This problem is in Contest(s) below:
Contest 1044:数组应用过关习题集(一)