func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( Ofast )   #pragma GCC target( avx2 )   #pragma GCC optimization( O3 )   #pragma GCC optimization( unroll-loops )   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int n, q;     cin >> n >> q;     std::vector<vector<int>> v;     v.resize(2, vector<int>(n, 0));     int ans = 0;     while (q--) {       int change = 0;       int x, y;       cin >> x >> y;       x--;       y--;       if (v[x][y] == 0)         change++;       else         change--;       v[x][y] = 1 - v[x][y];       for (int i = -1; i <= 1; i++) {         if (y + i >= n && y + i <= 0) continue;         if (v[1 - x][y + i] == 1) ans += change;       }       if (ans == 0)         cout <<  YES n ;       else         cout <<  NO n ;     }   }   