Elevator or Stairs?
1054A800· newbie1s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5 1 4 4 2 1
Output
YES
Sample 2of 3
Input
1 6 6 2 1 1
Output
NO
Sample 3of 3
Input
4 1 7 4 1 2
Output
YES
58%
1054A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
5 1 4 4 2 1
YES
1 6 6 2 1 1
NO
4 1 7 4 1 2
YES