TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

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

Sample Output 1

5
14
1

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 65536 131072
1 1000 65536 131072
2 1000 65536 131072
3 1000 65536 131072
4 1000 65536 131072
5 1000 65536 131072
6 1000 65536 131072
7 1000 65536 131072
8 1000 65536 131072
9 1000 65536 131072
10 1000 65536 131072
11 1000 65536 131072
12 1000 65536 131072
13 1000 65536 131072
14 1000 65536 131072
15 1000 65536 131072
16 1000 65536 131072
17 1000 65536 131072
18 1000 65536 131072
19 1000 65536 131072
20 1000 65536 131072
21 1000 65536 131072
22 1000 65536 131072
23 1000 65536 131072
24 1000 65536 131072
25 1000 65536 131072