tminh_hk20's blog

By tminh_hk20, history, 13 months ago, In English

+) Problem: You have an array with N elements and Q queries. For each query, you update the value of range [l, r] by x, a[l], a[l+1],...,a[r] will become to a[l]+x, a[l+1]+x,...a[r]+x. After the query, you need to find the RES (Cutting the range The above number into segments, and the RES is equal to the total value of the segments. The value of A segment is defined by the difference between the largest and smallest numbers in that segment) +) N, Q<=2e5 +) -1e8<=a[i],x<=1e8

If you know some problem like this problem in Code force, I want you can share it for me.

I'm sorry about my English, Thank you for all!

  • Vote: I like it
  • 0
  • Vote: I do not like it