JOI 2011-2012 予選第二問も解いた

Shakespeare で。

第一問は 5 個の整数が入力だったので微妙だと思って、N 個の入力が必要になるような問題を解いた。問題は こんなやつ

第一問に比べて詰めて書いたはずなのに長さが3倍ぐらいになってしまった。

solve joi 2011-2012 yo-t2.

Achilles, the number of teams.
Banquo, counts the number.
Claudio, first team.
Dionyza, second team.
Emilia, score of first team.
Fenton, score of second team.
Gertrude, stores points.
Hecate, stores points reversed.
Isabella, the number of matches.
John of Gaunt, points the first team will earn.
John of Lancaster, points the second team will earn.
Lady Macbeth, modified point.
Malcolm, counts the number.
Octavia, with the last result.
Pantino, remembers the point.
Shallow, have the rank.
The Abbot of Westminster, copy.
Romeo, talks with others.
Juliet, a Romeo's lover.
Desdemona, feeds lines to others.
Helen, returns with a carriage.

                         Act I: First Process.

                     Scene I: The Introductions.

[Enter Romeo and Desdemona]
Romeo:
        Thou art as fine as the sum of a pretty flower and a lovely
        smooth rich plum.
[Exit Desdemona]
[Enter Helen]
Romeo:
        Thou art as fine as the sum of Desdemona and the sum of a red
        rose and a flower.
[Exit Helen]
[Enter Achilles]
Romeo:
        Listen to your heart.
[Exit Achilles]
[Enter Isabella]
Romeo:
        Thou art as gentle as the quotient between the product of
        Achilles and the difference between Achilles and a father and
        a amazing brother.
[Exit Isabella]
[Enter Banquo]
Romeo:
        Thou art as embroidered as Achilles.

                    Scene II: The Initializations.

[Exeunt]
[Enter Juliet and Gertrude]
Gertrude:
        Thou art nothing!
        
Juliet:
        Remember me.
[Exit Gertrude]
[Enter Banquo]
Juliet:
        Thou art as honest as the difference between thyself and a
        moon. Are thou worse than a lamp?

Banquo:
        If not, let us return to scene II.

                 Scene III: The Termination of Act I.

[Exeunt]
[Enter Romeo and Banquo]
Romeo:
        Thou art as mighty as Isabella.

                       Act II: Process Matches.
        
                 Scene I: Input a Match and Process.

[Exeunt]
[Enter Romeo and Malcolm]
Romeo:
        Thou art as reddest as Achilles.
[Exit Malcolm]
[Enter Claudio]
Romeo:
        Listen to your heart.
[Exit Claudio]
[Enter Emilia]
Romeo:
        Listen to your heart.
[Exit Emilia]
[Enter Dionyza]
Romeo:
        Listen to your heart.
[Exit Dionyza]
[Enter Fenton]
Romeo:
        Listen to your heart.
[Exit Romeo]
[Enter Dionyza]
Dionyza:
        Am I better than you?

Fenton:
        If so, let us proceed to scene II.
        Am I better than you?

Dionyza:
        If so, let us proceed to scene III.
[Exeunt]
[Enter John of Gaunt and John of Lancaster]
John of Gaunt:
        Thou art as noble as a sky!

John of Lancaster:
        Thou art as peaceful as the town!
        We must proceed to scene IV.

                   Scene II: Dionyza beats Fenton.

[Exeunt]
[Enter John of Gaunt and John of Lancaster]
John of Gaunt:
        Thou art as good as zero.

John of Lancaster:
        Thou art as honest as the sum of a mistletoe and a proud town.
        We must proceed to scene IV.

                   Scene III: Fenton beats Dionyza.

[Exeunt]
[Enter John of Gaunt and John of Lancaster]
John of Gaunt:
        Thou art as trustworthy as the sum of a warm summer's day and
        a stone wall.

John of Lancaster:
        Thou art nothing.

                       Scene IV: Update Points.

[Exeunt]
[Enter Gertrude and Lady Macbeth]
Lady Macbeth:
        Recall your imminent death!
        
Gertrude:
        Thou art as disgusting as me.
[Exit Gertrude]
[Enter Malcolm]
Lady Macbeth:
        Are you as pretty as Claudio?

Malcolm:
        If so, let us proceed to scene V.

Lady Macbeth:
        Are you as smooth as Emilia?

Malcolm:
        If so, let us proceed to scene VI.
        We must proceed to scene VII.

                     Scene V: Claudio Get Points.

