Need help at a max/min range problem

Revision en1, by nhphuc, 2025-04-11 10:37:57

Link to contest (statement in Vietnamese): https://lqdoj.edu.vn/contest/dhbb23, problem link: https://lqdoj.edu.vn/problem/dhbb23hkdata. (you must virtual join the contest before open the problem)

Summary: Given a array $$$a$$$ with $$$n$$$ elements, the cost of this array is the maximum value of $$$|\sum^{R}_{i = L}\ a_i|$$$ among all pairs $$$1\leq L\leq R\leq n$$$. There are $$$q$$$ $$$\bf {independent}$$$ updates of the form $$$l\ r\ c$$$: increase all elements from $$$l$$$ to $$$r$$$ by $$$c$$$, then calculate the cost of array after the update. $$$n,\ q\leq 10^5,\ |a_i|,\ |c|\leq 10^9$$$.

Thanks for your help and attention, have a good day.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English nhphuc 2025-04-11 19:28:02 128
en1 English nhphuc 2025-04-11 10:37:57 652 Initial revision (published)