criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main2 {
	private	static	BufferedReader	br     = null;

	static {
		br = new BufferedReader(new InputStreamReader(System.in));
	}
 
    /**
     * @param args
     */
	public static void main(String[] args) {
	// TODO Auto-generated method stub
		int	cnt = 0;

		while ((cnt = parsePoint()) != 0) {
		}
	}
 
	private static int parsePoint() {
		int		params = 0;
        String	strin  = null;

        if ((strin = parseStdin()) != null) {
        	params = Integer.parseInt(strin);
        }
 
        return params;
	}

	private static String parseStdin() {
        String  stdin = null;
        
        try {
        	String  tmp = br.readLine();
        	if (!tmp.isEmpty()) stdin = tmp;
        }
        catch (IOException e) {}
 
        return stdin;
	}
}

Compiler output:
Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
       ^
1 error
Language: C

int x[12],y[12],p[12],r=0;
int f(int h,int n){
  int i,j,k,c;
  if(n==0){
    for(i=2;i<12;i++){
      for(j=2;j<12;j++){
	if(d[i][j])return 0;
      }
    }
    return 1;
  }
  for(i=h;i<12;i++){
    for(j=2;j<12;j++){
      if(d[i][j]==0)continue;
      for(k=2;k>-1;k--){
	for(c=0;c<s[k];c++){
	  if(d[i+Y[k][c]][j+X[k][c]]==0)break;
	}
	if(c==s[k]){
	  for(c=0;c<s[k];c++)d[i+Y[k][c]][j+X[k][c]]--;
	  y[r]=i+k/2-1;
	  x[r]=j+k%2-2;
	  p[r++]=k+1;
	  if(f(i,n-1))return 1;
	  for(c=0;c<s[k];c++)d[i+Y[k][c]][j+X[k][c]]++;
	  r--;
	}
      }
      return 0;
    }
  }
  return 0;
}    
int main(){
  int n,i,j;
  scanf("%d",&n);
  for(i=2;i<12;i++){
    for(j=2;j<12;j++)scanf("%d",&d[i][j]);
  }
  f(2,n);
  for(i=0;i<n;i++)printf("%d %d %d\n",x[i],y[i],p[i]);
  return 0;
}

