https://algospot.com/judge/problem/read/XHAENEUNG