cf/mirror

Naughty Stone Piles

CF
226B1900· candidate master2s256 MB⌨ stdin/stdout
#greedy

Examples

Sample 1of 1
Input
5
2 3 4 1 1
2
2 3
Output
9 8
226B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)