func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, k, q;     cin >> n >> k >> q;     vector<int> A(n);     set<int> S;     for (int i = 0; i < n; ++i) cin >> A[i];     int ty, id;     for (int i = 0; i < q; ++i) {       cin >> ty >> id;       if (ty == 1) {         S.insert(A[id - 1]);         if (S.size() > k) {           S.erase(S.begin());         }       } else {         if (S.find(A[id - 1]) != S.end())           cout <<  YES  << endl;         else           cout <<  NO  << endl;       }     }     return 0;   }   