cf/mirror

Another Problem about Beautiful Pairs

CF
2196B1600· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
5
1 1 2 100 4
6
2 2 1 1 2 2
10
1 1 2 3 4 1 1 7 3 9
2
1000000000 1000000000
Output
3
7
10
0
2196B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)