TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

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

Sample Output 1

2
1
3
2
4

Hints

Problem Source

NCPC 2026 Final Problem I

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 1048576 1048576
1 1000 1048576 1048576
2 1000 1048576 1048576
3 1000 1048576 1048576
4 1000 1048576 1048576
5 1000 1048576 1048576
6 1000 1048576 1048576
7 1000 1048576 1048576
8 1000 1048576 1048576
9 1000 1048576 1048576
10 1000 1048576 1048576
11 1000 1048576 1048576
12 1000 1048576 1048576
13 1000 1048576 1048576
14 1000 1048576 1048576
15 1000 1048576 1048576