cf/mirror

Very Different Array

CF
1921D1100· newbie2s256 MB⌨ stdin/stdout

Examples

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