cf/mirror

Three Sequences

CF
1406D2200· master2s512 MB⌨ stdin/stdout

Examples

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