cf/mirror

Long Way to be Non-decreasing

CF
1967D2800· international gm4s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
3
5 8
1 6 3 7 1
2 3 5 8 7 1 5 6
3 3
1 3 2
2 1 3
10 10
2 8 5 4 8 4 1 5 10 10
6 7 2 6 3 4 1 1 3 5
Output
3
-1
3
1967D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…