Help me solve problem E. Optimal Insertion

Revision en1, by laughinggorrila, 2021-11-23 13:13:01

I have a problem, here is the link: https://codeforces.me/contest/1602/problem/E The Tutorial showed me a solution using divide and conquer. When i read some accepted code of this problem i realized that most people tend to solve this problem using some data structures like segment tree like this , or this but i can't understand how they solved it with segment tree. anyone can explain me?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English laughinggorrila 2021-11-23 15:46:53 204
en2 English laughinggorrila 2021-11-23 14:15:04 145
en1 English laughinggorrila 2021-11-23 13:13:01 604 Initial revision (published)