This problem is in Contest(s) below:
Contest 1068:2022년도 1학기 알고리즘및실습 2장 문제
Contest 1093:2023년도 1학기 알고리즘및실습 2장
Contest 1118:2024년도 1학기 알고리즘및실습 2장
Contest 1045:알고리즘및실습 2021년도 1학기 2장 문제