Compiler output:
main.c: In function 'f':
main.c:7:12: error: 'd' undeclared (first use in this function)
    7 |         if(d[i][j])return 0;
      |            ^
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:19: error: 's' undeclared (first use in this function)
   16 |         for(c=0;c<s[k];c++){
      |                   ^
main.c:17:18: error: 'Y' undeclared (first use in this function)
   17 |           if(d[i+Y[k][c]][j+X[k][c]]==0)break;
      |                  ^
main.c:17:29: error: 'X' undeclared (first use in this function)
   17 |           if(d[i+Y[k][c]][j+X[k][c]]==0)break;
      |                             ^
main.c: In function 'main':
main.c:36:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   36 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int x[12],y[12],p[12],r=0;
main.c:36:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   36 |   scanf("%d",&n);
      |   ^~~~~
main.c:36:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:38:34: error: 'd' undeclared (first use in this function)
   38 |     for(j=2;j<12;j++)scanf("%d",&d[i][j]);
      |                                  ^
main.c:41:19: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   41 |   for(i=0;i<n;i++)printf("%d %d %d\n",x[i],y[i],p[i]);
      |                   ^~~~~~
main.c:41:19: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:41:19: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:41:19: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

def read_data():
  n=input()
  x=[]
  for i in range(10): x.append(map(int,raw_input().split()))
  return n, x

def is_area3(x,y):
  if x>7 or y>5: return False
  for dx in [0,1,2,1,0]:
    A=P[y][x-dx:x+dx+1]
    if A.count(0)>0: return False
    y+=1
  return True
      
def is_area2(x,y):
  if x>7 or y>7: return False
  for dy in [0,1,2]:
    A=P[y+dy][x:x+3]
    if A.count(0)>0: return False
  return True

def is_area1(x,y):
  if x>8 or y>7: return False
  for dx in [0,1,0]:
    A=P[y][x-dx:x+dx+1]
    if A.count(0)>0: return False
    y+=1
  return True

def ink(x,y,s,m):
  global P
  dx = [0,1,-1,0,0,1,1,-1,-1,2,-2,0,0]
  dy = [0,0,-0,1,-1,1,-1,1,-1,0,0,2,-2]
  for i in range([5,9,13][s-1]): P[y+dy[i]][x+dx[i]]+=m
  return

drops,P = read_data()
A=[]
i=-1
m=3
while i<99:
  i+=1
  y=i/10
  x=i%10
  if P[y][x]==0: continue

  if m==3:
    while is_area3(x,y):
      A.append([x,y,3])
      ink(x,y+2,3,-1)
    if P[y][x]==0:
      m=3
      continue
    else: m=2

  if m==2:
    while is_area2(x,y):
      A.append([x,y,2])
      ink(x+1,y+1,2,-1)
    if P[y][x]==0:
      m=3
      continue
    else: m=1

  if m==1:
    while is_area1(x,y):
      A.append([x,y,1])
      ink(x,y+1,1,-1)
    if P[y][x]==0:
      m=3
      continue
    else: m=0

  dx=[0,1,0]
  dy=[1,1,2]
  if m==0 and len(A)>0:
    x,y,m=A.pop()
    m-=1
    ink(x+dx[m],y+dy[m],m+1,1)
    i = y*10+x-1
  else: break

if drops <=12 and len(A)==drops:
  for x,y,s in A: print x+dx[s-1],y+dy[s-1],s

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def read_data():
      | ^~~
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>
  
using namespace std;
  
#define reps(i,f,n) for(int i=f;i<n;i++)
#define repc(i,n) for(int i=0;i<n;i++)
#define rep(i,n) reps(i,0,n)

#define pb push_back

#define X real()
#define Y imag()

const int N = 10;

class P{
	public:
	int x,y,kind;
	P(int x,int y,int kind):x(x),y(y),kind(kind){}
};


class B{
	public:
	int board[N][N];
	B(){rep(i,N)rep(j,N)board[i][j]=0;}
	
	B copy(){
		B b;
		rep(i,N)rep(j,N)b.board[i][j]=board[i][j];
		return b;
	}
};

int color[3][5][5]={
	{
		{0,0,0,0,0},
		{0,0,1,0,0},
		{0,1,1,1,0},
		{0,0,1,0,0},
		{0,0,0,0,0},
	},
	{
		{0,0,0,0,0},
		{0,1,1,1,0},
		{0,1,1,1,0},
		{0,1,1,1,0},
		{0,0,0,0,0},
	},
	{
		{0,0,1,0,0},
		{0,1,1,1,0},
		{1,1,1,1,1},
		{0,1,1,1,0},
		{0,0,1,0,0},
	}
};

bool canput(B& b, P p){
	
	int a = 5;
	int c = 2;
	int d = 0;
	
	if(p.kind!=2){
		a=3;
		c=1;
		d=1;
	}
	
	bool flg = true;
	repc(dy,a){
		repc(dx,a){
			int nx = p.x+dx-c;
			int ny = p.y+dy-c;
			
			if(nx<0 || ny<0 || nx>=N || ny>=N)continue;
			
			if(color[p.kind][dy+d][dx+d]==1 && b.board[ny][nx]==0)flg=false;
		}
	}
	
	return flg;
}

void put(B& b, P p,int rev=1){
	
	int a = 5;
	int c = 2;
	int d = 0;
	
	if(p.kind!=2){
		a=3;
		d=1;
		c=1;
	}
	repc(dy,a){
		repc(dx,a){
			int nx = p.x+dx-c;
			int ny = p.y+dy-c;
			
			if(nx<0 || ny<0 || nx>=N || ny>=N)continue;
			
			if(color[p.kind][dy+d][dx+d]==1){
				b.board[ny][nx]-=rev;
			}
		}
	}
}

vector<P> getcand(B& b){
	vector<P> ret;
	rep(y,N){
		rep(x,N){
			rep(k,3){
				if(canput(b, P(x,y,k))){
					ret.pb(P(x,y,k));
				}
			}
		}
	}
	return ret;
}

vector<P> answ;
int n;

bool saiki(B& b, int x, int y, vector<P>& hoge){
	
	if(x==N-1 && y==N-1){
		answ = hoge;
		return true;
	}
	
	int nx = (x+1)%N;
	int ny = y+(x+1)/N;
	
	if(b.board[y][x]==0){
		
		return saiki(b, nx, ny, hoge);
	}
	
	bool ret = false;
	rep(kind, 3){
		rep(dy,5){
			rep(dx,5){
				if(color[kind][dy][dx]==1){
					P np = P(x+dx-2, y+dy-2, kind);
					if(canput(b, np)){
						put(b, np);
						hoge.pb(np);
						
						ret |= saiki(b, nx,ny, hoge);
						put(b, np, -1);
						hoge.pop_back();
					}
				}
				if(ret)return true;
			}
		}
	}
	
	return false;
}

int main(){
	
	B b;	
	cin>>n;
	
	
	rep(i,N)rep(j,N){
		char c;
		cin>>c;
		b.board[i][j] = c-'0';
	}
	
	saiki(b, 0,0, vector<P>());
	
	rep(i,answ.size()){
		printf("%d %d %d\n",answ[i].x,answ[i].y,answ[i].kind+1);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:188:23: error: cannot bind non-const lvalue reference of type 'std::vector<P>&' to an rvalue of type 'std::vector<P>'
  188 |         saiki(b, 0,0, vector<P>());
      |                       ^~~~~~~~~~~
a.cc:138:43: note:   initializing argument 4 of 'bool saiki(B&, int, int, std::vector<P>&)'
  138 | bool saiki(B& b, int x, int y, vector<P>& hoge){
      |                                ~~~~~~~~~~~^~~~
Language: C++

#include <vector>
#include <cstdio>
#include <cstdlib>
using namespace std;

const vector<pair<
	int,
	vector<vector<int>>
>>pattern={
	{13,{
		{0,0,1,0,0},
		{0,1,1,1,0},
		{1,1,1,1,1},
		{0,1,1,1,0},
		{0,0,1,0,0},
	}},
	{9,{
		{1,1,1},
		{1,1,1},
		{1,1,1},
	}},
	{5,{
		{0,1,0},
		{1,1,1},
		{0,1,0},
	}},
};

vector<vector<int>>m(10);
set<vector<vector<int>>>se;
void dfs(vector<pair<pair<int,int>,int>> &v,int s){
	if(s==0){
		for(auto &e:v)printf("%d %d %d\n",e.first.first,e.first.second,e.second);
		exit(0);
	}
	if(se.find(m)!=se.end())return;
	int cnt=0;
	for(auto &pat:pattern){if(s>=pat.first){
		for(int y=0;y<=10-pat.second.size();y++){
			for(int x=0;x<=10-pat.second[0].size();x++){
				for(int dy=0;dy<pat.second.size();dy++){
					for(int dx=0;dx<pat.second[0].size();dx++){
						if(m[y+dy][x+dx]<pat.second[dy][dx])goto fail;
					}
				}
				for(int dy=0;dy<pat.second.size();dy++){
					for(int dx=0;dx<pat.second[0].size();dx++){
						m[y+dy][x+dx]-=pat.second[dy][dx];
					}
				}
				v.push_back(make_pair(make_pair(x+pat.second[0].size()/2,y+pat.second.size()/2),pattern.size()-cnt));
				dfs(v,s-pat.first);
				v.pop_back();
				for(int dy=0;dy<pat.second.size();dy++){
					for(int dx=0;dx<pat.second[0].size();dx++){
						m[y+dy][x+dx]+=pat.second[dy][dx];
					}
				}
				fail:;
			}
		}
	}cnt++;}
	se.insert(m);
}

int main(){
	int N,y,x,s=0;
	scanf("%d",&N);
	for(y=0;y<10;y++){
		m[y].resize(10);
		for(x=0;x<10;x++)scanf("%d",&m[y][x]),s+=m[y][x];
	}
	vector<pair<pair<int,int>,int>> v;
	dfs(v,s);
}

Compiler output:
a.cc:30:1: error: 'set' does not name a type
   30 | set<vector<vector<int>>>se;
      | ^~~
a.cc: In function 'void dfs(std::vector<std::pair<std::pair<int, int>, int> >&, int)':
a.cc:36:12: error: 'se' was not declared in this scope; did you mean 's'?
   36 |         if(se.find(m)!=se.end())return;
      |            ^~
      |            s
a.cc:63:9: error: 'se' was not declared in this scope; did you mean 's'?
   63 |         se.insert(m);
      |         ^~
      |         s
Language: C++

#include <vector>
#include <set>
#include <cstdio>
#include <cstdlib>
using namespace std;

const vector<pair<
	int,
	vector<vector<int>>
>>pattern={
	{{9,2},{
		{1,1,1},
		{1,1,1},
		{1,1,1},
	}},
	{{13,3},{
		{0,0,1,0,0},
		{0,1,1,1,0},
		{1,1,1,1,1},
		{0,1,1,1,0},
		{0,0,1,0,0},
	}},
	{{5,1},{
		{0,1,0},
		{1,1,1},
		{0,1,0},
	}},
};

vector<vector<int>>m(10);
set<vector<vector<int>>>se;
void dfs(vector<pair<pair<int,int>,int>> &v,int s){
	if(s==0){
		for(auto &e:v)printf("%d %d %d\n",e.first.first,e.first.second,e.second);
		exit(0);
	}
	if(se.find(m)!=se.end())return;
	for(auto &pat:pattern)if(s>=pat.first.first){
		for(int y=0;y<=10-pat.second.size();y++){
			for(int x=0;x<=10-pat.second[0].size();x++){
				for(int dy=0;dy<pat.second.size();dy++){
					for(int dx=0;dx<pat.second[0].size();dx++){
						if(m[y+dy][x+dx]<pat.second[dy][dx])goto fail;
					}
				}
				for(int dy=0;dy<pat.second.size();dy++){
					for(int dx=0;dx<pat.second[0].size();dx++){
						m[y+dy][x+dx]-=pat.second[dy][dx];
					}
				}
				v.push_back(make_pair(make_pair(x+pat.second[0].size()/2,y+pat.second.size()/2),pat.first.second));
				dfs(v,s-pat.first.first);
				v.pop_back();
				for(int dy=0;dy<pat.second.size();dy++){
					for(int dx=0;dx<pat.second[0].size();dx++){
						m[y+dy][x+dx]+=pat.second[dy][dx];
					}
				}
				fail:;
			}
		}
	}
	se.insert(m);
}

int main(){
	int N,y,x,s=0;
	scanf("%d",&N);
	for(y=0;y<10;y++){
		m[y].resize(10);
		for(x=0;x<10;x++)scanf("%d",&m[y][x]),s+=m[y][x];
	}
	vector<pair<pair<int,int>,int>> v;
	dfs(v,s);
}

Compiler output:
a.cc:28:1: error: could not convert '{{{9, 2}, {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}}}, {{13, 3}, {{0, 0, 1, 0, 0}, {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0}, {0, 0, 1, 0, 0}}}, {{5, 1}, {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}}}' from '<brace-enclosed initializer list>' to 'const std::vector<std::pair<int, std::vector<std::vector<int> > > >'
   28 | };
      | ^
      | |
      | <brace-enclosed initializer list>
a.cc: In function 'void dfs(std::vector<std::pair<std::pair<int, int>, int> >&, int)':
a.cc:38:47: error: request for member 'first' in 'pat.std::pair<int, std::vector<std::vector<int> > >::first', which is of non-class type 'const int'
   38 |         for(auto &pat:pattern)if(s>=pat.first.first){
      |                                               ^~~~~
a.cc:51:123: error: request for member 'second' in 'pat.std::pair<int, std::vector<std::vector<int> > >::first', which is of non-class type 'const int'
   51 |                                 v.push_back(make_pair(make_pair(x+pat.second[0].size()/2,y+pat.second.size()/2),pat.first.second));
      |                                                                                                                           ^~~~~~
a.cc:52:51: error: request for member 'first' in 'pat.std::pair<int, std::vector<std::vector<int> > >::first', which is of non-class type 'const int'
   52 |                                 dfs(v,s-pat.first.first);
      |                                                   ^~~~~
Language: C++

#include <vector>
#include <set>
#include <cstdio>
#include <cstdlib>
using namespace std;

const vector<pair<
	pair<int,int>,
	vector<vector<int>>
>>pattern={
	{{13,3},{
		{0,0,1,0,0},
		{0,1,1,1,0},
		{1,1,1,1,1},
		{0,1,1,1,0},
		{0,0,1,0,0},
	}},
	{{9,2},{
		{1,1,1},
		{1,1,1},
		{1,1,1},
	}},
	{{5,1},{
		{0,1,0},
		{1,1,1},
		{0,1,0},
	}},
};

vector<vector<char>>m(10);
vector<pair<pair<int,int>,int>>v;
void dfs(int pat,int y,int x,int N,int d,int s){
	if(s==0){
		for(auto &e:v)printf("%d %d %d\n",e.first.first,e.first.second,e.second);
		exit(0);
	}
	for(;pat<pattern.size();pat++,y=x=0)if(s>=pattern[pat].first.first){
		for(;y<=10-pattern[pat].second.size();y++,x=0){
			for(;x<=10-pattern[pat].second[0].size();x++){
				for(int dy=0;dy<pattern[pat].second.size();dy++){
					for(int dx=0;dx<pattern[pat].second[0].size();dx++){
						if(m[y+dy][x+dx]<pattern[pat].second[dy][dx])goto fail;
					}
				}
				for(int dy=0;dy<pattern[pat].second.size();dy++){
					for(int dx=0;dx<pattern[pat].second[0].size();dx++){
						m[y+dy][x+dx]-=pattern[pat].second[dy][dx];
					}
				}
				v[d]=make_pair(
					make_pair(x+pattern[pat].second[0].size()/2,y+pattern[pat].second.size()/2),
					pattern[pat].first.second
				);
				dfs(pat,y,x+1,N,d+1,s-pattern[pat].first.first);
				for(int dy=0;dy<pattern[pat].second.size();dy++){
					for(int dx=0;dx<pattern[pat].second[0].size();dx++){
						m[y+dy][x+dx]+=pattern[pat].second[dy][dx];
					}
				}
				fail:;
			}
		}
	}
}

int main(){
	int N,y,x,s=0,z;
	scanf("%d",&N);
	for(y=0;y<10;y++){
		m[y].resize(10);
		for(x=0;x<10;x++)scanf("%d",&z),m[y][x]=z,s+=m[y][x];
	}
	v.resize(N);
	dfs(0,0,0,N,0,v,s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:23: error: cannot convert 'std::vector<std::pair<std::pair<int, int>, int> >' to 'int'
   74 |         dfs(0,0,0,N,0,v,s);
      |                       ^
      |                       |
      |                       std::vector<std::pair<std::pair<int, int>, int> >
a.cc:32:46: note:   initializing argument 6 of 'void dfs(int, int, int, int, int, int)'
   32 | void dfs(int pat,int y,int x,int N,int d,int s){
      |                                          ~~~~^
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
using namespace std;

struct Ink{
	int y,x,size;
	Ink(){}
	Ink(int _y,int _x,int _size){
		y=_y; x=_x; size=_size;
	}
};

const int blur_x[3][4] = {{0,1,0,-1},{1,1,-1,-1},{0,2,0,-2}},
		  blur_y[3][4] = {{-1,0,1,0},{-1,1,1,-1},{-2,0,2,0}};
int N;
bool ansflag;

void dfs(int fld[10][10],vector<Ink> ink){
	if(ansflag==true) return;
	bool flag=true;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			//printf("%d ",fld[i][j]);
			int fld_c[10][10];
			memcpy(fld_c,fld,sizeof(fld));
			if(--fld_c[i][j]<0) continue;
			flag = false;
			for(int k=0;k<3;k++){
				for(int l=0;l<4;l++){
					int ny,nx;
					ny = i+blur_y[k][l];
					nx = j+blur_x[k][l];
					if(ny<0 || 10<=ny || nx<0 || 10<=nx || --fld_c[ny][nx]<0) goto NEXT;
				}
				ink.push_back(Ink(i,j,k+1));
				int fld_cc[10][10];
				memcpy(fld_cc,fld_c,sizeof(fld));
				dfs(fld_cc,ink);
				ink.pop_back();
			}
			NEXT:;
		}//puts("");
	}//puts("");
	if(flag==true && ink.size()==N){
		for(int i=0;i<ink.size();i++){
			printf("%d %d %d\n",ink[i].x,ink[i].y,ink[i].size);
		}
		ansflag = true;
		return;
	}
}

int main(){
	int fld[10][10];
	cin>>N;
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			cin>>fld[i][j];
		}
	}
	vector<Ink> ink;
	dfs(fld,ink);
	return 0;
}

Compiler output:
a.cc: In function 'void dfs(int (*)[10], std::vector<Ink>)':
a.cc:34:49: warning: 'sizeof' on array function parameter 'fld' will return size of 'int (*)[10]' [-Wsizeof-array-argument]
   34 |                         memcpy(fld_c,fld,sizeof(fld));
      |                                                ~^~~~
a.cc:27:14: note: declared here
   27 | void dfs(int fld[10][10],vector<Ink> ink){
      |          ~~~~^~~~~~~~~~~
a.cc:34:25: error: 'memcpy' was not declared in this scope
   34 |                         memcpy(fld_c,fld,sizeof(fld));
      |                         ^~~~~~
a.cc:12:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include<queue>
  +++ |+#include <cstring>
   12 | using namespace std;
a.cc:46:60: warning: 'sizeof' on array function parameter 'fld' will return size of 'int (*)[10]' [-Wsizeof-array-argument]
   46 |                                 memcpy(fld_cc,fld_c,sizeof(fld));
      |                                                           ~^~~~
a.cc:27:14: note: declared here
   27 | void dfs(int fld[10][10],vector<Ink> ink){
      |          ~~~~^~~~~~~~~~~
Language: C++

n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
n_stain = sum(sum(i) for i in cloth)
n = (n_stain - 5 * n_drop) // 4

drops_candidate = []
dl = 0
while 2 * dl <= n:
    dm = n - 2 * dl
    ds = n_drop - dm - dl
    if ds >= 0:
        drops_candidate.append([ds, dm, dl])
    dl += 1

sdxy = ((0, 0), (-1, 0), (1, 0), (0, -1), (0, 1))
mdxy = sdxy + ((-1, -1), (-1, 1), (1, -1), (1, 1))
ldxy = mdxy + ((-2, 0), (2, 0), (0, -2), (0, 2))
dxys = (sdxy, mdxy, ldxy)


def remove(cloth, x, y, drop_size):
    if drop_size == 2 and (not 1 < x < 8 or not 1 < y < 8):
        return False

    for dxy in dxys[drop_size]:
        (dx, dy) = dxy
        if cloth[y + dy][x + dx]:
            cloth[y + dy][x + dx] -= 1
        else:
            return False
    return True


def find(cloth, drops, history):
    for d in range(3):
        if not drops[d]:
            continue
        (start, stop) = (1, 9) if d < 2 else (2, 8)
        for y in range(start, stop):
            for x in range(start, stop):
                for dxy in dxys[d]:
                    (dx, dy) = dxy
                    if not cloth[y + dy][x + dx]:
                        break
                else:
                    new_cloth, new_drops, new_history = [r[:] for r in cloth], drops[:], history[:]
                    for dxy in dxys[d]:
                        (dx, dy) = dxy
                        new_cloth[y + dy][x + dx] -= 1

                    new_drops[d] -= 1
                    new_history.append((x, y, d + 1))
                    if sum(new_drops):
                        result = find(new_cloth, new_drops, new_history)
                        if result:
                            return result
                    else:
                        return new_history
    return False


for drops in drops_candidate:
    history = find(cloth, drops, [])
    if history != False:
        for h in history:
            print(*h)
        break

Compiler output:
a.cc:1:1: error: 'n_drop' does not name a type
    1 | n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
      | ^~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
using namespace std;
//kaewasuretyuui
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef pair<int,pii> pip;
typedef vector<pip>vip	;
const double PI=acos(-1);
const double EPS=1e-8;
const int inf=1e8;
int n;
vvi in;
vip out;
int dx[]={-1,0,0,0,1,1,1,-1,-1,2,0,0,-2};
int dy[]={0,-1,0,1,0,1,-1,1,-1,0,2,-2,0};
int co[3]={0,5,9,13};
bool f(int x,int y,int c){
	if(c==0){
		bool h=true;
		rep(i,10)rep(j,10)if(in[i][j])h=false;
		if(!h)return false;
		rep(i,n)cout<<out[i].first<<" "<<out[i].second.first<<" "<<
			out[i].second.second<<endl;
		return true;
	}
	rep(i,10)rep(j,10){
		if(i+j==0)i=x,j=y;
		if(in[i][j]){
			rep(k,3){
				bool h=true;
				loop(l,co[k],co[k+1])if(i+dx[l]<0||j+dy[l]<0||i+dx[l]>=10||j+dy[l]>=10||in[i+dx[l]][j+dy[l]]==0)h=false;
				if(!h)break;
				out[c-1]=pip(j,pii(i,k+1));
				rep(l,co[k])in[i+dx[l]][j+dy[l]]--;
				if(f(i,j,c-1))return true;
				rep(l,co[k])in[i+dx[l]][j+dy[l]]++;
			}
		}
	}
	return false;
}
int main(){
	cin>>n;
	in=vvi(10,vi(10));
	out=vip(n);
	rep(i,10)rep(j,10)cin>>in[i][j];
	f(0,0,n);
}

Compiler output:
a.cc:38:20: error: too many initializers for 'int [3]'
   38 | int co[3]={0,5,9,13};
      |                    ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <random>
#include <cstdlib>
#include <cmath>
#include <sstream>
using namespace std;

#define R 10
#define PSIZE 5
//????????????????????????14*14????????????????????£????????????????????????
//??¢?´¢?????§????????????????????§?????????
//??¨?????£????????????????????????????????????????????????????????????????????£??????
int T[10][10];
int N;

//????????????????????¨???????????????????????????????????¶??????????????????????????????????????´
//?????´????????????center??§???????????´
int mid = (PSIZE - 1) / 2;
int p[3][5][5] = {
	{0,0,1,0,0,
	0,1,1,1,0,
	0,0,1,0,0,
	0,0,0,0,0,
	0,0,0,0,0},

	{0,0,1,1,1,
	0,0,1,1,1,
	0,0,1,1,1,
	0,0,0,0,0,
	0,0,0,0,0},

	{0,0,1,0,0,
	0,1,1,1,0,
	1,1,1,1,1,
	0,1,1,1,0,
	0,0,1,0,0}

};
//{2,0}???????????????????????????
int center[3][2] = { {0,1},{1,1},{0,2} };
int psize[] = { 3,3,5 };

void add_point(int x, int y, int point[5][5]) {
	for (int i = 0; i < PSIZE; i++) {
		for (int j = 0; j < PSIZE; j++) {
			if (point[i][j]) T[y + i][x + j - mid] += point[i][j];
		}
	}
}

void delete_point(int x, int y, int point[5][5]) {
	for (int i = 0; i < PSIZE; i++) {
		for (int j = 0; j < PSIZE; j++) {
			if (point[i][j]) T[y + i][x + j - mid] -= point[i][j];
		}
	}
}

bool can_delete(int x, int y, int point[5][5]) {
	for (int i = 0; i < PSIZE; i++) {
		for (int j = 0; j < PSIZE; j++) {
			if (y + i < 0 || y + i >= R ||
				x + j - mid < 0 || x + j - mid >= R)
				if (point[i][j]) return false;
			if (T[y + i][x + j - mid] - point[i][j] < 0) return false;
		}
	}
	return true;
}

bool checkT() {
	for (int i = 0; i < R; i++) {
		for (int j = 0; j < R; j++) {
			if (T[i][j] != 0) return false;
		}
	}
	return true;
}

vector<pair< pair<int, int>, int> > points;
bool rec(int x, int y, int cnt) {
	if (checkT()) return true;
	if (cnt == N) return false;

	for (; !T[y][x];) {
		y += (x == 9 ? 1 : 0);
		x = (x + 1) % 10;
		if (y == 10) return false;
	}

	for (int i = 0; i < 3; i++) {
		if (!can_delete(x, y, p[i])) continue;
		delete_point(x, y, p[i]);
		points.push_back(make_pair(make_pair(x + center[i][0], y + center[i][1]), i));
		if (rec(x, y, cnt + 1)) return true;
		points.pop_back();
		add_point(x, y, p[i]);
	}
	return false;
}

void q91() {
	cin >> N;
	for (int i = 0; i < R; i++) {
		for (int j = 0; j < R; j++) {
			cin >> T[i][j];
		}
	}
	bool ans = rec(0, 0, 0);
	for (auto it = points.begin(); it != points.end(); it++) {
		cout << (*it).first.first << " " << (*it).first.second << " " << (*it).second + 1 << endl;
	}

}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;

int n;
int b[10][10];

int ans_x[12], ans_y[12], ans_type[12];

bool inside(int y, int x) {
  return 0 <= y && y < 10 && 0 <= x && x < 10;
}

inline bool latte(int y, int x, int type, int d = 0) {
  int dx[13] = {0, 0, 1, 0, -1, -1, 1, 1, -1, 0, 2, 0, -2};
  int dy[13] = {0, -1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};

  if (d == -1) {
    if (type == 1) b[y][x]--;
    for (int i = 4 * (type - 1) + 1; i <= 4 * type; ++i) {
      int ny = y + dy[i];
      int nx = x + dx[i];
      if (!b[ny][nx] || !inside(ny, nx)) return false;
    }
    for (int i = 0; i <= 4 * type; ++i) {
      int ny = y + dy[i];
      int nx = x + dx[i];
      b[ny][nx] += d;
    }

    return false;
  }

  for (int i = 0; i <= 4 * type; ++i) {
    int ny = y + dy[i];
    int nx = x + dx[i];
    b[ny][nx] += d;
  }

  return true;
}

inline bool dfs(int v = 0, int y = 0, int x = 0) {
  if (y == 10) return false;

  if (v == n) {
    for (int i = 0; i < 10; ++i) {
      for (int j = 0; j < 10; ++j) {
        if (b[i][j]) return false;
      }
    }

    for (int i = 0; i < n; ++i) {
      printf("%d %d %d\n", ans_x[i], ans_y[i], ans_type[i]);
    }
    return true;
  }

  if (b[y][x]) {
    for (int i = 1; i <= 3; ++i) {
      if (latte(y, x, i, -1)) {
        ans_y[v] = y;
        ans_x[v] = x;
        ans_type[v] = i;
        if (dfs(v + 1, y, x)) return true;
        // latte(y, x, i, 1);
      } else {
        latte(y, x, i - 1, 1)
      }
    }
  }

  int nx = (x + 1) % 10;
  int ny = y + (x == 9);

  return dfs(v, ny, nx);
}

int main() {
  cin >> n;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      cin >> b[i][j];
    }
  }

  dfs();
}

Compiler output:
a.cc: In function 'bool dfs(int, int, int)':
a.cc:67:30: error: expected ';' before '}' token
   67 |         latte(y, x, i - 1, 1)
      |                              ^
      |                              ;
   68 |       }
      |       ~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int n;
int b[10][10];

int dx[13] = {0, 0, 1, 0, -1, -1, 1, 1, -1, 0, 2, 0, -2};
int dy[13] = {0, -1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};

inline bool inside(int y, int x) {
  return 0 <= y && y < 10 && 0 <= x && x < 10;
}

inline bool latte(int y, int x, int type, int d = 0) {
  if (d == -1) {
    for (int i = 0; i <= 4 * type; ++i) {
      int ny = y + dy[i];
      int nx = x + dx[i];
      if (!b[ny][nx] || !inside(ny, nx)) return false;
    }
  }

  for (int i = 0; i <= 4 * type; ++i) {
    int ny = y + dy[i];
    int nx = x + dx[i];
    b[ny][nx] += d;
  }

  return true;
}

bool dfs(int v = 0, int y = 1, int x = 1) {
  if (y == 9) return false;

  if (v == n) {
    for (int i = 0; i < 10; ++i) {
      for (int j = 0; j < 10; ++j) {
        if (b[i][j]) return false;
      }
    }
    return true;
  }

  int nx = x % 8 + 1;
  int ny = y + (nx == 1);
  if (!b[y][x]) return dfs(v, ny, nx);

  for (int i = 1; i <= 3; ++i) {
    if (latte(y, x, i, -1)) {
      if (dfs(v + 1, y, x)) {
        printf("%d %d %d\n", x, y, i);
        return true;
      }
      latte(y, x, i, 1);
    } else {
      break;
    }
  }

  return dfs(v, ny, nx);
}

int main() {
  cin >> n;
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 10; ++j) {
      cin >> b[i][j];
    }
  }

  dfs()
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:8: error: expected ';' before '}' token
   71 |   dfs()
      |        ^
      |        ;
   72 | }
      | ~
