文章
55
粉丝
100
获赞
12
访问
31.1k
#include<stdio.h>
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int arr[100000];
for(int i = 0; i<n; i++){
cin>>arr[i];
}
int m;
cin>>m;
int k = n;
bool flag = true;
while(m--){
int j;
cin>>j;
for(int i = 0; i<n; i++){
if(arr[i] == j){
flag = true;
break;
}else{
flag = false;
}
}
if(flag){
cout<<"find"<<endl;
}else{
cout<<"no"<<endl;
arr[k++] = j;
n = k;
}
}
}
登录后发布评论
暂无评论,来抢沙发