TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Note: Unlike the pdf file, the input file has many test cases and ends with EOF.

Output Format

Sample Input 1

6 6
1 2 10
2 3 10
3 4 5
4 5 10
5 6 20
2 5 10

Sample Output 1

40
3 1 2 5 6
4 1 2 3 4 5

Hints

Problem Source

Migrated from old NTUJ.

ACM ICPC 2011–2012, NEERC, Northern Subregional Contest

Subtasks

No. Testdata Range Score

Testdata and Limits

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