import itertools MOD = 998244353 n,K,*a = map(int,open(0).read().split()) r = [1]+[0]*K for c in range(1,n+1): for i in range(K+1-c)[::-1]: r[i+c] = (r[i+c]-r[i])%MOD for k,v in itertools.groupby(sorted(a)): for c in range(1,len([*v])+1): for i in range(K+1-c): r[i+c] = (r[i+c]+r[i])%MOD print(r[K])