TopCoder

User's AC Ratio

100.0% (1/1)

Submission's AC Ratio

100.0% (2/2)

Tags

Description

Input Format

Output Format

Sample Input 1

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

Sample Output 1

2
3
5

Hints

Problem Source

Migrated from old NTUJ.

eddy

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 262144 131072