题号:NC52854
时间限制:C/C++/Rust/Pascal 5秒,其他语言10秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld
题目描述
Bobo has a matrix A with n rows and n columns.
For submatrix with upper-left corner
)
and lower-right corner
)
(

),
he defined its *skewness*
%20%3D%20%5Cleft(%5Csum_%7Bi%20%3D%20x_1%7D%5E%7Bx_2%7D%20%5Csum_%7Bj%20%3D%20y_1%7D%5E%7By_2%7D%20A_%7Bi%2C%20j%7D%5Cright)%5E3)
.
Bobo would like to know the sum of *skewness* of all submatrices modulo
)
.
输入描述:
The input contains zero or more test cases and is terminated by end-of-file. For each test case:
The first line contains an integer n.
The i-th of following n lines contains n integers
.
* 
* 
* The number of test cases does not exceed 10.
输出描述:
For each case, output an integer which denotes the sum.
示例1
输入
复制
2
0 1
1 0
3
0 1 0
1 1 0
1 0 1