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 6
3 1
1 2 1
2 3 1
3 2 1
2 1 1
1 3 4
3 1 4
3 6
5 1 
1 2 1
2 3 1
3 2 1
2 1 1
1 3 4
3 1 4
4 5 
3 1 
3 1 
1 2 5
2 3 5
3 4 5
4 2 5
3 1 5
2 1
2 1 1
0 0

Sample Output 1

7
8
36
-1

Hints

Problem Source

Migrated from old NTUJ.

Regionals 2011 Fukuoka

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 3000 65536 200