Problem statement : http://codeforces.me/contest/842/problem/E
How is the tree structure generated in the problem? (I am confused by the words "level" and "classes". Do they mean the same thing?)
Also, the input section describes "queries"? AFAICS, the queries contain the information to build the tree (submissions by other contestants). The sample test cases do not have any explanations, which makes is hard for me to understand the question.
Thank you for your time and attention.