cf/mirror

Jumping Through Segments

CF
1907D1400· specialist5s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
5
1 5
3 4
5 6
8 10
0 1
3
0 2
0 1
0 3
3
3 8
10 18
6 11
4
10 20
0 5
15 17
2 2
Output
7
0
5
13
1907D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)