cf/mirror

The Walkway

CF
1858B1500· specialist1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
8
6 2 2
2 5
8 3 2
3 5 8
10 4 9
2 8 9 10
30 5 8
6 8 15 24 29
30 5 8
6 8 12 20 27
8 8 3
1 2 3 4 5 6 7 8
2 2 2
1 2
1000000000 3 20000000
57008429 66778899 837653445
Output
3 1
4 1
4 4
6 4
5 2
7 7
1 1
51 1
1858B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)