Given a matrix of dimension n*n. All the cells are initially, zero. Given Q queries, which contains 4 integers a b c d where (a, b) is the TOP LEFT cell and (c ,d) is the Bottom Right cell of a submatrix. Now, all the cells of this submatrix have to be incremented by one. After all the Q queries have been performed. find the final resulting Matrix.
Given a matrix of dimension n*n. All the cells are initially, zero. Given Q queries, which contains 4 integers a b c d where (a, b) is the TOP LEFT cell and (c ,d) is the Bottom Right cell of a submatrix. Now, all the cells of this submatrix have to be incremented by one. After all the Q queries have been performed. find the final resulting Matrix.