Generate the Sequences

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Consider SS, the sequence of integer sequences. Initially, S_0=(1)S\_0 = (1). After that, we construct S_1,S_2,,S_nS\_1, S\_2, \ldots, S\_n as follows.

Let S_i|S\_i| be the length of the sequence S_iS\_i, and s_i,js\_{i,j} be the jj-th element of S_iS\_i. Then S_i+1S\_{i+1} will have length S_i+1|S\_i|+1 and can be obtained from S_i|S\_i| using one of the following two operations:

  • Write 11 or the given integer mm as the element with number S_i+1|S\_i| + 1 of the new sequence.  
  • Select an index jj (1j<S_i1 \le j < |S\_i|), choose integer xx such that s_i,j<x<s_i,j+1s\_{i,j} < x < s\_{i,j + 1} or s_i,j>x>s_i,j+1s\_{i,j} > x > s\_{i,j + 1}, and place it between s_i,js\_{i,j} and s_i,j+1s\_{i,j+1}, shifting the right part's indices by 11.

Given nn and mm, find the number of different ordered sets of sequences S_1S_nS\_1 \ldots S\_n. Two sets are considered different if, at least for one ii from 11 to nn, the sequences S_iS\_i in those sets differ. As the answer may be too large, print it modulo 998,244,353998\\,244\\,353.

입력

The input consists of one line containing two integers nn and mm (1n30001 \le n \le 3000, 2m1082 \le m \le 10^8).

출력

Print the number of different sequences SS modulo 998,244,353998\\,244\\,353.

힌트

Here are the possible sequences in the first example:

  • S_1=(1,3)S\_1=(1,3) (first operation), then S_2=(1,2,3)S\_2=(1,2,3) (second operation);
  • S_1=(1,1)S\_1=(1,1) (first operation), then S_2=(1,1,3)S\_2=(1,1,3) (first operation);
  • S_1=(1,1)S\_1=(1,1) (first operation), then S_2=(1,1,1)S\_2=(1,1,1) (first operation);
  • S_1=(1,3)S\_1=(1,3) (first operation), then S_2=(1,3,3)S\_2=(1,3,3) (first operation);
  • S_1=(1,3)S\_1=(1,3) (first operation), then S_2=(1,3,1)S\_2=(1,3,1) (first operation).

Therefore, the answer is 55.