Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2022 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2023 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2412 . 好多個三口羊
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
User's AC Ratio
NaN% (
0/0
)
Submission's AC Ratio
NaN% (
0
/
0
)
Tags
Show solution-related tags
pre-nhspc-2022
全國模擬賽
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
4 4
0 3
0 1
3 0
3 3
Sample Output 1
copy
1
2
5
7
Sample Input 2
copy
5 7
0 0
1 0
1 5
1 6
3 2
Sample Output 2
copy
1
2
3
4
8
Hints
Problem Source
111 學年度全國資訊學科能力競賽模擬賽
Subtasks
No.
Testdata Range
Constraints
Score
1
0~1
範例測資
0
2
0~11
$n, C \le 30$
7
3
0~28
$n \le 5 \times 10^ 4, C \le 1000$
10
4
0~11, 29~41
$n \le 1000$
14
5
0~52
$n \le 5 \times 10^ 4$
31
6
0~66
無額外限制
38
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
7000
1048576
65536
1
2
3
4
5
6
1
7000
1048576
65536
1
2
3
4
5
6
2
7000
1048576
65536
2
3
4
5
6
3
7000
1048576
65536
2
3
4
5
6
4
7000
1048576
65536
2
3
4
5
6
5
7000
1048576
65536
2
3
4
5
6
6
7000
1048576
65536
2
3
4
5
6
7
7000
1048576
65536
2
3
4
5
6
8
7000
1048576
65536
2
3
4
5
6
9
7000
1048576
65536
2
3
4
5
6
10
7000
1048576
65536
2
3
4
5
6
11
7000
1048576
65536
2
3
4
5
6
12
7000
1048576
65536
3
5
6
13
7000
1048576
65536
3
5
6
14
7000
1048576
65536
3
5
6
15
7000
1048576
65536
3
5
6
16
7000
1048576
65536
3
5
6
17
7000
1048576
65536
3
5
6
18
7000
1048576
65536
3
5
6
19
7000
1048576
65536
3
5
6
20
7000
1048576
65536
3
5
6
21
7000
1048576
65536
3
5
6
22
7000
1048576
65536
3
5
6
23
7000
1048576
65536
3
5
6
24
7000
1048576
65536
3
5
6
25
7000
1048576
65536
3
5
6
26
7000
1048576
65536
3
5
6
27
7000
1048576
65536
3
5
6
28
7000
1048576
65536
3
5
6
29
7000
1048576
65536
4
5
6
30
7000
1048576
65536
4
5
6
31
7000
1048576
65536
4
5
6
32
7000
1048576
65536
4
5
6
33
7000
1048576
65536
4
5
6
34
7000
1048576
65536
4
5
6
35
7000
1048576
65536
4
5
6
36
7000
1048576
65536
4
5
6
37
7000
1048576
65536
4
5
6
38
7000
1048576
65536
4
5
6
39
7000
1048576
65536
4
5
6
40
7000
1048576
65536
4
5
6
41
7000
1048576
65536
4
5
6
42
7000
1048576
65536
5
6
43
7000
1048576
65536
5
6
44
7000
1048576
65536
5
6
45
7000
1048576
65536
5
6
46
7000
1048576
65536
5
6
47
7000
1048576
65536
5
6
48
7000
1048576
65536
5
6
49
7000
1048576
65536
5
6
50
7000
1048576
65536
5
6
51
7000
1048576
65536
5
6
52
7000
1048576
65536
5
6
53
7000
1048576
65536
6
54
7000
1048576
65536
6
55
7000
1048576
65536
6
56
7000
1048576
65536
6
57
7000
1048576
65536
6
58
7000
1048576
65536
6
59
7000
1048576
65536
6
60
7000
1048576
65536
6
61
7000
1048576
65536
6
62
7000
1048576
65536
6
63
7000
1048576
65536
6
64
7000
1048576
65536
6
65
7000
1048576
65536
6
66
7000
1048576
65536
6
Submit
Back to Top