atcoder#ARC116D. [ARC116D] I Wanna Win The Game

[ARC116D] I Wanna Win The Game

Score : 500500 points

Problem Statement

Given are integers NN and MM. How many sequences AA of NN integers satisfy the following conditions?

  • 0Ai(i=1,2,,N)0 \leq A_i \left(i = 1, 2, \ldots, N\right)
  • i=1NAi=M\sum_{i = 1}^{N} A_i = M
  • A1A_1 xor A2A_2 xor \cdots xor AN=0A_N = 0 ("xor" denotes the bitwise XOR.)

Since the answer can be enormous, report it modulo 998244353998244353.

Constraints

  • All values in input are integers.
  • 1N50001 \leq N \leq 5000
  • 1M50001 \leq M \leq 5000

Input

Input is given from Standard Input in the following format:

NN MM

Output

Print the answer.

5 20
475

Some of the sequences AA satisfying the conditions follow:

  • A=(10,0,10,0,0)A = \left(10, 0, 10, 0, 0\right)
  • A=(1,2,3,7,7)A = \left(1, 2, 3, 7, 7\right)
10 5
0
3141 2718
371899128