논리
- 고슴도치가 비버소굴에 갈 수 있는 최단 시간 --> bfs 활용
- 고슴도치는 다음번 물이 올 자리에 가지 못한다 --> 물을 먼저 이동시키고 고슴도치를 이동시킨다
- '물들, 고슴도치들' 순서로 이동시키기 위해 큐에 (False, water1..waterN, hedgehog1..hedgehogM) 순으로 삽입하고 Fasle를 통해 각 시간의 구분을 두었다(큐에서 pop한게 False라면 time++ 수행하고 다시 Fasle 삽입)
- 고슴도치가 비버소굴에 도착하면 반복문을 탈출하여 time 반환
- 모든 queue를 소모해서 False만 남게 되면 반목문 종료 --> 고슴도치가 도착 못한 것을 확인하면 -1 반환
코드
import sys
from collections import deque
def escape():
# bfs: waters, hedgehogs에 따라 다르게 수행
def _spread(x, y, id):
for i in range(4):
nx, ny = x + dr[i][0], y + dr[i][1]
if 0 <= nx < R and 0 <= ny < C:
# water case
if id == '*' and (field[nx][ny] == '.' or field[nx][ny] == 'S'):
field[nx][ny] = '*' #
queue.append((nx, ny, '*'))
# hedgehog case
elif id == 'S':
# check hedgehog reaches to beaver
if field[nx][ny] == 'D':
return True
elif field[nx][ny] == '.':
field[nx][ny] = 'S'
queue.append((nx, ny, 'S'))
return False
###################################################
# inputs
R, C = list(map(int, sys.stdin.readline().split()))
waters = [] # 초기 water의 좌표들
hedgehog = None # 처음 고슴도치의 좌표
field = [None] * R
for i in range(R):
field[i] = list(sys.stdin.readline().strip())
for j in range(C):
if field[i][j] == '*':
waters.append((i, j, '*'))
elif field[i][j] == 'S':
hedgehog = (i, j, "S")
###################################################
dr = [(-1, 0), (0, 1), (1, 0), (0, -1)]
queue = deque([False] + waters + [hedgehog]) # False는 시간 사이의 간격
time = 0
survived = False # 비버소굴에 도착했는지
while len(queue) > 1:
curr = queue.popleft()
# update time
# deque([False, (waters ...), (hedgehogs...)] 일때 False가 leftpop되면 이전 time은 끝나고 time+1로 갱신
if not curr:
time += 1
queue.append(False)
continue
# waters. hedgehogs일 경우 bfs 수행하고 비버소굴에 도착했는지 확인
x, y, identity = curr
if _spread(x, y, identity):
survived = True
break
if survived:
return time
return "KAKTUS"
print(escape())
(이미지 출처)
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBYWFRgWFhYZGRgaGBwaHBwZGhoaGRgaGBgZGhoYHBkcIS4lHB4rIRoYJzgmKy8xNTU1HCQ7QDs0Py40NTEBDAwMEA8QHxISHzQrJSw0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0Mf/AABEIAOYA2wMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAAEAQIDBQYAB//EADoQAAIBAwMCBAQFAwMDBQEAAAECEQADIQQSMUFRBQYiYRMycYGRobHB8EJS0QcU4RaC8RUjYnKiM//EABkBAAMBAQEAAAAAAAAAAAAAAAECAwAEBf/EACURAAIDAAICAgICAwAAAAAAAAABAhEhEjEDQSJRE2EEoRRx0f/aAAwDAQACEQMRAD8Awemsya7UrFWZQKPaq+/k1C9LVQMHqUvimKgmiIEVmLTK/aZmo72CDRjxNC3hNMmKwlL2KRG3HNRosCkTBms0Bhhshc1Dc1Bos3htqu5JpFvZqHoZolEFCAVIlyKMlYWh2pSOKW1bxTmcGnM420NqhHZX3fmrttOakLVUaia24Fc94sYoffSb4NDj7AavSapFSDiBVYNTLkjAmqy3dkxRjCBNJJemI0WV67K1Xtmgb2qNJb1WKWPjcQxjRLecCokvzUF65NNRqtxwax168Zrku8Go2o7T6WRJrNpIxp9N4imyZHHFV3+6FVTQvFR/GqbgmI1ZvfGNKgtmQBtGIxWKvvR+t17vgkwOAarnrI6JOyAOamVj3octRFo05OxWNcqUiiaIK4pWwoGbtXNXOuaXbNEIO0miLSUq26kLRWbAkIbdMcCmPfpm+aNGbGXHPSmNdNNc5pHQhQxEBpIPfaYaPocUaFEDmnNRCeGXTvhGPwzD4wCDG2eCfp+4ltvSuyO6rKW9pZpEDe21Bk5JIMAScMeAY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nbDRJa0YjgRB/ITzUOoUghcZ47DE11dWs1ArXjG6TAPFE6HUcSOT3yMiurq0jI0Og8Xk7ADAjBgiIgAdRHajr2qNy2CSwHqkggGQdojEHMc4gcV1dUX2UXRX/APTasG9bAbCoIFsPE5UEIAqkEAgDpPMkm2/CNKlpkCErDjKoCs7uCm3gGB2AFdXUAAXiPlJLm1Q0PtndBO4nJJJYkcY56ZPNYHxby2bTMGKmDGCegnqPekrqeOoVlculwAD9PbvUvwO3v39un3rq6mRiF0GY5n+fSmsP1j8ppK6mFJRabqR/5j296Z+vH8iurqzMPAxPTpHOf/FNuEfh7CaWurGHKs/zNIUHXkA/nP8Aiurqwo3aPem47V1dWGEa4BGOaRjNdXUEAnt2+tJs+ldXUDI//9k=
'dev > 알고리즘문제풀이' 카테고리의 다른 글
[ 백준 11725번] 트리의 부모 찾기 파이썬 (1) | 2021.08.24 |
---|---|
[ 백준 2637번 ] 장난감 조립 파이썬 (0) | 2021.08.24 |
[ 백준 2617번 ] 구슬찾기 파이썬 (0) | 2021.08.24 |
[ 백준 2294번 ] 동전2 파이썬 (0) | 2021.08.24 |
[ 백준 7569번 ] 토마토 파이썬 (2) | 2021.08.24 |