Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n, m, a[23][23], ok=1;
- int main()
- {
- cin>>m>>n;
- for(int i=1; i<=m; i++)
- for(int j=1; j<=n; j++)
- cin>>a[i][j];
- for(int i=1; i<=m && ok; i++)
- for(int j=1; j<=n/2 && ok; j++)
- if(a[i][j]!= a[i][n-j+1])
- ok=0;
- if(ok)
- cout<<"DA";
- else
- cout<<"NU";
- return 0;
- }
Add Comment
Please, Sign In to add comment