Subscribed unsubscribe Subscribe Subscribe

0w1

CFR 429 D. Tricky Function ( Divide and Conquer, Closest Pair )

Problem - D - Codeforces題意: 給 A 數列。求 min{ ( j - i )^2 + Sigma( A[ i + 1 .. j ] )^2, 1 ≤ i 資料規模: The first line of input contains a single integer n (2 ≤ n ≤ 100000). Next line contains n integers a[1], a[2], ..., a[n] ( - 1e4 …