Last active
June 25, 2017 20:05
-
-
Save joaogui1/4a08d84896ca00c38d810d1b68b4e6ae 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 <bits/stdc++.h> | |
using namespace std; | |
int v[1024]; | |
int main(){ | |
int n; | |
cin >> n; | |
for(int i = 1; i <= n; ++i){ | |
cin >> v[i]; | |
} | |
for(int i = 2; i <= n - 1; ++i){ | |
if(v[i] < v[i - 1] && v[i] < v[i + 1]){ | |
printf("S\n"); | |
return 0; | |
} | |
} | |
printf("N\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment