#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语言程序设计教程(第三版)课后习题9.2 (C语言代码)浏览:734 |
C语言程序设计教程(第三版)课后习题7.4 (C语言代码)浏览:596 |
拆分位数 (C语言代码)浏览:1349 |
P1001 (C语言代码)浏览:831 |
简单的a+b (C语言代码)浏览:526 |
简单的a+b (C语言代码)浏览:1018 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:583 |
C二级辅导-分段函数 (C语言代码)浏览:783 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:1201 |
C二级辅导-公约公倍 (C语言代码)浏览:691 |