QOJ.ac

QOJ

Límite de tiempo: 0.5 s Límite de memoria: 8 MB Puntuación total: 100

#15579. 奥运游行

Estadísticas

SEERC 组委会决定以一种独特的方式举行今年的开幕式——在城市街道上组织一场参赛者游行。今年将有 $N$ 个人(参赛选手、教练和嘉宾)代表来自参赛国的各所大学走上街头,试图用新颖的服装和响亮的歌声给观众留下深刻印象。每所大学由一组人代表,并且有一个唯一的标识符(ID),该组中的每个人都持有这个 ID。为了使游行井然有序且具有观赏性,每个小组都应该排成若干行,每行由 $K$ 个人组成。

只有一所大学无法按照上述规则排队,你需要找出它的 ID。

输入格式

输入的第一行包含两个整数 $N$ 和 $K$,它们之间用一个空格分隔($1 \le N \le 1\,000\,000$,$2 \le K \le 10^9$)。

接下来的 $N$ 行,每行包含一个整数,依次为 $N$ 个人的 ID:$C_1, C_2, \dots, C_N$($0 \le C_i \le 1\,000\,000\,000$,$1 \le i \le N$)。

输出格式

输出仅包含一行,一个整数——即该问题的答案。

样例

输入样例 1

10 3
1
1
2
3
1
3
3
2
2
2

输出样例 1

2

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.