Quote:
Originally posted by dimm_coder
Ohh, yeh, I was not so carefully!
But nevertheless, We already discass it somewhere in October.
Something like this: We have 3 parts,
a - 4(a1,a2,a3,a4),
b - 4(b1,b2,b3,b4),
c - 4(c1,c2,c3,c4)
Then weight a and b.
1) = , so we have part c (4 balls), and it is not big problem to find what :)
2) <(or >) , for ex. a < b
This means that if the false ball in a - it weight some less, if in b - some havier.
then we have else 3 parts:
1(a1, a2, b1) 2(a3, a4, b2 ) and (b3, b4, c1 ) ( c1 - is a good ball )
weight 1 and 2.
if (1 == 2) then false ball in 3 and it is heavier (b1 or b2)
for ex.1 < 2 (or 1> 2 it is not the reason)
so we have 3 balls only - (a1, a2, b2),
b1, a3, a4 - are good, because othervise we have 2 > 1 ( remember that b - is heavier, a - lighter ).
so we have (a1, a2, b2)
then weight a1 and a2
if == , than b2 - false and it is heavier
a1<a2 we have a1 , because a - lighter
So, that is right solution :)
somehow it misses when ball is b1(heavier) i think