TopCoder

餘切
pooh is 8

User's AC Ratio

100.0% (4/4)

Submission's AC Ratio

26.3% (5/19)

Tags

Description

Input Format

Output Format

Sample Input 1

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

Sample Output 1

108

Sample Input 2

2
1 2

Sample Output 2

1

Hints

Problem Source

113 學年度全國資訊學科能力競賽
測資來源:TWPCA GitHub

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 0~16 m1000 7
3 1, 17~31 演化樹的所有內部節點 v 的 deg(v) 都等於 3m105 31
4 0~46 無額外限制 62

Testdata and Limits

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