1092 - Tracking Bio-bots

All about problems in Volume 10. 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
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

1092 - Tracking Bio-bots

Post by brianfry713 » Thu Aug 28, 2014 12:59 am

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!

red_apricot
New poster
Posts: 48
Joined: Sun Jun 22, 2014 6:14 am

Re: 1092 - Tracking Bio-bots

Post by red_apricot » Mon Feb 22, 2016 5:17 am

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"?
Attachments
pic.jpg
pic.jpg (183.71 KiB) Viewed 1854 times

Diusrex
New poster
Posts: 1
Joined: Wed Feb 12, 2014 1:30 am

Re: 1092 - Tracking Bio-bots

Post by Diusrex » Thu Dec 22, 2016 3:37 am

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".

Post Reply

Return to “Volume 10 (1000-1099)”