Minimal Capacity
CodeChefOpen on judge ↗
Consider a hypothetical city on a $2D$ Cartesian-coordinate where one unit represents a distance of 1 kilometre. The city is spread over $|x| \le$ 1000 and $|y| \le$ 1000. There are various gas pumps located inside the city. Jim wants to visit his home town located at $(e_x,e_y)$ in his car. The car consumes 1 litre gas per kilometre. Initially Jim is located at origin$(0,0)$ with his car's gas ta
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