Advertisement
Hazem3529

fixed abo 3la2

Apr 15th, 2015
3,476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <cstdio>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     int Cases,n;
  11.     string tmp;
  12.     long long int a[101][101];
  13.     cin>>Cases;
  14.     for (int cases = 1 ;cases <= Cases;cases++){
  15.        bool flag = true;
  16.        cin>>tmp>>tmp>>n;
  17.         for (int i = 1 ;i <= n ; i++){
  18.            for (int j = 1; j <= n ;j++)
  19.                cin>>a[i][j];
  20.         }
  21.         for (int i = 1;i <= n;i++) for (int j = 1;j <= n ; j++) if (a[i][j]<0)flag = false;
  22.        for (int i = 1;i <= n;i++){
  23.            if (flag == false)break;
  24.  
  25.        }
  26.        int i =1; //3cahn yt2ry fl loop ly t7t
  27.        for (int j = 1; j <= n ; j++){
  28.            if (a[i][j] != a[n + 1 - i][n + 1 - j]){
  29.                flag = false ;  break;
  30. //i++ low3zz tzwd y3ny
  31.  
  32.            }
  33.        }
  34.        if (flag)cout << "Test #"<<cases<<":"<<" symmetric"<<endl;
  35.        else cout << "Test #"<<cases<<":"<<" Non-symmetric"<<endl;
  36.  
  37.    }
  38.    return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement