Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
NTUCPC Speed Run! #1
比賽已結束,感謝大家的參與!
題目連結
IOICamp 2025 PreExam 進行中!
IOICamp 官網
、
PreExam 連結
程式解題社網站
程式解題社網站
上線了!
447 . 蛋餅愛拉麵
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Caido
主唱太拼命了
User's AC Ratio
100.0% (
16/16
)
Submission's AC Ratio
50.0% (
22
/
44
)
Tags
Show solution-related tags
ytp
ytp-senior
ytp-2024
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
6 3
1 2 3 2 3 1
Sample Output 1
copy
5 2 0
Sample Input 2
copy
6 3
1 1 3 2 2 1
Sample Output 2
copy
3 2 0
Sample Input 3
copy
9 9
8 6 4 1 9 7 5 3 2
Sample Output 3
copy
8 7 6 5 4 3 2 1 0
Sample Input 4
copy
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
copy
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
Submit
Back to Top