2 条题解

  • 0
    @ 2025-9-19 9:34:43

    c++题解

    #include<bits/stdc++.h>
    using namespace std;
    #define int long long
    unordered_map<int,int> cnt;
    signed main(){
    int x,q;
    char op;
    cin>>q;
    while(q--){
        cin>>op>>x;
        if(op=='I'){
           cnt[x]++;
        }
        if(op=='Q'){
            if(cnt[x]){
                cout<<"Yes"<<endl;
            }
            else cout<<"No"<<endl;
        }
    }
    }
    

    信息

    ID
    44
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    36
    已通过
    18
    上传者