Language: C++

#include<iostream>
#include<set>
#include<algorithm>
using namespace std;

class Point{
public:
  int x;
  int y;
  bool bin;
};

bool operator<(const Point& lp,const Point& rp){
  return (lp.x + lp.y) < (rp.x + rp.y);
}

class FourPoint{
public:
  Point lu;
  Point ru;
  Point ld;
  Point rd;
  friend ostream& operator<<(ostream& os,const FourPoint& fp){
    os << fp.lu.x << " " << fp.lu.y;
    return os;
  }
};

bool operator<(const FourPoint& lfp,const FourPoint& rfp){
  return (lfp.lu.x < rfp.lu.x) && (lfp.lu.y < rfp.lu.y) && (lfp.ru.x < rfp.ru.x) && (lfp.ru.y < rfp.ru.y) && (lfp.ld.x < rfp.ld.x) && (lfp.ld.y < rfp.ld.y) && (lfp.rd.x < rfp.rd.x) && (lfp.rd.y < rfp.rd.y);
}

int main(){

    int c,n,d,x,y,count;

    set<FourPoint> st;

    set<FourPoint>::iterator itr;

    Point ptmp[4];

    FourPoint fptmp;

    count = 0;

    cin >> c >> n;

    bool table[n][n];
    string s[n];

     for(int i=0;i<n;i++){
         cin >> s[i];
     }

     for(int i=0;i<n;i++){
       for(int j=0;j<n;j++){
         if(s[i][j] == '0'){
           table[i][j] =false;
         }
         else{
           table[i][j] = true;
         }
       }
     }

     for(int i=0;i<n;i++){
       for(int j=0;j<n/2;j++){
         if(table[i][j] != table[i][n-j-1]){

           ptmp[0].x = i; ptmp[0].y = j; ptmp[0].bin = table[i][j];
           ptmp[1].x = n-i-1; ptmp[1].y = j; ptmp[1].bin = table[n-i-1][j];
           ptmp[2].x = i; ptmp[2].y = n-j-1; ptmp[2].bin = table[i][n-j-1];
           ptmp[3].x = n-i-1; ptmp[3].y = n-j-1; ptmp[3].bin = table[n-i-1][n-j-1];

           sort(ptmp,ptmp+4);

           fptmp.lu = ptmp[0];
           if(ptmp[1].y < ptmp[2].y){
             fptmp.ru = ptmp[1];
             fptmp.ld = ptmp[2];
           }
           else{
             fptmp.ru = ptmp[2];
             fptmp.ld = ptmp[1];
           }

           fptmp.rd = ptmp[3];

           st.insert(fptmp);
         }
       }
     }


     for(int i=0;i<n/2;i++){
       for(int j=0;j<n;j++){
         if(table[i][j] != table[n-i-1][j]){
           ptmp[0].x = i; ptmp[0].y = j; ptmp[0].bin = table[i][j];
           ptmp[1].x = n-i-1; ptmp[1].y = j; ptmp[1].bin = table[n-i-1][j];
           ptmp[2].x = i; ptmp[2].y = n-j-1; ptmp[2].bin = table[i][n-j-1];
           ptmp[3].x = n-i-1; ptmp[3].y = n-j-1; ptmp[3].bin = table[n-i-1][n-j-1];

           sort(ptmp,ptmp+4);

           fptmp.lu = ptmp[0];
           if(ptmp[1].y < ptmp[2].y){
             fptmp.ru = ptmp[1];
             fptmp.ld = ptmp[2];
           }
           else{
             fptmp.ru = ptmp[2];
             fptmp.ld = ptmp[1];
           }

           fptmp.rd = ptmp[3];

           st.insert(fptmp);
         }
       }
     }

    /* for(itr = st.begin(); itr != st.end(); ++itr) {
        cout << *itr << "\n";      // ????????¬???????????????????????????????????¨???
    }*/


     if(st.size() == 0){
       count++;
     }

     for(int k=0;k<c-1;k++){

      /* for(itr = st.begin(); itr != st.end(); ++itr) {
       std::cout << "key = " << itr->first           // ???????????¨???
                     << ", val = " << itr->second << "\n";    // ????????¨???
       }*/

       cin >> d;

       /*for(int i=0;i<d;i++){

         cout << i << endl;

         for(int a=0;a<n;a++){
           for(int b=0;b<n;b++){
             if(table[a][b] == false){
               cout << '0';
             }
             else{
               cout << '1';
             }
             cout << ' ';
           }
           cout << endl;
         }*/

      for(int i=0;i<d;i++){



         is_delete = false;
         cin >> x >> y;
         table[x-1][y-1] = !table[x-1][y-1];
         //cout << "unsigned " << tmps << endl;

         ptmp[0].x = x-1; ptmp[0].y = y-1; ptmp[0].bin = table[x-1][y-1];
         ptmp[1].x = n-x; ptmp[1].y = y-1; ptmp[1].bin = table[n-x][y-1];
         ptmp[2].x = x-1; ptmp[2].y = n-y; ptmp[2].bin = table[x-1][n-y];
         ptmp[3].x = n-x; ptmp[3].y = n-y; ptmp[3].bin = table[n-x][n-y];

         sort(ptmp,ptmp+4);

         fptmp.lu = ptmp[0];
         if(ptmp[1].y < ptmp[2].y){
           fptmp.ru = ptmp[1];
           fptmp.ld = ptmp[2];
         }

         else{
           fptmp.ru = ptmp[2];
           fptmp.ld = ptmp[1];
         }

         fptmp.rd = ptmp[3];

         itr = st.find(fptmp);

         if(itr != st.end()){
           if(fptmp.lu.bin == fptmp.ru.bin && fptmp.ru.bin == fptmp.ld.bin && fptmp.ld.bin == fptmp.rd.bin){
             st.erase(itr);
           }
         }
         else{
           st.insert(fptmp);
         }

       }







       if(st.size() == 0){
         //cout << "f1d2a " << k+2 << endl;
         count++;
       }

     }

     cout << count << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:162:10: error: 'is_delete' was not declared in this scope; did you mean 'timer_delete'?
  162 |          is_delete = false;
      |          ^~~~~~~~~
      |          timer_delete