문제폴리오미노https://www.acmicpc.net/problem/1343 풀이설명X를 폴리오미노로 모두 덮었을 때, 사전순으로 가장 앞서는 답을 구하는 문제입니다. 폴리오미노의 종류는 두 가지입니다.AAAABB 사전순으로 앞서야 하므로 AAAA를 모두 덮은 다음, 남은 X를 BB로 덮으면 됩니다. 예시 코드function solution() { const S = input(); const result = S.replace(/XXXX/g, "AAAA").replace(/XX/g, "BB"); return result.includes("X") ? -1 : result;}