Language: C++

import itertools

dx = (0, 0, 0, 1,-1, 1, 1,-1,-1,-2, 2, 0, 0)
dy = (0, 1,-1, 0, 0, 1,-1, 1,-1, 0, 0,-2, 2)
dd = (5, 9, 13)

def drop(fab, used, size_list):
    for xy in range(100):
        y = xy%10
        x = xy//10
        size = size_list[used]
        check = True
        for i in range(size):
            if fab[y + dy[i] + 2][x + dx[i] + 2] == 0:
                check = False
        if check:
            for i in range(size):
                fab[y + dy[i] + 2][x + dx[i] + 2] -= 1
            if sum(map(sum, fab)):
                result = drop(fab, used + 1, size_list)
                if result:
                    result.append([x, y, dd.index(size) + 1])
                    return result
                for i in range(size):
                    fab[y + dy[i] + 2][x + dx[i] + 2] += 1
            else:
                return [[x, y, dd.index(size) + 1]]
    return False

fab = [[0 for i in range(14)] for j in range(14)]

n = int(input())

for i in range(10):
    fab[i + 2][2:12] = list(map(int, input().split()))

s = sum(map(sum, fab))
d_all = list(itertools.combinations_with_replacement([5,9,13], n))
d_list = [l for l in d_all if sum(l) == s]

