atcoder#ARC107D. [ARC107D] Number of Multisets

[ARC107D] Number of Multisets

Score : 600600 points

Problem Statement

You are given two positive integers NN and KK. How many multisets of rational numbers satisfy all of the following conditions?

  • The multiset has exactly NN elements and the sum of them is equal to KK.
  • Each element of the multiset is one of 1,12,14,18,1, \frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \dots. In other words, each element can be represented as 12i (i=0,1,)\frac{1}{2^i}\ (i = 0,1,\dots).

The answer may be large, so print it modulo 998244353998244353.

Constraints

  • 1KN30001 \leq K \leq N \leq 3000
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN KK

Output

Print the number of multisets of rational numbers that satisfy all of the given conditions modulo 998244353998244353.

4 2
2

The following two multisets satisfy all of the given conditions:

  • 1,12,14,14{1, \frac{1}{2}, \frac{1}{4}, \frac{1}{4}}
  • ${\frac{1}{2}, \frac{1}{2}, \frac{1}{2}, \frac{1}{2}}$
2525 425
687232272