Nastya and King Shamans

Revision en2, by Doritos4, 2018-07-17 21:11:20

codeforces.com/blog/entry/60083

In the editorial for problem E, how does the author descend down the segment tree to find the leftmost maximum element? It hasn’t been explained there.

Edit: I’ve understood how to go down the tree, but I’m unable to convince myself that its complexity is O(logn) per query. Please help.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Doritos4 2018-07-17 21:11:20 128
en1 English Doritos4 2018-07-09 18:27:56 221 Initial revision (published)