ans = [0 for i in range(n)]
for d in d_list:
    d_tmp = sorted(d)[::-1]
    ans = drop(fab, 0, d_tmp)
    if ans:
        for a in ans:
            print(*a)
        break



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import itertools
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;

int a[10][10];
int rem, n;
bool big(int x, int y, int r){
    bool res = true;
    if(x - 2 < 0 || x + 2 >= 10 || y - 2 < 0 || y + 2 >= 10)return false;
    for(int i = x - 2;i <= x + 2;i++)
	for(int j = y - 2;j <= y + 2;j++)
	    if(abs(x - i) + abs(y - j) <= 2){		
		a[i][j] += r;
		rem += r;
		if(a[i][j] < 0)res = false;
	    }
    if(!res)big(x, y, -r);
    return res;
}

bool small(int x, int y, int r){
    bool res = true;
    if(x - 1 < 0 || x + 1 >= 10 || y - 1 < 0 || y + 1 >= 10)return false;
    for(int i = x - 1;i <= x + 1;i++)
	for(int j = y - 1;j <= y + 1;j++)
	    if(abs(x - i) + abs(y - j) <= 1){
		a[i][j] += r;
		rem += r;
		if(a[i][j] < 0)res = false;
	    }
    if(!res)small(x, y, -r);
    return res;
}

