cf/mirror

Doremy's Drying Plan (Easy Version)

CF
1889C12000· candidate master1s256 MB⌨ stdin/stdout

Examples

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