P7481 Dream Moment
Description
Given $n, m$, with $m \le n$ guaranteed, define $F(a,b)=\sum_{i=0}^{b}\binom{b}{i}\binom{n-i}{a}$.
Find $\bigoplus_{a=1}^{m}\bigoplus_{b=1}^{m}(F(a,b) \bmod 998244353)$.
Here $\oplus$ denotes the XOR operation.
Input Format
The first line contains two integers $n, m$, with the same meaning as in the statement.
Output Format
Output one integer representing the answer.
Explanation/Hint
**【Constraints】**
**This problem uses bundled testdata.**
For $100\%$ of the testdata, $1 \le n \le {10}^9$, $1 \le m \le 5000$, and $m \le n$ is guaranteed.
- Subtask 1 (20 points): $n \le 500$.
- Subtask 2 (30 points): $n \le 5000$.
- Subtask 3 (50 points): no special constraints.
Translated by ChatGPT 5