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

/*??????????????????????????£???(Christmas Party)*/
#include <stdio.h>
int main(){
  int i, j, x, y, z, N, M;
  int A[100] = {0};
  int B[100][100] = {0};
  int data[100] = {0};
  scanf("%d %d", &N, &M);
  for (i = 1; i - 1 < M; i++) {
    scanf("%d", &A[i - 1]);
  }
  for (i = 1; i - 1 < M; i++) {
    for (j = 1; j - 1 < N; j++) {
      scanf("%d", &B[i - 1][j - 1]);
    }
  }
  for (i = 1; i - 1 < M; i++) {
    x = 0
    for (j = 1; j - 1 < N; j++) {
      if (A[i - 1] = B[i - 1][j - 1]) {
        data[j - 1]++;
          x++;
      }
	data[A[i - 1]] += N - x
    }
  }
  for (i = 1; i - 1 < M; i++) {
    printf("%d\n", A[i - 1]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:10: error: expected ';' before 'for'
   18 |     x = 0
      |          ^
      |          ;
   19 |     for (j = 1; j - 1 < N; j++) {
      |     ~~~
Language: C

/*??????????????????????????£???(Christmas Party)*/
#include <stdio.h>
int main(){
  int i, j, x, N, M;
  int A[100] = {0};
  int B[100][100] = {0};
  int data[100] = {0};
  scanf("%d %d", &N, &M);
  for (i = 1; i - 1 < M; i++) {
    scanf("%d", &A[i - 1]);
  }
  for (i = 1; i - 1 < M; i++) {
    for (j = 1; j - 1 < N; j++) {
      scanf("%d", &B[i - 1][j - 1]);
    }
  }
  for (i = 1; i - 1 < M; i++) {
    x = 0
    for (j = 1; j - 1 < N; j++) {
      if (A[i - 1] = B[i - 1][j - 1]) {
        data[j - 1]++;
          x++;
      }
	data[A[i - 1]] += N - x
    }
  }
  for (i = 1; i - 1 < M; i++) {
    printf("%d\n", data[i - 1]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:10: error: expected ';' before 'for'
   18 |     x = 0
      |          ^
      |          ;
   19 |     for (j = 1; j - 1 < N; j++) {
      |     ~~~
Language: C

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

int main()
{
	int n, m,
	long int f[100][100];
	int target[100];
	int cnt[100] = { 0 };
	int i, j;
	scanf("%d%d", &n, &m);
	for (i = 0;i < m;i++)
		scanf("%d", &target[i]);
	for (i = 0;i < m;i++)
		for (j = 0;j < n;j++)
			scanf("%d", &f[i][j]);
	for (i = 0;i < m;i++) {
		for (j = 0;i < n;j++) {
			cnt[target[i]] += 1;
			if (f[i][j] == target[i])cnt[j] += 1;
			else cnt[target[i]] += 1;
		}
	}
	for (i = 0;i < n;i++)
		printf("%d\n", cnt[i]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: expected identifier or '(' before 'long'
    7 |         long int f[100][100];
      |         ^~~~
main.c:16:38: error: 'f' undeclared (first use in this function)
   16 |                         scanf("%d", &f[i][j]);
      |                                      ^
main.c:16:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

//2015
#include<iostream>
using namespace std;
int main(void){
	int n,m,i,j,a;
	cin>>n;
	cin>>m;
	int a[m+1],b[n+1];
	for(i=1;i<=n;i++){
		cin>>a[i];
	}
	for(i=1;i<=m:;i++){
		for(j=0;j<=n;j++){
			cin>>a;
			if(a==a[i]){
				b[j]++;
			}
			else{
				b[a[i]]++;
			}
		}
	}
	for(j=0;j<=n;j++){
		cout<<b[j]<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: conflicting declaration 'int a [(m + 1)]'
    8 |         int a[m+1],b[n+1];
      |             ^
a.cc:5:21: note: previous declaration as 'int a'
    5 |         int n,m,i,j,a;
      |                     ^
a.cc:10:23: error: invalid types 'int[int]' for array subscript
   10 |                 cin>>a[i];
      |                       ^
a.cc:12:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   12 |         for(i=1;i<=m:;i++){
      |                 ^
a.cc:12:21: error: expected ';' before ':' token
   12 |         for(i=1;i<=m:;i++){
      |                     ^
      |                     ;
a.cc:12:26: error: expected ';' before ')' token
   12 |         for(i=1;i<=m:;i++){
      |                          ^
      |                          ;
a.cc:15:32: error: invalid types 'int[int]' for array subscript
   15 |                         if(a==a[i]){
      |                                ^
a.cc:19:36: error: invalid types 'int[int]' for array subscript
   19 |                                 b[a[i]]++;
      |                                    ^
Language: C++

//2015
#include<iostream>
using namespace std;
int main(void){
	int n,m,i,j,a;
	cin>>n;
	cin>>m;
	int a[m+1],b[n+1];
	for(i=1;i<=m;i++){
		cin>>a[i];
	}
	for(i=1;i<=m:;i++){
		for(j=0;j<=n;j++){
			cin>>a;
			if(a==a[i]){
				b[j]++;
			}
			else{
				b[a[i]]++;
			}
		}
	}
	for(j=0;j<=n;j++){
		cout<<b[j]<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: conflicting declaration 'int a [(m + 1)]'
    8 |         int a[m+1],b[n+1];
      |             ^
a.cc:5:21: note: previous declaration as 'int a'
    5 |         int n,m,i,j,a;
      |                     ^
a.cc:10:23: error: invalid types 'int[int]' for array subscript
   10 |                 cin>>a[i];
      |                       ^
a.cc:12:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   12 |         for(i=1;i<=m:;i++){
      |                 ^
a.cc:12:21: error: expected ';' before ':' token
   12 |         for(i=1;i<=m:;i++){
      |                     ^
      |                     ;
a.cc:12:26: error: expected ';' before ')' token
   12 |         for(i=1;i<=m:;i++){
      |                          ^
      |                          ;
a.cc:15:32: error: invalid types 'int[int]' for array subscript
   15 |                         if(a==a[i]){
      |                                ^
a.cc:19:36: error: invalid types 'int[int]' for array subscript
   19 |                                 b[a[i]]++;
      |                                    ^
Language: C++

//2015
#include<iostream>
using namespace std;
int main(void){
	int n,m,i,j,c;
	cin>>n;
	cin>>m;
	int a[m+1],b[n+1];
	for(i=1;i<=m;i++){
		cin>>a[i];
	}
	for(i=1;i<=m:;i++){
		for(j=1;j<=n;j++){
			cin>>c;
			if(c==a[i]){
				b[j]++;
			}
			else{
				b[a[i]]++;
			}
		}
	}
	for(j=0;j<=n;j++){
		cout<<b[j]<<endl;
	}
	return 0;
}//2015
#include<iostream>
using namespace std;
int main(void){
	int n,m,i,j,c;
	cin>>n;
	cin>>m;
	int a[m+1],b[n+1];
	for(i=1;i<=m;i++){
		cin>>a[i];
	}
	for(i=1;i<=m:;i++){
		for(j=1;j<=n;j++){
			cin>>c;
			if(c==a[i]){
				b[j]++;
			}
			else{
				b[a[i]]++;
			}
		}
	}
	for(j=0;j<=n;j++){
		cout<<b[j]<<endl;
	}
	return 0;
}//2015
#include<iostream>
using namespace std;
int main(void){
	int n,m,i,j,c;
	cin>>n;
	cin>>m;
	int a[m+1],b[n+1];
	for(i=1;i<=m;i++){
		cin>>a[i];
	}
	for(i=1;i<=m:;i++){
		for(j=1;j<=n;j++){
			cin>>c;
			if(c==a[i]){
				b[j]++;
			}
			else{
				b[a[i]]++;
			}
		}
	}
	for(j=0;j<=n;j++){
		cout<<b[j]<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   12 |         for(i=1;i<=m:;i++){
      |                 ^
a.cc:12:21: error: expected ';' before ':' token
   12 |         for(i=1;i<=m:;i++){
      |                     ^
      |                     ;
a.cc:12:26: error: expected ';' before ')' token
   12 |         for(i=1;i<=m:;i++){
      |                          ^
      |                          ;
a.cc: At global scope:
a.cc:30:5: error: redefinition of 'int main()'
   30 | int main(void){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(void){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:38:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   38 |         for(i=1;i<=m:;i++){
      |                 ^
a.cc:38:21: error: expected ';' before ':' token
   38 |         for(i=1;i<=m:;i++){
      |                     ^
      |                     ;
a.cc:38:26: error: expected ';' before ')' token
   38 |         for(i=1;i<=m:;i++){
      |                          ^
      |                          ;
a.cc: At global scope:
a.cc:56:5: error: redefinition of 'int main()'
   56 | int main(void){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(void){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:64:17: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   64 |         for(i=1;i<=m:;i++){
      |                 ^
a.cc:64:21: error: expected ';' before ':' token
   64 |         for(i=1;i<=m:;i++){
      |                     ^
      |                     ;
a.cc:64:26: error: expected ';' before ')' token
   64 |         for(i=1;i<=m:;i++){
      |                          ^
      |                          ;
Language: C++

#include <iostream>
using namespace std;
int main(){
int n,m;
int a[101],b[101],p[101];
cin >> n >> m;
for(int i=1;i<=m;i++){
cin >> a[i];
}
for(int i=1;i<=m;i++){
for(int j=1;j<=n;j++){
cin >> b[i][j];
}
}
for(int i=1;i<=m;i++){
for(int j=1;j<=n;j++){
if(a[i] == b[i][j]){
p[j]+=1;
}
else{ p[a[j]]+=1;}
}}
for(int j=1;j<=n;j++){
cout << p[j] << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: invalid types 'int[int]' for array subscript
   12 | cin >> b[i][j];
      |            ^
a.cc:17:16: error: invalid types 'int[int]' for array subscript
   17 | if(a[i] == b[i][j]){
      |                ^
Language: C++

N = int(input())
M = int(input())
A = list(map(int, input().split()))
p = [0] * N
for i in range(M):
    for bi, b in enumerate(map(int, input().split())):
        if b == A[i]:
            p[bi] += 1
        else:
            p[A[i] - 1] += 1
print('\n'.join(map(str, p)))

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include <cstdio>

using namespace std;

int main()
{
    int n, m;
    int tgt[100];
    int pt[100] = {0};
    int nomi[100][100];

    scanf("%d", &n);
    scanf("%d", &m);

    for (int i = 0; i < m; i++){
        scanf("%d", &tgt[i]);
    }

    for (int i = 0; i < m; i++){
        int tmp = 0;
        for (int j = 0; j < n; j++){
            scanf("%d", &nomi[i][j]);
            if (tgt[i] == nomi[i][j]){
                //printf("tgt[%d] = %d, nomi[%d][%d] = %d\n",
 i, tgt[i], i, j, nomi[i][j]);
                pt[j]++;
                tmp++;
            }
        }
        pt[tgt[i] - 1] += n - tmp;
    }

    for (int i = 0; i < n; i++){
        printf("%d\n", pt[i]);
    }

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:29: error: expected ';' before ')' token
   25 |  i, tgt[i], i, j, nomi[i][j]);
      |                             ^
      |                             ;
Language: C++

#include<iostream>
using namespace std;int n[100],x,k[100],m,c,i,j,l,o[100];
main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){x++;}else{o[j]=1;x++;}}
for(j=0;j<m;j++){if(o[j]==1){n[j]+=x+1;}}}
for(i=0;i<m;i++){cout<<n[i]<<endl;}}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:60: error: invalid types 'int[int]' for array subscript
    4 | for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){x++;}else{o[j]=1;x++;}}
      |                                                            ^
Language: C++

#include<iostream>
using namespace std;int n[100],x,k[100],m,c,i,j,l,o[100];
main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){x++;}
else{o[j]=1;x++;}}
for(j=0;j<m;j++){if(o[j]==1){n[j]+=x+1;}}}
for(i=0;i<m;i++){cout<<n[i]<<endl;}}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:60: error: invalid types 'int[int]' for array subscript
    4 | for(i=0;i<m;i++){x=0;for(j=0;j<m;j++){o[j]=0;cin>>l;if(l!=m[i]){x++;}
      |                                                            ^
Language: C++

#include<iostream>
using namespace std;int n[100],x,k[100],m,c,i,j,l,;
int main(){cin>>m>>c;for(i=0;i<c;i++){cin>>k[i];}
for(i=0;i<m;i++){
    x=0;
    for(j=0;j<m;j++){
        cin>>l;
        if(l!=k[i]){x++;}
        else{n[j]++;}
    }
    n[k[i]]+=x;cout<<x<<endl;
}
for(i=0;i<m;i++){cout<<n[i]<<endl;}}

Compiler output:
a.cc:2:51: error: expected unqualified-id before ';' token
    2 | using namespace std;int n[100],x,k[100],m,c,i,j,l,;
      |                                                   ^
Language: C++

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

int main(){
int player,round,i,j,k,forecast;
cin>>player>>round;
int target[round],forecast[player],sum[player];
for(i=0;i<round;i++) cin>>target[i]:
for(i=0;i<round;i++){

for(k=0;k<player;k++) cin>>forecaset[k];

for(j=0;j<player;j++){
if(forecast[j]==target[i])sum[j]++;
}

}
for(i=0;i<player;i++)cout<<sum[i]<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: conflicting declaration 'int forecast [player]'
    7 | int target[round],forecast[player],sum[player];
      |                   ^~~~~~~~
a.cc:5:24: note: previous declaration as 'int forecast'
    5 | int player,round,i,j,k,forecast;
      |                        ^~~~~~~~
a.cc:8:36: error: expected ';' before ':' token
    8 | for(i=0;i<round;i++) cin>>target[i]:
      |                                    ^
      |                                    ;
a.cc:9:20: error: expected ';' before ')' token
    9 | for(i=0;i<round;i++){
      |                    ^
      |                    ;
Language: C++

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

int main(){
int player,round,i,j,k,forecast;
cin>>player>>round;
int target[round],forecast[player],sum[player];
for(i=0;i<round;i++) cin>>target[i];
for(i=0;i<round;i++){

for(k=0;k<player;k++) cin>>forecaset[k];

for(j=0;j<player;j++){
if(forecast[j]==target[i])sum[j]++;
}

}
for(i=0;i<player;i++)cout<<sum[i]<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: conflicting declaration 'int forecast [player]'
    7 | int target[round],forecast[player],sum[player];
      |                   ^~~~~~~~
a.cc:5:24: note: previous declaration as 'int forecast'
    5 | int player,round,i,j,k,forecast;
      |                        ^~~~~~~~
a.cc:11:28: error: 'forecaset' was not declared in this scope; did you mean 'forecast'?
   11 | for(k=0;k<player;k++) cin>>forecaset[k];
      |                            ^~~~~~~~~
      |                            forecast
a.cc:14:12: error: invalid types 'int[int]' for array subscript
   14 | if(forecast[j]==target[i])sum[j]++;
      |            ^
Language: C++

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

int main(){
int player,round,i,j,k;
cin>>player>>round;
int target[round],forecast[player],sum[player];
for(i=0;i<round;i++) cin>>target[i];
for(i=0;i<round;i++){

for(k=0;k<player;k++) cin>>forecaset[k];

for(j=0;j<player;j++){
if(forecast[j]==target[i])sum[j]++;
}

}
for(i=0;i<player;i++)cout<<sum[i]<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: 'forecaset' was not declared in this scope; did you mean 'forecast'?
   11 | for(k=0;k<player;k++) cin>>forecaset[k];
      |                            ^~~~~~~~~
      |                            forecast
Language: C++

#include<bits/stdc++>
using namespace std;
int main(){
int player,rounds,i,j,k;
cin>>player>>rounds;
int target[rounds],forecast[player],sum[player];
for(i=0;i<player;i++)sum[i]=0;
for(i=0;i<rounds;i++)cin>>target[i];
for(i=0;i<rounds;i++){
    for(k=0;k<player;k++)cin>>forecast[k];
for(j=0;j<player;j++){
if(target[i]==forecast[j])sum[j]++;else sum[target[i]-1]++;
}
}
for(i=0;i<player;i++)cout<<sum[i]<<endl;
return 0;
}

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

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;

int main()
{
	int n, m;
	cin >> n >> m;
	vector<int> t;
	std::vector<int> tmp;

		for (int i = 0; i <= m; i++) {
		int tmp;
		cin >> tmp;
			t. push_back(tmp);
	}

	vector<int>p(n, 0);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: expected '}' at end of input
   25 |         }
      |          ^
a.cc:9:1: note: to match this '{'
    9 | {
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){

  int n,m,reason;

  cin >> n >> m;

  int tag[m],table[n];

  for(int i=0; i<m; i++)[
    cin >> tag[i];
  }

  for(int i=0; i<m; i++){
    for(int j=0; j<n; j++){
      cin >> reason;
      if(reason == tag[i]){
        table[j]++;
      }
      else{ 
        table[tag[i]];
      }
    }
  }

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

 return 0;

}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: warning: capture of variable 'std::cin' with non-automatic storage duration
   13 |     cin >> tag[i];
      |     ^~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::istream std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:8: error: expected ',' before '>>' token
   13 |     cin >> tag[i];
      |        ^~~
      |        ,
a.cc:13:9: error: expected identifier before '>>' token
   13 |     cin >> tag[i];
      |         ^~
a.cc:13:18: error: expected ']' before ';' token
   13 |     cin >> tag[i];
      |                  ^
      |                  ]
a.cc: In lambda function:
a.cc:13:18: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:16:3: error: expected unqualified-id before 'for'
   16 |   for(int i=0; i<m; i++){
      |   ^~~
a.cc:16:16: error: 'i' does not name a type
   16 |   for(int i=0; i<m; i++){
      |                ^
a.cc:16:21: error: 'i' does not name a type
   16 |   for(int i=0; i<m; i++){
      |                     ^
a.cc:28:2: error: expected unqualified-id before 'for'
   28 |  for(int i=0; i<n; i++){
      |  ^~~
a.cc:28:15: error: 'i' does not name a type
   28 |  for(int i=0; i<n; i++){
      |               ^
a.cc:28:20: error: 'i' does not name a type
   28 |  for(int i=0; i<n; i++){
      |                    ^
a.cc:32:2: error: expected unqualified-id before 'return'
   32 |  return 0;
      |  ^~~~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int i, N, M;
int A[101], B[101][101], P[101];
int main(){
    cin >> N >> M;
    for (i=1; i<=M; i++) { cin >> A[i]; }
    for (i=1; i<=M; i++) {
        for (j=1; j<=N; j++) {
            cin >> B[i][j];
        }
    }
    for (j=1; j<=N; j++) { p[j] = 0; }
    for (i=1; i<=M; i++) {
        for (j=1; j<=N; j++) {
            if(A[i]==B[i][j]) {
                P[j]++;
            } else {
                P[A[i]]++;
            }
        }
   }
   for (j=1; j<=N; j++) {
       cout << P[j] << endl;
   }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'j' was not declared in this scope
    9 |         for (j=1; j<=N; j++) {
      |              ^
a.cc:13:10: error: 'j' was not declared in this scope
   13 |     for (j=1; j<=N; j++) { p[j] = 0; }
      |          ^
a.cc:13:28: error: 'p' was not declared in this scope
   13 |     for (j=1; j<=N; j++) { p[j] = 0; }
      |                            ^
a.cc:15:14: error: 'j' was not declared in this scope
   15 |         for (j=1; j<=N; j++) {
      |              ^
a.cc:23:9: error: 'j' was not declared in this scope
   23 |    for (j=1; j<=N; j++) {
      |         ^
Language: C++

#include<iostream>
using namespace std;
int i, j, N, M;
int A[101], B[101][101], P[101];
int main(){
    cin >> N >> M;
    for (i=1; i<=M; i++) { cin >> A[i]; }
    for (i=1; i<=M; i++) {
        for (j=1; j<=N; j++) {
            cin >> B[i][j];
        }
    }
    for (j=1; j<=N; j++) { p[j] = 0; }
    for (i=1; i<=M; i++) {
        for (j=1; j<=N; j++) {
            if(A[i]==B[i][j]) {
                P[j]++;
            } else {
                P[A[i]]++;
            }
        }
   }
   for (j=1; j<=N; j++) {
       cout << P[j] << endl;
   }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: 'p' was not declared in this scope
   13 |     for (j=1; j<=N; j++) { p[j] = 0; }
      |                            ^
Language: Java

import java.io.*;
import java.util.StringTokenizer;

class Main{

static final PrintWriter out=new PrintWriter(System.out);

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
StringTokenizer st=new StringTokenizer(line);
int h=Integer.parseInt(st.netToken());
int w=Integer.parseInt(st.netToken());
int[][] wf=new int[h][w];
for(int i=0;i<h;i++){
boolean flag=false;
char[] map=br.readLine().toCharArray();
for(int j=0;j<w;j++){
if(map[j]=='c'){
wf[i][j]=0;
flag=true;
}
else{
if(!flag) wf[i][j]=-1;
else wf[i][j]=wf[i][j-1]+1;
}
if(j==w-1) out.println(wf[i][j]);
else out.print(wf[i][j]+" ");
}
}
out.flush();
}
}
}

Compiler output:
Main.java:13: error: cannot find symbol
int h=Integer.parseInt(st.netToken());
                         ^
  symbol:   method netToken()
  location: variable st of type StringTokenizer
Main.java:14: error: cannot find symbol
int w=Integer.parseInt(st.netToken());
                         ^
  symbol:   method netToken()
  location: variable st of type StringTokenizer
2 errors
Language: Java

import java.util.Scanner;

public class weatherforecast {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();
		int cnt=0;
		int ccnt=0;
		String data[][] = new String[H][W];
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
	    		data[i][k] = sc.next();
			}
		}
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
				if(data[i][k].equals(".")){
					if(ccnt != 1){
						if((k+1)==W){
							System.out.println(-1);
							ccnt = 0;
							cnt = 0;
						}else{ 
							System.out.print(-1);
						}
					}else{
						if((k+1)==W){
							cnt++;
							System.out.println(cnt);
							ccnt = 0;
		    				cnt = 0;
						}else{ 
							cnt++;
							System.out.print(cnt);
						}
			
					}
				}
				//	System.out.print(cnt);	
				else if(data[i][k].equals("c")){
	    			 //cnt++;
	    			 ccnt = 1;
	    			 if((k+1)==W){ 
	    				 System.out.println(0);
	    				 ccnt = 0;
	    				 cnt = 0;
	    			 } else {
	    				 System.out.print(0);
	    			 }
				}
		
		}
	}

	}
		
	

}

Compiler output:
Main.java:3: error: class weatherforecast is public, should be declared in a file named weatherforecast.java
public class weatherforecast {
       ^
1 error
Language: Java

import java.util.Scanner;

public class weatherforecast {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();
		int cnt=0;
		int ccnt=0;
		String data[][] = new String[H][W];
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
	    		data[i][k] = sc.next();
			}
		}
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
				if(data[i][k].equals(".")){
					if(ccnt != 1){
						if((k+1)==W){
							System.out.println(-1);
							ccnt = 0;
							cnt = 0;
						}else{ 
							System.out.print(-1);
						}
					}else{
						if((k+1)==W){
							cnt++;
							System.out.println(cnt);
							ccnt = 0;
		    				cnt = 0;
						}else{ 
							cnt++;
							System.out.print(cnt);
						}
			
					}
				}
				else if(data[i][k].equals("c")){
					cnt = 0;
	    			 ccnt = 1;
	    			 if((k+1)==W){ 
	    				 System.out.println(0);
	    				 ccnt = 0;
	    				 
	    			 } else {
	    				 System.out.print(0);
	    			 }
				}
		
		}
	}

	}
		
	

}

Compiler output:
Main.java:3: error: class weatherforecast is public, should be declared in a file named weatherforecast.java
public class weatherforecast {
       ^
1 error
Language: Java

import java.util.Scanner;
public class weatherforecast {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();
		int cnt=0;
		int ccnt=0;
		String data[][] = new String[H][W];
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
	    		data[i][k] = sc.next();
			}
		}
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
				if(data[i][k].equals(".")){
					if(ccnt != 1){
						if((k+1)==W){
							System.out.println(-1);
							ccnt = 0;
							cnt = 0;
						}else System.out.print(-1 );

					}else{
						if((k+1)==W){
							cnt++;
							System.out.println(cnt);
							ccnt = 0;
		    				cnt = 0;
						}else{ 
							cnt++;
							System.out.print(cnt );
						}
			
					}
				}
				else if(data[i][k].equals("c")){
					 cnt = 0;
	    			 ccnt = 1;
	    			 if((k+1)==W){ 
	    				 System.out.println(0 );
	    				 ccnt = 0; 
	    			 }else System.out.print(0 );
				}
		
		}
	}

	}
		
	

}

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

import java.util.Scanner;
public class weatherforecast {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();
		int cnt=0;
		int ccnt=0;
		String data[][] = new String[H][W];
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
	    		data[i][k] = sc.next();
			}
		}
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
				if(data[i][k].equals(".")){
					if(ccnt != 1){
						if((k+1)==W){
							System.out.println(-1);
							//System.out.print(" ");
							ccnt = 0;
							cnt = 0;
						}else {
							System.out.print(-1);
							System.out.print(" ");
						}

					}else{
						if((k+1)==W){
							cnt++;
							System.out.println(cnt);
							ccnt = 0;
		    				cnt = 0;
						}else{ 
							cnt++;
							System.out.print(cnt);
							System.out.print(" ");
						}
			
					}
				}
				else if(data[i][k].equals("c")){
					 cnt = 0;
	    			 ccnt = 1;
	    			 if((k+1)==W){ 
	    				 System.out.println(0);
	    			//	 System.out.println(" ");
	    				 ccnt = 0; 
	    			 }else {
	    				 System.out.print(0);
	    				 System.out.print(" ");
	    			 }
				}
		
		}
	}

	}
		
	

}

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

import java.util.Scanner;
public class main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();
		int cnt=0;
		int ccnt=0;
		String data[][] = new String[H][W];
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
	    		data[i][k] = sc.next();
			}
		}
		for(int i = 0;i < H;i++){
			for(int k = 0;k < W;k++){
				if(data[i][k].equals(".")){
					if(ccnt != 1){
						if((k+1)==W){
							System.out.println(-1);
							//System.out.print(" ");
							ccnt = 0;
							cnt = 0;
						}else {
							System.out.print(-1);
							System.out.print(" ");
						}

					}else{
						if((k+1)==W){
							cnt++;
							System.out.println(cnt);
							ccnt = 0;
		    				cnt = 0;
						}else{ 
							cnt++;
							System.out.print(cnt);
							System.out.print(" ");
						}
			
					}
				}
				else if(data[i][k].equals("c")){
					 cnt = 0;
	    			 ccnt = 1;
	    			 if((k+1)==W){ 
	    				 System.out.println(0);
	    			//	 System.out.println(" ");
	    				 ccnt = 0; 
	    			 }else {
	    				 System.out.print(0);
	    				 System.out.print(" ");
	    			 }
				}
		
		}
	}

	}
		
	

}

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

package second;
import java.util.Scanner;

public class WeatherForecaster {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		int ans[][] = new int[1000][1000]; //????°?????????????????????\?????????????????????
		
		//??\?????????????¨????
		int time;
		for(int i = 0; i < h; i++){
			char[] hw = sc.next().toCharArray();
			time = -1;//1???????????£???????????????????????????
			for(int j = 0; j < w; j++){
				if(hw[j] == 'c'){ //??????????°????????????????????????´???????????????0????????????
					time = 0;
				}
				ans[i][j] = time;
				if(time != -1){ //?????????????°?????????\??????????????????1???????¶????????????????
					time++;
				}
			}
		}
		
		//??????
		for(int i = 0; i < h; i++){
			for(int j = 0; j < w; j++){
				if(j == w - 1){
					System.out.println(ans[i][j]);
				}else{
					System.out.print(ans[i][j]);
					System.out.print(" ");
				}
			}
		}
	}
}

Compiler output:
Main.java:4: error: class WeatherForecaster is public, should be declared in a file named WeatherForecaster.java
public class WeatherForecaster {
       ^
1 error
Language: Java

import java.util.Scanner;

public class SDAOJ_610 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();
		char[] kumo = new char[W];
		int[][] ans = new int [H][W];
		int count = 0;
		int no = 0;
		for(int k = 0; k < H; k++){
			kumo = sc.next().toCharArray();
			for(int j = 0; j < W; j++){
				for(int l = j; l >= 0; l--){
					if(kumo[l] == 'c'){
						ans[k][j] = count;
						no = 1;
//						System.out.println("target");
						break;
					}else if(kumo[l] == '.'){
						count = count + 1;
//						System.out.println("suru-");
					}
				}
				if(no == 0){
					ans[k][j] = -1;
//					System.out.println("no");
				}
				count = 0;
				no = 0;
			}
		}
		for(int i = 0; i < H; i++){
			for(int k = 0; k < W; k++){
				System.out.print(ans[i][k]);
			}
		System.out.println("");
		}

	}

}

Compiler output:
Main.java:3: error: class SDAOJ_610 is public, should be declared in a file named SDAOJ_610.java
public class SDAOJ_610 {
       ^
1 error
Language: Java

import java.util.Scanner;
public class main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		int[][] section = new int[h][w];
		for (int i = 0; i < h; i++){
			char [] wether = sc.next().toCharArray();
			int count = 0;
			for(int j = 0; j < w; j++){
				if(wether[j] == 'c'){
					count = 0;
				}else if(wether[j] == '.'){
					count = -1;
				}else if(count >= 0){
					count++;
					section[i][j] = count;
				}
				for ( i = 0; i < h; i++){
					for( j = 0; j < w; j++){
						if(j != w-1){
						System.out.print(section[i][j]+"");
						}else{
							System.out.print(section[i][j]);
						}
					}
				}
			}
		}
	}
}

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

public class main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		int[][] section = new int[h][w];
		for (int i = 0; i < h; i++){
			char [] wether = sc.next().toCharArray();
			int count = 0;
			for(int j = 0; j < w; j++){
				if(wether[j] == 'c'){
					count = 0;
				}else if(wether[j] == '.'){
					count = -1;
				}
				if(count >= 0){
					count++;
					section[i][j] = count;
				}
				for ( i = 0; i < h; i++){
					for( j = 0; j < w; j++){
						if(j != w-1){
							System.out.print(section[i][j]+"");
						}else{
							System.out.print(section[i][j]);
						}
					}
				}
			}
		}
	}
}

Compiler output:
Main.java:1: error: class main is public, should be declared in a file named main.java
public class main {
       ^
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class main
3 errors
Language: Java

import java.util.Scanner;
 
public class Main {
 
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner sc = new Scanner(System.in);
        int H = sc.nextInt();
        int W = sc.nextInt();
        int[][] A;
        A = new int[H][W];
        for(int i=0; i<H; i++){
            char[] JOI = sc.next().toCharArray();
            int time = -1;
            for(int j=0; j<W; j++){
                if(JOI[j] == 'c') time = 0;
                A[i][j] = time;
                if(time>-1) time++;
            }
        }
        for(int i=0; i<H; i++){
            for(int j=0; j<W; j++){
                System.out.print(A[i][j]);
                if(j<W-1) System.out.print(" ");
                else System.out.println();
            }
        }
    }

Compiler output:
Main.java:28: error: reached end of file while parsing
    }
     ^
1 error
Language: Java


import java.util.Scanner;

public class mapcloud{
	public void draw(int h,int w){
        char[] c = new char[w];
		 int[][] map= new int[h][w];
		 int t = 0;
	        for(int i = 0; i < h; i++){
	            t = -1;
	            for(int j = 0; j < w ; j++){
	                if(c[j] == 'c') t = 0;
	                map[i][j] = t;
	                if(t != -1) t++;
	            }
	        }
	        for(int i = 0; i < h; i++){
	            for(int j = 0; j < w; j++){
	                if( j == w-1) System.out.println(map[i][j]);
	                else{
	                    System.out.print(map[i][j]+" ");
	                }
	            }
	        }
	        
	 public static void main(String[] args) { 
	    Scanner sc = new Scanner(System.in);
	    int h = sc.nextInt();
	    int w = sc.nextInt();
		 mapcloud(h,w);
	 }
	}
}

Compiler output:
Main.java:26: error: illegal start of expression
	 public static void main(String[] args) { 
	 ^
Main.java:33: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java


import java.util.Scanner;

public class mapcloud{
	public int w;
	public int h;
	public char[] c = new char[w];
	
	int t = 0;
	 void draw(int h,int w){
		int[][] map= new int[h][w];
	        for(int i = 0; i < h; i++){
	            t = -1;
	            for(int j = 0; j < w ; j++){
	                if(c[j] == 'c') t = 0;
	                map[i][j] = t;
	                if(t != -1) t++;
	            }
	        }
	        for(int i = 0; i < h; i++){
	            for(int j = 0; j < w; j++){
	                if( j == w-1) System.out.println(map[i][j]);
	                else{
	                    System.out.print(map[i][j]+" ");
	                }
	            }
	        }
       
	 public static void main(String[] args) { 
	    Scanner sc = new Scanner(System.in);
	    int h = sc.nextInt();
	    int w = sc.nextInt();
		 mapcloud(h,w);
	 }
	}
}

Compiler output:
Main.java:29: error: illegal start of expression
	 public static void main(String[] args) { 
	 ^
Main.java:36: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java


import java.util.Scanner;

public class Main{
	public int w;
	public int h;
	public char[] c = new char[w];
	
	int t = 0;
	 void doIt(int h,int w){
		int[][] map= new int[h][w];
	        for(int i = 0; i < h; i++){
	            t = -1;
	            for(int j = 0; j < w ; j++){
	                if(c[j] == 'c') t = 0;
	                map[i][j] = t;
	                if(t != -1) t++;
	            }
	        }
	        for(int i = 0; i < h; i++){
	            for(int j = 0; j < w; j++){
	                if( j == w-1) System.out.println(map[i][j]);
	                else{
	                    System.out.print(map[i][j]+" ");
	                }
	            }
	        }
       
	 public static void main(String[] args) { 
	    Scanner sc = new Scanner(System.in);
	    int h = sc.nextInt();
	    int w = sc.nextInt();
		 doIt(h,w);
	 }
	}
}

Compiler output:
Main.java:29: error: illegal start of expression
	 public static void main(String[] args) { 
	 ^
Main.java:36: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java


import java.util.Scanner;
public int w;
public int h;
public class Main{
	public int w;
	public int h;
	public char[] c = new char[w];
	
	int t = 0;
	 void doIt(int h,int w){
		int[][] map= new int[h][w];
	        for(int i = 0; i < h; i++){
	            t = -1;
	            for(int j = 0; j < w ; j++){
	                if(c[j] == 'c') t = 0;
	                map[i][j] = t;
	                if(t != -1) t++;
	            }
	        }
	        for(int i = 0; i < h; i++){
	            for(int j = 0; j < w; j++){
	                if( j == w-1) System.out.println(map[i][j]);
	                else{
	                    System.out.print(map[i][j]+" ");
	                }
	            }
	        }
       
	 public static void main(String[] args) { 
	    Scanner sc = new Scanner(System.in);
	    int h = sc.nextInt();
	    int w = sc.nextInt();
		 doIt(h,w);
	 }
	}

Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public int w;
       ^
  (use --enable-preview to enable unnamed classes)
Main.java:30: error: illegal start of expression
	 public static void main(String[] args) { 
	 ^
2 errors
Language: C

j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
      |   ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'k' defaults to 'int' [-Wimplicit-int]
main.c:1:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
      |           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
main.c:1:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
      |           ^~~~~
main.c:1:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:45: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
      |                                             ^~~~~~~
main.c:1:45: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:1:44: error: lvalue required as left operand of assignment
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
      |                                            ^
main.c:1:55: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
      |                                                       ^~~~~~
main.c:1:55: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:55: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:55: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include <iostream>
using namespace std;
int main (){
char ny;
int dr[101][101],h,w,c=0,i;
cin>>h>>w;
for (int s=0;s<h;s++){
        for (int s_=0;s_<w;s_++){
                cin>>ny;
                dr[s][s_]=-1;
                if (ny=='c')dr[s][s_]=0;
        }
}
for (int s=0;s<h;s++){
        for (int s_=0;s_<w;s_++){
                if (dr[s][s_]==0){
                i=s_;
                        for (int s__=i;s__<w;s__++){
                                if (dr[s][s__]==0)c=0;
                                if (dr[s][s__]==-1){
                                c++;
                                dr[s][s__]=c;
                                }
                        }
                        c=0;
                }
        }
}

for (int s=0;s<h;s++){
        for (int s_=0;s_<w;s_++){
                if (s_==w-1){
                cout<<dr[s][s_];
                }
                else {
                cout<<dr[s][s_]<<" ";
                }
        }
cout<<endl;
}
return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <iostream>
      |         ^
main.c: In function 'main':
main.c:6:1: error: 'cin' undeclared (first use in this function)
    6 | cin>>h>>w;
      | ^~~
main.c:6:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:17: error: 'cout' undeclared (first use in this function)
   33 |                 cout<<dr[s][s_];
      |                 ^~~~
main.c:39:7: error: 'endl' undeclared (first use in this function)
   39 | cout<<endl;
      |       ^~~~
Language: C

#include <stdio.h>

int main(void)
{
	int h,w,i,j,e,b;
	char a[100][100];
	scanf("%d %d",&h,&w);
	for(i=0;i<h;i++){
		scanf("%s",&a[i]);
	}
	for(i=0;i<h;i++){
		for(j=0;j<w;j++){
			if(a[i][j]=='c'){
				a[i][j]=0;
			}
			else if(a[i][j]=='.' && j==0){
				a[i][j]=-1;
			}
			else if(a[i][j]=='.'){
				b=j;
				g:
					if(a[i][b]=='c'){
						a[i][j]=b-j;
						b=0;
					}
					else if(b==0){
						a[i][j]=-1;
					}
					else if(a[i][j]!='c' && b!=0){
						b-;
						goto g;
					}
			}
			printf("%d ",a[i][j]);
		}
		printf("\n");
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:30:51: error: expected expression before ';' token
   30 |                                                 b-;
      |                                                   ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(void)
{
	int H=0,W=0,a=0,c=0,d=0;
	cin>>H>>W;
	char d=0;
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			cin>>d;
			if(d=='.'&&c==0){cout<<"-1";}
			else(d=='c'){cout<<"0";c=1;a=0;}
			else(d=='.'){a++;cout<<a;}
			if(j==W-1){cout<<endl;}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: conflicting declaration 'char d'
    9 |         char d=0;
      |              ^
a.cc:7:29: note: previous declaration as 'int d'
    7 |         int H=0,W=0,a=0,c=0,d=0;
      |                             ^
a.cc:14:37: error: expected ';' before '{' token
   14 |                         else(d=='c'){cout<<"0";c=1;a=0;}
      |                                     ^
      |                                     ;
a.cc:15:25: error: 'else' without a previous 'if'
   15 |                         else(d=='.'){a++;cout<<a;}
      |                         ^~~~
a.cc:15:37: error: expected ';' before '{' token
   15 |                         else(d=='.'){a++;cout<<a;}
      |                                     ^
      |                                     ;
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(void)
{
	int H=0,W=0,a=0,c=0,d=0;
	cin>>H>>W;
	char d=0;
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			cin>>d;
			if(d=='.'&&c==0){cout<<"-1";}
			else if(d=='c'){cout<<"0";c=1;a=0;}
			else if(d=='.'){a++;cout<<a;}
			if(j==W-1){cout<<endl;}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: conflicting declaration 'char d'
    9 |         char d=0;
      |              ^
a.cc:7:29: note: previous declaration as 'int d'
    7 |         int H=0,W=0,a=0,c=0,d=0;
      |                             ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(void)
{
	int H=0,W=0,a=0,c=0;
	cin>>H>>W;
	char d=0;
	for(int i=0;i<H;i++){
		for(int j=0;j<W;j++){
			cin>>d;
			if(d=='.'&&c==0){cout<<"-1";}
			else if(d=='c'){cout<<"0";c=1;a=0;}
			else if(d=='.'){a++;cout<<a;}
			if(j==W-1){cout<<endl;c=0;a=0;}
			else{cout<<" "}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:39: error: expected ';' before '}' token
   17 |                         else{cout<<" "}
      |                                       ^
      |                                       ;
Language: C++

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

int main()
{
  int h,w;
  cin >> h >> w;
  char a[h][w];
  int b[h][w];
  for(int i=0;i<h;i++)
    for(int j=0;j<w;j++)
      cin >> a[i][j];
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      int d=0;
      for(int k=j;k>=0;k--){
        if(a[i][k]=='c'){
          b[i][j]=j-k;
          d++;
          break;
        }
      }
      if(d==0) b[i][j]=-1;
      
    }
  }
  for(int i=0;i<h;i++){
    for(int j=0;j<w-1;j++)
      cout << a[i][j] << " ";
    cout << a[i][j] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: 'j' was not declared in this scope
   31 |     cout << a[i][j] << endl;
      |                  ^
Language: C++

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

#define for_(i,a,b) for(int i=(a);i<(b);++i)

int main() {
	int H, W;
	cin >> H >> W;
	
	vector< string > grid(H);
	for_(i,0,H) cin >> grid[i];
	
	for_(y,0,H) {
		for_(x,0,W) {
			int xx = x;
			while (xx >= 0 && grid[y][xx] == '.') --xx;
			cout << (xx >= 0 ? x - xx : -1) << (x < W - 1 ? " " : "\n");c 
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:85: error: 'c' was not declared in this scope
   17 |                         cout << (xx >= 0 ? x - xx : -1) << (x < W - 1 ? " " : "\n");c
      |                                                                                     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n,m;
	int ans[100][100];
	char a[100][100];
	for(int i = 0;i<100;i++){
		for(int j = 0;j<100;j++){
			ans[i][j]=101;
		}
	}
	cin >> n >> m;
	for(int i = 0;i<n;i++){
		for(int j=0;j<m;j++){
			cin >> a[i][j];
		}
	}
	for(int i =0;i<n;i++){
		for(int j = m-1;j>=0;j--){
			if(a[i][j]=='c'){
				int p=0;
				for(int k=j;k<m;k++){
					if(ans[i][k]>p){
						ans[i][k]=p;
					}
					p++;
				}
			}
		}
	}
	for(int i = 0;i<100;i++){
		for(int j = 0;j<100;j++){
			if(ans[i][j]==101;){ans[i][j]=-1;}
		}
	}
	for(int i =0;i<n;i++){
		for(int j =0;j<m;j++){
			if(j == 0){
				cout << ans[i][j];
			} 
			else if(j == m-1){
				cout << ' ' << ans[i][j] << endl;
			}
			else{cout << ' '<< ans[i][j];}
			
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:43: error: expected primary-expression before ')' token
   34 |                         if(ans[i][j]==101;){ans[i][j]=-1;}
      |                                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
      ios::sync_with_stdio(false);
      int a,b,flag;
      char ch;
      cin>>a>>b;
      for(int i= 0;i<a;i++){
            flag = -1;
            for(int j = 0 ; j < b;j++){
                  scanf("%c",&ch);
                  if(ch == 'c'){
                        cout << '0';
                        flag = 0;
                  }else{
                        if (flag == -1)cout << flag;
                        else cout << ++flag;
                 }
                  if(j!=b-1)cout << ' ';
            }
            cout<<endl;
      }
      retrun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: 'retrun' was not declared in this scope
   24 |       retrun 0;
      |       ^~~~~~