[20250831] BOJ / G5 / 치킨 배달 / 이준희 #783
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/15686
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
2차원 배열에 집, 치킨집이 있고 치킨거리는 집과 치킨집 사이의 맨해튼 거리를 말합니다.
이 때 마을에 치킨집 개수를 m 개만 남기고 폐업시키려고 할 때
마을에 있는 집들의 치킨거리의 합이 최소가 되는 경우의 치킨거리를 출력하는 문제입니다.
🔍 풀이 방법
모든 집 -> 치킨집 까지의 거리를 구한 후에
m개의 치킨집을 고르는 경우의 수를 모두 계산하였습니다.
⏳ 회고
n, m 자체가 크지 않아서 쉽게 풀었습니다.