标签:
[2016-04-13][codeforces][447][A][DZY Loves Hash].md
#include<cstdio>
#include<cstring>
using namespace std;
const int maxn = 300 + 10;
int a[maxn];
int main(){
int p,n,tmp;
memset(a,-1,sizeof(a));
scanf("%d%d",&p,&n);
for(int i = 0; i < n ; ++i){
scanf("%d",&tmp);
if(a[tmp % p] != -1){
printf("%d\n",i+1);
return 0;
}else a[tmp%p] = tmp;
}
printf("-1\n");
return 0;
}
[2016-04-13][codeforces][447][A][DZY Loves Hash]
标签:
原文地址:http://www.cnblogs.com/qhy285571052/p/56404708b0654295d91637484752f523.html