Блог пользователя Sammmmmmm

Автор Sammmmmmm, история, 16 месяцев назад, По-английски

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

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится