cf/mirror

Court Blue (Easy Version)

CF
2002F12600· international gm3s512 MB⌨ stdin/stdout

Examples

Sample 1of 3multi-test • hover to link
Input
8
3 3 2 5
4 4 1 4
6 6 2 2
7 7 2 3
9 9 9 1
2 2 1 4
5 5 1 4
8 8 6 7
Output
19
17
18
33
86
9
24
86
Sample 2of 3multi-test • hover to link
Input
1
20000000 20000000 1341 331
Output
33439999007
Sample 3of 3multi-test • hover to link
Input
2
1984 1984 19 84
9982 9982 44 35
Output
204143
788403
2002F1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…