TopCoder

欸我好笨ㄛ
Why am I so weak mie pu

User's AC Ratio

72.1% (31/43)

Submission's AC Ratio

24.2% (53/219)

Tags

Description

Input Format

Output Format

Sample Input 1

5 5 1
3 8 5 9 4

Sample Output 1

4

Sample Input 2

14 6 2
6 9 6 4 5 5 3 6 4 8 8 7 6 1

Sample Output 2

2

Hints

Problem Source

110 學年度全國資訊學科能力競賽
測資來源:TWPCA GitHub

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資。 0
2 2~21 $k = n, n \le 10, p = 1$ 15
3 22~41 $k = n, n \le 10 ^ 5, p = 1$ 25
4 42~52 $p = 1$ 17
5 53~72 無額外限制。 43

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 2000 1048576 65536 1
1 2000 1048576 65536 1
2 2000 1048576 65536 2
3 2000 1048576 65536 2
4 2000 1048576 65536 2
5 2000 1048576 65536 2
6 2000 1048576 65536 2
7 2000 1048576 65536 2
8 2000 1048576 65536 2
9 2000 1048576 65536 2
10 2000 1048576 65536 2
11 2000 1048576 65536 2
12 2000 1048576 65536 2
13 2000 1048576 65536 2
14 2000 1048576 65536 2
15 2000 1048576 65536 2
16 2000 1048576 65536 2
17 2000 1048576 65536 2
18 2000 1048576 65536 2
19 2000 1048576 65536 2
20 2000 1048576 65536 2
21 2000 1048576 65536 2
22 2000 1048576 65536 3
23 2000 1048576 65536 3
24 2000 1048576 65536 3
25 2000 1048576 65536 3
26 2000 1048576 65536 3
27 2000 1048576 65536 3
28 2000 1048576 65536 3
29 2000 1048576 65536 3
30 2000 1048576 65536 3
31 2000 1048576 65536 3
32 2000 1048576 65536 3
33 2000 1048576 65536 3
34 2000 1048576 65536 3
35 2000 1048576 65536 3
36 2000 1048576 65536 3
37 2000 1048576 65536 3
38 2000 1048576 65536 3
39 2000 1048576 65536 3
40 2000 1048576 65536 3
41 2000 1048576 65536 3
42 2000 1048576 65536 4
43 2000 1048576 65536 4
44 2000 1048576 65536 4
45 2000 1048576 65536 4
46 2000 1048576 65536 4
47 2000 1048576 65536 4
48 2000 1048576 65536 4
49 2000 1048576 65536 4
50 2000 1048576 65536 4
51 2000 1048576 65536 4
52 2000 1048576 65536 4
53 2000 1048576 65536 5
54 2000 1048576 65536 5
55 2000 1048576 65536 5
56 2000 1048576 65536 5
57 2000 1048576 65536 5
58 2000 1048576 65536 5
59 2000 1048576 65536 5
60 2000 1048576 65536 5
61 2000 1048576 65536 5
62 2000 1048576 65536 5
63 2000 1048576 65536 5
64 2000 1048576 65536 5
65 2000 1048576 65536 5
66 2000 1048576 65536 5
67 2000 1048576 65536 5
68 2000 1048576 65536 5
69 2000 1048576 65536 5
70 2000 1048576 65536 5
71 2000 1048576 65536 5
72 2000 1048576 65536 5