Help needed in CSES Problem

Правка en4, от AdnanShamsi, 2020-07-30 09:35:16

Sliding Cost

https://cses.fi/problemset/task/1077

Can someone explain how to approach this problem.

I was trying to do it using pdbs and fenwick tree but it showed me tle on last 4 test cases
https://pastebin.com/3qBy2WBW

Теги cses, #sorting, searching

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский AdnanShamsi 2020-07-30 09:35:37 0 (published)
en4 Английский AdnanShamsi 2020-07-30 09:35:16 18 Tiny change: 'problem.\n------------------\nI was tr' -> 'problem.\n\nI was tr'
en3 Английский AdnanShamsi 2020-07-30 09:33:34 24 Tiny change: 's problem.####\nI was tr' -> 's problem.\n------------------\nI was tr'
en2 Английский AdnanShamsi 2020-07-30 09:32:57 4 Tiny change: 's problem.\nI was tr' -> 's problem.####\nI was tr'
en1 Английский AdnanShamsi 2020-07-30 09:32:03 281 Initial revision (saved to drafts)