bool middle(int x, int y, int r){
    bool res = true;
    if(x - 1 < 0 || x + 1 >= 10 || y - 1 < 0 || y + 1 >= 10)return false;
    for(int i = x - 1;i <= x + 1;i++)
	for(int j = y - 1;j <= y + 1;j++){
	    a[i][j] += r;
	    rem += r;
	    if(a[i][j] < 0)res = false;
	}
    if(!res)middle(x, y, -r);
    return res;
}

typedef pair<int, int> P;
typedef pair<P, int> T;

vector<T> ans;

bool solve(int n,int p = 0, int q = 0){
    if(rem > 13 * n)return false;
    if(p - 2 >= 0 && q - 1 >= 0 && a[p - 2][q - 1])return false;
    if(p - 1 >= 0 && q - 2 >= 0 && a[p - 1][q - 1])return false;
    for(int i = 0;i < 10;i++){
	for(int j = 0;j < 10;j++){
	    if(a[i][j] > n)return false;
	}
    }
    if(counter() > n)return false;
    for(int i = p;i < 10;i++){
	for(int j = 0;j < 10;j++){
	    if(a[i][j] == 0)continue;
	    if(big(i, j, -1)){
		ans.push_back(T(P(i, j), 3));
		if(solve(n - 1, i, j))return true;
		ans.pop_back();
		big(i, j, 1);
	    }
	    if(middle(i, j, -1)){
		ans.push_back(T(P(i, j), 2));
		if(solve(n - 1, i, j))return true;
		ans.pop_back();
		middle(i, j, 1);
	    }
	    if(small(i, j, -1)){
		ans.push_back(T(P(i, j), 1));
		if(solve(n - 1, i, j))return true;
		ans.pop_back();
		small(i, j, 1);
	    }
	}
    }
    return (n == 0);
}

