No.3473 AtCoder < CMS
問題文最終更新日: 2026-03-21 05:42:22
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 494 オムニバス
(順位表)
の他の問題:
Problem Statement
You are given integers $N, M$. Find the number, modulo $998244353$, of integer sequences $A = (A_1, A_2, \cdots, A_N)$ of length $N$ such that each element is between $0$ and $2^M - 2$, inclusive, and the bitwise OR of all $A_i$ is $2^M - 1$.
You are given $T$ test cases; find the answer for each of them.
Input
$T$Here, $\mathrm{case}_i$ denotes the $i$-th test case, and each test case is given in the following format.
$\mathrm{case}_1$
$\mathrm{case}_2$
$\vdots$
$\mathrm{case}_T$
$N \ \ M$
- $1 \leq T \leq 100$
- $1 \leq N \leq 10^9$
- $2 \leq M \leq 10^9$
- All input values are integers.
Output
For each test case, print the answer on $1$ line, followed by a newline.
Sample
Sample 1
Input
3
2 2
1 3
2026 320
Output
2
0
417570173
- For the $1$-st test case, there are $2$ sequences $A$ satisfying the conditions: $(1, 2), (2, 1)$.
- For the $2$-nd test case, no sequence $A$ satisfies the conditions.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
蜜蜂