Codeforces-solutions/ITMO Academy: pilot course - Segment Tree, part 2 - Step 2