05-21 07:17
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Polymolphism
- OOP
- Operator
- literal
- X.org
- Java
- 리눅스 마스터 1급
- Entity Set
- systemd
- 셀레니움
- spring
- BFS
- Physical Scheme
- X윈도우
- Class
- 리눅스
- 자바
- preprocessing
- selenium
- Mac
- descriptive statistics
- dbms
- Unity
- Entity
- python
- External Scheme
- 백준
- Reference Type
- Inheritance
- Binary Search
Archives
- Today
- Total
목록코딩대회 (1)
Byeol Lo
미로찾기 - bfs
from collections import deque graph = [ [1,1,1,0,0], [1,0,1,0,1], [1,1,1,1,1], [1,1,0,0,1], [1,1,1,1,1] ] dx = [1,-1,0,0] dy = [0,0,1,-1] visited = [[False]*5 for _ in range(5)] path = deque() def solution(graph, visited, x, y) : visited[y][x] = True path = deque([[x, y]]) while path : x, y = path.popleft() for i in range(4) : pos1, pos2 = x+dx[i], y+dy[i] if 0
Programming Language/Python
2022. 9. 2. 19:16