int main(){
    cin >> n;
    for(int i = 0;i < 10;i++)
	for(int j = 0;j < 10;j++){
	    cin >> a[i][j];
	    rem += a[i][j];
	}
    
    solve(n);
    for(int i = 0;i < ans.size();i++){
	cout << ans[i].first.second << " "<< ans[i].first.first << " "<<ans[i].second << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'bool solve(int, int, int)':
a.cc:64:8: error: 'counter' was not declared in this scope
   64 |     if(counter() > n)return false;
      |        ^~~~~~~
Language: C++

// test20.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int map[12][12];
int n;
bool hantei3(int x,int y){
	if(map[y][x] && map[y][x-1] && map[y][x-2] && map[y][x+1] && map[y][x+2] && map[y-2][x] && map[y-1][x] && map[y+1][x] && map[y+2][x]){
		if((map[y+2][x+2] == map[y][x]-1 && map[y+1][x+2] == map[y][x]-1 && map[y+2][x+1] == map[y][x]-1) || (map[y+2][x-2] == map[y][x]-1 && map[y+1][x-2] == map[y][x]-1 && map[y+2][x-1] == map[y][x]-1)|| (map[y-2][x+2] == map[y][x]-1 && map[y-1][x+2] == map[y][x]-1 && map[y-2][x+1] == map[y][x]-1)|| (map[y-2][x-2] == map[y][x]-1 && map[y-1][x-2] == map[y][x]-1 && map[y-2][x-1] == map[y][x]-1)){
			map[y][x]--;
			map[y][x-1]--;
			map[y][x-2]--;
			map[y][x+1]--;
			map[y][x+2]--;
			map[y-2][x]--;
			map[y-1][x]--;
			map[y+1][x]--;
			map[y+2][x]--;
			return true;
		}
	}
	return false;
}
bool hantei2(int x,int y){
	if(map[y][x] && map[y][x-1] && map[y][x+1] && map[y-1][x] && map[y-1][x-1] && map[y-1][x+1] && map[y+1][x] && map[y+1][x-1] && map[y+1][x+1]){
		if((map[y+2][x+2] == map[y][x]-1 && map[y+1][x+2] == map[y][x]-1 && map[y+2][x+1] == map[y][x]-1) || (map[y+2][x-2] == map[y][x]-1 && map[y+1][x-2] == map[y][x]-1 && map[y+2][x-1] == map[y][x]-1)|| (map[y-2][x+2] == map[y][x]-1 && map[y-1][x+2] == map[y][x]-1 && map[y-2][x+1] == map[y][x]-1)|| (map[y-2][x-2] == map[y][x]-1 && map[y-1][x-2] == map[y][x]-1 && map[y-2][x-1] == map[y][x]-1)){
			map[y][x] --; 
			map[y][x-1] --; 
			map[y][x+1] --; 
			map[y-1][x] --; 
			map[y-1][x-1] --; 
			map[y-1][x+1] --; 
			map[y+1][x] --; 
			map[y+1][x-1] --; 
			map[y+1][x+1]--;
			return true;
		}
	}
	return false;
}
bool hantei1(int x,int y){
	if(map[y][x] && map[y+1][x] && map[y-1][x] && map[y][x+1] && map[y][x-1]){
		if((map[y+1][x+1] == map[y][x]-1) || (map[y+1][x-1] == map[y][x]-1)|| (map[y-1][x+1] == map[y][x]-1)|| (map[y-1][x-1] == map[y][x]-1)){
			map[y][x] --;
			map[y+1][x] --;
			map[y-1][x] --;
			map[y][x+1] --;
			map[y][x-1]--;
			return true;
		}
	}
	return false;
}
int _tmain(int argc, _TCHAR* argv[])
{
	vector<int>ans;
	cin >> n;
	for(int y=1;y<11;y++){
		for(int x=1;x<11;x++){
			cin >> map[y][x];
		}
	}
	for(int y=3;y<9;y++){
		for(int x=3;x<9;x++){
			if(hantei3(x,y)){
				cout << x -1 << " " << y-1 << " "  << 3 << endl;
			}
		}
	}
	for(int y=2;y<10;y++){
		for(int x=2;x<10;x++){
			if(hantei2(x,y)){
				cout << x -1 << " " << y-1 << " "  << 2 << endl;
			}
		}
	}
	for(int y=2;y<10;y++){
		for(int x=2;x<10;x++){
			if(hantei1(x,y)){
				cout << x -1 << " " << y-1 << " "  << 1 << endl;
			}
		}
	}



	return 0;
}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

// AOJ Volume 0 Problem 0092

#include <stdio.h>
#include <string.h>

    int map[1000][1000];
	int index[1001][1001][2];

int main(void)
{
	int n;
	char str[1001];
	int i, j;
	int max;
	int s;
	

    while (1){
		scanf("%d", &n);
		if (n == 0){
			break;
		}
		for (i = 0; i < n; i++){
			scanf("%s", str);
			for (j = 0; str[j] != '\0'; j++){
				if (str[j] =='*'){
					map[i][j] = 0;
				}
				else {
					map[i][j] = 1;
				}
			}
		}
		
		memset(index, 0, sizeof(index));
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (j == 0){
					index[i][j][0] = map[i][j];
					index[j][i][1] = map[j][i];
				}
				else {
					index[i][j][0] = (index[i][j - 1][0] + map[i][j]) * map[i][j];
					index[j][i][1] = (index[j - 1][i][1] + map[j][i]) * map[j][i];
				}
			}
		}
#if 0
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				printf("(%2d:%2d)", index[i][j][0], index[i][j][1]);
			}
			printf("\n");
		}