[Exeunt]
[Enter Lady Macbeth and John of Gaunt]
John of Gaunt:
        Thou art as healthy as the sum of thyself and me. We must
        proceed to scene VII.

                     Scene VI: Emilia Get Points.

[Exeunt]
[Enter Lady Macbeth and John of Lancaster]
John of Lancaster:
        Thou art as lovely as the sum of thyself and me.

                Scene VII: Hecate Get Modified Points.

[Exeunt]
[Enter Lady Macbeth and Hecate]
Lady Macbeth:
        Remember me.
[Exit Lady Macbeth]
[Enter Malcolm]
Hecate:
        Thou art as cursed as the difference between thyself and a
        thing. Are thou worse than a wind?

Malcolm:
        If not, let us return to scene IV.

Hecate:
        Thou art as noble as Achilles.

                     Scene VIII: Reverse Hecate.

[Exeunt]
[Enter Hecate and Lady Macbeth]
Lady Macbeth:
        Recall what you said.
        
Hecate:
        Thou art as mighty as me!
[Exit Hecate]
[Enter Gertrude]
Lady Macbeth:
        Remember me.
[Exit Lady Macbeth]
[Enter Malcolm]
Gertrude:
        Thou art as handsome as the difference between thyself and an
        uncle. Are thou worse than a son?

Malcolm:
        If not, let us return to scene VIII.
[Exit Gertrude]
[Enter Banquo]
Malcolm:
        Thou art as foul as the difference between thyself and a
        niece. Are thou worse than a sister?

Banquo:
        If not, let us return to scene I.

                      Act III: Calculate Ranks.

                          Scene I: Prepares.
        
[Exeunt]
[Enter Romeo and Banquo]
Romeo:
        Thou art as loving as Achilles.

                      Scene II: Push Points to Hecate.

[Exeunt]
[Enter Gertrude and Hecate]
Hecate:
        Recall the point!

Gertrude:
        Remember me.
[Exit Hecate]
[Enter Banquo]
Gertrude:
        Thou art as mighty as the difference between thyself and a
        nose. Are thou worse than a nephew?

Banquo:
        If not, let us return to scene II.

Gertrude:
        Thou art as loving as Achilles.

                     Scene III: Copy The Points.

[Exeunt]
[Enter Gertrude and Hecate]
Gertrude:
        Recall what I said!

Hecate:
        Remember me.
[Exit Gertrude]
[Enter The Abbot of Westminster]
Hecate:
        Remember me.
[Exit Hecate]
[Enter Banquo]
The Abbot of Westminster:
        Thou art as amazing as the difference between thyself and a
        mother. Are thou worse than a niece?

Banquo:
        If not, let us return to scene III.

The Abbot of Westminster:
        Thou art as blossoming as Achilles.

                    Scene IV: Actual Computation.

[Exeunt]
[Enter Gertrude and Shallow]
Gertrude:
        Thou art as rich as a squirrel.

Shallow:
        Recall the point you have.
[Exit Shallow]
[Enter Pantino]
Gertrude:
        Thou art as proud as me.
[Exit Pantino]
[Enter Malcolm]
Gertrude:
        Thou art as reddest as Achilles.

                       Scene V: Calculation.

[Exeunt]
[Enter Shallow and The Abbot of Westminster]
Shallow:
        Recall the point I will fight.

The Abbot of Westminster:
        Am I better than Pantino?

Shallow:
        If not, let us proceed to Scene VI.

The Abbot of Westminster:
        Thou art as embroidered as the sum of thyself and a purse.

                         Scene VI: Next Team.

[Exeunt]
[Enter The Abbot of Westminster and Hecate]
The Abbot of Westminster:
        Remember me.
[Exit Hecate]
[Enter Malcolm]
The Abbot of Westminster:
        Thou art as clearest as the difference between thyself and a
        lantern. Are thou worse than a horse?

Malcolm:
        If not, let us return to scene V.

The Abbot of Westminster:
        Thou art as bold as Achilles.

                           Scene VII: Restore.

[Exeunt]
[Enter Hecate and The Abbot of Westminster]
The Abbot of Westminster:
        Recall what I gave you.

Hecate:
        Remember me.
[Exit The Abbot of Westminster]
[Enter Malcolm]
Hecate:
        Thou art as cunning as the difference between thyself and a
        hamster. Are thou worse than a moon?

Malcolm:
        If not, let us return to scene VII.

                     Scene VIII: Store The Rank.

[Exeunt]
[Enter Shallow and Octavia]
Shallow:
        Remember me.
