This problem is in Contest(s) below:
Contest 1037:컴퓨터알고리즘 기말 과제용 콘테스트