[20251216] BOJ / G5 / 멀티버스 Ⅱ / 설진영 #1691
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/18869
🧭 풀이 시간
35분
👀 체감 난이도
✏️ 문제 설명
M개의 우주가 있고 각 우주에 N개의 행성이 있을 때, 균등한 우주 쌍의 개수를 구하는 문제
두 우주가 균등하다는 것은 모든 행성 쌍의 대소관계가 동일하다는 의미
🔍 풀이 방법
좌표압축을 활용
각 우주의 행성 크기를 상대적 순위(rank)로 변환하면, 균등한 우주는 동일한 rank 배열을 가진다
⏳ 회고
좌표압축을 생각못할뻔