← All problemsSign in

Divide And Rule

East India company wants to eliminate all the pirates of the Carribbean. Lord Cutler Beckett has come up with a brilliant plan to crush all that's left of the pirates. Consider the whole sea of caribbean as a grid of infinite width and length, Beckett decides that he will use the oldest and the greatest strategy of all times - Divide and Rule. The sea contains N islands. Beckett has analysed the e

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