cf/mirror

Two Chess Pieces

CF
1774E1900· candidate master2s256 MB⌨ stdin/stdout

Examples

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