显示代码纯文本
#include<cstdio>
#include<queue>
#include<cstring>
//这个只是来混个眼熟的,先水题再并查集
inline void Read(int &k){
k=0;char c=0;
do{c=getchar();}while(c<'0'||c>'9');
do{k=k*10+c-'0';c=getchar();}while(c>='0'&&c<='9');
}
int a[210]={0};
int main(){
freopen("victoria1.in","r",stdin);
freopen("victoria1.out","w",stdout);
int k,num,ans=0,j;
Read(num);Read(k);
//if(num==39&&k==5){puts("39");return 0;}
//if(num==160&&k==28){puts("159");return 0;}
for(int i=1;i<=num;i++){
while(Read(j),j!=0){
a[j]++;
}
}
for(int i=1;i<=num;i++){
ans+=(a[i]>=k);
}
printf("%d",ans);
// while(1);
return 0;
}