Need help with optimal solution for Codechef question LOWSUM

Revision en2, by lucifer_107, 2022-10-25 19:42:20

Hello,

For this question. Does there exist an optimal solution, i.e., processing each query in O(1) or O(log K) time or some significantly efficient way if the constraints were higher for each query?

Thank you for reading, L

Tags queue, priority queue, optimization, algorithms

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English lucifer_107 2022-10-25 19:42:20 4
en1 English lucifer_107 2022-10-25 19:40:24 335 Initial revision (published)