#include <bits/stdc++.h> using namespace std; int main(){ int n,a; cin >> n; double x; vector<double> num; for(int i=0;i<n;i++){ cin >> a >> x; if(a==1){//a等于1压入x,等于2在num内查找x num.push_back(x); } else{ auto it = find(num.begin(),num.end(),x); if(it==num.end()){ cout << "False" << endl; } else{ cout << "True" << endl; } } } return 0; }
0.0分
0 人评分
回文串 (C语言代码)浏览:2941 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:702 |
C语言程序设计教程(第三版)课后习题7.5 (C语言代码)浏览:860 |
矩阵加法 (C语言代码)浏览:1733 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:567 |
【偶数求和】 (C语言代码)浏览:440 |
简单的事情 (C语言代码)浏览:641 |
1134题解(求分析)浏览:742 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:509 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:471 |