Comments
+9

I haven't seen any official announcement, but right now there's no beta sign nearby the Codeforces logo. Maybe it's just because unusual theme due to holidays.

Yes. It's actually almost the same as http://pythontutor.ru, but in English.

"In code we trust".

But that solution's complexity is O(nlog2n), instead O(nlogn) for the solution with compression.

What is r2k summand in the time complexity of the problem Orchestra for? Why it's not just r2? Seems that you don't need to change anything if there're no violist with current xhi, but if it's so, you have already counted it in rnk summand.

Maybe author want to say, that you can choose any vertex as a root of the tree and then consider our tree as oriented (forbid to go 'up'). Seems that it's enought to consider only vertexies set, which are prefixies of dfs, started in some vertex of such oriented tree.

I was wrong, but you can calculate the second dp: the optimal answer for the 'subtree', which consists from all vertexes, except the vertexes in the subtree of the vertex u. If you reuse values of the first dp, you don't increase the time complexity.