TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Input Format

Output Format

Sample Input 1

2 
4 7 4 
0 4 
2 4 
2 2 
-2 2 
4 7 2 
0 4 
2 4 
2 2 
-2 2

Sample Output 1

Case 1: 
Carl finished the path at time 13 
The ants finished in the following order: 
0 2 1 3 4 5 6 
The last ant finished the path at time 29 

Case 2: 
Carl finished the path at time 13 
The ants finished in the following order: 
0 4 1 5 2 6 3 
The last ant finished the path at time 19  

Hints

Problem Source

Migrated from old NTUJ.

2004 ACM ICPC World Final

Subtasks

No. Testdata Range Score

Testdata and Limits

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