This problem is in Contest(s) below:
Contest 1847:七年级二分练习
Contest 1626:位运算、倍增、二分、贪心复习
Contest 1998:零基础第七节
Contest 1862:单招测试题