Apple tree puzzle from input.txt

Hello :slight_smile:,

I’m trying to solve “Apple tree” puzzle from input.txt, approved by Arglanir , InstouT94 and JohnnyYuge.
Link to puzzle

You have the position (I guess the center) of an apple by its (x,y,z), and the radius of the apple.
One apple falls, eventually hitting others, making them fall, too.
And you have to determine the number of fallen apples.

I disagree with the second test (simple collision).
Can anyone explain to me how 4 apples can fall whereas they are so far away one another ?
I would have answered 2. (index 5 and 0)

x y z r
0 0 0 25
200 200 0 25
200 -200 0 25
-200 200 0 25
-200 -200 0 25
5 10 500 10
This last one is falling.

:confused: 4 apples fall if the radius of the last one is 260.

Thank you for your attention.

Flo

You have to determine the number of REMAINING apples, not the number of fallen apples.

1 Like

Ok. Thank you. I go and hide myself. :blush: