• 沒有找到結果。

: {0 < i < n, 0 < j < n}. In this problem you’ll have to find out whether the given matrix is symmetric or not.

N/A
N/A
Protected

Academic year: 2021

Share ": {0 < i < n, 0 < j < n}. In this problem you’ll have to find out whether the given matrix is symmetric or not."

Copied!
1
0
0

加載中.... (立即查看全文)

全文

(1)

11349 Symmetric Matrix

You‘re given a square matrix M . Elements of this matrix are M

ij

: {0 < i < n, 0 < j < n}. In this problem you’ll have to find out whether the given matrix is symmetric or not.

Definition: Symmetric matrix is such a matrix that all elements of it are non-negative and symmetric with relation to the center of this matrix. Any other matrix is considered to be non-symmetric. For example:

M =

 5 1 3 2 0 2 3 1 5

 is symmetric

M =

 5 1 3 2 0 2 0 1 5

 is not symmetric, because 3 ̸= 0

All you have to do is to find whether the matrix is symmetric or not. Elements of a matrix given in the input are −2

32

≤ M

ij

≤ 2

32

and 0 < n ≤ 100.

Input

First line of input contains number of test cases T ≤ 300. Then T test cases follow each described in the following way. The first line of each test case contains n – the dimension of square matrix. Then n lines follow each of then containing row i. Row contains exactly n elements separated by a space character. j-th number in row i is the element M

ij

of matrix you have to process.

Output

For each test case output one line ‘Test #t: S’. Where t is the test number starting from 1. Line S is equal to ‘Symmetric’ if matrix is symmetric and ‘Non-symmetric’ in any other case.

Sample Input 2

N = 3 5 1 3 2 0 2 3 1 5 N = 3 5 1 3 2 0 2 0 1 5

Sample Output Test #1: Symmetric.

Test #2: Non-symmetric.

參考文獻

相關文件

One of the technical results of this paper is an identifi- cation of the matrix model couplings ti(/x) corresponding to the Liouville theory coupled to a

Matrix model recursive formulation of 1/N expansion: all information encoded in spectral curve ⇒ generates topological string amplitudes... This is what we

introduction to continuum and matrix model formulation of non-critical string theory.. They typically describe strings in 1+0 or 1+1 dimensions with a

where L is lower triangular and U is upper triangular, then the operation counts can be reduced to O(2n 2 )!.. The results are shown in the following table... 113) in

However, it is worthwhile to point out that they can not inherit all relations between matrix convex and matrix monotone functions, since the class of contin- uous

Proof. The proof is complete.. Similar to matrix monotone and matrix convex functions, the converse of Proposition 6.1 does not hold. 2.5], we know that a continuous function f

In this paper, a novel subspace projection technique, called Basis-emphasized Non-negative Matrix Factorization with Wavelet Transform (wBNMF), is proposed to represent

• Conceptually there is a 4 x 4 homogeneous coordinate matrix, the current transformation matrix (CTM) that is part of the state and is applied to all vertices that pass down