Advertisement
kl1nov

Untitled

Dec 11th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement