A63 - Shortest Path 1
提出
code: python
from collections import deque
n, m = map(int, input().split())
g = {}
for i in range(1, n+1):
for a, b in ab:
print(g)
for k in range(1, n+1):
ans = 0
print(ans)
continue
while now:
# どうやって最小にする?
next = now.popleft()
ans += 1
print(ans)
break
else:
print(ans + 1)
break
continue
else:
now.append(v)
print(-1)
解答
code: python
from collections import deque
N, M = map(int, input().split())
for a, b in ab:
now = deque()
now.append(1)
while len(now) >= 1:
next = now.popleft()
now.append(v)
for i in range(1, N + 1):