0w1

Recursion

CFR 257 D. Sum ( Recursion, Math )

Problem - 257D - Codeforces題意: 給數列 a,滿足 a[ i ] ≤ a[ i + 1 ] ≤ 2 * a[ i ]。要求對每項定正負,使得總和介於 [ 0, a[ 0 ] ]。資料規模: The first line contains integer n (1 ≤ n ≤ 1e5) — the size of the array. The second line contains s…