cf/mirror

Unimodal Array

CF
831A1000· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6
1 5 5 5 4 2
Output
YES
Sample 2of 4
Input
5
10 20 30 20 10
Output
YES
Sample 3of 4
Input
4
1 2 1 2
Output
NO
Sample 4of 4
Input
7
3 3 3 3 3 3 3
Output
YES
831A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)