#include #include #include #include using namespace std; using mint=atcoder::modint998244353; 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