B e a r a n d B o w l i n g 4 Bear\ and\ Bowling\ 4 Bear and Bowling 4
D e s c r i p t i o n \mathcal{Description} Description
给一个长度为 N N N 的序列 { a i } \{a_i\} {
ai}, 求 max x = 1 N − k + 1 ( ∑ i = 1 k i ⋅ a x + i − 1 ) \max\limits_{x=1}^{N-k+1}( \sum\limits_{i=1}^k i\cdot a_{x+i-1} ) x=1maxN−k+1(i=1∑ki⋅ax+i−1)
1 ≤ n ≤ 2 × 1 0 5 , ∣ a i ∣ ≤ 1 0 7 1\leq n\leq 2\times 10^5, |a_i|\leq 10^7 1≤n≤2×105,∣ai∣≤107
最 初 想 法 最初想法