cf/mirror

Monocarp and a Strategic Game

CF
1841F2700· international gm1s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
5
0 0 1 0
1 3 4 2
2 5 1 2
4 5 4 3
1 4 4 5
Output
85
Sample 2of 2
Input
4
3 3 1 5
5 1 5 3
4 4 4 1
1 3 4 4
Output
41
1841F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)