- 机器翻译
- 2015-11-01 22:53:49 @
#include<iostream>
#include<cstdio>
using namespace std;
int judge[1000+5]={0};
int M[1000+5]={0};
int ans=0;
int n,m;
int main()
{
scanf("%d%d",&m,&n);
int temp;
for(int i=0;i<n;i++)
{
scanf("%d",&temp);
if(judge[temp]==0)
{
judge[temp]=1;
if(i>=m)
judge[M[i%m]]=0;
M[i%m]=temp;
ans++;
}
}
printf("%d",ans);
//while(1);
return 0;
}
0 条评论
目前还没有评论...