D. Harmonious Graph (Codeforces Round # 600 (Div. 2)) (disjoint-set thinking +)

NoSuchKey

Guess you like

Origin blog.csdn.net/weixin_42856843/article/details/103115497