This problem is in multiple input format, so of course the waterloo solution gets WA because it expects other input format.
If you don't know multiple input format, read here: http://online-judge.uva.es/problemset/minput.html
Each problem with a blue checkmark or with a green checkmark is in multiple input format.
Think again - it's not good to use flating numbers ... exists simple solution which operates only on integers
Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
My solution is mainly the same (counting distance) ... but I in different way compute time ...
Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
I am a little confused about the problem. I thought this is like the 'Chinese postman problem'. But from the previous posts, i think i misunderstood. Can anyone please tell me, should we traverse each road twice, or at least once (like the postmans problem)?