Page 2 of 2

Re: 10039 - Railroads

Posted: Sat Jul 28, 2012 12:10 am
by brianfry713
My AC output for your input:

Code: Select all

Scenario 1
Departure 0622 C
Arrival   1419 G


Re: 10039 - Railroads

Posted: Sat Jul 28, 2012 4:33 am
by Neil
How could that be the answer? There's no train at C at time 0622. (0622 isn't in the input times at all)
My output is

Code: Select all

Scenario 1
Departure 0582 C
Arrival   1419 G

Re: 10039 - Railroads

Posted: Tue Jul 31, 2012 11:03 pm
by brianfry713
Your input isn't valid. In the judge's input, each train schedule will be for a single day and sorted in increasing time.

Re: 10039 - Railroads

Posted: Tue Aug 07, 2012 8:29 pm
by Neil
The problem statement says nothing of the sort, but you seem to know what you're doing so ok thanks.

Re: 10039 - Railroads

Posted: Tue Aug 07, 2012 11:07 pm
by brianfry713
Read it again, the problem statement mentions that each schedule is for a single day. It wouldn't make sense for it to not be sorted. I modified my AC code to produce a RE if any train schedule wasn't for a single day or not sorted in increasing time. I resubmitted and it still got AC.

Re: 10039 - Railroads

Posted: Fri Nov 13, 2015 10:24 pm
by zholnin
Spent 6 hours fixing bugs, the final bug was misreading following:

After each scenario print a blank line.

Lots of problems here on UVA ask to print blank line between testcases, so this is what my template did by default and I didn't even think about double checking that. On a good side after all optimizations and refactorizations I've got 0.036 running time.