P10707 Eternity (Eternity)
Background
>$$Walking among the world,$$
>
>$$may not be angels.$$
>
>$$Those who bring disaster,$$
>
>$$may not be demons.$$
>
>$$A demon's tears are treasured by angels,$$
>
>$$and an angel's purity is guarded by demons.$$
>
>$$Perhaps,$$
>
>$$this is the best ending.$$
Description
Some preliminary definitions:
- Elements in a multiset must be non-negative integers.
- The size of a multiset is the number of elements in the multiset.
- For a multiset of size $x$, let its elements be $a_1,a_2\dots a_x$. Then the **value** of this multiset is $a_1\oplus a_2\oplus \dots \oplus a_x$, that is, the **xor sum** of all elements in the multiset.
Now given $n,m$.
How many different multisets $S$ of size $n$ satisfy:
$$\max\limits_{T \subseteq S,T\ne \emptyset}{Q_T}=m$$
where $Q_T$ is the **value** of multiset $T$.
**Note: Due to the nature of multisets, multisets with the same numbers but different orders are considered the same multiset. For example, $\left \{ 1,2,3 \right \} $ and $\left \{ 3,2,1 \right \} $ are the same multiset.**
Output the number of different multisets modulo $998244353$.
It can be proven that the number of such multisets is finite.
Input Format
The first line contains two integers, representing $n$ and $m$.
Output Format
One line with one integer, the answer modulo $998244353$.
Explanation/Hint
#### Sample Explanation
In sample 1, the $13$ valid multisets are:
$$(0,0,5)$$, $$(0,1,4)$$, $$(0,1,5)$$, $$(0,4,5)$$, $$(0,5,5)$$, $$(1,1,4)$$, $$(1,1,5)$$, $$(1,4,4)$$, $$(1,4,5)$$, $$(1,5,5)$$, $$(4,4,5)$$, $$(4,5,5)$$, $$(5,5,5)$$.
#### Constraints
| subtask ID | $n$ | $m$ | Special Property | Score |
| :----------: | :----------: | :----------: | :----------: | :-----: |
| $0$ | $\le 10$ | $\le 10$ | $-$ | $10$ |
| $1$ | $\le 10^5$ | $