Skip to content

Conversation

@JHLEE325
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

2차원 배열에 집, 치킨집이 있고 치킨거리는 집과 치킨집 사이의 맨해튼 거리를 말합니다.
이 때 마을에 치킨집 개수를 m 개만 남기고 폐업시키려고 할 때
마을에 있는 집들의 치킨거리의 합이 최소가 되는 경우의 치킨거리를 출력하는 문제입니다.

🔍 풀이 방법

모든 집 -> 치킨집 까지의 거리를 구한 후에
m개의 치킨집을 고르는 경우의 수를 모두 계산하였습니다.

⏳ 회고

n, m 자체가 크지 않아서 쉽게 풀었습니다.

@ShinHeeEul ShinHeeEul merged commit 527a023 into main Aug 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants