INOI 2023 Planet

Revision en1, by Sammmmmmm, 2023-07-18 08:56:58

Given two arrays a[] and w[] of n integers. The cost for a subarray [l, r] is max(w[l], w[l + 1].., w[r]) * (a[l] + a[l] +.. a[r]) Divide the array into k subarray so that the total cost is minimized. Thanks

n, k <= 2500 a[i] <= 2500 with 1 <= i <= n w[i] <= 1e9 with 1 <= i <= n

You can submit here: https://www.codechef.com/INOIPRAC/problems/INOI2301?tab=statement

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Sammmmmmm 2023-07-18 08:56:58 393 Initial revision (published)