거리두기 확인하기
![[프로그래머스] 거리두기 확인하기 [python]](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fuqg9b%2Fbtr6GVsT4n9%2F4vpiDpLWI4fovw5f75GeTk%2Fimg.png)
[프로그래머스] 거리두기 확인하기 [python]
문제 BFS로 문제를 풀었다,,실수가 많아서 오래 걸렸다,, 금방 풀줄 알았는데,, 코드 def solution(places): answer = [] for place in places: q = [] for i,p in enumerate(place): for j in range(len(place)): if p[j] == "P": q.append([i,j]) if len(q) == 0: answer.append(1) continue if bfs(place, q): answer.append(1) continue answer.append(0) return answer def bfs(graph, q): mX = [0,0,1,-1] mY = [1,-1,0,0] for c in q: queue = [[c[0], c..