TopCoder

Caido
主唱太拼命了

User's AC Ratio

100.0% (16/16)

Submission's AC Ratio

50.0% (22/44)

Tags

Description

Input Format

Output Format

Sample Input 1

6 3
1 2 3 2 3 1

Sample Output 1

5 2 0

Sample Input 2

6 3
1 1 3 2 2 1

Sample Output 2

3 2 0

Sample Input 3

9 9
8 6 4 1 9 7 5 3 2

Sample Output 3

8 7 6 5 4 3 2 1 0

Sample Input 4

20 7
4 5 2 7 2 7 1 3 1 3 4 2 4 1 5 1 2 5 4 1

Sample Output 4

19 12 10 5 3 0 0

Hints

Problem Source

YTP 2024 高中組程式挑戰營 p6

Subtasks

No. Testdata Range Constraints Score
1 0~3 範例測資 0
2 0~26 $N \leq 2000$ 5
3 0~61 無額外限制 10

Testdata and Limits

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