You are viewing a single comment's thread. Return to all comments →
What is wrong with the code from editorial?
_dp_sum[0]=0 for i in range(1, len(arr)): _dp_sum[i]+=_dp_sum[i-1] for j in range(1, i): _dp_sum[i]+=_dp_partitial_sums[j][i] _dp_sum[i]+=arr[i]*sum(range(2, i+1)) _dp_sum[i]+=_dp_partitial_sums[i][i]
Seems like cookies are disabled on this browser, please enable them to open this website
Summing Pieces
You are viewing a single comment's thread. Return to all comments →
What is wrong with the code from editorial?