Problem:
Score : 700 points

Problem Statement

Takahashi throws N dice, each having K sides with all integers from 1 to K. The dice are NOT pairwise distinguishable.
For each i=2,3,...,2K, find the following value modulo 998244353:

The number of combinations of N sides shown by the dice such that the sum of no two different sides is i.

Note that the dice are NOT distinguishable, that is, two combinations are considered different when there exists an integer k such that the number of dice showing k is different in those two.

Constraints

1 \leq K \leq 2000

2 \leq N \leq 2000

K and N are integers.

Input

Input is given from Standard Input in the following format:

K N

Output

Print 2K-1 integers. The t-th of them (1\leq t\leq 2K-1) should be the answer for i=t+1.

Sample Input 1

3 3

Sample Output 1

7
7
4
7
7

For i=2, the combinations (1,2,2),(1,2,3),(1,3,3),(2,2,2),(2,2,3),(2,3,3),(3,3,3) satisfy the condition, so the answer is 7.

For i=3, the combinations (1,1,1),(1,1,3),(1,3,3),(2,2,2),(2,2,3),(2,3,3),(3,3,3) satisfy the condition, so the answer is 7.

For i=4, the combinations (1,1,1),(1,1,2),(2,3,3),(3,3,3) satisfy the condition, so the answer is 4.

Sample Input 2

4 5

Sample Output 2

36
36
20
20
20
36
36

Sample Input 3

6 1000

Sample Output 3

149393349
149393349
668669001
668669001
4000002
4000002
4000002
668669001
668669001
149393349
149393349

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#include<bits/stdc++.h>
#define reg register
#define F(i,j,k) for(reg int i=j,lim=k;i<=lim;++i)
#define dF(i,j,k) for(reg int i=j,lim=k;i>=lim;--i)
using namespace std;
typedef long long ll;
int n,k;
const int mod=998244353;
const int MN=2005;
int C[MN<<1][MN<<1],pw[MN<<1];
inline int add(int a,int b){return (a+=b)-(a>=mod?mod:0);}
inline int solve(int i,int n){
	reg int k2=min(k-i/2,(i-1)/2),k1=k-(k2<<1)-(~i&1);
	reg ll res=0,pos=1;
	for(reg int j=k2;j+k1>0&&(~j);j--,pos*=-1)
		res=add(res,pos*C[j+k1+n-1][j+k1-1]*pw[j]%mod*C[k2][j]%mod);
	return add(res,mod);
}
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	cin>>k>>n;C[0][0]=1;pw[0]=1;
	F(i,1,n<<1){
		C[i][0]=1;pw[i]=add(pw[i-1],pw[i-1]);F(j,1,i)C[i][j]=add(C[i-1][j-1],C[i-1][j]);
	}
	reg ll ans=0;
	F(i,2,k<<1){
		if(~i&1)ans=add(solve(i,n),solve(i,n-1));
		else ans=solve(i,n);
		cout<<ans<<endl;
	}
	return 0;
}