QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 2048 MB Points totaux : 100

#14439. 题目征集,第二轮

Statistiques

ICPC 北美资格赛(NAQ)的题目征集工作已经结束,共收到了若干道题目。评委们对每道题的难度进行了投票。今年的 NAQ 将会包含一定数量的题目。NAQ 希望所选题目尽可能涵盖更多的不同难度。请计算出能够达到的最大不同难度数量。

输入格式

输入的第一行包含两个整数 $n$ 和 $k$ ($1 \le k \le n \le 50$)。NAQ 将从 $n$ 道候选题目中恰好选出 $k$ 道题目。

接下来的 $n$ 行,每行包含一个整数 $d$ ($1 \le d \le 50$),表示 $n$ 道候选题目的难度。

输出格式

输出一个整数,表示 NAQ 可以选出的题目中,所包含的最大不同难度数量。

样例

输入 1

20 19
43
4
19
27
34
7
12
34
44
36
38
38
39
34
30
35
44
47
39
5

输出 1

15

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.