cf/mirror

Turtle and Intersected Segments

CF
1981E2600· international gm5s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
5
1 7 3
2 4 6
3 5 5
6 7 9
3 4 4
5
2 7 3
1 3 6
4 5 5
6 7 9
1 1 4
4
1 4 3
1 2 1
3 4 5
1 4 4
3
1 3 1
2 3 3
4 5 8
Output
9
13
4
-1
1981E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…