cf/mirror

Rain and Umbrellas

CF
988F2100· master2s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 3
Input
10 2 4
3 7
8 10
0 10
3 4
8 1
1 2
Output
14
Sample 2of 3
Input
10 1 1
0 9
0 5
Output
45
Sample 3of 3
Input
10 1 1
0 9
1 5
Output
-1
988F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)