cf/mirror

Shop Game

CF
1969D1900· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
4
2 0
2 1
1 2
4 1
1 2 1 4
3 3 2 3
4 2
2 1 1 1
4 2 3 2
6 2
1 3 4 9 1 3
7 6 8 10 6 8
Output
1
1
0
7
1969D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)