cf/mirror

Flying Sort (Hard Version)

CF
1367F22400· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
9
5
4 7 2 2 9
5
3 5 8 1 7
5
1 2 2 4 5
2
0 1
3
0 1 0
4
0 1 0 0
4
0 1 0 1
4
0 1 0 2
20
16 15 1 10 0 14 0 10 3 9 2 5 4 5 17 9 10 20 0 9
Output
2
2
0
0
1
1
1
1
16
1367F2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)