SHARE
TWEET

Untitled

kl1nov Dec 11th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. int n;
  5.     bool s;
  6.     cin >> n;
  7.     vector <vector<int> > a (n);
  8.     for (int i = 0; i < n; i++) {
  9.             a[i].resize(n);
  10.         for (int j = 0; j < n; j++) {
  11.             cin >> a[i][j];
  12.         }
  13.     }
  14.     s = true;
  15.     for (int i = 0; i < n; i++) {
  16.         for (int j = 0; j < n; j++) {
  17.             if (a[i][j] != a[j][i]) s = false;
  18.         }
  19.     }
  20.     if (s) cout << "yes";
  21.     else cout << "no";
  22.     return 0;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top