单点时限: 2.0 sec
内存限制: 512 MB
After thousands of battles, the astrologer Komorebi
, the warrior Amuzi
and the samurai lbromine
finally defeat the Elden Beast and get the Elden Remembrance. As usual, they decide to fight a duel to determine the ownership of the trophy.
They all have a deadly skill, but the skill will not hit the target certainly. Formally, Komorebi
‘s skill has the probability of Amuzi
‘s skill has the probability of lbromine
‘s skill has the probability of
Because of the difference of the role they choose,
For each turn, all living players can choose one target respectively, and use their skill at the same time.
Since they fight with each other for a long time, so they know each other very much, including the hit rate of their skills. And they are intelligent enough to make the greatest choice in each turn.
You will be given the hit rate of their skills and an integer
The first line contains an integer
The second line contains
Output Komorebi
, the warrior Amuzi
and the samurai lbromine
respectively.
You should output the answer modulo
2 80 60 40
839040006 985600007 606400005