文章

211

粉丝

1

获赞

1178

访问

75.0k

头像
查找1 题解:
P1388 北京邮电大学
发布于2026年3月14日 15:28
阅读数 246

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	while(cin >> n){
		map<int,int> mp;
		while(n--){
			int a;
			cin >> a;
			mp[a] = 1;
		}
		int m;
		cin >> m;
		while(m--){
			int b;
			cin >> b;
			if(mp.count(b))
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}	
	}	
	return 0;
}	

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发