Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2366 . A. 演化樹分析 (Agreement)
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
abcabcabc
快去寫 TIOJ 2311 > <
User's AC Ratio
100.0% (
1/1
)
Submission's AC Ratio
11.1% (
1
/
9
)
Tags
Show solution-related tags
全國賽
2023-全國賽
nhspc112
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
5 3 3 2
1 7
2 8
3 6
4 6
5 8
6 7
7 8
1 6
2 8
3 6
4 7
5 8
6 7
7 8
Sample Output 1
copy
1
4
Sample Input 2
copy
4 2 2 0
1 5
2 5
3 6
4 6
5 6
1 6
2 6
3 5
4 5
5 6
Sample Output 2
copy
0
Sample Input 3
copy
6 3 3 2
1 7
2 7
3 7
4 8
5 9
6 9
7 8
8 9
1 7
2 7
3 9
4 9
5 8
6 8
7 8
8 9
Sample Output 3
copy
2
9
Sample Input 4
copy
6 1 4 2
1 7
2 7
3 7
4 7
5 7
6 7
1 7
2 7
3 8
4 8
5 9
6 9
7 10
8 10
9 10
Sample Output 4
copy
-1
Hints
比賽快結束才可以提交的題目 QQ
Problem Source
112 學年度全國資訊學科能力競賽
測資來源:
TWPCA GitHub
Subtasks
No.
Testdata Range
Constraints
Score
1
0~3
範例測資
0
2
1, 4~9
$k = 0$
21
3
1, 4~17
$k \in {0, 1}$
13
4
0~3, 18~37
$n+m_1 \le 30$ 且 $n+m_2 \le 30$
23
5
0~54
無額外限制
43
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
5000
1048576
65536
1
4
5
1
5000
1048576
65536
1
2
3
4
5
2
5000
1048576
65536
1
4
5
3
5000
1048576
65536
1
4
5
4
5000
1048576
65536
2
3
5
5
5000
1048576
65536
2
3
5
6
5000
1048576
65536
2
3
5
7
5000
1048576
65536
2
3
5
8
5000
1048576
65536
2
3
5
9
5000
1048576
65536
2
3
5
10
5000
1048576
65536
3
5
11
5000
1048576
65536
3
5
12
5000
1048576
65536
3
5
13
5000
1048576
65536
3
5
14
5000
1048576
65536
3
5
15
5000
1048576
65536
3
5
16
5000
1048576
65536
3
5
17
5000
1048576
65536
3
5
18
5000
1048576
65536
4
5
19
5000
1048576
65536
4
5
20
5000
1048576
65536
4
5
21
5000
1048576
65536
4
5
22
5000
1048576
65536
4
5
23
5000
1048576
65536
4
5
24
5000
1048576
65536
4
5
25
5000
1048576
65536
4
5
26
5000
1048576
65536
4
5
27
5000
1048576
65536
4
5
28
5000
1048576
65536
4
5
29
5000
1048576
65536
4
5
30
5000
1048576
65536
4
5
31
5000
1048576
65536
4
5
32
5000
1048576
65536
4
5
33
5000
1048576
65536
4
5
34
5000
1048576
65536
4
5
35
5000
1048576
65536
4
5
36
5000
1048576
65536
4
5
37
5000
1048576
65536
4
5
38
5000
1048576
65536
5
39
5000
1048576
65536
5
40
5000
1048576
65536
5
41
5000
1048576
65536
5
42
5000
1048576
65536
5
43
5000
1048576
65536
5
44
5000
1048576
65536
5
45
5000
1048576
65536
5
46
5000
1048576
65536
5
47
5000
1048576
65536
5
48
5000
1048576
65536
5
49
5000
1048576
65536
5
50
5000
1048576
65536
5
51
5000
1048576
65536
5
52
5000
1048576
65536
5
53
5000
1048576
65536
5
54
5000
1048576
65536
5
Submit
Back to Top