link: https://www.acmicpc.net/problem/20061

구현 빡센 문제