Page 1 of 1

10389 - Subway

Posted: Fri Jan 29, 2016 11:40 pm
by pointless0
In case anyone has a concern about producing a rounded output for this problem...

For input

Code: Select all

3

0 0 0 10000
0 0 0 14999 0 20000 -1 -1

0 0 0 10000
0 0 0 15000 0 20000 -1 -1

0 0 0 10000
0 0 0 15001 0 20000 -1 -1
uDebug delivers the output

Code: Select all

52

52

53
My AC output

Code: Select all

52

53

53
My C++11 print statement would seem to be canonical in this regard...

Code: Select all

        std::cout << std::round(result[1]) << std::endl;
There must be no edge cases...