Created
September 4, 2019 18:40
-
-
Save invatainfo/cbeb0b44eda35e4d6c5e39bd66f6b857 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, i, a[21]; | |
cin >> n; | |
for (i = 0; i < n; i++) | |
cin >> a[i]; | |
int symmetric = 1; | |
for (i = 0; i < (n - 1) / 2; i++) { | |
if (a[i] != a[n - i - 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