func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, k, q, a;     cin >> n >> k >> q;     int t[150005] = {0};     for (int i = 1; i <= n; i++) {       cin >> a;       t[i] = a;     }     set<pair<int, int> > s;     set<pair<int, int> >::iterator it;     for (int i = 1; i <= q; i++) {       int flag, id;       cin >> flag >> id;       if (flag == 1) {         if (s.size() == k) {           it = s.begin();           if (t[id] > (it->first)) {             s.erase(it);             s.insert(make_pair(t[id], id));           }         } else {           s.insert(make_pair(t[id], id));         }       } else {         if (s.find(make_pair(t[id], id)) != s.end())           cout <<  YES n ;         else           cout <<  NO n ;       }     }     return 0;   }   