def polymul(f,g): lf = len(f) lg = len(g) res = [0]*(lf+lg-1) for i in range(lf): for j in range(lg): res[i+j] += f[i]*g[j] res[i+j] %= MOD return res def add(r,s): if len(r) < len(s): r += [0]*(len(s)-len(r)) for i,si in enumerate(s): r[i] += s[i] r[i] %= MOD # dp[i][j] = i 個の隙間に j 個を N = 101 MOD = 998244353 dp = [[None]*N for _ in range(N)] dp[0] = [[1]] + [[0]]*N for i in range(1,N): dp[i][0] = [1] for j in range(1,N): r = [0]*(i-1) + dp[i][j-1] add(r, dp[i-1][j]) dp[i][j] = r from itertools import groupby n,K,*a = map(int,open(0).read().split()) r = [1] t = 0 for k,v in groupby(sorted(a)): c = len(list(v)) r = polymul(r,dp[t+1][c]) t += c print(0 if K >= len(r) else r[K])