洛谷链接 分析 首先给出朴素的方程( s [ i ] = ∑ j = 1 i x [ j ] s[i]=\sum_{j=1}^{i}x[j] s[i]=∑j=1ix[j]) d p [ i ] = m i n { d p [ j ] + a ( s [ i ] − s [ j ] ) 2 + b ( s [ i ] − s [ j ] ) + c } dp[i]=min\{dp[j]+
题目: Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away when he is finished playing with them. They ga