boj

Python/알고리즘 문제풀이

[백준][파이썬] 점프왕 쩰리(small)

백준 온라인저지 점프왕 쩰리(small) 문제풀러 바로가기👇👇👇👇👇👇 점프왕 쩰리(Small) 문제풀이 from collections import deque n = int(input()) graph = [] for i in range(n): graph.append(list(map(int, input().split()))) dx = [1, 0] dy = [0, 1] def bfs(x, y): queue = deque() queue.append((x, y)) visit = [[False]*n for _ in range(n)] while queue: x, y = queue.popleft() move = graph[x][y] if move == -1: return True for i in range(2): nx..

gakko
'boj' 태그의 글 목록