← All problemsSign in

Save Energy

An area is affected badly by disaster and thus the whole land is divided in to m2 equi-sized pieces forming a square grid. Each piece has also gained some altitude. Therefore, a helicopter is deployed to help people trapped on the land. Only some cells of grid have inhabitants leaving other cells empty. Helicopter starts from one of the cell of the gird thus forming it as its base centre. It can m

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