cf/mirror

Reverse the Rivers

CF
2036E1600· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3 4 4
1 3 5 9
4 6 5 3
2 1 2 7
3
1 > 4
2 < 8
1 < 6
2
1 < 8
2 > 8
1
3 > 5
2
4 > 8
1 < 8
Output
2
-1
3
1
2036E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)