#P7481. 梦现时刻

梦现时刻

Description

Given n,mn, m, with mnm \le n guaranteed, define F(a,b)=i=0b(bi)(nia)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, 1n1091 \le n \le {10}^9, 1m50001 \le m \le 5000, and mnm \le n is guaranteed.

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

Translated by ChatGPT 5