Deck-Building Game
1906K2500· grandmaster1s1024 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
416 12 4 8
Output
9
Sample 2of 4
Input
41 2 4 8
Output
1
Sample 3of 4
Input
21 1
Output
5
Sample 4of 4
Input
61 1 1 2 2 2
Output
169
58%
1906K.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)