#K91102. Increment Grid Operations
Increment Grid Operations
Increment Grid Operations
You are given an \(n \times m\) grid initialized with zeros. You need to perform \(k\) operations on the grid. Each operation is described by four integers \(x_1\), \(y_1\), \(x_2\), and \(y_2\). For every cell \((i, j)\) such that \(x_1 \le i \le x_2\) and \(y_1 \le j \le y_2\), add 1 to that cell.
Input Format:
The first line contains three integers \(n\), \(m\), and \(k\) separated by spaces. Each of the next \(k\) lines contains four integers \(x_1\), \(y_1\), \(x_2\), and \(y_2\) representing an operation.
Output Format:
Output the final state of the grid. Each of the \(n\) lines should contain \(m\) integers separated by a single space.
inputFormat
The first line contains three integers \(n\), \(m\), and \(k\). Each of the following \(k\) lines contains four space-separated integers \(x_1\), \(y_1\), \(x_2\), and \(y_2\).
outputFormat
Print the grid's final state. Each of the \(n\) lines should contain \(m\) space-separated integers representing the values in that row.
## sample3 3 2
1 1 2 2
2 2 3 3
1 1 0
1 2 1
0 1 1
</p>