Back to Topic List
Hi Kevin!
I have a solution for the problem, although the checker does not accept them. After my calculations I checked the difference between the result radius and the distance between a point and circle center for each given points. So if my results are: R - is the radius of the circle centerX - is the X coordinate of the center centerY - is the Y coordinate of the center
then my checking for each given points (xi, yi)
di := distance((xi, y_i), (centerX, centerY))
abs(d_i - R) is the same for each given input points
This time I strongly believe that my solution is correct :)
Could you please check the checker?
Thanks!
Hi Adam!
The error was indeed on my end, this time accidentally leaving a key piece out of the prompt... the final circle should leave 2 of the boulders outside the fence and 2 inside. Your code indeed was correctly providing a circle which inlcuded 3 boulders on one side - maybe I'll make a follow up problem for that method too!
Sorry about that!!!
Hi Kevin!
Ah, OK, now I see. No Problem! So 2 inside and 2 outside... I think my method needs only a slight modification. Thank you for clarification!
Yippie!! Solution accepted :)