Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <cstdio>
- #include <string>
- using namespace std;
- int main()
- {
- int Cases,n;
- string tmp;
- long long int a[101][101];
- cin>>Cases;
- for (int cases = 1 ;cases <= Cases;cases++){
- bool flag = true;
- cin>>tmp>>tmp>>n;
- for (int i = 1 ;i <= n ; i++){
- for (int j = 1; j <= n ;j++)
- cin>>a[i][j];
- }
- for (int i = 1;i <= n;i++) for (int j = 1;j <= n ; j++) if (a[i][j]<0)flag = false;
- for (int i = 1;i <= n;i++){
- if (flag == false)break;
- }
- int i =1; //3cahn yt2ry fl loop ly t7t
- for (int j = 1; j <= n ; j++){
- if (a[i][j] != a[n + 1 - i][n + 1 - j]){
- flag = false ; break;
- //i++ low3zz tzwd y3ny
- }
- }
- if (flag)cout << "Test #"<<cases<<":"<<" symmetric"<<endl;
- else cout << "Test #"<<cases<<":"<<" Non-symmetric"<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement