cf/mirror

Infinite Chess

CF
1765I2800· international gm3s512 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
1 8
7 8
2
N 4 8
B 4 6
Output
10
Sample 2of 3
Input
1 1
1 5
2
K 1 3
R 2 3
Output
6
Sample 3of 3
Input
2 2
6 4
1
Q 4 3
Output
-1
1765I.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…