cf/mirror

Game on Paper

CF
203B1300· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
4 11
1 1
1 2
1 3
2 2
2 3
1 4
2 4
3 4
3 2
3 3
4 1
Output
10
Sample 2of 2
Input
4 12
1 1
1 2
1 3
2 2
2 3
1 4
2 4
3 4
3 2
4 2
4 1
3 1
Output
-1
203B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)