Toyota Programming Contest 2023 Spring Qual A(AtCoder Beginner Contest 288)
翻译中…
Problem Statement
翻译中…
Print the number of integer sequences of length $N$, $A = (A_1, A_2, \ldots, A_N)$, that satisfy both of the following conditions, modulo $998244353$.
翻译中…
$0 \leq A_1 \leq A_2 \leq \cdots \leq A_N \leq M$$A_1 \oplus A_2 \oplus \cdots \oplus A_N = X$
翻译中…
Here, $\oplus$ denotes bitwise XOR.
翻译中…
What is bitwise XOR? The bitwise XOR of non-negative integers $A$ and $B$, $A \oplus B$, is defined as follows. When $A \oplus B$ is written in binary, the $k$-th lowest bit ($k \geq 0$) is $1$ if exactly one of the $k$-th lowest bits of $A$ and $B$ is $1$, and $0$ otherwise. For instance, $3 \oplus 5 = 6$ (in binary: $011 \oplus 101 = 110$).
翻译中…
Constraints
翻译中…
$1 \leq N \leq 200$$0 \leq M \lt 2^{30}$$0 \leq X \lt 2^{30}$- All values in the input are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N M X
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
3 3 2
Output #1
5
Here are the five sequences of length $N$ that satisfy both conditions in the statement: $(0, 0, 2), (0, 1, 3), (1, 1, 2), (2, 2, 2), (2, 3, 3)$.
Input #2
200 900606388 317329110
Output #2
788002104
题目信息
题号
abc288_h
时间限制
3 s
内存限制
1024 MB
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。