#include #include using namespace std; set st; int main() { int m ,n; cin >> m >> n; for (int i = 0; i < m; i++ ) { int temp; cin >> temp; st.insert(temp); } for (int i = 0; i < n; i++ ) { int t; cin >> t; if (st.count(t)) { cout << "YES" << endl; } else { cout << "NO" << endl; } } return 0; }

请把以下代码改写为c++语言:#include cstdio#include map#include set using namespace std;mapint int mp;setint st;int main 	int m n;	cinmn;	scanfdd &m &n;	for int i = 0; i m; i++ 		int temp;		cintemp;		scanfd &tem

原文地址: https://www.cveoy.top/t/topic/fjoM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录