题号:NC225902
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
64bit IO Format: %lld
题目描述
There are

players. Each player chooses exactly one player except himself with the same probability, and then every player shoots the player he chooses simultaneously. Each shot hits the chosen player with probability

. All choices and hits are independent. A player dies if and only if hit by at least one shot. For each

, find the probability

exactly

player alive.
输入描述:
The only line contains three integers
,
, where
is the number of players and
is the probability of hit for each shot.
输出描述:
Output
lines. In the
-th line, output one integer indicating
module 998244353.
Formally, it can be proved that
is a rational number and it can be represented by
where the greatest common divisor of
and
is
. You should output one integer
such that
.
示例3
输出
复制
748683265
499122177
748683265
示例4
输出
复制
619281219
27729010
499122177
850356301
备注:
For the first example,
.
For the second example,
.
For the third example,
.
For the fourth example,
.