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/1875458189↵
↵
rmq https://judge.yosupo.jp/submission/1875468190↵
↵
edit: minor golf
↵
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
↵
rmq https://judge.yosupo.jp/submission/18
↵
edit: minor golf