Using rust-competitive-helper and heaveily borrowing from:
- Eulerian stuff (to build segment trees on and do queries on paths or subtrees)
- Extension: create map from values to positions
- Make ArqSpec generic?
- Magic tree abstraction -- does queries on paths and subtrees very easily.
- kth order like we have in C++ with g++ libs
- Try using centroid decomposition and maybe make it more friendly to rust_algo graphs
- If graph is forest, split it to tree graphs
- ModInt shall accept 64 bit stuff (got -100 because of overflow in init...)