cf/mirror

Sums on Segments

CF
2043C1600· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
5
1 -1 10 1 1
5
-1 -1 -1 -1 -1
2
-1 2
2
7 1
3
1 4 -1
Output
8
-1 0 1 2 9 10 11 12
6
-5 -4 -3 -2 -1 0
4
-1 0 1 2
4
0 1 7 8
6
-1 0 1 3 4 5
2043C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)