← All problemsSign in

Shortest Path

A hollow cylinder with radius $R$ and height $H$ is lying on a table. Cylinder's walls have negligible thickness. There are two points $A$ and $B$ marked on outer and inner surface of the cylinder respectively. An insect starts at point $A$ and reaches the point using the shortest path between these points. You have to find the total distance covered by the insect, or in other words the length

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start