#K41447. Final Grid State

    ID: 26867 Type: Default 1000ms 256MiB

Final Grid State

Final Grid State

Given a grid of size (n \times m) initialized with zeros, you are required to perform a series of operations. Each operation is described by four integers (a, b, c, d), which represent the top-left cell and the bottom-right cell of a rectangular subgrid. For each operation, increment each element in the subgrid by 1.

Your task is to compute the final state of the grid after executing all the operations.

inputFormat

Input is read from standard input (stdin).

The first line contains two space-separated integers (n) and (m), representing the number of rows and columns respectively.
The second line contains an integer (Q) denoting the number of operations.
Each of the next (Q) lines contains four space-separated integers (a), (b), (c), (d) which define an operation.

outputFormat

Output the final grid to standard output (stdout). The grid should be printed in (n) lines, where each line contains (m) space-separated integers representing the cell values in that row.## sample

3 3
2
1 1 2 2
2 2 3 3
1 1 0

1 2 1 0 1 1

</p>