- Victoria的舞会1
- 11 年前 @
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
int main()
{
int n,k,m;
scanf("%d%d",&n,&k);
int a[n+5];
for(int i=0;i<=n+5;i++)
{a[i]=0;}
for(int i=1;i<=n;i++)
{
int f=-1;
while(f!=0)
{
scanf("%d",&f);
a[f]++;
}
}
int tot=0;
for(int i=1;i<=n;i++)
{
if(a[i]>=k)tot++;
}
printf("%d ",tot);
// system("pause");
return 0;
}
3 条评论
-
1928699517 LV 4 @ 10 年前
……
-
10 年前@
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
int main()
{
int n,k,m;
scanf("%d%d",&n,&k);
int a[n+5];
for(int i=0;i<=n+5;i++)
{a[i]=0;}
for(int i=1;i<=n;i++)
{
int f=-1;
while(f!=0)
{
scanf("%d",&f);
a[f]++;
}
}
int tot=0;
for(int i=1;i<=n;i++)
{
if(a[i]>=k)tot++;
}
printf("%d ",tot);
// system("pause");
return 0;
} -
11 年前@
编译错误
- 1