Page 1 of 1

1092 - Tracking Bio-bots

Posted: Thu Aug 28, 2014 12:59 am
by brianfry713
Use this thread to discuss this problem.

Re: 1092 - Tracking Bio-bots

Posted: Mon Feb 22, 2016 5:17 am
by red_apricot
For input (picture attached)

Code: Select all

30 30 13
18 10 22 10
22 10 27 10
9 3 16 3
3 26 19 26
9 17 22 17
27 10 27 10
11 25 18 25
22 5 27 5
26 10 27 10
25 9 27 9
9 2 11 2
6 27 7 27
26 17 27 17
0 0 0
the correct output should be "15", but udebug outputs "11".
Assuming udebug features accepted solutions, someone cares to explain how this is "11"?

Re: 1092 - Tracking Bio-bots

Posted: Thu Dec 22, 2016 3:37 am
by Diusrex
red_apricot wrote:For input (picture attached)

Code: Select all

30 30 13
18 10 22 10
22 10 27 10
9 3 16 3
3 26 19 26
9 17 22 17
27 10 27 10
11 25 18 25
22 5 27 5
26 10 27 10
25 9 27 9
9 2 11 2
6 27 7 27
26 17 27 17
0 0 0
the correct output should be "15", but udebug outputs "11".
Assuming udebug features accepted solutions, someone cares to explain how this is "11"?
The problem is this input is invalid. You have multiple walls, like

Code: Select all

26 10 27 10
27 10 27 10
which intersect, which is guaranteed to never occur. So the udebug solution doesn't handle this case correctly.

After altering the input:

Code: Select all

30 30 13
6 27 7 27
22 5 24 5
25 9 27 9
3 26 19 26
11 25 18 25
9 17 22 17
26 17 27 17
18 10 21 10
22 10 25 10
26 10 26 10
27 10 27 10
9 3 16 3
9 2 11 2
0 0 0
udebug correctly determines the answer "15".