Skip to content

Conversation

@Seol-JY
Copy link
Contributor

@Seol-JY Seol-JY commented Jul 2, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/1715

🧭 풀이 시간

35분

👀 체감 난이도

✏️ 문제 설명

숫자 카드 묶음이 N개 주어지고,
카드 두 묶음을 합치려면, 각 묶음의 카드 수를 더한 만큼의 비교 작업이 필요
이걸 반복해서 모든 카드 묶음을 하나로 만들되, 비교 횟수의 총합이 최소가 되게 만드는 게 목표

🔍 풀이 방법

작은 묶음부터 합쳐야 비교 횟수가 작아진다는 것을 인지

모든 카드 묶음을 우선순위 큐에 넣음
큐에서 2개를 꺼내 합치고, 그 값을 누적 비교 횟수에 더하기
큐에 1개만 남을 때까지 반복

⏳ 회고

그리디+우선순위 문제

@Seol-JY Seol-JY added the success 👍 해설을 보지 않고 풀었을 때 label Jul 2, 2025
@ShinHeeEul ShinHeeEul merged commit cde2aff into main Jul 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants