a53

Simetrica_Bac

a53
Jul 15th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int n, m, a[23][23], ok=1;
  5. int main()
  6. {
  7. cin>>m>>n;
  8. for(int i=1; i<=m; i++)
  9. for(int j=1; j<=n; j++)
  10. cin>>a[i][j];
  11. for(int i=1; i<=m && ok; i++)
  12. for(int j=1; j<=n/2 && ok; j++)
  13. if(a[i][j]!= a[i][n-j+1])
  14. ok=0;
  15. if(ok)
  16. cout<<"DA";
  17. else
  18. cout<<"NU";
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment