QOJ.ac

QOJ

时间限制: 1 s 内存限制: 2048 MB 总分: 100

#14446. 十人宾果游戏

统计

Bingo 是一种多人参与的概率游戏。每位玩家会收到一张写有若干数字的卡片,随后由主持人按随机顺序叫出这些数字。玩家将听到的数字划掉,最先划掉卡片上所有数字的玩家获胜。这个基础版本的游戏以“沉闷”著称,除了不睡着之外,玩家不需要进行任何特殊操作。

在本题中,我们将分析一种需要恰好十名玩家参与的特定 Bingo 版本。在这个被称为“十人 Bingo”的版本中,每位玩家的编号为 1 到 10。每位玩家还会收到一张卡片,上面包含 1 到 100 之间所有与该玩家编号的个位数相同的整数。主持人也拿到了一张包含 1 到 100 每个整数恰好一次的列表,但这些整数的顺序已被打乱。主持人将按照列表上的顺序依次读出这些整数。当某位玩家听到了其卡片上的所有数字时,他们会大喊“BINGO”并离开游戏。游戏持续进行,直到所有人都喊出“BINGO”。

最后一位喊出“BINGO”的玩家是谁?

输入格式

输入的第一行也是唯一一行包含 100 个整数,每个整数的范围在 1 到 100 之间。保证每个整数恰好出现一次。

输出格式

输出一个整数,即最后喊出“BINGO”的玩家编号。

样例

样例输入 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 为了显示方便被分成了十行。实际数据将全部位于同一行。

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.