#include<stdio.h>
int main(){
int i,n,hash[10001]={0};//a[i]范围为[0,10000]
scanf("%d",&n);
for(i=0;i<n;i++){
int tmp;
scanf("%d",&tmp);
hash[tmp]=1;
}
int key;
scanf("%d",&key);
if(hash[key]==1)
printf("%d\n",key);
else
printf("-1\n");
return 0;
}
/*
2
1 3
0
-1
*/
find x2
最新推荐文章于 2021-08-12 05:50:44 发布