cf/mirror

Anton and Permutation

CF
785E2200· master4s512 MB⌨ stdin/stdout

Examples

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