← All problemsSign in

Baldy and Princess Saumia

Our friend Baldy was in love with Princess Saumia. They lived happily untill one day a strange disease grips the planet. Consider Earth to be built of unit square cells infinitely in all the directions. Now the disease has a trigger region consisting of some cells. At any second a cell can have two states, either infected or healthy At any second the current state of a cell is determined by the

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