cf/mirror

Tree

CF
1111E2500· grandmaster1.5s256 MB⌨ stdin/stdout

Examples

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