cf/mirror

Functions On The Segments

CF
837G2500· grandmaster5s1024 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
1
1 2 1 4 5 10
1
1 1 2
Output
13
Sample 2of 2
Input
3
2 5 1 1 1 4
3 6 8 2 5 7
1 3 5 1 4 10
3
1 3 3
2 3 2
1 2 5
Output
19
17
11
837G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)