Save the nature
The new king of Byteland, John-2318, has just ascended the throne. As every new king, he wants to build a spectacular palace to showcase his wealth and power. We can consider Byteland as an N x M rectangular matrix A. If A[i][j] is positive, then it means that A[i][j] litres of oxygen are produced by trees in the cell with coordinates (i, j) every day. On the other hand, a negative value of A[i][
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