func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long mod1 = 19260817;   const long long mod2 = 19660813;   int n;   int m;   char s[200005];   char opt[5];   struct {     int tree[200005];     int lowbit(int x) { return x & -x; }     void ins(int pos, int val) {       for (; pos <= n; pos += lowbit(pos)) tree[pos] += val;     }     int query(int pos) {       int sum = 0;       for (; pos; pos -= lowbit(pos)) sum += tree[pos];       return sum;     }   } t[125];   int find(int x) {     int ret = 0;     for (int i = 20; i >= 0; --i) {       if (ret + (1 << i) > n) continue;       int sum = 0;       for (int j = 48; j < 125; ++j) sum += t[j].tree[ret + (1 << i)];       if (x >= sum) {         x -= sum;         ret += (1 << i);       }     }     return ret;   }   set<int> book[125];   set<int>::iterator it;   vector<int> memo;   bool check(int pos) {     if (pos == 1) {       if (t[s[pos]].query(pos)) return true;     } else {       if (t[s[pos]].query(pos) - t[s[pos]].query(pos - 1)) return true;     }     return false;   }   int main() {     scanf( %d %d , &n, &m);     scanf( %s , s + 1);     for (int i = 1; i <= n; ++i) {       t[s[i]].ins(i, 1);       book[s[i]].insert(i);     }     while (m--) {       int l;       int r;       scanf( %d %d %s , &l, &r, opt + 1);       int lcur = find(l - 1) + 1;       int rcur = find(r - 1) + 1;       it = book[opt[1]].lower_bound(lcur);       memo.clear();       while (it != book[opt[1]].end()) {         int pos = *it;         if (pos > rcur) break;         memo.push_back(pos);         ++it;       }       for (auto p : memo) book[opt[1]].erase(p);       for (auto p : memo) t[opt[1]].ins(p, -1);     }     for (int i = 1; i <= n; ++i) {       if (check(i)) printf( %c , s[i]);     }     printf(  n );     return 0;   }   