I was trying out segment tree problems and had some confusions in understanding the solutions for problems involving segment tree with offline queries.
Here are two problems GQR and 301D - Ярослав и делители, for which I was referring to solutions GQR_AC and 36281412 respectively.
If anyone could help me understand these solutions in detail, it would be a great help.
Thanks!