Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2023 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2400 . 珍珠奶茶
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
guagua0407
豬大哥
User's AC Ratio
100.0% (
2/2
)
Submission's AC Ratio
100.0% (
2
/
2
)
Tags
Show solution-related tags
pre-nhspc-2023
全國模擬賽
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
3
6 3 2 0
0 0 1 0 1 1
6 3 2 1
0 0 1 0 1 1
6 2 2 8
0 0 1 0 0 1
Sample Output 1
copy
No
Yes
No
Hints
Problem Source
112 學年度全國資訊學科能力競賽模擬賽
Subtasks
No.
Testdata Range
Constraints
Score
1
0
範例測資
0
2
0~23
$\sum N \leq 500$
9
3
0, 24~38
$K \leq 200$
27
4
0, 39~61
$L \leq 20, Q \leq 20$
29
5
0~92
無額外限制
35
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
2000
524288
65536
1
2
3
4
5
1
2000
524288
65536
2
5
2
2000
524288
65536
2
5
3
2000
524288
65536
2
5
4
2000
524288
65536
2
5
5
2000
524288
65536
2
5
6
2000
524288
65536
2
5
7
2000
524288
65536
2
5
8
2000
524288
65536
2
5
9
2000
524288
65536
2
5
10
2000
524288
65536
2
5
11
2000
524288
65536
2
5
12
2000
524288
65536
2
5
13
2000
524288
65536
2
5
14
2000
524288
65536
2
5
15
2000
524288
65536
2
5
16
2000
524288
65536
2
5
17
2000
524288
65536
2
5
18
2000
524288
65536
2
5
19
2000
524288
65536
2
5
20
2000
524288
65536
2
5
21
2000
524288
65536
2
5
22
2000
524288
65536
2
5
23
2000
524288
65536
2
5
24
2000
524288
65536
3
5
25
2000
524288
65536
3
5
26
2000
524288
65536
3
5
27
2000
524288
65536
3
5
28
2000
524288
65536
3
5
29
2000
524288
65536
3
5
30
2000
524288
65536
3
5
31
2000
524288
65536
3
5
32
2000
524288
65536
3
5
33
2000
524288
65536
3
5
34
2000
524288
65536
3
5
35
2000
524288
65536
3
5
36
2000
524288
65536
3
5
37
2000
524288
65536
3
5
38
2000
524288
65536
3
5
39
2000
524288
65536
4
5
40
2000
524288
65536
4
5
41
2000
524288
65536
4
5
42
2000
524288
65536
4
5
43
2000
524288
65536
4
5
44
2000
524288
65536
4
5
45
2000
524288
65536
4
5
46
2000
524288
65536
4
5
47
2000
524288
65536
4
5
48
2000
524288
65536
4
5
49
2000
524288
65536
4
5
50
2000
524288
65536
4
5
51
2000
524288
65536
4
5
52
2000
524288
65536
4
5
53
2000
524288
65536
4
5
54
2000
524288
65536
4
5
55
2000
524288
65536
4
5
56
2000
524288
65536
4
5
57
2000
524288
65536
4
5
58
2000
524288
65536
4
5
59
2000
524288
65536
4
5
60
2000
524288
65536
4
5
61
2000
524288
65536
4
5
62
2000
524288
65536
5
63
2000
524288
65536
5
64
2000
524288
65536
5
65
2000
524288
65536
5
66
2000
524288
65536
5
67
2000
524288
65536
5
68
2000
524288
65536
5
69
2000
524288
65536
5
70
2000
524288
65536
5
71
2000
524288
65536
5
72
2000
524288
65536
5
73
2000
524288
65536
5
74
2000
524288
65536
5
75
2000
524288
65536
5
76
2000
524288
65536
5
77
2000
524288
65536
5
78
2000
524288
65536
5
79
2000
524288
65536
5
80
2000
524288
65536
5
81
2000
524288
65536
5
82
2000
524288
65536
5
83
2000
524288
65536
5
84
2000
524288
65536
5
85
2000
524288
65536
5
86
2000
524288
65536
5
87
2000
524288
65536
5
88
2000
524288
65536
5
89
2000
524288
65536
5
90
2000
524288
65536
5
91
2000
524288
65536
5
92
2000
524288
65536
5
Submit
Back to Top