10758 - Journey

All about problems in Volume 107. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

10758 - Journey

Post by Cho »

I believe I'm in the right track, but got several WAs. Is there any tricky trap?
I've generated some test cases. Would someone please give me the corrected output? The output from my WA code is also included.

Windows version: 10758.zip (3.23MB)

There are 7000 test cases in the input file, it's over 12MB after unzipped.

[Edit:] The output is now generated from AC code. It may help if someone also got WA.
Last edited by Cho on Tue Jul 05, 2005 5:57 am, edited 1 time in total.
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey »

I also have WA on this one, so I was very interested in your I/O.
My answers were very different from yours, and that is because you treat all roads as two-way roads. But according to the problem statement, all roads are one-way! This means of course that you can't get AC.

[Edit] 10 minutes later: I re-read my original code and found a stupid bug in it. Got AC now and can confirm that all roads are one-way roads, so your ourput is completely wrong. But your method looks much like mine, so you should have not too much problems getting accepted.
Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

Post by Cho »

What a stupid mistake... :oops:
You are right. Thanks a lot, joey.
Post Reply

Return to “Volume 107 (10700-10799)”