This problem is in Contest(s) below:
Contest 3337:柯灵基础