Codeforces Round #599 (Div. 1) B. 0-1 MST(图论+dfs)

NoSuchKey