QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 2048 MB مجموع النقاط: 100

#14446. 10人ビンゴ

الإحصائيات

ビンゴは多人数で遊ぶ運任せのゲームである。各プレイヤーはいくつかの数字が書かれたシートを受け取り、ゲームマスターがランダムな順序で数字を読み上げる。プレイヤーは読み上げられた数字を自分のシートから消していき、すべての数字を消し終えた最初のプレイヤーが勝者となる。この基本的なゲームは、退屈で眠気を誘うものとして知られている。プレイヤーは眠らないようにすること以外、特に何もする必要がないからである。

本問題では、ちょうど10人のプレイヤーで行う特定のバージョンのビンゴを分析する。「10人ビンゴ(Ten Player Bingo)」と呼ばれるこのバージョンでは、各プレイヤーに1から10までの番号が割り振られる。各プレイヤーは、自分の番号の1の位と同じ1の位を持つ1から100までの整数が書かれたシートを受け取る。ゲームマスターもまた、1から100までのすべての整数がちょうど一度ずつ書かれたシートを持っているが、その数字はシャッフルされている。ゲームマスターはシートに書かれた順序で整数を読み上げる。プレイヤーは自分のシートにあるすべての数字を聞き終えると「BINGO」と叫び、ゲームから抜ける。ゲームは全員が「BINGO」と叫ぶまで続く。

最後に「BINGO」と叫ぶプレイヤーは誰か。

入力

入力の唯一の行には、1から100までの範囲の100個の整数が含まれる。各整数はちょうど一度ずつ現れることが保証されている。

出力

最後に「BINGO」と叫ぶプレイヤーの番号を1つの整数で出力せよ。

入出力例

入力 1

12 91 49 4 52 95 45 51 50 40 11 5 88 87 39 38 42 89 76 85 30 69 35 81 23 67 32 3 62 8 79 58 1 75 37 27 24 46 18 16 97 61 41 59 13 74 78 54 98 66 14 33 86 55 83 93 63 72 6 19 92 17 56 64 100 53 28 71 7 96 36 57 84 43 73 60 15 77 80 31 20 99 21 90 70 22 26 10 25 2 94 9 82 34 65 68 48 29 44 47

出力 1

7

注記

サンプル入力1は表示の都合上10行に分割されているが、実際のデータはすべて1行で与えられる。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.