TopCoder

User's AC Ratio

100.0% (3/3)

Submission's AC Ratio

100.0% (3/3)

Tags

Description

Input Format

Output Format

Sample Input 1

5 1
1 2
2 3
3 4
4 5

Sample Output 1

1

Sample Input 2

5 3
1 2
2 3
3 4
4 5

Sample Output 2

2

Sample Input 3

7 1
1 2
1 3
2 4
2 5
3 6
3 7

Sample Output 3

3

Hints

Problem Source

111 學年度全國資訊學科能力競賽模擬賽

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 0~22 存在一個節點 $v$,使得以節點 $v$ 為根時,輸入是一棵二元樹 29
3 0~42 無額外限制 71

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 3000 524288 65536 1 2 3
1 3000 524288 65536 1 2 3
2 3000 524288 65536 1 2 3
3 3000 524288 65536 2 3
4 3000 524288 65536 2 3
5 3000 524288 65536 2 3
6 3000 524288 65536 2 3
7 3000 524288 65536 2 3
8 3000 524288 65536 2 3
9 3000 524288 65536 2 3
10 3000 524288 65536 2 3
11 3000 524288 65536 2 3
12 3000 524288 65536 2 3
13 3000 524288 65536 2 3
14 3000 524288 65536 2 3
15 3000 524288 65536 2 3
16 3000 524288 65536 2 3
17 3000 524288 65536 2 3
18 3000 524288 65536 2 3
19 3000 524288 65536 2 3
20 3000 524288 65536 2 3
21 3000 524288 65536 2 3
22 3000 524288 65536 2 3
23 3000 524288 65536 3
24 3000 524288 65536 3
25 3000 524288 65536 3
26 3000 524288 65536 3
27 3000 524288 65536 3
28 3000 524288 65536 3
29 3000 524288 65536 3
30 3000 524288 65536 3
31 3000 524288 65536 3
32 3000 524288 65536 3
33 3000 524288 65536 3
34 3000 524288 65536 3
35 3000 524288 65536 3
36 3000 524288 65536 3
37 3000 524288 65536 3
38 3000 524288 65536 3
39 3000 524288 65536 3
40 3000 524288 65536 3
41 3000 524288 65536 3
42 3000 524288 65536 3