#line 1 "a.cpp" #include #include #include #include using namespace std; using mint=atcoder::modint998244353; #line 2 "/home/kotatsugame/library/math/combination.cpp" template struct combination{ vectorfac,invfac; combination(size_t N=0):fac(1,1),invfac(1,1) { make_table(N); } void make_table(size_t N) { if(fac.size()>N)return; size_t now=fac.size(); N=max(N,now*2); fac.resize(N+1); invfac.resize(N+1); for(size_t i=now;i<=N;i++)fac[i]=fac[i-1]*i; invfac[N]=1/fac[N]; for(size_t i=N;i-->now;)invfac[i]=invfac[i+1]*(i+1); } T factorial(size_t n) { make_table(n); return fac[n]; } T P(size_t n,size_t k) { if(nC; int N,L; int A[3030]; mint ans[3030]; main() { cin>>N>>L; vector,int> >B; for(int i=0;i>A[i]; B.push_back(make_pair(make_pair(A[i],1),i)); B.push_back(make_pair(make_pair(L-A[i],0),i)); } sort(B.begin(),B.end()); int l=0,r=0; for(int i=0;i