#endif
		max = 0;
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (index[i][j][0] != 0 && index[i][j][1] != 0){
					s = 2;
					while (index[i + s - 1][j + s - 1][0] >= s && index[i + s - 1][j + s - 1][1] >= s){
						s++;
					}
					s--;
					if (s > max){
//						printf("<%d, %d=%d>", j, i, s);
						max = s;
					}
				}
			}
		}
		
		printf("%d\n", max);
	}
	return (0);
}
		

Compiler output:
main.c:7:13: error: 'index' redeclared as different kind of symbol
    7 |         int index[1001][1001][2];
      |             ^~~~~
In file included from /usr/include/string.h:462,
                 from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
   68 | extern char *index (const char *__s, int __c)
      |              ^~~~~
Language: C

// AOJ Volume 0 Problem 0092

#include <stdio.h>
#include <string.h>

char map[1000][1000];
int index[1001][1001][2];

int main(void)
{
	int n;
	char str[1001];
	int i, j;
	int max;
	int s;
	

    while (1){
		scanf("%d", &n);
		if (n == 0){
			break;
		}
		for (i = 0; i < n; i++){
			scanf("%s", str);
			for (j = 0; str[j] != '\0'; j++){
				if (str[j] =='*'){
					map[i][j] = 0;
				}
				else {
					map[i][j] = 1;
				}
			}
		}
		
		memset(index, 0, sizeof(index));
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (j == 0){
					index[i][j][0] = map[i][j];
					index[j][i][1] = map[j][i];
				}
				else {
					index[i][j][0] = (index[i][j - 1][0] + map[i][j]) * map[i][j];
					index[j][i][1] = (index[j - 1][i][1] + map[j][i]) * map[j][i];
				}
			}
		}
#if 0
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				printf("(%2d:%2d)", index[i][j][0], index[i][j][1]);
			}
			printf("\n");
		}
#endif
		max = 0;
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (index[i][j][0] != 0 && index[i][j][1] != 0){
					s = 2;
					while (index[i + s - 1][j + s - 1][0] >= s && index[i + s - 1][j + s - 1][1] >= s){
						s++;
					}
					s--;
					if (s > max){
//						printf("<%d, %d=%d>", j, i, s);
						max = s;
					}
				}
			}
		}
		
		printf("%d\n", max);
	}
	return (0);
}

Compiler output:
main.c:7:5: error: 'index' redeclared as different kind of symbol
    7 | int index[1001][1001][2];
      |     ^~~~~
In file included from /usr/include/string.h:462,
                 from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
   68 | extern char *index (const char *__s, int __c)
      |              ^~~~~
Language: C

// AOJ Volume 0 Problem 0092

#include <stdio.h>
#include <string.h>

int map[1000][1000];
int index[1001][1001][2];

int main(void)
{
	int n;
	char str[1001];
	int i, j;
	int max;
	int s;
	

    while (1){
		scanf("%d", &n);
		if (n == 0){
			break;
		}
		for (i = 0; i < n; i++){
			scanf("%s", str);
			for (j = 0; str[j] != '\0'; j++){
				if (str[j] =='*'){
					map[i][j] = 0;
				}
				else {
					map[i][j] = 1;
				}
			}
		}
		
		memset(index, 0, sizeof(index));
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (j == 0){
					index[i][j][0] = map[i][j];
					index[j][i][1] = map[j][i];
				}
				else {
					index[i][j][0] = (index[i][j - 1][0] + map[i][j]) * map[i][j];
					index[j][i][1] = (index[j - 1][i][1] + map[j][i]) * map[j][i];
				}
			}
		}
//		for (i = 0; i < n; i++){
//			for (j = 0; j < n; j++){
//				printf("(%2d:%2d)", index[i][j][0], index[i][j][1]);
//			}
//			printf("\n");
//		}
		max = 0;
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (index[i][j][0] != 0 && index[i][j][1] != 0){
					s = 2;
					while (index[i + s - 1][j + s - 1][0] >= s && index[i + s - 1][j + s - 1][1] >= s){
						s++;
					}
					s--;
					if (s > max){
//						printf("<%d, %d=%d>", j, i, s);
						max = s;
					}
				}
			}
		}
		
		printf("%d\n", max);
	}
	return (0);
}

Compiler output:
main.c:7:5: error: 'index' redeclared as different kind of symbol
    7 | int index[1001][1001][2];
      |     ^~~~~
In file included from /usr/include/string.h:462,
                 from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
   68 | extern char *index (const char *__s, int __c)
      |              ^~~~~
Language: C

// AOJ Volume 0 Problem 0092

#include <stdio.h>
#include <string.h>

char map[1000][1000];
char index[1001][1001][2];

int main(void)
{
	int n;
	char str[1001];
	int i, j;
	int max;
	int s;
	

    while (1){
		scanf("%d", &n);
		if (n == 0){
			break;
		}
		for (i = 0; i < n; i++){
			scanf("%s", str);
			for (j = 0; str[j] != '\0'; j++){
				if (str[j] =='*'){
					map[i][j] = 0;
				}
				else {
					map[i][j] = 1;
				}
			}
		}
		
		memset(index, 0, sizeof(index));
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (j == 0){
					index[i][j][0] = map[i][j];
					index[j][i][1] = map[j][i];
				}
				else {
					index[i][j][0] = (index[i][j - 1][0] + map[i][j]) * map[i][j];
					index[j][i][1] = (index[j - 1][i][1] + map[j][i]) * map[j][i];
				}
			}
		}
//		for (i = 0; i < n; i++){
//			for (j = 0; j < n; j++){
//				printf("(%2d:%2d)", index[i][j][0], index[i][j][1]);
//			}
//			printf("\n");
//		}
		max = 0;
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (index[i][j][0] != 0 && index[i][j][1] != 0){
					s = 2;
					while (index[i + s - 1][j + s - 1][0] >= s && index[i + s - 1][j + s - 1][1] >= s){
						s++;
					}
					s--;
					if (s > max){
//						printf("<%d, %d=%d>", j, i, s);
						max = s;
					}
				}
			}
		}
		
		printf("%d\n", max);
	}
	return (0);
}

Compiler output:
main.c:7:6: error: 'index' redeclared as different kind of symbol
    7 | char index[1001][1001][2];
      |      ^~~~~
In file included from /usr/include/string.h:462,
                 from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
   68 | extern char *index (const char *__s, int __c)
      |              ^~~~~
Language: C

// AOJ Volume 0 Problem 0092

#include <stdio.h>
#include <string.h>

#define SIZE (100)

int map[SIZE][SIZE];
int index[SIZE + 1][SIZE + 1][2];

