cf/mirror

Choosing Subtree is Fun

CF
372D2600· international gm5s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
10 6
4 10
10 6
2 9
9 6
8 5
7 1
4 7
7 3
1 8
Output
3
Sample 2of 2
Input
16 7
13 11
12 11
2 14
8 6
9 15
16 11
5 14
6 15
4 3
11 15
15 14
10 1
3 14
14 7
1 7
Output
6
372D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…