38
The Problem
A doomsday scenario is described by three numbers on a single line, n, m, and p. Following that line are n lines with m values per line. Each value represents the total units of water each cell can hold.
The following p lines describe the weather for the next p days. 1 unit of rain ...