Unimodal Array
831A1000· newbie1s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
61 5 5 5 4 2
Output
YES
Sample 2of 4
Input
510 20 30 20 10
Output
YES
Sample 3of 4
Input
41 2 1 2
Output
NO
Sample 4of 4
Input
73 3 3 3 3 3 3
Output
YES
58%
831A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)