No.2097 AND^k
タグ : / 解いたユーザー数 18
作問者 :
taiga0629kyopro
/ テスター :
Problem Statement
You are given positive integers $N$,$M$,$L$. Solve the following problem for $k=1,2,\dots,L$.
There are $2^{NM}$ sequences $A$ of length $N$ in which each element is an integer at least $0$ and less than $2^M$. Find the sum of $(A_1\ \mathrm{AND}\ A_2\ \mathrm{AND} \dots \mathrm{AND}\ A_N)^k$ over all of them, modulo $998244353$.
What is $\mathrm{AND}$? (click to expand)
$\mathrm{AND}$ denotes the bitwise logical AND.
Input
$N$ $M$ $L$
Output
Print $L$ lines.
On the $i$-th line, print the answer for $k=i$.
Sample
Sample 1
Input
2 2 2
Output
12 24
For $k=1$, the answer to be found is $\displaystyle \sum_{x=0}^3 \sum_{y=0}^3 (x\ \mathrm{AND}\ y)^1=12$.
For $k=2$, the answer to be found is $\displaystyle \sum_{x=0}^3 \sum_{y=0}^3 (x\ \mathrm{AND}\ y)^2=24$.
Sample 2
Input
3 3 3
Output
448 1568 6496
Sample 3
Input
100 100 5
Output
495103078 305228311 29664754 176921287 683149961
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。