func_code_string: #include <bits/stdc++.h>   using namespace std;   set<pair<int, int> > s;   int t[200000];   int n, k, q;   int main() {     cin >> n >> k >> q;     for (int i = 1; i <= n; ++i) scanf( %d , t + i);     for (int i = 0; i < q; ++i) {       int type, id;       pair<int, int> p;       scanf( %d %d , &type, &id);       p = make_pair(t[id], id);       if (type == 1) {         s.insert(p);         if (s.size() > k) s.erase(s.begin());       } else if (type == 2) {         if (s.count(p))           printf( YES n );         else           printf( NO n );       } else {         assert(0);       }     }   }   