[백준] 2178번 미로 탐색
from collections import deque n, m = map(int, input().split()) graph = [] visited = [] for _ in range(n): graph.append(list(map(int, input()))) dx = [-1, 1, 0, 0] dy = [0, 0, -1, 1] def bfs(x, y): queue = deque() queue.append([x, y]) while queue: x, y = queue.popleft() for i in range(4): nx = x + dx[i] ny = y + dy[i] if nx = n or ny = m: continue if graph[nx][ny] == 0: cont..
코딩테스트 대비
2022. 2. 21. 15:14
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 카카오
- shellscript
- Python
- 백준
- n과m
- 최소신장트리
- notfound
- version
- error
- LGSVL
- 파이썬
- torch
- 이것이코딩테스트다
- 프로그래머스
- CUDA
- 다익스트라
- BFS
- PIP
- matplotlib
- 백트래킹
- docker
- numpy
- 코딩테스트
- 설치하기
- torchscript
- 동적프로그래밍
- dfs
- tensorflow
- 설치
- pytorch
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함