← All problemsSign in

Germ spread

Chef wants to cultivate his favorite crop. Bob also being a lover of this crop, asked Chef for some, but Chef denied since he is a selfish person and only thinks about himself. Bob wants to take revenge and has decided to put germs in his field and destroy all his crops. Let's denote this special crop by $c$. Given a field of $N$ X $M$, $c$ are placed at arbitrary locations, and the leftover p

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