import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) def merge(a,b): n = len(a) m = len(b) c = [0]*(n+m-1) for i in range(n): for j in range(m): c[i+j] += a[i]*b[j]%M if c[i+j] > M: c[i+j] -= M return c def sub(v,k): kk = min(v*k, K) res = [[0]*(kk+1) for _ in range(k+1)] res[0][0] = 1 for i in range(v+1): nres = [[0]*(kk+1) for _ in range(k+1)] for j in range(k+1): for l in range(kk+1): val = res[j][l] if val==0: continue for jj in range((k-j)+1): nl = l+jj*(v-i) if nl<=kk: nres[j+jj][nl] += val nres[j+jj][nl] %= M res = nres return res[k] n,K = list(map(int, input().split())) a = list(map(int, input().split())) M = 998244353 from collections import Counter c = Counter(a) kvs = sorted(c.items()) num = 0 dp = [1] for k,v in kvs: t = sub(num, v) dp = merge(dp, t) num += v if len(dp)