Language: C++

#include<stdio.h>
int main(void)
{
	int C,n,d,r,c,flg,cnt,i,j,k,acnt,bt[25000],by[25000],N,m;
	char p[1000][1001];
	scanf("%d %d",&C,&n);
	for(i=0;i<n;i++){
		scanf("%s",p[i]);
	}
	cnt=0;
	m=1;
	for(i=0;i<n/2;i++){
		for(j=0;j<n/2;j++){
			flg=0;
			if(p[i][j]!=p[i][n-j-1]){
				flg=1;
				bt[m][cnt]=i;
				by[m][cnt]=j;
				cnt++;
			}
			if(p[i][j]!=p[n-i-1][j]&&flg==0){
				flg=1;
				bt[m][cnt]=i;
				by[m][cnt]=j;
				cnt++;
			}
			if(p[i][j]!=p[n-i-1][n-j-1]&&flg==0){
				bt[m][cnt]=i;
				bt[m][cnt]=j;
				cnt++;
			}
		}
	}
	acnt=0;
	if(cnt==0){
		acnt++;
	}
	for(i=2;i<=C;i++){
		scanf("%d",&d);
		for(j=0;j<d;j++){
			scanf("%d %d",&r,&c);
			r=r-1;
			c=c-1;
			if(p[r][c]=='1'){
				p[r][c]='0';
			}
			if(p[r][c]=='0'){
				p[r][c]='1';
			}
			if(r>=n/2){
				r=n-r-1;
			}
			if(c>=n/2){
				c=n-c-1;
			}
			flg=0;
			for(k=0;k<cnt;k++){
				if(bt[m][k]==r&&by[m][k]==c){
					flg=1;
					if(p[r][c]==p[r][n-c-1]&&p[r][c]==p[n-r-1][c]&&p[r][c]==p[n-r-1][n-c-1]){
						bt[m][k]=-1;
						flg=2;
					}
				}
			}
			if(flg==0){
				

Compiler output:
a.cc: In function 'int main()':
a.cc:17:38: error: invalid types 'int[int]' for array subscript
   17 |                                 bt[m][cnt]=i;
      |                                      ^
a.cc:18:38: error: invalid types 'int[int]' for array subscript
   18 |                                 by[m][cnt]=j;
      |                                      ^
a.cc:23:38: error: invalid types 'int[int]' for array subscript
   23 |                                 bt[m][cnt]=i;
      |                                      ^
a.cc:24:38: error: invalid types 'int[int]' for array subscript
   24 |                                 by[m][cnt]=j;
      |                                      ^
a.cc:28:38: error: invalid types 'int[int]' for array subscript
   28 |                                 bt[m][cnt]=i;
      |                                      ^
a.cc:29:38: error: invalid types 'int[int]' for array subscript
   29 |                                 bt[m][cnt]=j;
      |                                      ^
a.cc:58:41: error: invalid types 'int[int]' for array subscript
   58 |                                 if(bt[m][k]==r&&by[m][k]==c){
      |                                         ^
a.cc:58:54: error: invalid types 'int[int]' for array subscript
   58 |                                 if(bt[m][k]==r&&by[m][k]==c){
      |                                                      ^
a.cc:61:54: error: invalid types 'int[int]' for array subscript
   61 |                                                 bt[m][k]=-1;
      |                                                      ^
a.cc:66:36: error: expected '}' at end of input
   66 |                         if(flg==0){
      |                                   ~^
a.cc:66:36: error: expected '}' at end of input
a.cc:40:33: note: to match this '{'
   40 |                 for(j=0;j<d;j++){
      |                                 ^
a.cc:66:36: error: expected '}' at end of input
   66 |                         if(flg==0){
      |                                    ^
a.cc:38:26: note: to match this '{'
   38 |         for(i=2;i<=C;i++){
      |                          ^
a.cc:66:36: error: expected '}' at end of input
   66 |                         if(flg==0){
      |                                    ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^