[Exit Shallow]
[Enter Banquo]
Octavia:
        Thou art as cute as the difference between thyself and a
        morning. Are thou worse than a hair?

Banquo:
        If not, let us return to scene IV.

                      Act IV: Output The Result.

                     Scene I: Prepare for Output.

[Exeunt]
[Enter Octavia and Banquo]
Octavia:
        Thou art as fair as Achilles.

                       Scene II: Actual Output.

[Exeunt]
[Enter Octavia and Romeo]
Romeo:
        Recall the rank! Open your heart!
[Exit Octavia]
[Enter Helen]
Romeo:
        Speak your mind!
[Exit Helen]
[Enter Desdemona]
Romeo:
        Speak your mind!
[Exit Desdemona]
[Enter Banquo]
Romeo:
        Thou art as fine as the difference between thyself and a
        fellow. Are thou worse than a door?

Banquo:
        If not, let us return to scene II.

JOI 2011-2012 予選第一問を解いた

Shakespeare で。

solve JOI 2011-2012 yo-t1.

Paris, just counts the number.
Benvolio, reads first three lines.
Romeo, with the most inexpensive pasta.
Capulet, reads last two lines.
Juliet, with the most inexpensive juice.
Montague, stores total price of the set.
Desdemona, feeds lines to others.
Helen, returns with a carriage.

                      Act I: A menu is presented.

                      Scene I: The introductions.
[Enter Romeo and Desdemona]

Romeo:
        Thou art as fine as the sum of a pretty flower and a lovely
        smooth rich plum.

[Exit Desdemona]
[Enter Helen]

Romeo:
        Thou art as fine as the sum of Desdemona and the sum of a red
        rose and a flower.

[Exit Helen]
[Enter Juliet]

Juliet:
        Thou art as fine as the cube of a lovely beautiful charming
        rich summer's day.

Romeo:
        Thou art as charming as the cube of a lovely pretty smooth
        white flower.

[Exit Juliet]
[Enter Paris]

Romeo:
        Thou art as good as the sum of a lovely rose and a flower.

                     Scene II: The three pastas.

[Exeunt]
[Enter Romeo and Benvolio]

Romeo:
        Listen to your heart.

Benvolio:
        Am I worse than you?
        If so, you are as fine as I.
        

[Exit Benvolio]
[Enter Paris]

Romeo:
        Thou art as good as the difference between thyself and a
        brother. Are you worse than a cat?

Paris:
        If not, let us return to scene II.

                 Scene III: Preparing for the juice.

[Exeunt]
[Enter Juliet and Paris]

Juliet:
        Thou art as fine as a white flower.

                         Scene IV: The juice.

[Exeunt]
[Enter Juliet and Capulet]

Juliet:
        Listen to your heart.

Capulet:
        Am I worse than you?
        If so, you are as charming as I.

[Exit Capulet]
[Enter Paris]

Juliet:
        Thou art as fine as the difference between thyself and a
        rose. Are you worse than a tree?

Paris:
        If not, let us return to scene IV.
        
                        Act II: Order the set.

                   Scene I: Calculating the price.

[Exeunt]
[Enter Romeo and Paris]

Romeo:
        Thou art as good as a little tiny furry white animal.
        Thou art as fine as the sum of thyself and a delicious
        flower. Thou art as fine as the sum of a lovely smooth
        rich furry red plum and thyself.

[Exit Paris]
[Enter Montague]

Romeo:
        Thou art as good as I.

[Exit Romeo]
[Enter Juliet]

Juliet:
        Thou art as fine as the sum of I and thyself.

[Exeunt]

                      Scene II: Print the price.

[Enter Paris and Montague]

Paris:
        Thou art as foul as the difference between thyself and I.
        Open your heart!

[Exit Montague]
[Enter Helen]

Paris:
        Speak your mind!

[Exit Helen]
[Enter Desdemona]

Paris:
        Speak your mind!

[Exeunt]

8月まとめ

前(~20日)

ろ~ど~

中(21日)

二の腕をできるかぎりぷるぷるさせるのがコツ

f:id:JAPLJ:20120831024049p:plain

手の形は両隣の人の頭を撫でるイメージで

f:id:JAPLJ:20120831024114p:plain

二人で。思いの限り頭を上下に動かそう

f:id:JAPLJ:20120831024133p:plain

後(~31日)

情報オリンピックの夏季セミナーでちゅーたーをやったよ

選手時代に夏季セミナーに参加したことはないよ

遺伝的プログラミングの本を担当していたよ