## 12831 - Bob the Builder

Moderator: Board moderators

morris821028
New poster
Posts: 13
Joined: Thu Dec 06, 2012 4:07 pm

### Re: 12831 - Bob the Builder

In the second case, why not the result is 2 ?

{8, 20}
-----
8 + 8 = 16 (time 1)
20 + 4 = 24 (time 1)
{8, 16, 20, 24}
-----
16 + 16 = 32 (time 2)
20 + 16 = 36 (time 2)
24 + 16 = 40 (time 2)
-----
{8, 16, 20, 24, 32, 36, 40}

I hate this login page. I always fail on it. Finally, I don't know how to login.
?? Taiwan ! ??????????

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 12831 - Bob the Builder

I haven't solved it yet but, I don't think that's what counts as one use of the machine.
From the problem statement:
Bob takes X and using the IBM just once he can do following things:
1. Build just one child from X, let's say the child is Y.
2. Build just one child from Y, let's say the child is Z.
3. Build just one child from Z, let's say the child is Q.
And so on...

So if you use it for:
8 + 8 = 16
You could then only use it on 16 and have it count as a single use of the machine.
Check input and AC output for thousands of problems on uDebug!

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

### Re: 12831 - Bob the Builder

start 20
L 36
end 20 24 32 36
1st use: 20 -> 24, 24 -> 32
2nd use: 20 -> 36

start 8 20
L 40
end 8 16 20 24 32 36 40
1st use: 8 -> 16, 16 -> 32
2nd use: 20 -> 24, 24 -> 40
3rd use: 20 -> 36
Check input and AC output for thousands of problems on uDebug!

uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

### Re: 12831 - Bob the Builder

I hate this login page. I always fail on it. Finally, I don't know how to login.