Chef and Condition Zero (Challenge)
ShareChat is a country where Chef lives. The country may be represented by a $N \times M$ grid; let's denote the cell in row $i$ and column $j$ ($1 \le i \le N$, $1 \le j \le M$) by $(i, j)$. Each cell of this grid is a city; let's denote the population (number of residents) of the city in cell $(i, j)$ by $A_{i, j}$. Two cities are *neighbouring* if their cells have a common side. Chef wants 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.
Sign in to chat with the tutor and save your progress.
Sign in to start