#C8891. Increment Subgrid

    ID: 52923 Type: Default 1000ms 256MiB

Increment Subgrid

Increment Subgrid

You are given a grid with n rows and m columns, initially filled with zeros. You will also be given an integer q and q operations. Each operation is described by four integers \(x_1, y_1, x_2, y_2\) and indicates that you need to increment every element in the subgrid with top‐left corner at \( (x_1, y_1) \) and bottom‐right corner at \( (x_2, y_2) \) by 1.

After processing all operations, output the final grid. Each element should be separated by a space in a row, and each row should be on a new line.

inputFormat

The first line of input contains three space-separated integers \(n\), \(m\) and \(q\): the number of rows, columns and the number of operations respectively.

Each of the next \(q\) lines contains four integers \(x_1, y_1, x_2, y_2\) describing an operation.

outputFormat

Output the final grid after all operations. Each of the \(n\) lines should contain \(m\) space-separated integers representing the grid row.

## sample
3 3 3
1 1 2 2
2 2 3 3
1 1 3 3
2 2 1

2 3 2 1 2 2

</p>