Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <string.h>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- int ** p= new int*[n];
- for (int i=0;i<n;i++)
- {
- p[i]=new int[n];
- }
- for(int i=0;i<n;i++)
- {
- for(int j=0;j<n;j++)
- cin>>p[i][j];
- }
- for (int i=0;i<n;i++)
- for(int j=0;j<n;j++)
- {
- if (p[i][j]!=p[j][i])
- {
- cout<<"no";
- return 0;
- }
- }
- cout<<"yes";
- //вывод p
- // for (int i=0;i<n;i++)
- // {
- //
- // for (int j=0;j<n;j++)
- // {
- // cout<<p[i][j]<<" ";
- // }
- // cout<<endl;
- // }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement