Matrix Reduction (matred)

15 teams scored 291 points on this task, for a maximum score of 100, an average score of 19 and a median score of 7.

Highlights

  1. Volta, Milano is the institute with the most points (107).
  2. Lombardia is the region with the most points (121).

Statement

Alex and Andrei are playing a game on an N × M matrix filled with non-negative integers. The rows of the matrix are numbered from 1 to N (from top to bottom), and the columns are numbered from 1 to M (from left to right). Alex is allowed to perform the following operation any number of times: (1) Choose a horizontal or vertical 1 × 3 subrectangle. (2) Select an integer V. (3) Add V to all numbers in the chosen subrectangle, ensuring that no number becomes negative. Andrei believes that Alex cannot make all the numbers in the matrix zero within at most 2 * N * M operations. Alex is determined to prove him wrong -- but since he hasn't learned addition at school yet, he needs your help. Can you determine whether Alex can reduce the entire matrix to zero within the given limit?