cf/mirror

Yet Another Inversions Problem

CF
1917D2300· international master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
3 2
3 5 1
0 1
3 4
1 3 5
3 2 0 1
1 5
1
0 1 2 3 4
8 3
5 1 7 11 15 3 9 13
2 0 1
Output
9
25
0
104
1917D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)