Codeforces Round #583 (Div. 1 + Div. 2) E. Petya and Construction Set(树上构造) Source will download... Codeforces Round #583 (Div. 1 + Div. 2) E. Petya and Construction Set(树上构造)