Floods
CodeChefOpen on judge ↗
You are given a grid having $N$ rows and $M$ columns. Each cell of the grid corresponds to a city and has a certain height $H_{i, j}$. You are also given $Q$ queries, each consisting of a single integer $X$, meaning a flood of height $X$ attacks the grid of cities from the sides of the grid. For each query, you are required to print the number of cities that are **not** submerged when a flood of t
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