Pagini recente » Diferente pentru girls-programming-camp-2011/selectie/solutii intre reviziile 6 si 5 | Diferente pentru runda/w2 intre reviziile 8 si 9 | Profil Andrei_Popa | Diferente pentru links intre reviziile 106 si 130 | Diferente pentru problema/christmas-balls intre reviziile 5 si 4
Nu exista diferente intre titluri.
Diferente intre continut:
h2. Date de intrare
The first line of the input file $christmas-balls.in$ contains the only integer $N$ $1 ≤ N ≤ 10^5$, the number of nodes of the tree.
The first line of the input file $christmas-balls.in$ contains the only integer $N$ ($1 \le N \le 10^5$), the number of nodes of the tree.
The second line contains $N$ integers $C_i$ $0 ≤ C_i < N$, the colors of each ball.
The second line contains $N$ integers $C_i$ ($0 ≤ C_i < N$), the colors of each ball.
The third line contains $N-1$ integers: $P_i$ (with $1 ≤ i < N$) is the index of the parent of the $i$-th node.
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.