O(n),O(1) lca/rmq; not method of 4 russians

Revision en2, by lrvideckis, 2024-02-03 21:56:44

I came across this paper

On Finding Lowest Common Ancestors: Simplification and Parallelization by Baruch Schieber, Uzi Vishkin April, 1987

so naturally I tried to code golf it

lca https://judge.yosupo.jp/submission/188189

rmq https://judge.yosupo.jp/submission/188190

edit: minor golf

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English lrvideckis 2024-02-03 21:56:44 36 Tiny change: 'ion/188190' -> 'ion/188190\n\nedit: minor golf'
en1 English lrvideckis 2024-02-01 08:44:54 325 Initial revision (published)