criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>

using namespace std;

int main(){
  int data[300]=2;
  int a,b,c;
  cin >> a>> b>>c;
  for(int i=0;i<a+b+c;i++){
    data[i]=2;
  }
  int n;
  cin >> n;
  int x,y,z,re;
  int save[n][4];
  int nows=0;
  for(int i=0;i<n;i++){
    cin >>x>>y>>z>>re;
    if(re==1){
      data[x]=1;
      data[y]=1;
      data[z]=1;
    }else{
      save[nows][0]=x;
      save[nows][1]=y;
      save[nows][2]=z;
      nows++;
    }
  }
  for(int i=0;i<nows;i++){
    if(save[i][0]==1 && save[i][1]==1){
      data[save[i][2]]=0;
    }else if(save[i][1]==1 && save[i][2]==1){
      data[save[i][0]]=0;
    }else if(save[i][2]==1 && save[i][0]==1){
      data[save[i][1]]=0;
    }
  }
  for(int i=0;i<a+b+c;i++){
    cout<<data[i]<<endl;
  }
    
      
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: array must be initialized with a brace-enclosed initializer
    6 |   int data[300]=2;
      |                 ^
Language: C++

#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
const double EPS = 1e-10;

signed main() {
	int a, b, c;
	while (cin >> a >> b >> c, a || b || c) {
		int n; cin >> n;
		vector<int>i, j, k, ans(a + b + c + 1, 2);
		rep(x, 0, n) {
			int e, f, g, h;
			cin >> e >> f >> g >> h;
			if (h) {
				ans[e] = ans[f] = ans[g] = 1;

			}
			else {
				i.push_back(e);
				j.push_back(f);
				k.push_back(g);
			}
		}
		int m = i.size();
		for (int x = 0; x < m; x++) {
			int p(i[x]), q(j[x]), r(k[x]);
			if (ans[p] == 1 && ans[q] == 1 && ans[r] == 2) {
				ans[r] = 0;
				f = true;
			}
			else if (ans[p] == 1 && ans[q] == 2 && ans[r] == 1) {
				ans[q] = 0;
				f = true;
			}
			else if (ans[p] == 2 && ans[q] == 1 && ans[r] == 1) {
				ans[r] = 0;
				f = true;
			}

		}

		rep(x, 1, ans.size())cout << ans[x] << endl;

	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:33: error: 'f' was not declared in this scope
   40 |                                 f = true;
      |                                 ^
a.cc:44:33: error: 'f' was not declared in this scope
   44 |                                 f = true;
      |                                 ^
a.cc:48:33: error: 'f' was not declared in this scope
   48 |                                 f = true;
      |                                 ^
Language: C++

#include<iostream>

using namespace std;

struct ST {
	int a;
	int b;
	int c;

	int an;
};

int reset(int, int */*[100 + 10]*/);

int main()
{
	int ans[1000 + 10];

	ST res[1000 + 10];

	int an, bn, cn, n;

	int ml;

	int ln;

	int i, j;
	int af, bf, cf;

	while (1)
	{
		cin >> an >> bn >> cn
		if (an == 0 && bn == 0 && cn == 0)
		{
			return 0;
		}

		cin >> n;

		ln = n;

		ml = an + bn + cn;

		reset(ml, ans);

		for (i = 1; i <= ln; i++)
		{
			cin >> res[i].a >> res[i].b >> res[i].c >> res[i].an;

			if (res[i].an == 1)
			{
				ans[res[i].a] = 1;
				ans[res[i].b] = 1;
				ans[res[i].c] = 1;

				i--;
				ln--;
			}
		}

		for (i = 1; i <= ln; i++)
		{
			af = bf = cf = 0;

			if (ans[res[i].a] == 1) af = 1;
			if (ans[res[i].b] == 1) bf = 1;
			if (ans[res[i].c] == 1) cf = 1;

			if (af + bf + cf == 2)
			{
				if (af == 0)
				{
					ans[res[i].a] = 0;
				}
				if (bf == 0)
				{
					ans[res[i].b] = 0;
				}
				if (cf == 0)
				{
					ans[res[i].c] = 0;
				}
			}
		}

		for (i = 1; i <= ml; i++)
		{
			cout << ans[i] << endl;
		}
	}

	return 0;
}

int reset(int n, int *le)
{
	int i;
	for (i = 0; i < n; i++)
	{
		le[i] = 2;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:38: error: expected ';' before 'if'
   32 |                 cin >> an >> bn >> cn
      |                                      ^
      |                                      ;
   33 |                 if (an == 0 && bn == 0 && cn == 0)
      |                 ~~
Language: C++

 #include <iostream>
 using namespace std;
 
 int main(){
 while(1){
 int a,b,c;
 cin >> a >> b >> c;
 if(a==0 && b==0 && c==0) break;
 int A[a+1],B[b+1],C[c+1];
 int n;
 cin >> n;
 char NUM[5];
 for(int w=0; w<n; w++){
 int i,j,k,r;
 cin >> i >> j >> k >> r;
 if(r==1){
 A[i] = 1;
 B[j] = 1;
 C[k] = 1;
 }else{
 NUM[0]=i;
 NUM[1]=j;
 NUM[2]=k;
 NUM[3]=r;
 A[i] = 3;
 B[j] = 3;
 C[k] = 3;
 }
 }
 for(int i=1; i<=a+b+c; i++){
 if(i<=a) cout << A[i] << endl;
 if(i>a&&i<=a+b) cout << B[i] << endl;
 if(i>a+b&&i<=a+b+c) cout << C[i] << endl;
 }
 int res=0;
 while(1){
 res++;
 if(res==3) break;
 for(int i=1; i<=a; i++){
 for(int j=1; j<=b; j++){
 for(int k=1; k<=c; k++){
 if(NUM[i][j][k]==0){
 cout << "NUM[" << i << "][" << j << "] = " << NUM[i][j][k] << endl;
 if(A[i]==1&&B[j]==1){
 cout << "C[" << k << "] = " << 0 << endl;
 C[k] = 0;
 }else if(A[i]==1&&C[k]==1){
 cout << "B[" << j << "] = " << 0 << endl;
 B[j] = 0;
 }else if(B[j]==1&&C[k]==1){
 cout << "B[" << j << "] = " << 0 << endl;
 A[i] = 0;
 }else{
 if(A[i]!=1) A[i]=2; cout << "A[" << i << "]=" << A[i] << endl;
 if(B[j]!=1) B[j]=2; cout << "B[" << i << "]=" << B[j] << endl;
 if(C[k]!=1) C[k]=2; cout << "C[" << i << "]=" << C[k] << endl;
 }
 }
 }
 }
 }
 }
 out:
 for(int i=1; i<=a+b+c; i++){
 if(i<=a) cout << A[i] << endl;
 if(i>a&&i<=a+b) cout << B[i] << endl;
 if(i>a+b&&i<=a+b+c) cout << C[i] << endl;
 }
 }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:42:11: error: invalid types 'char[int]' for array subscript
   42 |  if(NUM[i][j][k]==0){
      |           ^
a.cc:43:54: error: invalid types 'char[int]' for array subscript
   43 |  cout << "NUM[" << i << "][" << j << "] = " << NUM[i][j][k] << endl;
      |                                                      ^
Language: C++

#include <cstdio>
using namespace std;
int main(void){
    printf("2\n1\n1\n0\n1\n0\n") 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:33: error: expected ';' before '}' token
    4 |     printf("2\n1\n1\n0\n1\n0\n")
      |                                 ^
      |                                 ;
    5 | }
      | ~
Language: C++

#include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
while(1){
int a,b,c,q,w,e[300],l[1000][4];
cin>>a>>b>>c;
if(a==0&&b==0&&c==0)break;
cin>>n;
for(q=0;q<a+b+c;q++)e[q]=2;
for(q=0;q<n;q++){
cin>>l[q][0]>>l[q][1]>>l[q][2]>>l[q][3];
if(l[q][3]==1){
e[l[q][0]]=1;e[l[q][1]]=1;e[l[q][2]]=1;
}
}
for(q=0;q<n;q++){
for(w=0;w<n;w++){
if(l[w][3]==0&&e[l[w][0]]=1&&e[l[w][1]]==1)e[l[w][2]]=0;
if(l[w][3]==0&&e[l[w][2]]=1&&e[l[w][1]]==1)e[l[w][0]]=0;
if(l[w][3]==0&&e[l[w][0]]=1&&e[l[w][2]]==1)e[l[w][1]]=0;
}
}
for(q=0;q<a+b+c;q++)cout<<e[q]<<endl;
}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 'n' was not declared in this scope
   10 | cin>>n;
      |      ^
a.cc:20:14: error: lvalue required as left operand of assignment
   20 | if(l[w][3]==0&&e[l[w][0]]=1&&e[l[w][1]]==1)e[l[w][2]]=0;
      |    ~~~~~~~~~~^~~~~~~~~~~~
a.cc:21:14: error: lvalue required as left operand of assignment
   21 | if(l[w][3]==0&&e[l[w][2]]=1&&e[l[w][1]]==1)e[l[w][0]]=0;
      |    ~~~~~~~~~~^~~~~~~~~~~~
a.cc:22:14: error: lvalue required as left operand of assignment
   22 | if(l[w][3]==0&&e[l[w][0]]=1&&e[l[w][2]]==1)e[l[w][1]]=0;
      |    ~~~~~~~~~~^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
while(1){
int a,b,c,q,w,e[300],l[1000][4];
cin>>a>>b>>c;
if(a==0&&b==0&&c==0)break;
cin>>n;
for(q=0;q<a+b+c;q++)e[q]=2;
for(q=0;q<n;q++){
cin>>l[q][0]>>l[q][1]>>l[q][2]>>l[q][3];
if(l[q][3]==1){
e[l[q][0]]=1;e[l[q][1]]=1;e[l[q][2]]=1;
}
}
for(q=0;q<n;q++){
for(w=0;w<n;w++){
if(l[w][3]==0&&e[l[w][0]]==1&&e[l[w][1]]==1)e[l[w][2]]=0;
if(l[w][3]==0&&e[l[w][2]]==1&&e[l[w][1]]==1)e[l[w][0]]=0;
if(l[w][3]==0&&e[l[w][0]]==1&&e[l[w][2]]==1)e[l[w][1]]=0;
}
}
for(q=0;q<a+b+c;q++)cout<<e[q]<<endl;
}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 'n' was not declared in this scope
   10 | cin>>n;
      |      ^
Language: C++

#include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define loop(a,t) for(int a=0;a<t;a++) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
int ans[100];
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	while (true) {
		int a, b, c, n;
		cin >> a >> b >> c;
		if (a + b + c == 0) { break; }
		cin >> n;
		int ak[100], bk[100], ck[100];
		loop(i, 100) {
			ak[i] = bk[i] = ck[i] = -1;
			ans[i] = 2;
		}
		loop(i, n) {
			int an, bn, cn, or ;
			cin >> an >> bn >> cn >> or;
			if (or==1) {
				ans[an - 1] = 1;
				ans[bn - 1] = 1;
				ans[cn - 1] = 1;
			}
			else {
				ak[i] = an - 1;
				bk[i] = bn - 1;
				ck[i] = cn - 1;
			}
		}
		loop(j,n) {
			loop(i, 100) {
				if (ak[i] != -1) {
					if (ans[ak[i]] == 2&& ans[bk[i]] == 1 && ans[ck[i]] == 1) {
						ans[ak[i]] = 0;
					}
					if (ans[ak[i]] == 1 && ans[bk[i]] == 2 && ans[ck[i]] == 1) {
						ans[bk[i]] = 0;
					}
					if (ans[ak[i]] == 1 && ans[bk[i]] == 1 && ans[ck[i]] == 2) {
						ans[ck[i]] = 0;
					}

				}
			}
		}
		loop(i, a + b + c) {
			cout << ans[i] << endl;
		}

	}
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:41: error: expected unqualified-id before 'or' token
   47 |                         int an, bn, cn, or ;
      |                                         ^~
a.cc:48:50: error: expected primary-expression before 'or' token
   48 |                         cin >> an >> bn >> cn >> or;
      |                                                  ^~
a.cc:48:52: error: expected primary-expression before ';' token
   48 |                         cin >> an >> bn >> cn >> or;
      |                                                    ^
a.cc:49:29: error: expected primary-expression before 'or' token
   49 |                         if (or==1) {
      |                             ^~
a.cc:49:31: error: expected primary-expression before '==' token
   49 |                         if (or==1) {
      |                               ^~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

vector<int> ans;

bool check(vector<int> v) {
	int count = 0, no;

	for (int i = 0; i < 3; ++i)
		if (ans[v[i]] != 1) {
			no = v[i];
			++count;
		}

	if (count > 1) return false;
	else if (count == 0) { cout << "ERROR" << endl; return false; }
	else ans[no] = 0;

	return true;
}

vector<int> make_result(int a, int b, int c, int r) {
	vector<int> ret;

	ret.push_back(a);
	ret.push_back(b);
	ret.push_back(c);
	ret.push_back(r);

	return ret;
}

int main() {
	int a, b, c;
	while (cin >> a >> b >> c, a || b || c) {
		int n = a + b + c;
		int N; cin >> N;
		ans.erase( ans.begin(), ans.end() );

		for (int i = 0; i < n; ++i)
			ans.push_back(2);

		vector< vector<int> > results;
		for (int i = 0; i < N; ++i) {
			int r;
			cin >> a >> b >> c >> r;
			--a, --b, --c;

			if (r == 1)
				ans[a] = ans[b] = ans[c] = 1;

			else results.push_back( make_result(a, b, c, r) );
		}

		while (1) {
			bool update = false;
			for (int i = 0; i < results.size(); ++i)
				if (update = check(results[i]))
					results.erase( i );

			if (!update) break;
		}

		for (int i = 0; i < n; ++i)
			cout << ans[i] << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:54: error: no matching function for call to 'std::vector<std::vector<int> >::erase(int&)'
   61 |                                         results.erase( i );
      |                                         ~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; iterator = std::vector<std::vector<int> >::iterator; const_iterator = std::vector<std::vector<int> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::vector<int> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; iterator = std::vector<std::vector<int> >::iterator; const_iterator = std::vector<std::vector<int> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

int main()
{
	int parts[512], check, n, wk, tk, kt, kr;
	vector<int> a, b, c;

	while(cin >> wk >> tk >> kt >> check)
	{
		for(int i = 0; i < 300; i++)
		{
			parts[i] = -1;
		}

		n = wk + tk + kt;

		for(int i = 0; i < check; i++)
		{
			cin >> wk >> tk >> kt >> kr;

			if(kr)
			{
				parts[wk-1] = parts[tk-1] = parts[kt-1] = 1;
			}
			else
			{
				a.push_back(wk-1);
				b.push_back(tk-1);
				c.push_back(kt-1);
			}
		}

		for(int i = 0; i < a.size(); i++)
		{
			if( (parts[a[i]] + parts[b[i]] + parts[c[i]]) == 1)
			{
				if(parts[a[i]] == -1)
				{
					parts[a[i]] = 0;
				}
				else if(parts[b[i]] == -1)
				{
					parts[b[i]] = 0;
				}
				else if(parts[c[i]] == -1)
				{
					parts[c[i]] = 0;
				}
			}
		}

		for(int i = 0; i < n; i++)
		{
			if(parts[i] == -1)
				parts[i] = 2;
		}

		for(int i = 0; i < n; i++)
		{
			cout << parts[i] << endl;
		}
	}
	a.clear();
	b.clear();
	c.clear();
}

/*
2 3 2
4
1 3 5 1
2 4 5 1
2 5 6 1
1 5 6 1
*

Compiler output:
a.cc:87:1: error: unterminated comment
   87 | /*
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<string>
#include<sstream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cctype>
#include<climits>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
#define P pair<int, int>
const int INF = INT_MAX / 2;

class C{
    public:
        int abc[3], sign;
        C(int _a, int _b, int _c, int _sign);
};

C::C(int _a, int _b, int _c, int _sign){
    abc[0] = _a;
    abc[1] = _b;
    abc[2] = _c;
    sign = _sign;
}

int cntOK(C cls, vector<int> ok){
    int ret = 0;
    REP(i, 3){
        if(ok[cls.abc[i]] == true) ret++;
    }
    return ret;
}

int searchNG(C cls, vector<int> ok){
    REP(i, 3){
        if(ok[cls.abc[i]] == 2) return cls.abc[i];
    }
    return -1;
}

int main(){
    int x, y, z;
    while(cin >>x >>y >>z && (x && y && z)){
        int sum = x + y + z;
        vector<int> ok(sum + 1, 2);

        int n;
        cin >>n;
        vector<C> vec;
        REP(i, n){
            int a, b, c, s;
            cin >>a >>b >>c >>s;

            if(s == 0){
                C cls(a, b, c, s);
                vec.push_back(cls);
            } else{
                ok[a] = 1; ok[b] = 1; ok[c] = 1;
            }

        }

        REP(i, vec.size()){
            if(vec[i].sign == 1) continue;

            int cntok = cntOK(vec[i], ok);
            if(cntok == 2){

                ok[searchNG(vec[i], ok)] = 0;
                vec[i].sign = 1;
                isChanged = true;

            }
        }
        FOR(i, 1, ok.size()) cout <<ok[i] <<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:17: error: 'isChanged' was not declared in this scope
   79 |                 isChanged = true;
      |                 ^~~~~~~~~
Language: C++

#include<cstdio>
 
int main()
{
while(true) {

int a, b, c, n;
int test[3000], r[1000];
int ans[1000];
scanf("%d%d%d", &a, &b, &c);
if(a == 0)
break;
scanf("%d", &n);
for(int i = 0; i < n; ++i) {
scanf("%d%d%d%d", test + i * 3, test + i * 3 + 1, test + i * 3 + 2, r + i);
test[i * 3] -= 1, test[i * 3 + 1] -= 1, test[i * 3 + 2] -= 1;
}

for(int i = 0; i < a + b + c; ++i)
ans[i] = 2;
for(int i = 0; i < n; ++i) {
if(r[i] != 1)
continue;
for(int j = i * 3; j < i * 3 + 3; ++j)
ans[j] = 1;
}
for(int i = 0; i < n; ++i) {
if(tr[i] != 0)
continue;
int correct = 0;
for(int j = i * 3; j < i * 3 + 3; ++j)
correct += (ans[j] == 1);
if(correct != 2)
continue;
for(int j = i * 3; j < i * 3 + 3; ++j) {
if(ans[j] != 1)
ans[j] = 0;
}
}
for(int i = 0; i < a + b + c; ++i)
printf("%d\n", ans[i]);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:4: error: 'tr' was not declared in this scope; did you mean 'r'?
   28 | if(tr[i] != 0)
      |    ^~
      |    r
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c,n,flag=1;
	while(1){
		cin>>a>>b>>c;
		if(a==0 && b==0 && c==0)
		break;
		cin>>n;
		int p=0,w[n],x[n],y[n],z[n],ans[a+b+c+1];
		for(int i=0;i<a+b+c+1;i++)
			ans[i]=2;
		for(int i=0;i<n;i++){
			cin>>w[i]>>x[i]>>y[i]>>z[i];
			if(z[i]==1){
				ans[w[i]]==1;
				ans[x[i]]==1;
				ans[y[y]]==1;
			}
		}
		for(int i=0;i<n;i++){
			if(z[i]==0){
				if(ans[w[i]]==1 && ans[x[i]]==1 && ans[y[i]]==2)
				ans[y[i]]=0;
				if(ans[w[i]]==1 && ans[x[i]]==2 && ans[y[i]]==1)
				ans[x[i]]=0;
				if(ans[w[i]]==2 && ans[x[i]]==1 && ans[y[i]]==1)
				ans[w[i]]=0;
			}
		}
		for(int i=1;i<=a+b+c;i++)
		cout<<ans[i]<<endl;
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:38: error: invalid types 'int [n][int [n]]' for array subscript
   19 |                                 ans[y[y]]==1;
      |                                      ^
Language: Java

import java.util.Scanner;
public class AOJ0515{
	public static void main(String[] args) { 
		Scanner sc = new Scanner(System.in);
		//while(true){
			int w = sc.nextInt();
			int h = sc.nextInt();
			//if(w==0&&h==0)break;
			int n = sc.nextInt();
			
			boolean map[][]=new boolean[w+1][h+1];
			for(int i=0;i<n;i++)map[sc.nextInt()][sc.nextInt()]=true;
			
			
			//今いる場所を記録
			int dp[][]=new int[w+1][h+1];
			//for(int i=2;i<=w;i++)dp[i][1]=1;
			//for(int i=2;i<=h;i++)dp[1][i]=1;
			dp[1][1]=1;
			for(int i=1;i<=w;i++){
				for(int j=1;j<=h;j++){
//					if(map[i][j])
//						dp[i][j]=0;
					
					
					if(map[i][j]){
						dp[i][j]=0;
					}else if(i==1&&j==1){
						dp[i][j]=1;
					}else if(i==1){
						dp[i][j]=dp[i][j-1];
					}else if(j==1){
						dp[i][j]=dp[i-1][j];
					}else{
						dp[i][j]=dp[i][j-1]+dp[i-1][j];
					}
					
					//System.out.println(i+""+j+" "+dp[i][j-1]+" "+dp[i-1][j]+" "+dp[i][j]);
				}
			}
			System.out.println(dp[w][h]);
		}
	//}
}

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

#include<iostream>
#include<algorithm>
using namespace std;
int dx[2]={0,1};
int dy[2]={1,0};
int a,b;
int MAP[17][17];
int x,y;
void func(int y,int x);
int main(void){
	int i,j;
	while(1){
		for(i=0;i<17;i++){
			for(j=0;j<17;j++){
				MAP[i][j]=0;
			}
		}
		cin>>a>>b;
		if(a==0&&b==0) break;
		cin>>n;
		for(i=0;i<n){
			cin>>x>>y;
			MAP[x][y]=-1;
		}
		func(0,0);
	}
	return 0;
}
void func(int y,int x){
	int xx,yy;
	if(xx==a&&yy==b) cnt++;
	for(i=0;i<2;i++){
		xx=dx[i];
		yy=dy[i];
	}
	if(xx<=a&&yy<=b&&MAP[xx][yy]!=-1){
		
	
	
	
}




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

#include<stdio.h>
int kai(int n) {
  if (n <= 1) return 1;
  return n * kai(n - 1);
}
int r(int nx, int ny, int kx, int ky) {
  int m = kx - nx,l = ky - ny;
  return kai(m + l) / kai(m) / kai(l);
}
int in(int n[2], int k[40][2]) {
  int i,
  for (i = 0; i < 40; i ++) {
    if (n == k[i]) {
      return 0;
    }
  }
  return 1;
}
int road(int x, int y, int n[2], int m, int k[40][2]) {
  int ans = r(x, y, n[0], n[1]), i;
  for (i = 0; i < m; i ++) {
    if (in(k[i], k)) {
      ans -= r(x, y, k[i][0], k[i][1]) * r(k[i][0], k[i][1], n[0], n[1]);
    } else {
      ans -= r(x, y, k[i][0], k[i][1]) * road(k[i][0], k[i][1], n, m, k);
    }
  }
  return ans;
}
int main() {
  int ans[1000], i, l;
  for (i = 0; i < 1000; i ++) {
    ans[i] = -1;
  }
  int n[2];
  while (1) {
    scanf("%d %d", &n[0], &n[1]);
    if (n[0] == 0 && n[1] == 0) {
      for (i = 0; ans[i] != -1; i ++) {
	printf("%d\n", ans[i]);
      }
      return 0;
    } else {
      int k[40][2], m;
      scanf("%d", &m);
      for (i = 0; i < m; i ++) {
	scanf("%d %d", &k[i][0], &k[i][1]);
      }
      ans[l] = road(n, m, k); l ++;
    }
  }
}

Compiler output:
main.c: In function 'in':
main.c:12:3: error: expected identifier or '(' before 'for'
   12 |   for (i = 0; i < 40; i ++) {
      |   ^~~
main.c:12:27: error: expected ';' before ')' token
   12 |   for (i = 0; i < 40; i ++) {
      |                           ^
      |                           ;
main.c:12:27: error: expected statement before ')' token
main.c: In function 'main':
main.c:49:21: error: passing argument 1 of 'road' makes integer from pointer without a cast [-Wint-conversion]
   49 |       ans[l] = road(n, m, k); l ++;
      |                     ^
      |                     |
      |                     int *
main.c:19:14: note: expected 'int' but argument is of type 'int *'
   19 | int road(int x, int y, int n[2], int m, int k[40][2]) {
      |          ~~~~^
main.c:49:27: error: passing argument 3 of 'road' from incompatible pointer type [-Wincompatible-pointer-types]
   49 |       ans[l] = road(n, m, k); l ++;
      |                           ^
      |                           |
      |                           int (*)[2]
main.c:19:28: note: expected 'int *' but argument is of type 'int (*)[2]'
   19 | int road(int x, int y, int n[2], int m, int k[40][2]) {
      |                        ~~~~^~~~
main.c:49:16: error: too few arguments to function 'road'
   49 |       ans[l] = road(n, m, k); l ++;
      |                ^~~~
main.c:19:5: note: declared here
   19 | int road(int x, int y, int n[2], int m, int k[40][2]) {
      |     ^~~~
Language: C

#include<stdio.h>
int main(void){
int road[20][20]={{0}},i,j,t,a,b,tree,tx,ty,ans;
for(;;){
    road[1][1]=1;
    scanf("%d %d",&a,&b);
    if(a==0&&b==0)break;
    scanf("%d",&tree);
    for(t=0;t<tree;t++){
        scanf("%d %d",&tx,&ty);
        road[tx][ty]=-1;
    }
    for(i=1;i<=a;i++){
        for(j=1;j<=b;j++){
            if(road[i][j]==0){
                if(i==1){
                    road[i][j]=road[i][j-1];
                }
                else if(j==1){
                    road[i][j]=road[i-1][j];
                }
                else{
                    if(road[i][j-1]==-1){
                        road[i][j]=road[i-1][j];
                    }
                    else if(road[i-1][j]==-1){
                        road[i][j]=road[i][j-1];
                    }
                    else road[i][j]=road[i-1][j]+road[i][j-1];
                }
            }
        }
    }
    printf("%d\n",road[a][b]);
}

Compiler output:
main.c: In function 'main':
main.c:35:1: error: expected declaration or statement at end of input
   35 | }
      | ^
Language: C

#include<stdio.h>

int main(){
	int board[17][17]={0};
	int i,j,n,x,y;

	while(scanf("%d%d",&x,&y),x+y){
		scanf("%d",&n);
		for(i=0;i<17*17;i++)board[i%17][i/17]=-1;
		for(i=0;i<n;i++){
			scanf("%d%d",&p,&q);
			board[p][q]=0;
		}
		board[1][1]=1;

		for(i=1;i<17;i++){
			if(board[i][j]<0){
				board[i][j]=board[1][i-1];
				board[i][j]=board[i-1][1];
			}
		}
		for(i=2;i<x;i++){
			for(j=2;j<y;j++){
				if(board[i][j]<0){
					board[i][j]=board[i][j-1]+board[i-1][j];
				}
			}
		}
		printf("%d\n",board[x][y]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:39: error: 'p' undeclared (first use in this function)
   11 |                         scanf("%d%d",&p,&q);
      |                                       ^
main.c:11:39: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:42: error: 'q' undeclared (first use in this function)
   11 |                         scanf("%d%d",&p,&q);
      |                                          ^
Language: C

#include<stdio.h>
int a,b;
int data[17][17];


int hoko(int nx,int ny);

int main(){
  int i,j,p,q;
  for(i=0;i<17;i++){
    for(j=0;j<17;j++){
      data[i][j]=-1;
    }
  }
  scanf("%d %d",&a,&b);
  sacnf("%d",&k);
  for(i=0;i<k;i++){
    scanf("%d %d",&p,&q);
    data[p][q]=0;
  }
  printf("%d\n",hoko(a,b));
  return(0);
}

int hoko(int nx,int ny){
  if(0<nx&&0<ny&&nx<=a&&ny<=b){
    if(nx==1&&ny==1) return 1;
    if(data[nx][ny]!=-1) return data[nx][ny];
    return data[nx][ny]=(hoko(nx,ny-1)+hoko(nx-1,ny));
  }
}
	 

Compiler output:
main.c: In function 'main':
main.c:16:3: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   16 |   sacnf("%d",&k);
      |   ^~~~~
      |   scanf
main.c:16:15: error: 'k' undeclared (first use in this function)
   16 |   sacnf("%d",&k);
      |               ^
main.c:16:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void) {
	int dp[16][16];
	int a, b, n, x, y;
	int i,j;
	while (1) {
		scanf("%d %d", &a, &b);
		if (a == 0 && b == 0)break;

		scanf("%d", &n);

		for (i = 0; i < a; i++) {
			for (j = 0; j < b; j++)
				dp[i][j] = 0;
		}
		for (i = 0; i < b; i++)
			dp[0][i] = 1;

		for (i = 0; i < a; i++)
			dp[i][0] = 1;

		for (i = 0; i < n; i++) {
			scanf_s("%d %d", &x, &y);
			dp[x - 1][y - 1] = -1;
			if (x == 1)
				for (j = y - 1; j < b; j++) { dp[0][j] = 0; }
			if (y == 1)
				for (j = x - 1; j < a; j++) { dp[j][0] = 0; }
		}

		for (i = 1; i < a; i++) {
			for (j = 1; j < b; j++) {
				if (dp[i][j] == -1) { dp[i][j] = 0; }
			    else dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
			}
		}
		printf("%d\n", dp[a - 1][b - 1]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:25: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   24 |                         scanf_s("%d %d", &x, &y);
      |                         ^~~~~~~
      |                         scanf
Language: C

include <stdio.h>

int main(){
  int a,b,n,i,j,cross[16][16],x,y;

  while(1){
    scanf("%d%d",&a,&b);
    if(a == 0 && b == 0) {break;}
    scanf("%d",&n);

      for(i=0;i<a;i++){
      for(j=0;j<b;j++){
        cross[i][j] = 0;
      }
    }
  
    for(i = 0;i < b;i++){
      cross[0][i] = 1;
    }

    for(i = 0;i < a;i++){
      cross[i][0] = 1;
    }
    
  for(i = 0;i < n;i++){
      scanf("%d%d",&x,&y);
      cross[x-1][y-1] = -1;
    if(x == 1) {for(j=y-1;j<b;j++){ cross[0][j] = 0;}}
    if(y == 1) {for(j=x-1;j<a;j++){ cross[j][0] = 0;  }}    
    }

    for(i=1;i<a;i++){
      for(j=1;j<b;j++){
        if(cross[i][j] == -1) {cross[i][j] = 0;}
        else {cross[i][j] = cross[i][j-1] + cross[i-1][j];}
      }
    }

    printf("%d\n",cross[a-1][b-1]);
  }

  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

// #1140935 Solution for 0515: School Road by ryogo 
#include<iostream>
using namespace std;
int dp[20][20];
int main(){
	int a, b i, j, x, y;
	while(cin>>a>>b){
		if(a == 0 && b == 0) { break; }
		int n;
		cin>>n;
		for(i=1;i<=16;i++)for(j=1;j<=16;j++){dp[i][j]=0;}
		for(i=1;i<=n ;i++){
			cin>>x>>y; dp[y][x]=-1;
		}
		dp[1][1]=1;
		for(i=1;i<=b;i++){
			for(j=1;j<=a;j++){
				if(i==1 && j==1)continue;
				if(dp[i][j]!=-1){
					dp[i][j]=dp[i][j-1]+dp[i-1][j];
				}
				else dp[i][j]=0;
			}
		}
 
		cout<<dp[b][a]<<endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected initializer before 'i'
    6 |         int a, b i, j, x, y;
      |                  ^
a.cc:7:23: error: 'b' was not declared in this scope
    7 |         while(cin>>a>>b){
      |                       ^
a.cc:11:21: error: 'i' was not declared in this scope
   11 |                 for(i=1;i<=16;i++)for(j=1;j<=16;j++){dp[i][j]=0;}
      |                     ^
a.cc:11:39: error: 'j' was not declared in this scope
   11 |                 for(i=1;i<=16;i++)for(j=1;j<=16;j++){dp[i][j]=0;}
      |                                       ^
a.cc:12:21: error: 'i' was not declared in this scope
   12 |                 for(i=1;i<=n ;i++){
      |                     ^
a.cc:13:30: error: 'x' was not declared in this scope
   13 |                         cin>>x>>y; dp[y][x]=-1;
      |                              ^
a.cc:13:33: error: 'y' was not declared in this scope
   13 |                         cin>>x>>y; dp[y][x]=-1;
      |                                 ^
a.cc:16:21: error: 'i' was not declared in this scope
   16 |                 for(i=1;i<=b;i++){
      |                     ^
a.cc:17:29: error: 'j' was not declared in this scope
   17 |                         for(j=1;j<=a;j++){
      |                             ^
Language: C++

// #1140935 Solution for 0515: School Road by ryogo 
#include<iostream>
using namespace std;
int dp[17][17];
int main(){
	int a, b ,i, j, x, y;
	while(cin >> a >> b){
		if(a == 0 && b == 0) { break; }
		int n;
		cin>>n;
		for(i=1; i<=16; i++)for(j=1; j<=16; j++){dp[i][j] = 0;}
		for(i=1; i<=n ; i++){
			cin >> x >> y; dp[y][x] = -1;
		}
		dp[1][1] = 1;
		for(i=1; i<=b; i++){
			for(j=1; j<=a; j++){
				if(i==1 && j==1)continue;
				if(dp[i][j]! = -1){
					dp[i][j] = dp[i][j-1] + dp[i-1][j];
				}
				else dp[i][j] = 0;
			}
		}
 
		cout << dp[b][a] << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:44: error: expected ')' before '!' token
   19 |                                 if(dp[i][j]! = -1){
      |                                   ~        ^
      |                                            )
Language: C++

#include <cstdio>
#include <cstring>
using namespace std;

typedef __int64 Int;
#define MAX_L 16
Int table[MAX_L + 1][MAX_L + 1];
bool wall[MAX_L + 1][MAX_L + 1];
int a, b, n;

Int dp(int x, int y){
	if(x == a && y == b) return 1;
	if(x > a || y > b) return 0;
	if(table[x][y] >= 0) return table[x][y];
	if(wall[x][y]) return 0;
	
	return table[x][y] = dp(x + 1, y) + dp(x, y + 1);
}

int main(){
	scanf("%d%d", &a, &b);
	scanf("%d", &n);
	
	int in_x, in_y;
	for(int i = 0; i < n; i++){
		scanf("%d%d", &in_x, &in_y);
		wall[in_x][in_y] = true;
	}
	
	memset(table, -1, sizeof(table));
	
	printf("%I64d\n", dp(1, 1));
	
	return 0;
}

Compiler output:
a.cc:5:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | typedef __int64 Int;
      |         ^~~~~~~
      |         __int64_t
a.cc:7:1: error: 'Int' does not name a type; did you mean 'int'?
    7 | Int table[MAX_L + 1][MAX_L + 1];
      | ^~~
      | int
a.cc:11:1: error: 'Int' does not name a type; did you mean 'int'?
   11 | Int dp(int x, int y){
      | ^~~
      | int
a.cc: In function 'int main()':
a.cc:30:16: error: 'table' was not declared in this scope; did you mean 'mutable'?
   30 |         memset(table, -1, sizeof(table));
      |                ^~~~~
      |                mutable
a.cc:32:27: error: 'dp' was not declared in this scope
   32 |         printf("%I64d\n", dp(1, 1));
      |                           ^~
Language: C++

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

typedef pair<int,int> pii;

int main(){
  int r,c;
  int n;
  while(1){
    cin>>r>>c;
    if(r==0)break;
    cin>>n;
    int dp[c][r];
    memset(dp,-1,sizeof(dp));
    for(int i=0;i<n;i++){
      int a,b;
      cin>>a>>b;
      dp[b-1][a-1]=0;
    }
    for(int i=c-1;i>=0;i--){
      for(int j=r-1;j>=0;j--){
	if(dp[i][j]==0)continue;
	if(i==c-1 || j==r-1){
	  dp[i][j]=1;
	}else{
	  dp[i][j]=dp[i+1][j]+dp[i][j+1];
	}
      }
    }
    cout<<dp[0][0]<<endl;
  }
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/sdtc++.h: No such file or directory
    1 | #include<bits/sdtc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

typedef pair<int,int> pii;

int main(){
  int r,c;
  int n;
  while(1){
    cin>>r>>c;
    if(r==0)break;
    cin>>n;
    int dp[c][r];
    memset(dp,-1,sizeof(dp));
    for(int i=0;i<n;i++){
      int a,b;
      cin>>a>>b;
      dp[b-1][a-1]=0;
    }
    for(int i=c-1;i>=0;i--){
      for(int j=r-1;j>=0;j--){
	if(dp[i][j]==0)continue;
	if(i==c-1 || j==r-1){
	  dp[i][j]=1;
	}else{
	  dp[i][j]=dp[i+1][j]+dp[i][j+1];
	}
      }
    }
    cout<<dp[0][0]<<endl;
  }
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory
    1 | #include<bis/stdc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++


//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int DX[] = {0, 1, 0, -1};
const int DY[] = {-1, 0, 1, 0};


//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(int argc, char const *argv[])
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int width, height, n;
	while(true){

		cin >> width >> height;
		if(width == 0 && height == 0){
			break;
		}
		cin >> n;
		vector<PII> bad(n);
		VVI table(height, VI(width));
		REP(i, n){
			int x, y;
			cin >> x  >> y;
			x--;
			y = height - y;
			table[y][x] = -1;
		}
		table[height - 1][0] = 1;
		int value;
		for(int y = height -1; y >= 0; --y){
			REP(x, width){
				if(table[y][x] == -1) continue;
				if(x > 0){
					value = table[y][x -1];
					table[y][x] += value > -1 ? value : 0;
				}
				if(y < height - 1){
					value = table[y + 1][x];
					table[y][x] += value > -1 ? value : 0;
				}
			}
		}
		cout << table[0][width -1] << endl;
		}

	}

	return 0;
}

Compiler output:
a.cc:118:9: error: expected unqualified-id before 'return'
  118 |         return 0;
      |         ^~~~~~
a.cc:119:1: error: expected declaration before '}' token
  119 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int mass[17][17];
int memo[17][17];

int solve( int x ,int y ,int maxx ,int maxy);
int main(){
  int n ,x ,y;
  int cx ,cy;
  while( true ){
    memset( mass ,0 ,sizeof( mass ) );
    memset( memo ,0 ,sizeof( memo ) );
    cin >> x >> y;
    if( x == 0 && y == 0 ) break;

    mass[y-1][x-1] = 2; // goal地点の指定
    
    cin >> n;
    for( int i=0 ; i<n ; i++ ){ // 行けない地点の指定
      cin >> cx >> cy;
      mass[cy-1][cx-1] = 1;
    }

    cout << solve( 0 ,0 ,x-1 ,y-1 ) << endl; // go 再帰
  }
}


int solve( int x ,int y ,int maxx ,int maxy ){
  if( memo[y][x] != 0 ) return memo[y][x];
  else if( mass[y][x] == 2 ) return 1;      // goal
  else if( x > maxx || y > maxy ) return 0;  // どっか行った
  else if( mass[y][x] == 1 ) return 0; // いけねぇ 
  else return memo[y][x] = (solve( x+1 ,y ,maxx ,maxy ) + solve( x ,y+1 ,maxx ,maxy ) );
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'memset' was not declared in this scope
   11 |     memset( mass ,0 ,sizeof( mass ) );
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <stdio.h>

int dp[16];
bool u[16][16];

int main()
{
 int a,b;
 scanf("%d%d",&a,&b);
 for(int i = 0; i < b; i++)
 {
  for(int ii = 0; ii < a; ii++)
  {
   u[i] = true;
  }
 }
 int n;
 scanf("%d",&n);
 for(int i = 0; i < n; i++)
 {
  int x,y;
  scanf("%d%d",&x,&y);
  u[y - 1][x - 1] = false;
 }
 for(int i = 0; i < a; i++)
 {
  dp[i] = 0;
 }
 for(int i = 0; i < b; i++)
 {
  int now = 0;
  for(int ii = 0; ii < a; ii++)
  {
   if(u[i][ii])
   {
    now += dp[ii];
    dp[ii] = now;
   }
   else
   {
    dp[ii] = 0;
   }
  }
 }
 printf("%d\n",dp[a - 1]);
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: incompatible types in assignment of 'bool' to 'bool [16]'
   14 |    u[i] = true;
      |    ~~~~~^~~~~~
Language: C++

#include<stdio.h>
int main(void){
int road[20][20]={{0}},i,j,t,a,b,tree,tx,ty,ans;
for(;;){
    road[1][1]=1;
    scanf("%d %d",&a,&b);
    if(a==0&&b==0)break;
    scanf("%d",&tree);
    for(t=0;t<tree;t++){
        scanf("%d %d",&tx,&ty);
        road[tx][ty]=-1;
    }
    for(i=1;i<=a;i++){
        for(j=1;j<=b;j++){
            if(road[i][j]==0){
                if(i==1){
                    road[i][j]=road[i][j-1];
                }
                else if(j==1){
                    road[i][j]=road[i-1][j];
                }
                else{
                    if(road[i][j-1]==-1){
                        road[i][j]=road[i-1][j];
                    }
                    else if(road[i-1][j]==-1){
                        road[i][j]=road[i][j-1];
                    }
                    else road[i][j]=road[i-1][j]+road[i][j-1];
                }
            }
        }
    }
    printf("%d\n",road[a][b]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: C++

#include<cstdio>
#include<math.h>
#include<algorithm>

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
int A,B;
int N;
long long int DP[20][20];


int main(){
	while(1){
	memset(DP,0,sizeof(DP));
	scanf("%d %d",&A,&B);
	if(A==0&&B==0)break;
	scanf("%d",&N);

	rep(i,N){
		int a,b;
		scanf("%d %d",&a,&b);
		DP[a-1][b-1]=-1;
	}
	rep(i,A){
		rep(j,B){
			if(DP[i][j]==-1)continue;
			if(i==0){DP[i][j]=1;continue;}
			else if(DP[i-1][j]!=-1)DP[i][j]+=DP[i-1][j];
			if(j==0){DP[i][j]=1;continue;}
			else if(DP[i][j-1]!=-1)DP[i][j]+=DP[i][j-1];
		}
	}
	printf("%lld",DP[A-1][B-1]);
	
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'memset' was not declared in this scope
   15 |         memset(DP,0,sizeof(DP));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<math.h>
#include<algorithm>


using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
int A,B;
int N;
long long int DP[20][20];


int main(){
	while(1){
	memset(DP,0,sizeof(DP));
	scanf("%d %d",&A,&B);
	if(A==0&&B==0)break;
	scanf("%d",&N);

	rep(i,N){
		int a,b;
		scanf("%d %d",&a,&b);
		DP[a-1][b-1]=-1;
	}
	rep(i,A){
		rep(j,B){
			if(DP[i][j]==-1)continue;
			if(i==0&&j==0){DP[0][0]=1;continue;}
			if(i==0){if(DP[i][j-1]>0)DP[i][j]=1;continue;}
			else if(DP[i-1][j]!=-1)DP[i][j]+=DP[i-1][j];
			if(j==0){if(DP[i-1][j]>0)DP[i][j]=1;continue;}
			else if(DP[i][j-1]!=-1)DP[i][j]+=DP[i][j-1];
		}
	}
	printf("%lld",DP[A-1][B-1]);
	
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'memset' was not declared in this scope
   15 |         memset(DP,0,sizeof(DP));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | 
a.cc:16:9: error: 'scanf' was not declared in this scope
   16 |         scanf("%d %d",&A,&B);
      |         ^~~~~
a.cc:35:9: error: 'printf' was not declared in this scope
   35 |         printf("%lld",DP[A-1][B-1]);
      |         ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include<algorithm>
  +++ |+#include <cstdio>
    3 |
Language: C++

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

int main(){
    
    int W, H;
    while(cin >> W >> H, W||H){
        int n, dp[17][17] = {0};
        bool xx[17][17];
        
        memset(xx, false, sizeof(xx));
        cin >> n;
        for(int i = 0; i < n; i++){
            int x, y; cin >> x >> y;
            xx[--y][--x] = true;
        }
        
        for(int i = 0; i < W; i++)
            dp[0][i] = 1;
        for(int i = 0; i < H; i++)
            dp[i][0] = 1;
        for(int i = 1; i < H; i++){
            for(int j = 1; j < W; j++){
                if(!xx[i][j])
                    dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
        }
        cout << dp[H - 1][W - 1] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
   12 |         memset(xx, false, sizeof(xx));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <iostream>
#include <stack>
#include <algorithm>
using namespace std;
typedef pair<int,int>pa;
int ma[42][42];
int main(){
    while(true){
        int a,b,x,y;
        int n;
        cin>>a>>b;
        if(a==0)break;
        cin>>n;
        memset(ma,0,sizeof(ma));
        while(n--){
            cin>>x>>y;x--;
            ma[b-y][x]=-1;
        }
        ma[b-1][0]=1;
        stack<pa>stk;
        stk.push(pa(0, b-1));
        while(stk.size()){
            pa p=stk.top();
            stk.pop();
            x=p.first,y=p.second;
            if(x+1<a&&ma[y][x+1]!=-1){
                ma[y][x+1]+=1;
                stk.push(pa(x+1,y));
            }
            if(y-1>-1&&ma[y-1][x]!=-1){
                ma[y-1][x]+=1;
                stk.push(pa(x,y-1));
            }
            
        }
        
        cout<<ma[0][a-1]<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'memset' was not declared in this scope
   14 |         memset(ma,0,sizeof(ma));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <iostream>
#include <arrary>
#include <iterator>

int main(){
	std::array<int, 256> crossing; //16*16

	int length,width;
	while(std::cin >> width >> length){

		if(width == 0 && length == 0){
			break;
		}

		int construction;
		std::cin >> construction;

		for(int i = 0; i < construction; ++i){
			int con_length,con_width;
			std::cin >> con_width >> con_length;
			crossing[con_width + (width * (con_length - 1)) - 1] = -1; //construction = -1
		}

		crossing.front() = 1; //start
		
		int cros_num = 0;
		for(auto itr = crossing.begin(), itr != crossing.end(), ++itr){

			if(*itr != -1){ //not crossing
				//considering left crossing
				if(cros_num % width != 0){ //no left
					itr -= 1;
					if(*itr != -1){ //left not construction
						int buf = *itr;
						itr += 1;
						*itr += buf; //plus left
					}else{
						itr += 1;
					}
				}
				//considering down crossing
				if(cros_num > width){ //no down
					itr -= width;
					if(*itr != -1){ //down not construction
						int buf = *itr;
						itr += width;
						*itr += buf; //plus down
					}else{
						itr += width;
					}
				}
			}
			++cros_num;
			
			if(cros_num == length * width) break;

		}
	}
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: arrary: No such file or directory
    2 | #include <arrary>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <arrary>
#include <iterator>

int main(){
	std::array<int, 256> crossing; //16*16

	int length,width;
	while(std::cin >> width >> length){

		if(width == 0 && length == 0) break;

		int construction;
		std::cin >> construction;

		for(int i = 0; i < construction; ++i){
			int con_length,con_width;
			std::cin >> con_width >> con_length;
			crossing[con_width + (width * (con_length - 1)) - 1] = -1; //construction = -1
		}

		crossing.front() = 1; //start
		
		int cros_num = 0;
		for(auto itr = crossing.begin(), itr != crossing.end(), ++itr){

			if(*itr != -1){ //not crossing
				//considering left crossing
				if(cros_num % width != 0){ //no left
					itr -= 1;
					if(*itr != -1){ //left not construction
						int buf = *itr;
						itr += 1;
						*itr += buf; //plus left
					}else{
						itr += 1;
					}
				}
				//considering down crossing
				if(cros_num > width){ //no down
					itr -= width;
					if(*itr != -1){ //down not construction
						int buf = *itr;
						itr += width;
						*itr += buf; //plus down
					}else{
						itr += width;
					}
				}
			}
			++cros_num;
			
			if(cros_num == length * width) break;

		}
	}
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: arrary: No such file or directory
    2 | #include <arrary>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <arrary>
#include <iterator>

int main(){
	int length,width;

	while(std::cin >> width >> length){
		std::array<int, 256> crossing; //16*16

		if(width == 0 && length == 0) break;

		int construction;
		std::cin >> construction;

		for(int i = 0; i < construction; ++i){
			int con_length,con_width;
			std::cin >> con_width >> con_length;
			crossing[con_width + (width * (con_length - 1)) - 1] = -1; //construction = -1
		}

		crossing.front() = 1; //start
		
		int cros_num = 0;
		for(auto itr = crossing.begin(), itr != crossing.end(), ++itr){

			if(*itr != -1){ //not crossing
				//considering left crossing
				if(cros_num % width != 0){ //no left
					itr -= 1;
					if(*itr != -1){ //left not construction
						int buf = *itr;
						itr += 1;
						*itr += buf; //plus left
					}else{
						itr += 1;
					}
				}
				//considering down crossing
				if(cros_num > width){ //no down
					itr -= width;
					if(*itr != -1){ //down not construction
						int buf = *itr;
						itr += width;
						*itr += buf; //plus down
					}else{
						itr += width;
					}
				}
			}
			++cros_num;
			
			if(cros_num == length * width){
				std::cout << *itr << endl;	
				break;
			}
		}

	}
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: arrary: No such file or directory
    2 | #include <arrary>
      |          ^~~~~~~~
compilation terminated.