2021-01-13から1日間の記事一覧
Atcoder Begginer Contest 169 でのキューを使った幅優先探索のメモ atcoder.jp import os, sys, re, math from collections import deque N,M = map(int, input().split(' ')) tag = [-1] * N path_r = {} for _ in range(M): A,B = map(lambda x: int(x) -…
Atcoder Begginer Contest 169 でのキューを使った幅優先探索のメモ atcoder.jp import os, sys, re, math from collections import deque N,M = map(int, input().split(' ')) tag = [-1] * N path_r = {} for _ in range(M): A,B = map(lambda x: int(x) -…