[python] [백준] 15686 치킨 배달
문제 https://www.acmicpc.net/problem/15686 15686번: 치킨 배달 크기가 N×N인 도시가 있다. 도시는 1×1크기의 칸으로 나누어져 있다. 도시의 각 칸은 빈 칸, 치킨집, 집 중 하나이다. 도시의 칸은 (r, c)와 같은 형태로 나타내고, r행 c열 또는 위에서부터 r번째 칸 www.acmicpc.net 코드 from itertools import combinations n, m = map(int, input().split()) graph = [list(map(int, input().split())) for _ in range(n)] chicken = [] home = [] def get_dist(x1, y1, x2, y2): return abs(x1 - x2) + ab..
2023. 3. 4.