Time limit
2000 ms
Memory limit
262144 kB
Source
Educational Codeforces Round 56 (Rated for Div. 2)
Tags
dfs and similar graphs *1600
Editorial
Announcement #1 (en) Announcement #2 (ru) Tutorial #1 (en) Tutorial #2 (ru)
Descriptions:

Beautiful Graph

CodeForces - 1093D