Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

How to do fractional cascading on an iterative segment tree?
Разница между en1 и en2, 5 символ(ов) изменены
I was doing this question [Hotel Queries](https://cses.fi/problemset/task/1143/) on CSES. I understand the obvious Nlog^2N approach that uses binary search on segment trees.↵

But I'm interested in solving it in NlogN and I know the fractional cascading approach that traverses the segment tree. But I want to try this approach on an iterative segment tree ,exactly the same implement
ation as in the blog [Efficient and easy segment trees](https://codeforces.me/blog/entry/18051).↵

But apparently the tree from this version of the segment tree is degenerate where we cannot guarantee that the left child corresponds to an actual left range. i.e it is not necessary for the left child to have range [l1,r1] such that r1>l2 for the corresponding right child.↵

Please share any implementations of fractional cascading or any NlogN approaches you know using iterative segment tree for the problem.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский roni123rohann 2023-07-30 17:19:02 5 Tiny change: ' implement as in the' -> ' implementation as in the'
en1 Английский roni123rohann 2023-07-30 08:55:52 954 Initial revision (published)