func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( O3 ,  unroll-loops )   #pragma GCC target( avx2 )   using namespace std;   inline long long add(long long a, long long b) {     return ((a + b) < 1000000007 ? (a + b) : (a + b - 1000000007));   }   int prime[1000005];   void seive() {     prime[0] = prime[1] = 1;     for (int i = 2; i <= sqrt(1000005); i++) {       if (prime[i]) continue;       for (int j = 2 * i; j <= 1000005; j += i) {         prime[j] = 1;       }     }   }   inline long long sub(long long a, long long b) {     return ((a - b) < 0 ? a - b + 1000000007 : a - b);   }   long long power(long long a, long long b) {     if (b == 0) return 1;     long long y = power(a, b / 2);     y = (y * y) % 1000000007;     if (b & 1) y = (a * y) % 1000000007;     return y;   }   using namespace std;   int main() {     long long n;     cin >> n;     vector<long long> v;     long long fr = 0, tw = 0;     long long a[100005] = {0};     for (long long i = 0; i < n; i++) {       long long x;       cin >> x;       v.push_back(x);       a[x]++;       if (a[x] % 4 == 0) {         fr++;         tw--;       } else if (a[x] % 2 == 0) {         tw++;       }     }     long long q;     cin >> q;     for (long long i = 0; i < q; i++) {       char k;       cin >> k;       long long x;       cin >> x;       if (k ==  - ) {         if (a[x] % 4 == 0) {           fr--;           tw++;         } else if (a[x] % 2 == 0)           tw--;         a[x]--;       } else {         a[x]++;         if (a[x] % 4 == 0) {           fr++;           tw--;         } else if (a[x] % 2 == 0) {           tw++;         }       }       if (fr > 1 || (tw > 1 && fr == 1))         cout <<  YES  << endl;       else         cout <<  NO  << endl;     }   }   