O(n),O(1) lca/rmq; not method of 4 russians
Difference between en1 and en2, changed 36 character(s)
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/18
75458189

rmq https://judge.yosupo.jp/submission/18
75468190↵

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)