#P17285. 「IXOI R2」不会说明你有鱼鱼蒸
「IXOI R2」不会说明你有鱼鱼蒸
Problem Description
Given , we call a sequence of length good if and only if:
-
.
-
.
We generate in a special way: initially set for all . Then perform operations. In each operation, choose uniformly at random, and then set .
Let be the probability that after operations, the generated sequence is good. Compute .
Input Format
Input one line with three integers .
Output Format
Output one integer, the answer modulo .
3 4 0
21
Hint
This problem uses bundled testdata.
| Subtask | Constraints | Score |
|---|---|---|
| No special restrictions. |
For all testdata, it is guaranteed that:
, and .
Translated by ChatGPT 5