func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     int cnt[100005];     int cmax[10];     memset(cnt, 0, sizeof(cnt));     memset(cmax, 0, sizeof(cmax));     for (int i = 1; i <= n; i++) {       int a;       cin >> a;       cnt[a]++;       if (cnt[a] < 10) cmax[cnt[a]]++;     }     int t;     cin >> t;     while (t--) {       char ch;       int x;       cin >> ch >> x;       if (ch ==  + ) {         cnt[x]++;         if (cnt[x] < 10) cmax[cnt[x]]++;       } else {         if (cnt[x] < 10) cmax[cnt[x]]--;         cnt[x]--;       }       if (cmax[8])         cout <<  YES  << endl;       else if (cmax[4] >= 2)         cout <<  YES  << endl;       else if (cmax[4]) {         if (cmax[2] >= 3)           cout <<  YES  << endl;         else if (cmax[2] >= 2 && cmax[6])           cout <<  YES  << endl;         else           cout <<  NO  << endl;       } else         cout <<  NO  << endl;     }   }   