PROGRAMMING:Kung Fu heirs
Whether a martial art can be inherited and carried forward depends on fate. Generally speaking, the martial arts taught by the master to the disciples are always discounted, so the more they pass on, the weaker their martial arts will become... Until a certain generation of a certain branch suddenly appears a disciple with special talent (or has eaten the elixir or dug up a special secret Collection), which will magnify the power of martial arts n times at once - we call this kind of disciple "the virtuous one".
Let's examine the genealogy of a Grandmaster's disciples and grandchildren: suppose that everyone in the genealogy has only one master (except grandmaster); Each master can bring many apprentices; And assuming that the seniority is strictly orderly, that is to say, each 'I' generation of master Zu can only worship one master among the 'I-1' generations. Let's assume that the grandmaster's skill value is' Z '. Every time he passes it down to the next generation, it will be reduced by' R% ', unless a certain generation of disciples get the Tao. Now I give you the pedigree relationship of the teachers. I ask you to calculate the total power of all the masters.
###Input format:
Input three positive integers in the first line, which are respectively: $$n $$($$Le 10 ^ 5 $$) -- the total number of the whole school (so each person is numbered from 0 to $$n-1 $$, and the grandmaster's number is 0)$$ Z $$-- grandmaster's skill value (not necessarily an integer, but at least a positive number)$$ R $$-- discount percentage of each generation of Kung Fu (no more than a positive number of 100). Next, there is the $$n $$line, and the $$I $$line ($$I = 0, cdots, n-1 $) describes the apprentice passed on by the person with the number of $$I $, in the following format:
$$K_ i$$ ID[1] ID[2] $$\cdots$$ ID[$$K_ i$$]
Where $$k_ I $$is the number of apprentices, followed by the number of apprentices, and the numbers are separated by spaces$$ K_ If I $$is zero, it means that he is a virtuous person. At this time, a number following him indicates the magnification of his martial arts.
###Output format:
Output the total power of all the masters in one line, and only keep the integral part. The title ensures that the input and correct output are no more than $$10 ^ {10} $$.
###Input example:
```in
10 18.0 1.00
3 2 3 5
1 9
1 4
1 7
0 7
2 6 1
1 8
0 9
0 4
0 3
```
###Output example:
```out
four hundred and four
```
answer:If there is no answer, please comment
Let's examine the genealogy of a Grandmaster's disciples and grandchildren: suppose that everyone in the genealogy has only one master (except grandmaster); Each master can bring many apprentices; And assuming that the seniority is strictly orderly, that is to say, each 'I' generation of master Zu can only worship one master among the 'I-1' generations. Let's assume that the grandmaster's skill value is' Z '. Every time he passes it down to the next generation, it will be reduced by' R% ', unless a certain generation of disciples get the Tao. Now I give you the pedigree relationship of the teachers. I ask you to calculate the total power of all the masters.
###Input format:
Input three positive integers in the first line, which are respectively: $$n $$($$Le 10 ^ 5 $$) -- the total number of the whole school (so each person is numbered from 0 to $$n-1 $$, and the grandmaster's number is 0)$$ Z $$-- grandmaster's skill value (not necessarily an integer, but at least a positive number)$$ R $$-- discount percentage of each generation of Kung Fu (no more than a positive number of 100). Next, there is the $$n $$line, and the $$I $$line ($$I = 0, cdots, n-1 $) describes the apprentice passed on by the person with the number of $$I $, in the following format:
$$K_ i$$ ID[1] ID[2] $$\cdots$$ ID[$$K_ i$$]
Where $$k_ I $$is the number of apprentices, followed by the number of apprentices, and the numbers are separated by spaces$$ K_ If I $$is zero, it means that he is a virtuous person. At this time, a number following him indicates the magnification of his martial arts.
###Output format:
Output the total power of all the masters in one line, and only keep the integral part. The title ensures that the input and correct output are no more than $$10 ^ {10} $$.
###Input example:
```in
10 18.0 1.00
3 2 3 5
1 9
1 4
1 7
0 7
2 6 1
1 8
0 9
0 4
0 3
```
###Output example:
```out
four hundred and four
```
answer:If there is no answer, please comment