Language: C++

clude <bits/stdc++.h>
using namespace std;
const double eps=1e-9;
typedef vector<int> vi;
typedef long long ll;
string board[1005];
bool sym[1005][1005];
int C,N;
int ans=0;
int miss=0;
unordered_set<int> rowdif;
unordered_set<int> coldif;
vector<set<int> > rowdifset(1005);
vector<set<int> > coldifset(1005);
void judge()
{
  for(int i=0;i<N/2;i++)
    {
      for(int j=0;j<N;j++)
	{
	  if(board[i][j]!=board[N-1-i][j]) 
	    {
	      rowdif.insert(i);
	      if(j<N/2)
		{
		  rowdifset[i].insert(j);
		}
	      else
		{
		  rowdifset[i].insert(N-1-j);
		}
	    }
	}
    }
  for(int i=0;i<N/2;i++)
    {
      for(int j=0;j<N;j++)
	{
	  if(board[j][i]!=board[j][N-1-i]) 
	    {
	      coldif.insert(i);
	      if(j<N/2)
		{
		  coldifset[i].insert(j);
		}
	      else
		{
		  coldifset[i].insert(N-1-j);
		}
	    }
	}
    }
}

int main(void)
{
  cin >> C >> N;
  for(int i=0;i<N;i++)
    {
      cin >> board[i];
    }
  judge();
  if(rowdif.empty() && coldif.empty()) ans++;
  for(int i=0;i<C-1;i++)
    {
      int change;
      cin >> change;
      for(int j=0;j<change;j++)
	{
	  int row,col;
	  cin >> row >> col;
	  row--,col--;
	  if(row>=(N/2)) row=N-1-row;
	  if(col>=(N/2)) col=N-1-col;
	  auto it=rowdifset[row].find(col);
	  if(it==rowdifset[row].end())
	    {
	      rowdifset[row].insert(col);
	      rowdif.insert(row);
	    }
	  else
	    {
	      rowdifset[row].erase(col);
	      if(rowdifset[row].empty())
		{
		  rowdif.erase(row);
		}
	    }
	  it=coldifset[col].find(row);
	  if(it==coldifset[col].end())
	    {
	      coldifset[col].insert(row);
	      coldif.insert(col);
	    }
	  else
	    {
	      coldifset[col].erase(row);
	      if(coldifset[col].empty())
		{
		  coldif.erase(col);
		}
	    }
	}
      if(rowdif.empty() && coldif.empty()) 
	{
	  cout << "Now Tile No. " << i+2 << endl;
	  ans++;
	}
    }
  cout << ans << endl;
  return 0;
}



Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude <bits/stdc++.h>
      | ^~~~~
a.cc:4:9: error: 'vector' does not name a type
    4 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:6:1: error: 'string' does not name a type
    6 | string board[1005];
      | ^~~~~~
a.cc:11:1: error: 'unordered_set' does not name a type
   11 | unordered_set<int> rowdif;
      | ^~~~~~~~~~~~~
a.cc:12:1: error: 'unordered_set' does not name a type
   12 | unordered_set<int> coldif;
      | ^~~~~~~~~~~~~
a.cc:13:1: error: 'vector' does not name a type
   13 | vector<set<int> > rowdifset(1005);
      | ^~~~~~
a.cc:14:1: error: 'vector' does not name a type
   14 | vector<set<int> > coldifset(1005);
      | ^~~~~~
a.cc: In function 'void judge()':
a.cc:21:14: error: 'board' was not declared in this scope
   21 |           if(board[i][j]!=board[N-1-i][j])
      |              ^~~~~
a.cc:23:15: error: 'rowdif' was not declared in this scope
   23 |               rowdif.insert(i);
      |               ^~~~~~
a.cc:26:19: error: 'rowdifset' was not declared in this scope
   26 |                   rowdifset[i].insert(j);
      |                   ^~~~~~~~~
a.cc:30:19: error: 'rowdifset' was not declared in this scope
   30 |                   rowdifset[i].insert(N-1-j);
      |                   ^~~~~~~~~
a.cc:39:14: error: 'board' was not declared in this scope
   39 |           if(board[j][i]!=board[j][N-1-i])
      |              ^~~~~
a.cc:41:15: error: 'coldif' was not declared in this scope
   41 |               coldif.insert(i);
      |               ^~~~~~
a.cc:44:19: error: 'coldifset' was not declared in this scope
   44 |                   coldifset[i].insert(j);
      |                   ^~~~~~~~~
a.cc:48:19: error: 'coldifset' was not declared in this scope
   48 |                   coldifset[i].insert(N-1-j);
      |                   ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:57:3: error: 'cin' was not declared in this scope
   57 |   cin >> C >> N;
      |   ^~~
a.cc:60:14: error: 'board' was not declared in this scope
   60 |       cin >> board[i];
      |              ^~~~~
a.cc:63:6: error: 'rowdif' was not declared in this scope
   63 |   if(rowdif.empty() && coldif.empty()) ans++;
      |      ^~~~~~
a.cc:63:24: error: 'coldif' was not declared in this scope
   63 |   if(rowdif.empty() && coldif.empty()) ans++;
      |                        ^~~~~~
a.cc:75:19: error: 'rowdifset' was not declared in this scope
   75 |           auto it=rowdifset[row].find(col);
      |                   ^~~~~~~~~
a.cc:79:15: error: 'rowdif' was not declared in this scope
   79 |               rowdif.insert(row);
      |               ^~~~~~
a.cc:86:19: error: 'rowdif' was not declared in this scope
   86 |                   rowdif.erase(row);
      |                   ^~~~~~
a.cc:89:14: error: 'coldifset' was not declared in this scope
   89 |           it=coldifset[col].find(row);
      |              ^~~~~~~~~
a.cc:93:15: error: 'coldif' was not declared in this scope
   93 |               coldif.insert(col);
      |               ^~~~~~
a.cc:100:19: error: 'coldif' was not declared in this scope
  100 |                   coldif.erase(col);
      |                   ^~~~~~
a.cc:104:10: error: 'rowdif' was not declared in this scope
  104 |       if(rowdif.empty() && coldif.empty())
      |          ^~~~~~
a.cc:104:28: error: 'coldif' was not declared in this scope
  104 |       if(rowdif.empty() && coldif.empty())
      |                            ^~~~~~
a.cc:106:11: error: 'cout' was not declared in this scope
  106 |           cout << "Now Tile No. " << i+2 << endl;
      |           ^~~~
a.cc:106:45: error: 'endl' was not declared in this scope
  106 |           cout << "Now Tile No. " << i+2 << endl;
      |                                             ^~~~
a.cc:110:3: error: 'cout' was not declared in this scope
  110 |   cout << ans << endl;
      |   ^~~~
a.cc:110:18: error: 'endl' was not declared in this scope
  110 |   cout << ans << endl;
      |                  ^~~~