Created
September 4, 2019 18:33
-
-
Save invatainfo/d05b7e2356b76bd3485e27835ad694cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int n, m, i, j, a[21][21]; | |
cin >> m >> n; | |
for (i = 0; i < m; i++) | |
for (j = 0; j < n; j++) { | |
cin >> a[i][j]; | |
} | |
int symmetric = 1; | |
for (i = 0; i < m; i++) | |
for (j = 0; j < (n - 1) / 2; j++) { | |
if (a[i][j] != a[i][n - j - 1]) { | |
symmetric = 0; | |
} | |
} | |
if (symmetric == 1) | |
cout << "DA" << endl; | |
else | |
cout << "NU" << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment