Polycarp and Sums of Subsequences
1618A800· newbie1s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
51 3 4 4 5 7 81 2 3 4 5 6 7300000000 300000000 300000000 600000000 600000000 600000000 9000000001 1 2 999999998 999999999 999999999 10000000001 2 2 3 3 4 5
Output
1 4 34 1 2300000000 300000000 300000000999999998 1 11 2 2
58%
1618A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)