SP10612 FUNAREA - Funny Areas
Description
There is an M x N matrix of integer numbers. Both the rows and columns of the matrix are numbered starting at 0 and ending at M-1 and N-1 respectively.
A funny area is defined by three integers i,j, and r, and it is composed for those cells \[x,y\] such that |i-x| + |j-y|
Input Format
The first line contains two integers 1
Output Format
F lines: for each funny area print a single number -- the sum of all the cells inside of it.