railway

For all subtasks, 1 ≤ N ≤ 100 000, 1 ≤ Q ≤ 100 000.

Subtask 1 (27%): Each city is connected by at most 2 trains.

Subtask 2 (22%): 1 ≤ N ≤ 10 000, 1 ≤ Q ≤ 10 000.

Subtask 3 (51%): No further constraints.

Subtask 4 (0%): Sample Testcases.



Submitting .cpp to 'railway'


You're not logged in! Click here to login


Compile Errors


							
Time Limit: 1 Seconds
Memory Limit: 128MB
No. of ACs: 41
Your best score: 0
Source: CPSPC 2004

Subtask Score
1 27
2 22
3 51
4 0