cf/mirror

Deck-Building Game

CF
1906K2500· grandmaster1s1024 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
4
16 12 4 8
Output
9
Sample 2of 4
Input
4
1 2 4 8
Output
1
Sample 3of 4
Input
2
1 1
Output
5
Sample 4of 4
Input
6
1 1 1 2 2 2
Output
169
1906K.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)