This problem is in Contest(s) below:
Contest 1183:小朋友来玩线段树
Contest 1453:线段树回顾
Contest 1290:Treap,FHQ Treap,Splay,线段树标记永久化
Contest 1090:线段树从入门到入门
Contest 1286:线段树从入门到入门
Contest 1418:线段树从入门到入门