Nu exista diferente intre titluri.
Diferente intre continut:
The third line contains $N-1$ integers: $P_i$ (with $1 ≤ i < N$) is the index of the parent of the $i$-th node.
h2. Date de ieşire
For tests worth $13$ points, the tree is a line.
The output file $christmas-balls.out$ contains a single line with an integer: chosen the optimal subtree, the number of colors with the highest frequency.
For tests worth $15$ more points, $1 ≤ N ≤ 1000$, $1 ≤ MAXC ≤ 2$.
For tests worth $21$ more points, $1 ≤ N ≤ 1000$.
h2. Restrictii
For tests worth $17$ more points, $1 ≤ MAXC ≤ 2$.
* For tests worth $13$ points, the tree is a line.
* For tests worth $15$ more points, $1 ≤ N ≤ 1000$, $1 ≤ MAXC ≤ 2$.
* For tests worth $21$ more points, $1 ≤ N ≤ 1000$.
* For tests worth $17$ more points, $1 ≤ MAXC ≤ 2$.
* The scores obtained now may be different compared to the ones from the original contest
h2. Date de ieşire
The output file $christmas-balls.out$ contains a single line with an integer: chosen the optimal subtree, the number of colors with the highest frequency.
h2. Exemplu
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.