Petya and Staircases
362B1100· newbie1s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
10 52 4 8 3 6
Output
NO
Sample 2of 2
Input
10 52 4 5 7 9
Output
YES
58%
362B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
10 52 4 8 3 6
NO
10 52 4 5 7 9
YES