Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

### Endagorion's blog

By Endagorion, history, 18 months ago, translation, ,  Tutorial of Technocup 2019 - Elimination Round 4   Tutorial of Codealittle Contest-1 Comments (14)
 » Thanks for fast editorial
•  » » so fast
 » I want to ask questions about the solution F:the 2 n polynomials,is it should be n 2 polynomials?
•  » » 2 n since the inclusion-exclusion formula is used in the proof. But it is only the proof that the main function is a polynomial, we don't need to actually compute all these 2 n summands.
 » Out of curiosity, may I ask problemsetters about their views to criticism on Div1C? There seems to be quite negative feedback to this problem. Do you think it is reasonable to appear in CF rounds? Do you think people's criticism make sense? Thanks.
•  » » I am not a setter of this problem, but I considered it to be OK when it was proposed. Perhaps it would be better if we didn't ask for a certificate.But I still don't quite understand why it received such an amount of hate. There are problems which at first seem like handling a lot of corner cases without applying any specific idea, but if contestant thinks carefully before starting to write code, then he can reduce the length of this solution and the number of cases he needs to handle. I understand how this problem can be seen as a bad one if someone picks the first solution idea that comes to his mind and starts implementing it right away, but is it a good strategy on contests?
•  » » » I know this thread is quite old, but I'll write this for any future visitorsConsider any edge $\displaystyle e \in E$ and let $\displaystyle x , y$ be the number of leaves on either side of the subtrees of this particular edge. Then the number of paths between leaf vertices, such that $\displaystyle e$ belongs to this path is given by $\displaystyle x*y.$ If $\displaystyle l$ be the total number of leaves, then we have $\displaystyle x + y = l.$ Therefore, the minimum number of paths (leaf to leaf) in which the edge $\displaystyle e$ is a part of is, when there is one leaf on one side and $\displaystyle l - 1$ leaves on the other side. Hence each edge will be part of atleast $\displaystyle 1*(l-1) = l- 1$ paths.