Time limit
1000 ms
Memory limit
262144 kB
Source
Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 2)
Tags
brute force dfs and similar dsu *1400
Editorial
Announcement (en) Tutorial (en)
Descriptions: