TopCoder

User's AC Ratio

100.0% (1/1)

Submission's AC Ratio

50.0% (1/2)

Tags

Description

Input Format

Output Format

Sample Input 1

2
1 2

3
1 2
2 3

Sample Output 1

6

34

Hints

NTUJ cannot show multiple samples, so we merged them here

Problem Source

Migrated from old NTUJ.

Subtasks

No. Testdata Range Score

Testdata and Limits

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