cf/mirror

One-Dimensional Puzzle

CF
1931G2000· candidate master4s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
11
1 1 1 1
1 2 5 10
4 6 100 200
900000 900000 900000 900000
0 0 0 0
0 0 566 239
1 0 0 0
100 0 100 0
0 0 0 4
5 5 0 2
5 4 0 5
Output
4
66
0
794100779
1
0
1
0
1
36
126
1931G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)