int main(void)
{
	int n;
	char str[1001];
	int i, j;
	int max;
	int s;
	

    while (1){
		scanf("%d", &n);
		if (n == 0){
			break;
		}
		for (i = 0; i < n; i++){
			scanf("%s", str);
			for (j = 0; str[j] != '\0'; j++){
				if (str[j] =='*'){
					map[i][j] = 0;
				}
				else {
					map[i][j] = 1;
				}
			}
		}
		
		memset(index, 0, sizeof(index));
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (j == 0){
					index[i][j][0] = map[i][j];
					index[j][i][1] = map[j][i];
				}
				else {
					index[i][j][0] = (index[i][j - 1][0] + map[i][j]) * map[i][j];
					index[j][i][1] = (index[j - 1][i][1] + map[j][i]) * map[j][i];
				}
			}
		}
//		for (i = 0; i < n; i++){
//			for (j = 0; j < n; j++){
//				printf("(%2d:%2d)", index[i][j][0], index[i][j][1]);
//			}
//			printf("\n");
//		}
		max = 0;
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (index[i][j][0] != 0 && index[i][j][1] != 0){
					s = 2;
					while (index[i + s - 1][j + s - 1][0] >= s && index[i + s - 1][j + s - 1][1] >= s){
						s++;
					}
					s--;
					if (s > max){
//						printf("<%d, %d=%d>", j, i, s);
						max = s;
					}
				}
			}
		}
		
		printf("%d\n", max);
	}
	return (0);
}

Compiler output:
main.c:9:5: error: 'index' redeclared as different kind of symbol
    9 | int index[SIZE + 1][SIZE + 1][2];
      |     ^~~~~
In file included from /usr/include/string.h:462,
                 from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
   68 | extern char *index (const char *__s, int __c)
      |              ^~~~~
Language: C

// AOJ Volume 0 Problem 0092

#include <stdio.h>
#include <string.h>

#define SIZE (100)

int map[SIZE][SIZE];
int index[SIZE + 1][SIZE + 1][2];

int main(void)
{
	int n;
	char str[1001];
	int i, j;
	int max;
	int s;
	

    while (1){
		scanf("%d", &n);
		if (n == 0){
			break;
		}
		for (i = 0; i < n; i++){
			scanf("%s", str);
			for (j = 0; str[j] != '\0'; j++){
				if (str[j] == '*'){
					map[i][j] = 0;
				}
				else {
					map[i][j] = 1;
				}
			}
		}
		
		memset(index, 0, sizeof(index));
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (j == 0){
					index[i][j][0] = map[i][j];
					index[j][i][1] = map[j][i];
				}
				else {
					index[i][j][0] = (index[i][j - 1][0] + map[i][j]) * map[i][j];
					index[j][i][1] = (index[j - 1][i][1] + map[j][i]) * map[j][i];
				}
			}
		}
//		for (i = 0; i < n; i++){
//			for (j = 0; j < n; j++){
//				printf("(%2d:%2d)", index[i][j][0], index[i][j][1]);
//			}
//			printf("\n");
//		}
		max = 0;
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (index[i][j][0] != 0 && index[i][j][1] != 0){
					s = 2;
					while (index[i + s - 1][j + s - 1][0] >= s && index[i + s - 1][j + s - 1][1] >= s){
						s++;
					}
					s--;
					if (s > max){
//						printf("<%d, %d=%d>", j, i, s);
						max = s;
					}
				}
			}
		}
		
		printf("%d\n", max);
	}
	return (0);
}

Compiler output:
main.c:9:5: error: 'index' redeclared as different kind of symbol
    9 | int index[SIZE + 1][SIZE + 1][2];
      |     ^~~~~
In file included from /usr/include/string.h:462,
                 from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
   68 | extern char *index (const char *__s, int __c)
      |              ^~~~~
Language: C

#include<iostream>
using namespace std;

int min(int,int);

int main(void){
  char dp[1001][1001];
  int n,i,j,max,M[1001][1001];
  
  
  while(cin >> n,n){
      max=0;

      for(i=0;i<n;i++){
	  for(j=0;j<n;j++){
	      M[i][j]=1;
	    }
	} 

      for(i=0;i<n;i++){
	  for(j=0;j<n;j++){
	      cin >> dp[i][j];
	      if(i==0){
		  if(dp[i][j]!='*')M[i][j]=1;
		  else M[i][j]=-1;
		}
	      else{
		  if(dp[i][j]!='*'){
		  if(j==0)M[i][j]=1;
		  else{
		      if(M[i-1][j]==-1 || M[i-1][j-1]==-1 || M[i][j-1]==-1)
			M[i][j]=1;
		      else M[i][j]=min(M[i-1][j],min(M[i-1][j-1],M[i][j-1]))+1;
		  }
		  }
	      }
	      if(dp[i][j]=='*')M[i][j]=-1;
	  }
      }
      
      for(i=0;i<n;i++){
	  for(j=0;j<n;j++){
	      if(M[i][j]>=0 && max<M[i][j])max=M[i][j];
	    }
	}
      cout << max <<"\n";
    }
  return 0;
}

int min(int x,int y){
  return x<y?x:y;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<algorithm>

using namespace std;
 
int main(void){
  char dp[1001][1001];
  int n,M[1001][1001];
   
   
  while(cin >> n,n){
       
      for(int i=0;i<n;i++)
	for(int j=0;j<n;j++)
          M[i][j]=1;
      
      for(int i=0;i<n;i++){
	for(int j=0;j<n;j++){
          cin >> dp[i][j];
          if(i==0){
	    if(dp[i][j]!='*')M[i][j]=1;
	    else M[i][j]=-1;
	  }
          else{
	    if(dp[i][j]!='*'){
	      if(j==0)M[i][j]=1;
	      else{
		if(M[i-1][j]==-1 || M[i-1][j-1]==-1 || M[i][j-1]==-1)M[i][j]=1;
		else M[i][j]=min(M[i-1][j],min(M[i-1][j-1],M[i][j-1]))+1;
	      }
	    }
	  }
          if(dp[i][j]=='*')M[i][j]=-1;
        }
      }

      int ans=0;      
      for(int i=0;i<n;i++)
	for(int j=0;j<n;j++)
	  ans=max(ans,M[i][j]);
  
      cout << ans << endl;
    }
  return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<iostream>
using namespace std;

int main()
{
  int n;
  for(;cin>>n,n;)
    {
      string s[n];
      int ans=0;
      for(int i=0;i<n;i++)
	cin>>s[i];
      for(int x=0;x<n;x++)
	for(int y=0;y<n;y++)
	  {
	    if(s[x][y]=='.')
	      {
		int count = 1;
		for(int tmp=1;tmp<n;tmp++)
		  {
		    if(tmp+x>=n ||tmp+y>=n)
		      break;
		    bool c=true;
		    for(int tt=0;tt<tmp+1;tt++)
		      {
			if(s[x+tt][y+tmp]=='*' || s[x+tmp][y+tt]=='*')
			  {
			    c=false;
			    break;
			  }
		      }
		    if(c)
		      count++;
		    else
		      break;
		  }
		if(count>ans)
		  ans=count;
	      }
	  }
      cout<<ans<<endl;
    }


}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.