4179

·Algorithm/baekjoon
문제https://www.acmicpc.net/problem/4179풀이 코드from collections import dequeimport sys# J와 F동시에 BFS시작# 탐색한 좌표를 담을 수 있는 변수 x 필요 # 해당 변수에 J와 F를 구분할 수 있는 변수 필요# 좌표를 담은 변수x를 pop하며 탐색 진행# 탐색을 한 후, 다시 x에 저장, 이때 카운티 1증가# J가 F랑 곂치면 임파서블 출력# J가 벽 외각에 도달하면 cnt 출력r,c = map(int,input().split())dx = [-1,1,0,0]dy = [0,0,-1,1]answer = "IMPOSSIBLE"def bfs(): global answer while que: # print(mapp) ..
Shine_sunho
'4179' 태그의 글 목록