목록알고스팟 (1)
황소개발자
백준 1261 파이썬 python : 알고스팟 @@황소처럼 우직하게@@ 화이팅!
고진감래다 import sys from collections import deque input = sys.stdin.readline w, h = map(int, input().split()) miro = [[] for i in range(h)] for i in range(h): ss = input().strip() for s in ss: miro[i].append(int(s)) dx = [1, -1, 0, 0] dy = [0, 0, 1, -1] ans = 999999999 def bfs(y, x): q = [[y, x]] nxtq = [] miro[y][x] = 2 while q: now = q.pop(0) for i in range(4): ny = now[0] + dy[i] nx = now[1] + d..
백준 문제 풀이
2020. 3. 3. 16:46