cf/mirror

Coin Troubles

CF
283C2100· master2s256 MB⌨ stdin/stdout
#dp

Examples

Sample 1of 3
Input
4 2 17
3 1 2 5
4 2
3 4
Output
3
Sample 2of 3
Input
3 2 6
3 1 1
1 2
2 3
Output
0
Sample 3of 3
Input
3 2 10
1 2 3
1 2
2 1
Output
0
283C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)