일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- itertools
- Combination
- 11기
- 코틀린
- 매일11시
- 1182
- 최소공배수
- LCS
- 파이썬
- 백준
- 6603
- lcm
- 11057
- Android
- 안드로이드
- 나머지
- permutation
- 순열
- Python
- 홈화면
- 11053
- 앱
- 괄호
- 뒤로가기
- 1260
- expo
- 11054
- Kotlin
- 9095
- 코테
Archives
- Today
- Total
목록11048 (1)
황소개발자
백준 11048 파이썬 python : 이동하기 @@황소처럼 우직하게@@
bfs로 풀어보았다. 다이나믹이 아닌 import sys input = sys.stdin.readline from collections import deque n, m = map(int, input().split()) mat = [] for i in range(n): mat.append(list(map(int, input().split()))) score = [[-1 for i in range(m)] for j in range(n)] score[0][0] = mat[0][0] dx = [1, 0] dy = [0, 1] def bfs(y, x): q = deque() q.append([y, x]) while q: y, x = q.popleft() for i in range(2): ny = y + dy[i]..
백준 문제 풀이
2020. 3. 12. 10:32