Skip to content

Conversation

@lkhyun
Copy link
Contributor

@lkhyun lkhyun commented Jul 17, 2025

🧷 문제 링크

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

🧭 풀이 시간

90분

👀 체감 난이도

✏️ 문제 설명

크기가 N인 배열을 정렬해라.
근데 M개의 특정한 두 개의 인덱스끼리만 바꿀 수 있다.
바꾸는데 비용이 든다.
정렬하는데 드는 최소 비용을 출력해라.

🔍 풀이 방법

다익스트라, 해시를 이용한 맵

⏳ 회고

다익스트라인데, int 배열로 했던 distance 기록을 맵으로 기록하는 것으로 바꾼거임.
근데 애초에 다익스트라라고 생각하는 것도 좀 힘들고 int[]로 상태 저장해둔다는 게 좀 까다로웠음. 대혁준

@lkhyun lkhyun self-assigned this Jul 17, 2025
@lkhyun lkhyun added success 👍 해설을 보지 않고 풀었을 때 hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 timeout ⌚ 목표 시간보다 오래걸렸을 때 labels Jul 17, 2025
@ShinHeeEul ShinHeeEul merged commit e803c10 into main Jul 17, 2025
1 check passed
@oncsr
Copy link
Contributor

oncsr commented Jul 17, 2025

ㄷㄷㄷ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 success 👍 해설을 보지 않고 풀었을 때 timeout ⌚ 목표 시간보다 오래걸렸을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants