This is an easy task , you are given a N*N square , write a program calculates the sum of a given sub-matrix.
First line contains tow integer N and Q (N <= 250 , Q <= 100000 )
2..N+1 line : Each line contains N integer , denotes the kth line of the matrix
N+2..N+Q+1 line: each line contains four integer r0 c0 r1 c1 , describes a sub matrix. r0 c0 denotes the position(r0 row and c0 column) of upper left element of the sub-matrix in the square,and r1 c1 denotes the position of the lower right element.
For each sub-matrix in the input data , print a line contains the sum of the sub-matrix.