You got the input wrong.
when you have two numbers in a row, it DOESN'T mean that the outbound must be 
from left to right and the return flight from right to left. You can fly right 
to left as outbound flight, and the return will be from left to right.

Notice the way the input was described in the question:

"M lines then follow, each containing two integers i and j (1 ≤ i < j ≤ N) 
indicating that a bidirectional flight exists between the i-th city and the 
j-th city"

so, the first number will always be the smaller one. It doesn't mean the 
smaller one must be the source, as both bidirectional flights are possible.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/60824374-c628-4ab0-9402-1f123a7fb451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to