ACLPC J
ACLPC_J
https://gyazo.com/7b156fa7d40d819dbdc9f6ab4ce42bda
segment tree is a tree that can speed up this kind of operation. As for query 3, we'll do a binary search.
---
This page is auto-translated from /nishio/ACLPC J. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.