DFS
O(N + M)
S
void dfs (int v)
N
M
U
i
Vi が提供されます
g[i][j]
j
used
1000 ms 32 Mb Rules for program design and list of errors in automatic problem checking