AlgoWiki

Persistent segment tree

Problems

See also


  1. Note that the test cases are a little bit shady, sometimes giving queries i,ji,j that don't satisfy 1ijn1\leq i\leq j\leq n. Blue.Mary describes the correct behaviour in the comments.