cf/mirror

Military Problem

CF
1006E1600· expert3s256 MB⌨ stdin/stdout

Examples

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