This problem is in Contest(s) below:
Contest 1090:线段树从入门到入门
Contest 1286:线段树从入门到入门
Contest 1418:线段树从入门到入门