from collections import Counter N,K=map(int,input().split()) A=list(map(int,input().split())) mod=998244353 M=10 K=min(K,M+1) C=Counter(A) dp=[[0]*(1<