목록코딩 테스트/기타 (2)
IT보안관의 공부 클라우드
https://www.youtube.com/watch?v=7C9RgOcvkvo&list=PLRx0vPvlEmdAghTr5mXQxGpHjWqSz0dgC&index=3 from collections import deque def bfs(x,y,graph): q = deque([[x,y,graph[x][y]]]) print(q) prev=0 while 1: a,b,c=q.popleft() # print(q, a, b) if a == n - 1 and b == m - 1: graph[a][b] +=c return graph if a = n or b>= m: continue print(q, a, b) for i in graph: print(i) if graph[a][b] == 0..
https://www.youtube.com/watch?v=7C9RgOcvkvo&list=PLRx0vPvlEmdAghTr5mXQxGpHjWqSz0dgC&index=3 def dfs(x,y,graph): if x = n or y = m: return if graph[x][y] == 1: return False else: graph[x][y] = 1 dfs(x-1,y,graph) dfs(x+1,y,graph) dfs(x,y-1,graph) dfs(x,y+1,graph) return True from collections import deque n,m = map(int,input().split()) graph=[] cnt = 0 for i in range(n): graph.a..