cf/mirror

Game with Marbles (Easy Version)

CF
1914E11400· specialist3.5s256 MB⌨ stdin/stdout

Examples

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