Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main() {
- int n;
- bool s;
- cin >> n;
- vector <vector<int> > a (n);
- for (int i = 0; i < n; i++) {
- a[i].resize(n);
- for (int j = 0; j < n; j++) {
- cin >> a[i][j];
- }
- }
- s = true;
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- if (a[i][j] != a[j][i]) s = false;
- }
- }
- if (s) cout << "yes";
- else cout << "no";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement