TopCoder

User's AC Ratio

100.0% (3/3)

Submission's AC Ratio

100.0% (5/5)

Tags

Description

Input Format

Output Format

Sample Input 1

2
0 1
1 0

3
0 1 1
1 0 1
1 1 0

4
0 1 1 1
1 0 2 2
1 2 0 3
1 2 3 0

Sample Output 1

0

6

56

Hints

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 262144 131072
1 5000 262144 131072
2 5000 262144 131072
3 5000 262144 131072
4 5000 262144 131072
5 5000 262144 131072
6 5000 262144 131072
7 5000 262144 131072
8 5000 262144 131072
9 5000 262144 131072
10 5000 262144 131072
11 5000 262144 131072
12 5000 262144 131072
13 5000 262144 131072
14 5000 262144 131072
15 5000 262144 131072
16 5000 262144 131072
17 5000 262144 131072
18 5000 262144 131072
19 5000 262144 131072
20 5000 262144 131072