This problem is in Contest(s) below:
Contest 1017:动态分配内存