← All problemsSign in

Magical Islands

The land of $BIT$ is magical. It has islands covered by water around it. The land here is denoted by '$#$' and water by '$.$'. The magical part of this place is that any person can walk on $Special Water$. $Special Water$ are in those areas, which are adjacent to any piece of land (ie, share atleast one corner with any piece of land). $Mr. X$ being from normal land, finds it fascinating. So he

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