Richard and Cylinder
CodeChefOpen on judge ↗
Richard loves Geometry. One day he was playing with a rectangle and a cylinder and came up with a problem. There is a rectangle with sharp edges, kept in an x-y coordinate system. And there is also a cylinder of height 2 units (One unit above the x-y plane and one unit below x-y plane) placed vertically in the same x-y coordinate system. Richard is going to insert a pin in any of the four corner
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start