-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11349.cpp
More file actions
30 lines (29 loc) · 825 Bytes
/
11349.cpp
File metadata and controls
30 lines (29 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <bits/stdc++.h>
using namespace std;
int main() {
int sum, x, y, n, t = 1, tc, i, j, k, l;
long long a[200][200];
char c[12];
scanf("%d", &tc);
while (tc--) {
scanf("%s = %d", &c, &n);
for (i = 0; i < n; i++)
for (j = 0; j < n; j++) scanf("%lld", &a[i][j]);
k = n / 2;
int flag = 0;
for (i = 0; i <= k; i++) {
for (j = 0; j < n; j++) {
if (a[i][j] != a[n - 1 - i][n - 1 - j] || a[n - 1 - i][n - 1 - j] < 0 || a[i][j] < 0) {
flag = 1;
break;
}
}
if (flag) break;
}
if (flag) {
printf("Test #%d: Non-symmetric.\n", t++);
} else
printf("Test #%d: Symmetric.\n", t++);
}
return 0;
}