← All problemsSign in

The War Zone

There are mines in a battlefield connected in a hierarchical manner such that there can only be two or less mines connected to one. There is a unique intensity value assigned to each mine. As you check your minefield (which you named as “kaboom town” ) you are not happy with its structure. There is a minefield (named “take my mines”) nearby which is not expecting any battle action. So, you take

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