← All problemsSign in

Strange Planet

Scientists have discovered a new planet in a faraway galaxy which has water on it's surface. But water there has strange properties. Unlike Earth, Ripples created by falling drops are not circular but only travel on x-axis and y-axis. In question water surface is represented by a matrix $mat$ of size $r$ rows and $c$ columns in which water is denoted by "0" and falling drop by "1". You have to

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