#P7481. 梦现时刻

梦现时刻

Problem Description

Given n,mn, m, with m≤nm \le n guaranteed, define F(a,b)=∑i=0b(bi)(n−ia)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,mn, m, with the same meaning as in the statement.

Output Format

Output one integer representing the answer.

3 3
7

Hint

【Constraints】

This problem uses bundled testdata.

For 100%100\% of the testdata, 1≤n≤1091 \le n \le {10}^9, 1≤m≤50001 \le m \le 5000, and m≤nm \le n is guaranteed.

  • Subtask 1 (20 points): n≤500n \le 500.
  • Subtask 2 (30 points): n≤5000n \le 5000.
  • Subtask 3 (50 points): no special constraints.

Translated by ChatGPT 5