#P15443. [蓝桥杯 2025 国研究生组] 黑球与白球
[蓝桥杯 2025 国研究生组] 黑球与白球
Problem Description
Xiao Lan has white balls and black balls.
In each operation, Xiao Lan randomly selects 5 balls with equal probability. For the 5 selected balls, Xiao Lan dyes all of them into the color that appears most among these 5 balls. Find the probability that after rounds, all balls are of the same color. Output the answer modulo .
Input Format
Input one line containing three non-negative integers , separated by one space.
Output Format
Output one line containing one integer representing the answer.
Since the answer may be in the form , you need to output , where .
1 5 2
138645050
5 5 10
776052319
Hint
Sample Explanation 1
The answer for this sample, written as a fraction, is .
Constraints and Notes
For of the testdata, , .
For of the testdata, .
For all testdata, , , , .
Translated by ChatGPT 5