#P4707. 重返现世
重返现世
Description
To open the gate back to the real world, Yopilla needs to craft the key that unlocks it. On the Lost Continent where Yopilla is, there are kinds of materials. As long as he gathers any kinds, he can start crafting.
Yopilla arrives at the core area of the Lost Continent. In each unit of time, this area will randomly generate one kind of material. The probability of generating the -th kind of material is . If Yopilla does not have this material, then he can collect it.
Yopilla urgently wants to know the expected time for him to collect any kinds of materials. Output the answer modulo .
Input Format
The first line contains three integers .
The second line contains integers .
Output Format
Output one line.
3 3 3
1 1 1
499122182
Hint
For of the testdata, .
For another of the testdata, .
For of the testdata, .
For of the testdata, , , , , , 。
Translated by ChatGPT 5
京公网安备 11011102002149号