cf/mirror

Matrix Walk

CF
954C1700· expert1s256 MB⌨ stdin/stdout

Examples

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