QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 2048 MB 満点: 100

#8988. 不诚实的彩票

統計

你怀疑当地的彩票存在作弊行为!有些数字出现的频率太高了!

每周,彩票系统会从 1 到 50 的范围内随机抽取五个数字。因此,如果数字是真正随机选择的,每个数字出现的概率应该约为 10%。如果某个数字出现的频率远高于此,那就很可疑!

请通过列出所有出现频率过高的数字,来判断一组彩票开奖结果是否可疑。为了容忍随机误差,你需要标记出所有出现次数超过总次数 20% 的数字。

输入格式

输入的第一行包含一个整数 $n$ ($1 \le n \le 1,000$)。你需要分析 $10 \cdot n$ 组彩票开奖结果。

接下来的 $10 \cdot n$ 行,每行包含 5 个整数 $x$ ($1 \le x \le 50$)。每一行代表一次开奖。每行中的所有数值各不相同。

输出格式

在一行中输出所有在列表中出现次数严格大于 $2 \cdot n$ 次的数字。如果有多个这样的数字,请按从小到大的顺序输出,并用空格分隔。如果没有这样的数字,则输出 $-1$。

样例

样例输入 1

1
32 30 16 45 27
34 45 35 31 42
1 12 26 50 13
34 50 36 21 39
47 7 41 18 45
28 48 2 8 4
16 40 17 2 19
50 4 30 15 6
31 13 33 46 18
49 23 24 17 48

样例输出 1

45 50

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.