QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 2048 MB 總分: 100

#14439. 問題募集、Round 2

统计

ICPC North America Qualifier (NAQ) の問題募集が終了し、いくつかの問題が提案されました。審査員は各問題の難易度を投票しました。今年の NAQ では、いくつかの問題が出題されます。NAQ は、可能な限り多くの異なる難易度の問題を出題したいと考えています。達成可能な異なる難易度の最大数を計算してください。

入力

入力の最初の行には、2つの整数 $n$ と $k$ ($1 \le k \le n \le 50$) が含まれます。NAQ は、提案された $n$ 問の問題のうち、ちょうど $k$ 問を使用します。

続く $n$ 行の各行には、1つの整数 $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.