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

int a[8][8];

void f(int x, int y)
{
  a[x][y]=0;
  for(int i=1;i<=3;i++)
  {
    if(x+i>7) break;
    if(a[x+i][y]) f(x+i,y);
  }
  for(int i=1;i<=3;i++)
  {
    if(x-i<0) break;
    if(a[x-i][y]) f(x-i,y);
  }
  for(int i=1;i<=3;i++)
  {
    if(y+i>7) break;
    if(a[x][y+i]) f(x,y+i);
  }
  for(int i=1;i<=3;i++)
  {
    if(y-i<0) break;
    if(a[x][y-i]) f(x,y-i);
  }
}

void solve(int x, int y)
{
  f(x,y);
  REP(i,8)REP(j,8) printf("%d%s",a[i][j],(j==7?"\n":""));
}

int main()
{
  int n; cin >> n;
  string s;
  FOR(c,1,n)
  {
    REP(i,8)
    {
      cin >> s;
      REP(j,8) a[i][j] = s[j]-'0';
    }
    int a,b; cin >> a >> b;
    printf("Data %d:\n",c);
    solve(--b,--a);
  }
  return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:31:3: error: implicit declaration of function 'REP' [-Wimplicit-function-declaration]
   31 |   REP(i,8)REP(j,8) printf("%d%s",a[i][j],(j==7?"\n":""));
      |   ^~~
main.c:31:7: error: 'i' undeclared (first use in this function)
   31 |   REP(i,8)REP(j,8) printf("%d%s",a[i][j],(j==7?"\n":""));
      |       ^
main.c:31:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:11: error: expected ';' before 'REP'
   31 |   REP(i,8)REP(j,8) printf("%d%s",a[i][j],(j==7?"\n":""));
      |           ^~~
      |           ;
main.c: In function 'main':
main.c:36:10: error: 'cin' undeclared (first use in this function)
   36 |   int n; cin >> n;
      |          ^~~
main.c:37:3: error: unknown type name 'string'
   37 |   string s;
      |   ^~~~~~
main.c:38:3: error: implicit declaration of function 'FOR' [-Wimplicit-function-declaration]
   38 |   FOR(c,1,n)
      |   ^~~
main.c:38:7: error: 'c' undeclared (first use in this function)
   38 |   FOR(c,1,n)
      |       ^
main.c:38:13: error: expected ';' before '{' token
   38 |   FOR(c,1,n)
      |             ^
      |             ;
   39 |   {
      |   ~
Language: C

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

char m[10][10];
int n,j,k,x,y,g=0;

int main(){
	scanf("%d\n\n",&n);
	while(n--){g++;
		for(int i=0;i<8;i++)scanf("%8s\n",m[i]);
		scanf("%d\n%d\n\n",&x,&y);
		m[y-1][x-1]='0';
		ex(y-1,x-1);
		printf("Data %d:\n",g);
		for(int i=0;i<8;i++)printf("%s\n",m[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: implicit declaration of function 'ex' [-Wimplicit-function-declaration]
   13 |                 ex(y-1,x-1);
      |                 ^~
Language: C++

gets.to_i.times{|n|
gets
m=(1..8).map{gets}
q=[[gets.to_i-1,gets.to_i-1]]
while q!=[]
x,y=q.pop
x<8&&x>=0&&y<8&&y>=0&&m[y][x]>?0&&(
m[y][x]=?0
q.push *(-3..3).flat_map{|i|[[x,y+i],[x+i,y]]}
)
end
puts "Data #{n+1}:",m
}

Compiler output:
a.cc:3:4: error: too many decimal points in number
    3 | m=(1..8).map{gets}
      |    ^~~~
a.cc:9:11: error: too many decimal points in number
    9 | q.push *(-3..3).flat_map{|i|[[x,y+i],[x+i,y]]}
      |           ^~~~
a.cc:1:1: error: 'gets' does not name a type
    1 | gets.to_i.times{|n|
      | ^~~~
Language: C++

import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

void main()
{
    immutable N = 8;
    immutable n = readln().chomp().to!int();
    foreach(i;0..n)
    {
        readln();
        auto m = iota(N).map!(_=>readln.chomp().to!(char[])()).array();
        immutable x = readln().chomp().to!int();
        immutable y = readln().chomp().to!int();
        void dfs(int x, int y)
        {
            if(x<0 || N<=x || y<0 || N<=y || m[y][x]=='0') return;
            m[y][x]='0';
            foreach(d;[[1,0],[-1,0],[0,1],[0,-1]])
                foreach(k;1..4)
                    dfs(x+d[0]*k,y+d[1]*k);
        }
        dfs(x-1,y-1);
        writeln("Data ",i+1,":");
        m.join("\n").writeln();
    }
}

Compiler output:
a.cc:8:15: error: too many decimal points in number
    8 |     foreach(i;0..n)
      |               ^~~~
a.cc:19:27: error: too many decimal points in number
   19 |                 foreach(k;1..4)
      |                           ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio, std.string, std.conv;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.array, std.algorithm, std.range;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: '::main' must return 'int'
    4 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'immutable' was not declared in this scope; did you mean 'mutable'?
    6 |     immutable N = 8;
      |     ^~~~~~~~~
      |     mutable
a.cc:7:14: error: expected ';' before 'n'
    7 |     immutable n = readln().chomp().to!int();
      |              ^~
      |              ;
a.cc:8:13: error: 'i' was not declared in this scope
    8 |     foreach(i;0..n)
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define FOR(i, s, n) for(int i = s; i <= (int)n; ++i)
#define per(i, n) for(int i = n; i > 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define MP make_pair
#define PB push_back
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define int long long
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef vector<int> VLL;
typedef vector<int> VVLL;
typedef unsigned int uint;
typedef priority_queue<int> maxque;
typedef priority_queue< int, vector<int>, greater<int> > minque;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const int LL_INF = 1ll << 60;
static const int dx[] = { -1, 0, 1, 0 };
static const int dy[] = { 0, -1, 0, 1 };

char feld[10][10];
int n;

void boms(int x,int y){
     if(feld[y][x]=='0')return;
     feld[y][x]='0';
     for(int i=1;i<=3;++i){
        rep(j,4){
            int nx=x+(dx[j]*i);
            int ny=y+(dy[j]*i);
            if(nx>8||nx<=0||ny>8||ny<=0)continue;
            boms(nx,ny);
        }
     }
}

signed main(){
    cin>>n;
    for(int i=1;i<=n;++i){
        for(int y=1;y<=8;++y){
            for(int x=1;x<=8;++x){
                cin>>feld[y][x];
            }
        }
        int a,b;
        cin>>a>>b;
        boms(a,b);
        cout<<"Data "<<i<<":"<<endl;
        for(int y=1;y<=8;++y){
            for(int x=1;x<=8;++x)cout<<feld[y][x];
            cout<<"\n";
        }
    }
}

Compiler output:
a.cc:24:22: error: conflicting declaration 'typedef long long unsigned int uint'
   24 | typedef unsigned int uint;
      |                      ^~~~
In file included from /usr/include/stdlib.h:514,
                 from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/sys/types.h:150:22: note: previous declaration as 'typedef unsigned int uint'
  150 | typedef unsigned int uint;
      |                      ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
 
char bomb[8][8];
 
void printData(int i)
{
    cout << "Data " << i+1 << ':' << endl;
}
 
void dfs(int x, int y)
{
    bomb[y][x] = '0';
 
    for (int i = x-3; i <= x+3; i++) {
	if ((0 <= i && i <= 7) && bomb[y][i] == '1') dfs(i, y);
    }
    for (int j = y-3; j <= y+3; j++) {
	if ((0 <= j && j <= 7) && bomb[j][x] == '1') dfs(x, j);
    }
}
 
int main()
{
    int n, x, y;
    string str;
   
    cin >> n;
    for (int i = 0; i < n; i++) {
	string tmp;
	for (int j = 0; j < 8; j++) {
	    cin >> str;
	    tmp += str;
	}
 
	int t = 0;
	for (int j = 0; j < 8; j++) {
	    for (int k = 0; k < 8; k++) {
		bomb[j][k] = tmp[t++];
 
	cin >> x >> y;
 
	printData(i);
	dfs(x-1, y-1);
 
	for (int j = 0; j < 8; j++) {
	    for (int k = 0; k < 8; k++) {
		cout << bomb[j][k];
	    }
	    cout << endl;
	}
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:30:33: note: to match this '{'
   30 |     for (int i = 0; i < n; i++) {
      |                                 ^
a.cc:55:2: error: expected '}' at end of input
   55 | }
      |  ^
a.cc:25:1: note: to match this '{'
   25 | {
      | ^
Language: C++

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

int dfs(int x,int y);

char maps[8][8];
int dx[12]={-1,-2,-3,1,2,3,0,0,0,0,0,0};
int dy[12]={0,0,0,0,0,0,-1,-2,-3,1,2,3};
int strx[65]={0};
int stry[65]={0};
int k=0;

int main(){
  int n,sx,sy,cas;
  cin >> n;
  for(cas=1;cas<=n;cas++){
    for(int i=0;i<8;i++){
      for(int j=0;j<8;j++){
	cin >> maps[i][j];
      }
    }
    cin >> sx >> sy;
    dfs(sx-1,sy-1);

    printf("Data %d:\n",cas);
    for(int i=0;i<8;i++){
      for(int j=0;j<8;j++){
	cout << maps[i][j];
      } 
      cout << endl;
    }
  }
  return 0;
}
 
int dfs(int x,int y){ 
  int nx,ny; 
  for(int j=0;j<64;j++){
    strx[j]=strx[j+1];
    stry[j]=stry[j+1];
  }
  if(k!=0){
    k--;
  }
  strx[64]=0;
  stry[64]=0;
  }
  for(int i=0;i<12;i++){
    nx=x+dx[i];
    ny=y+dy[i];
    maps[y][x]='0';
    if(0<=nx && nx<8 && 0<=ny && ny<8 && maps[ny][nx]=='1'){ 
      strx[k]=nx;
      stry[k]=ny;
      k++;
    }
  }
  if(strx[0]==0) return 0;
  dfs(strx[0],stry[0]);
}

Compiler output:
a.cc: In function 'int dfs(int, int)':
a.cc:48:3: warning: no return statement in function returning non-void [-Wreturn-type]
   48 |   }
      |   ^
a.cc: At global scope:
a.cc:49:3: error: expected unqualified-id before 'for'
   49 |   for(int i=0;i<12;i++){
      |   ^~~
a.cc:49:15: error: 'i' does not name a type
   49 |   for(int i=0;i<12;i++){
      |               ^
a.cc:49:20: error: 'i' does not name a type
   49 |   for(int i=0;i<12;i++){
      |                    ^
a.cc:59:3: error: expected unqualified-id before 'if'
   59 |   if(strx[0]==0) return 0;
      |   ^~
a.cc:60:6: error: expected constructor, destructor, or type conversion before '(' token
   60 |   dfs(strx[0],stry[0]);
      |      ^
a.cc:61:1: error: expected declaration before '}' token
   61 | }
      | ^
Language: C++

int a[8][8];

void f(int x, int y)
{
  a[x][y]=0;
  for(int i=1;i<=3;i++)
  {
    if(x+i>7) break;
    if(a[x+i][y]) f(x+i,y);
  }
  for(int i=1;i<=3;i++)
  {
    if(x-i<0) break;
    if(a[x-i][y]) f(x-i,y);
  }
  for(int i=1;i<=3;i++)
  {
    if(y+i>7) break;
    if(a[x][y+i]) f(x,y+i);
  }
  for(int i=1;i<=3;i++)
  {
    if(y-i<0) break;
    if(a[x][y-i]) f(x,y-i);
  }
}

void solve(int x, int y)
{
  f(x,y);
  REP(i,8)REP(j,8) printf("%d%s",a[i][j],(j==7?"\n":""));
}

int main()
{
  int n; cin >> n;
  string s;
  FOR(c,1,n)
  {
    REP(i,8)
    {
      cin >> s;
      REP(j,8) a[i][j] = s[j]-'0';
    }
    int a,b; cin >> a >> b;
    printf("Data %d:\n",c);
    solve(--b,--a);
  }
  return 0;
}

Compiler output:
a.cc: In function 'void solve(int, int)':
a.cc:31:7: error: 'i' was not declared in this scope
   31 |   REP(i,8)REP(j,8) printf("%d%s",a[i][j],(j==7?"\n":""));
      |       ^
a.cc:31:3: error: 'REP' was not declared in this scope
   31 |   REP(i,8)REP(j,8) printf("%d%s",a[i][j],(j==7?"\n":""));
      |   ^~~
a.cc: In function 'int main()':
a.cc:36:10: error: 'cin' was not declared in this scope
   36 |   int n; cin >> n;
      |          ^~~
a.cc:37:3: error: 'string' was not declared in this scope
   37 |   string s;
      |   ^~~~~~
a.cc:38:7: error: 'c' was not declared in this scope
   38 |   FOR(c,1,n)
      |       ^
a.cc:38:3: error: 'FOR' was not declared in this scope
   38 |   FOR(c,1,n)
      |   ^~~
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
 
using namespace std;
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define ld long double
#define forever while(true)
int vx[13]={-3,-2,-1,0,0,0,0,0,0,0,1,2,3};
int vy[13]={0,0,0,0,-3,-2,-1,1,2,3,0,0,0};
int a[8][8];
int blow(int x,int y)
{
  a[x][y]=0;
  rep(i,13){
  		int nextx=x+vx[i];
      int nexty=y+vy[i];
      if(nextx<0||8<=nextx||nexty<0||8<=nexty){
      continue;
      }
      if(a[nextx][nexty]==1)
      {
     int u= blow(nextx,nexty);
      }
      a[next][nexty]=0;
  }
return 0;
 
}
int main(){
  int n;
  cin>>n;
  rep(i,n){
  rep(i1,8){
    rep(i2,8){
      cin>>a[i1][i2];
    }
  }
  int x,y;
  cin>>x>>y;
  x--;
  y--;
  int u=blow(x,y);
  for(int i=0;i<8;i++)
  {
  for(int j=0;j<8;j++){
  cout<<a[i][j];
  }
  cout<<endl;
  }
 
  }
 
return 0;
}


Compiler output:
a.cc: In function 'int blow(int, int)':
a.cc:29:8: error: invalid types 'int [8][8][<unresolved overloaded function type>]' for array subscript
   29 |       a[next][nexty]=0;
      |        ^
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
 
using namespace std;
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define ld long double
#define forever while(true)
int vx[13]={-3,-2,-1,0,0,0,0,0,0,0,1,2,3};
int vy[13]={0,0,0,0,-3,-2,-1,1,2,3,0,0,0};
int a[8][8];
int blow(int x,int y)
{
  a[x][y]=0;
  rep(i,13){
  		int nextx=x+vx[i];
      int nexty=y+vy[i];
      if(nextx<0||8<=nextx||nexty<0||8<=nexty){
      continue;
      }
      if(a[nextx][nexty]==1)
      {
     int u= blow(nextx,nexty);
      }
      a[nextx][nexty]=0;
  }
return 0;
 
}
int main(){
  int n;
  cin>>n;
  while(n—){
  rep(i1,8){
    rep(i2,8){
      cin>>a[i1][i2];
    }
  }
  int x,y;
  cin>>x>>y;
  x--;
  y--;
  int u=blow(x,y);
  for(int k=0;k<8;k++)
  {
  for(int j=0;j<8;j++){
  cout<<a[k][j];
  }
  cout<<endl;
  }
 
  }
 
return 0;
}


Compiler output:
a.cc:37:9: error: extended character — is not valid in an identifier
   37 |   while(n—){
      |         ^
a.cc: In function 'int main()':
a.cc:37:9: error: 'n\U00002014' was not declared in this scope
   37 |   while(n—){
      |         ^~
Language: C++

//0071

#include<stdio.h>
#include<algorithm>
using namespace std;

const int N = 8;
char board[N][N+2];

void Fire(int i, int j)
{
	if(board[i][j] != '1')
		return;
	board[i][j] = '0';
	int d;
	for(d = max(j-3, 0); d < min(j+4, N); ++d)
	{
		Fire(i, d);
	}
	for(d = max(i-3, 0); d < min(i+4, N); ++d)
	{
		Fire(d, j);
	}
}

int main(void)
{
	int n;
	scanf("%d", &n);
	int i;
	for(int caseNum = 1; caseNum <= n; ++caseNum)
	{
		for(i = 0; i < N; ++i)
		{
			gets(board[i]);
			if(board[i][0] == '\0')
				--i;
		}
		int x, y;
		scanf("%d %d", &x, &y);
		Fire(y-1, x-1);

		printf("Data %d:\n", caseNum);
		for(i = 0; i < N; ++i)
		{
			puts(board[i]);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:25: error: 'gets' was not declared in this scope; did you mean 'getw'?
   35 |                         gets(board[i]);
      |                         ^~~~
      |                         getw
Language: C++

#include <iostream>

using namespace std;
char field[14][14];
int dx[12] = {-3, -2, -1, 0, 0, 0,  0,  0,  0, 1, 2, 3};
int dy[12] = { 0,  0,  0, 1, 2, 3, -1, -2, -3, 0, 0, 0};

void DFS(int y, int x)
{
	field[y][x] = '0';
	for(int i = 0; i < 12; ++i)
	{
		int X = x + dx[i];
		int Y = y + dy[i];
		if((3 <= X && X <= 10 && 3 <= Y && Y <= 10) && field[Y][X] == '1')
		{
			DFS(Y, X);
		}
	}		
}

void solve()
{
	int n;
	cin >> n;
	int count = 0;
	while(n--)
	{
		count++;
		memset(field, 0, sizeof(field));
		for(int i = 3; i < 11; ++i)
		{
			for(int j = 3; j < 11; ++j)
			{
				cin >> field[i][j];
			}
		}
		int x, y;
		cin >> x >> y;
		DFS(y + 2, x + 2);
		cout << "Data " << count << ":" << endl;
		for(int i = 3; i < 11; ++i)
		{
			for(int j = 3; j < 11; ++j)
			{
				cout << field[i][j];
			}
			cout << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:30:17: error: 'memset' was not declared in this scope
   30 |                 memset(field, 0, sizeof(field));
      |                 ^~~~~~
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 |
Language: C++

#include<stdio.h>
#include<iostream>
char map[8][9];
int start[2];
void explosion(int x,int y){
	int ai;
	map[x][y]='0';
	int j,k;
	for(i=-3;i<4;i++){
		if((x+i>=0)&&(x+i<9)&&(map[x+i][y]=='1')){
			explosion(x+i,y);
		}
		if((y+i>=0)&&(y+i<9)&&(map[x][y+i]=='1')){
			explosion(x,y+i);
		}
	}
	return;
}
int main(){
	int n;
	scanf("%d",&n);
	int i,j,k;
	for(i=1;i<n+1;i++){
		for(j=0;j<8;j++){
			scanf(" %s",&map[j]);
		
		scanf("%d %d",&start[0],&start[1]);
		if(map[start[1]-1][start[0]-1]=='1')explosion(start[1]-1,start[0]-1);
		printf("Data %d:\n",i);
		for(j=0;j<8;j++){
			for(k=0;k<8;k++){
				putchar(map[j][k]);
			}
			printf("\n");
		}
	}
}

Compiler output:
a.cc: In function 'void explosion(int, int)':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i=-3;i<4;i++){
      |             ^
a.cc: In function 'int main()':
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:19:11: note: to match this '{'
   19 | int main(){
      |           ^
Language: C++

#include <iostream>

using namespace std;

bool field[9][9];

void vis(int x, int y){

	if(x<0 || 8<x || y<0 || 8<y || field[y][x]==0){
		return;
	}

	if(field[y][x]==1){

		field[y][x]=0;

		for(int t=1; t<=3; ++t){
		
			vis(x+t, y);
			vis(x-t, y);
			vis(x, y+t);
			vis(x, y-t);
		}
	}

	return;
}
		


int main(){

	int n, x, y;

	cin>>n;

	while(n--){
		
		for(int j=0; j<8; ++j){
			for(int i=0; i<8; ++i){

				char c;
				cin>>c;
				field[y][x]=c=='1';
			}
		}

		cin>>x>>y;
		vis(x, y);

		for(int j=0; j<8; ++j){
			for(int i=0; i<8; ++i){

				cout<<field[y][x];
			}

			cout << endl;
		}

		return 0;
}

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

//まともに使い方を理解していないくせにincludeしまくる人間のクズ
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>


//using namespace stdしないと表記がめんどくさいからね、仕方ないね
using namespace std;

//可読性を上げるためのdefineが仇となる典型的パターン
#define rep(i,n) for(int i = 0; i < n; i++)

//ローカル変数とグローバル変数は使い分けよう！
short n, x, y, j, k;
short planar[14][14];
int s;
unsigned long long int ans;

//関数って楽しいよね！（魔王スマイル）

void bom(short c, short d) {
	planar[c][d] = 0;
	if (planar[c + 1][d] != 0)
		bom(c + 1, d);
	if (planar[c - 1][d] != 0)
		bom(c - 1, d);
	if (planar[c][d + 1] != 0)
		bom(c, d + 1);
	if (planar[c][d - 1] != 0)
		bom(c, d - 1);
	if (planar[c + 2][d] != 0)
		bom(c + 2, d);
	if (planar[c - 2][d] != 0)
		bom(c - 2, d);
	if (planar[c][d + 2] != 0)
		bom(c, d + 2);
	if (planar[c][d - 2] != 0)
		bom(c, d - 2);
	if (planar[c - 3][d] != 0)
		bom(c - 3, d);
	if (planar[c + 3][d] != 0)
		bom(c + 3, d);
	if (planar[c][d + 3] != 0)
		bom(c, d + 3);
	if (planar[c][d - 3] != 0)
		bom(c, d - 3);
	return;
}
}

int main() {
	rep(i, 14) {
		planar[i][0] = 0;
		planar[i][1] = 0;
		planar[i][2] = 0;
		planar[i][11] = 0;
		planar[i][12] = 0;
		planar[i][13] = 0;
		planar[0][i] = 0;
		planar[1][i] = 0;
		planar[2][i] = 0;
		planar[11][i] = 0;
		planar[12][i] = 0;
		planar[13][i] = 0;
	}
	scanf("%d", &n);
	rep(i, n) {
		scanf("\n");
		for (j = 3; j <= 10; j++)
			for (k = 3; k <= 10; k++)
				scanf("%1d", &planar[j][k]);
		scanf("%d", &x);
		scanf("%d", &y);
		bom(y + 2, x + 2);
		printf("Data %d:\n", i + 1);
		for (j = 3; j <= 10; j++) {
			for (k = 3; k <= 10; k++) {
				printf("%d", planar[j][k]);
			}
			printf("\n");
		}
	}
	return 0;
}

Compiler output:
a.cc:59:1: error: expected declaration before '}' token
   59 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
#define loop(i,a,b) for(int i=a;i<b;i++)
void bom(int x,int y,char& in[8][8]){
  in[x][y]='0';
  loop(i,-3,4){
    loop(j,-3,4){
      if(i&&j)continue;
      if(x+i>=0&&x+i<8&&y+j>=0&&y+j<8&&in[x+i][y+j]=='1')bom(x+i,y+j,in);
    }
  }
}

int main(){

  int n;
  cin>>n;
  for(int i=1;i<=n;i++){
    char in[8][8];
    for(int j=0;j<8;j++){
      cin>>in[j];
    }
    int x,y;
    cin>>x>>y;
    if(in[y-1][x-1]=='1')bom(y-1,x-1,in);

    cout<<"Data "<<i<<':'<<endl;
    for(int i=0;i<8;i++){
      loop(j,0,8)
	cout<<in[i][j];
      cout<<endl;
    }
  }
}

Compiler output:
a.cc:6:28: error: declaration of 'in' as array of references
    6 | void bom(int x,int y,char& in[8][8]){
      |                            ^~
a.cc: In function 'void bom(...)':
a.cc:7:3: error: 'in' was not declared in this scope; did you mean 'int'?
    7 |   in[x][y]='0';
      |   ^~
      |   int
a.cc:7:6: error: 'x' was not declared in this scope
    7 |   in[x][y]='0';
      |      ^
a.cc:7:9: error: 'y' was not declared in this scope
    7 |   in[x][y]='0';
      |         ^
Language: C

#include<stdio.h>
int main(void){
    int n,m,o;
    int a[101][101],b[101][101],c[2],r[3]={0};
    int d=0,e=0,f=0,ans=0;
    int x,y,z;
    int h,i,j;
    scanf("%d%d",&n,&m);
    for(h=0;h<m;h++){
        scanf("%d,%d,%d",&x,&y,&z);
        a[x][y]=1;
        a[y][x]=1;
        b[x][y]=z;
        b[y][x]=z;
    }
    scanf("%d",&o);
    while(1){
        e=0;
        for(h=0;h<n;h++){//????¢????
            d=0;
            for(i=0;i<n;i++){
                if(a[h][i]==1){
                    c[0]=h;
                    c[1]=i;
                    d++;
                }
            }
            if(d==1){
                ans=ans+b[c[0]][c[1]];
                a[c[0]][c[1]]=0;
                a[c[1]][c[0]]=0;
                e++;
            }
        }
        if(e==0){//?????????
            r[0]=0;
            r[1]=0;
            r[2]=0;
            for(h=0;h<n;h++){
                for(i=0;i<n;i++){
                    if(a[h][i]==1){
                        if(b[h][i]=>r[2]){
                            r[0]=h;
                            r[1]=i;
                            r[2]=b[h][i];
                        }
                    }
                }
            }
            a[r[0]][r[1]]=0;
            a[r[1]][r[0]]=0;
        }
        f=0;
        for(h=0;h<n;h++){//break
            for(i=0;i<n;i++){
                if(a[h][i]==1){
                    f++;
                }
            }
        }
        if(f==0){
            break;
        }
    }
    ans=ans/100-n+1;
    printf("%d\n",ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:42:36: error: expected expression before '>' token
   42 |                         if(b[h][i]=>r[2]){
      |                                    ^
Language: C

#include<stdio.h>
#define INF 1000000000
void MST(int);

int edge[101][101],v[101],d[101],sum=0,n;

int main(void){

  int m,a,b,i,j, cost;

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

      scanf("%d",&m);

      for(i=0;i<101;i++){
	  for(j=0;j<101;j++){
	      edge[i][j]=INF;
	    }
	}

      for(i=0;i<m;i++){
	scanf("%d,%d,%d",&a,&b,&cost);
	edge[a][b]=cost;
	edge[b][a]=cost;
	 }

      for(i=0;i<101;i++){
	d[i]=INF;
	v[i]=0;
      }

      d[0]=0;
      sum = 0;
      MST(0);

      printf("%d\n",sum);
    }

  return 0;
}

void MST(int u)
{
  int x=0,i;

  while(1){
    int minv=INF;

    for(i=0;i<n;i++){
      if(v[i]==0 &&  d[i]<minv){
	//d[i]=edge[x][i];
	x=i;
	minv=d[i];
      }
    }
    if(minv==INF)break;  

    v[x]=1;
    if ( x != u ) sum+=(d[x]/100-1);
    
    for(i=0;i<n;i++){
      if ( v[i] ) continue;
      d[i]=min(d[i],edge[x][i]);
    }
  }
}

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

Compiler output:
main.c: In function 'main':
main.c:12:7: error: 'count' undeclared (first use in this function)
   12 |       count=0;
      |       ^~~~~
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'MST':
main.c:66:12: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   66 |       d[i]=min(d[i],edge[x][i]);
      |            ^~~
      |            main
Language: C++

#include <iostream>
#include <vector>
#include <tuple>

// Union Find
template<class T=int>
class UnionFind
{
    std::vector<T> p;
    std::vector<T> r;
    T find(const T x)
    {
        if(x==p[x]) return x;
        return p[x]=find(p[x]);
    }
    void unite_(T x, T y)
    {
        if(x==y) return;
        if(r[x]>r[y]) std::swap(x,y);
        else if(r[x]==r[y]) ++r[y];
        p[x]=y;
    }
public:
    explicit UnionFind(const T n):p(n),r(n,0)
    {
        for(T i=0; i<n; ++i)
            p[i]=i;
    }
    bool same(const T x, const T y)
    {
        // assert(0<=x && x<p.size())
        // assert(0<=y && y<p.size())
        return find(x)==find(y);
    }
    void unite(const T x, const T y)
    {
        // assert(0<=x && x<p.size())
        // assert(0<=y && y<p.size())
        unite_(find(x),find(y));
    }
};

// Kruskal's algorithm
template<class T, class U>
T& kruskal(T& edges, U max_v)
{
    typedef typename T::value_type Edge;
    std::sort(edges.begin(),edges.end());
    UnionFind<U> uf(max_v);
    edges.erase(
        std::remove_if(edges.begin(),edges.end(),
            [&uf](const Edge& e){
                const auto& a = std::get<1>(e);
                const auto& b = std::get<2>(e);
                if(uf.same(a,b)) return true;
                uf.unite(a,b);
                return false;
            }),
        edges.end());
    return edges;
}

int main()
{
    std::cin.tie(0);
    std::ios_base::sync_with_stdio(false);
    for(int n,m; (std::cin >> n >> m) && n; )
    {
        typedef std::tuple<int,int,int> T;
        std::vector<T> edges(m);
        for(auto& v: edges)
        {
            int a,b,d; char c; std::cin >> a >> c >> b >> c >> d;
            v = T(d,a,b);
        }
        int c=0;
        for(auto& e: kruskal(edges, n))
            c+=std::get<0>(e)/100-1;
        std::cout << c << "\n";
    }
}

Compiler output:
a.cc: In function 'T& kruskal(T&, U)':
a.cc:48:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   48 |     std::sort(edges.begin(),edges.end());
      |          ^~~~
      |          qsort
a.cc:51:14: error: 'remove_if' is not a member of 'std'; did you mean 'remove_cv'?
   51 |         std::remove_if(edges.begin(),edges.end(),
      |              ^~~~~~~~~
      |              remove_cv
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;

class UF{
  vi p,r;

public:
  UF(int n):p(n,-1),r(n,0){ }

  int find(int x){ return (p[x]<0)?x:(p[x] = find(p[x])); }

  void unite(int x,int y){
    x = find(x); y = find(y);
    if(x==y)return;

    if(r[x] < r[y])p[x] = y;
    else p[y] = x;
    if(r[x] == r[y])r[x]++;
  }

  bool same(int x,int y){return find(x)==find(y);}
};

const int INF= 1e9;

struct edge{
  int from, to, cost;
  edge(int x,int y, int z):from(x),to(y),cost(z){}
  bool operator<(const edge &x)const{ return cost<x.cost; }
};

class Kruskal{
  int n;
  vector< vector<edge> > g;
public:
  Kruskal(int a=0):n(a){ g.resize(n); }

  void AddEdge(int a, int b, int cost){
    g[a].push_back(edge(a,b,cost));
    g[b].push_back(edge(b,a,cost));
  }

  int MinSpanningTree(){
    UF connect(n);
    vector<edge> edges;
    for(int v=0;v<n;v++){
      for(edge e.: g[v])edges.push_back(e);
    }
    sort(edges.begin(), edges.end());
    
    int res = 0;
    for(edge e : edges){
      if(!connect.same(e.from,e.to)){
	res += e.cost;
	connect.unite(e.from,e.to);
      }
    }
    return res;
  }
};

int main(){
  int n,m;
  while(scanf("%d",&n),n){
    Kruskal p(n);
    cin >> m;
    for(int i=0;i<m;i++){
      int a,b,c;
      scanf("%d,%d,%d",&a,&b,&c);
      p.AddEdge(a,b,c/100-1);
    }
    cout << p.MinSpanningTree() << endl;
  }
}

Compiler output:
a.cc: In member function 'int Kruskal::MinSpanningTree()':
a.cc:48:17: error: expected ';' before '.' token
   48 |       for(edge e.: g[v])edges.push_back(e);
      |                 ^
a.cc:48:17: error: expected primary-expression before '.' token
a.cc:48:18: error: expected unqualified-id before ':' token
   48 |       for(edge e.: g[v])edges.push_back(e);
      |                  ^
a.cc:48:18: error: expected ';' before ':' token
a.cc:48:18: error: expected primary-expression before ':' token
a.cc:48:18: error: expected ')' before ':' token
a.cc:48:10: note: to match this '('
   48 |       for(edge e.: g[v])edges.push_back(e);
      |          ^
a.cc:48:18: error: expected primary-expression before ':' token
   48 |       for(edge e.: g[v])edges.push_back(e);
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back
struct EDGE
{
    int to, cost;
    bool operator < (const EDGE& t) const {
        return cost > t.cost;
    }
};
vector<EDGE> v[100]; 
bool f[100];
int search()
{
    int res = 0;
    prioritiy_queue<EDGE> que;
    que.push({0, 0});
    while (!que.empty()){
        EDGE e = que.top(); que.pop();
        if (f[e.to]) continue;
        f[e.to] = true;
        res += e.cost;
        rep(i, v[e.to].size()){
            if (!f[v[e.to][i].to]){
                que.push(v[e.to][i]);
            }
        }
    }
    return res;
}

int main()
{
    int n, m;
    while (scanf("%d", &n), n){
        scanf("%d", &m);
        rep(i,m){
            int a, b, c;
            scanf("%d%d%d",&a,&b,&c);
            a--; b--;
            c = c / 100 - 1;
            v[a].pb({b, c});
            v[b].pb({a, c});
        }
        printf("%d", search());
        memset(f, false, sizeof(f));
        rep(i, n) v[i].clear();
    }
    return 0;
}

Compiler output:
a.cc: In function 'int search()':
a.cc:17:5: error: 'prioritiy_queue' was not declared in this scope
   17 |     prioritiy_queue<EDGE> que;
      |     ^~~~~~~~~~~~~~~
a.cc:17:25: error: expected primary-expression before '>' token
   17 |     prioritiy_queue<EDGE> que;
      |                         ^
a.cc:17:27: error: 'que' was not declared in this scope
   17 |     prioritiy_queue<EDGE> que;
      |                           ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
struct Edge{ int from, to, cost; };

bool comp(const Edge& e1, const Edge& e2){
	return e1.cost < e2.cost;
}

const int N = 1 << 30;
vector<Edge> e;

int par[N];
int rank_[N];

int find(int x)
{
	if(x == par[x])
		return x;
	else
		return par[x] = find(par[x]);
}

void unite(int x, int y)
{
	x = find(x);
	y = find(y);
	if(x == y)
		return;
	
	if(rank_[x] < rank_[y])
		par[x] = y;
	else {
		par[y] = x;
		if(rank_[x] == rank_[y])
			rank_[x]++;
	}
}

bool same(int x, int y)
{
	return find(x) == find(y);
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	while(1){
		int n, m;
		cin >> n;
		if(n == 0)
			break;
		cin >> m;
		
		int a1, a2, a3;
		char b1, b2;
		for(int i = 0; i != m; ++i){
			cin >> a1 >> b1 >> a2 >> b2 >> a3;
			e.push_back(Edge{a1, a2, a3 / 100});
		}
		
		for(int i = 0; i != n; ++i){
			par[i] = i;
			rank_[i] = 0;
		}
		
		sort(e.begin(), e.end(), comp);
		
		int ans = 0;
		for(int i = 0; i != n; ++i){
			if(!same(e[i].from, e[i].to)){
				unite(e[i].from, e[i].to);
				ans += e[i].cost;
			}
		}
		
		cout << ans - n + 1 << endl;
	}
	
	return 0;
}

Compiler output:
/tmp/cciZKGCn.o: in function `unite(int, int)':
a.cc:(.text+0xe0): relocation truncated to fit: R_X86_64_PC32 against symbol `rank_' defined in .bss section in /tmp/cciZKGCn.o
a.cc:(.text+0xf7): relocation truncated to fit: R_X86_64_PC32 against symbol `rank_' defined in .bss section in /tmp/cciZKGCn.o
a.cc:(.text+0x14b): relocation truncated to fit: R_X86_64_PC32 against symbol `rank_' defined in .bss section in /tmp/cciZKGCn.o
a.cc:(.text+0x162): relocation truncated to fit: R_X86_64_PC32 against symbol `rank_' defined in .bss section in /tmp/cciZKGCn.o
a.cc:(.text+0x17d): relocation truncated to fit: R_X86_64_PC32 against symbol `rank_' defined in .bss section in /tmp/cciZKGCn.o
a.cc:(.text+0x197): relocation truncated to fit: R_X86_64_PC32 against symbol `rank_' defined in .bss section in /tmp/cciZKGCn.o
/tmp/cciZKGCn.o: in function `main':
a.cc:(.text+0x324): relocation truncated to fit: R_X86_64_PC32 against symbol `rank_' defined in .bss section in /tmp/cciZKGCn.o
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<cstdio>
#include<queue>
#include<vector>
using namespace std;

typedef pair<int, int> P;

int N, M;
vector<P> g[100];
bool done[100];
int main()
{
  while(true)
  {
    fill(done, done + 100, 0);
    for(int i = 0; i < 100; i++)
      g[i].reset();
    
    cin >> N;
    if(!N)
      break;
    cin >> M;

    for(int i = 0; i < M; i++)
    {
      int a, b, c;
      scanf("%d,%d,%d", &a, &b, &c);
      printf("%d %d %d \n", a, b, c);
      c = c / 100 - 1;
      g[a].push_back(make_pair(c, b));
      g[b].push_back(make_pair(c, a));
    }

    priority_queue<P, vector<P>, greater<P>> q;
    q.push(make_pair(0, 0));
    int cost = 0;
    while(q.size())
    {
      auto p = q.top(); q.pop();
      if(done[p.second])
        continue;
      done[p.second] = true;
      cost += p.first;
      for(auto e: g[p.second])
      {
        if(done[e.second])
          continue;
        q.push(e);
      }
    }
    cout << cost << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'class std::vector<std::pair<int, int> >' has no member named 'reset'
   18 |       g[i].reset();
      |            ^~~~~
Language: C++

#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
long long prim(int V, vector<pair<long long, long long>> X[]) {
	for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
	dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
	while (!Q.empty()) {
		pair<long long, long long>pa = Q.top(); Q.pop();
		long long a1 = pa.first, a2 = pa.second; color[a2] = BLACK;
		for (int i = 0; i < X[a2].size(); i++) {
			long long to = X[a2][i].first, leng = X[a2][i].second;
			if (dist[to] > leng && color[to] < BLACK) {
				dist[to] = leng; Q.push(make_pair(dist[to], to));
			}
		}
	}
	long long sum = 0; for (int i = 0; i < V; i++) { sum += dist[i]; }//0-indexed
	return sum;
}
int n, m, u, v, w; vector<pair<long long, long long> > g[100];
int main() {
	while(cin >> n >> m) {
		for(int i = 0; i < n; i++) g[i].clear();
		for(int i = 0; i < m; i++) {
			scanf("%d,%d,%d", u, v, w);
			g[u].push_back(make_pair(v, w / 100 - 1));
			g[v].push_back(make_pair(u, w / 100 - 1));
		}
		cout << prim(n, g) << endl;
	}
}

Compiler output:
a.cc: In function 'long long int prim(int, std::vector<std::pair<long long int, long long int> >*)':
a.cc:7:39: error: 'dist' was not declared in this scope
    7 |         for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
      |                                       ^~~~
a.cc:7:49: error: 'INF' was not declared in this scope
    7 |         for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
      |                                                 ^~~
a.cc:7:54: error: 'color' was not declared in this scope; did you mean 'tolower'?
    7 |         for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
      |                                                      ^~~~~
      |                                                      tolower
a.cc:7:65: error: 'WHITE' was not declared in this scope
    7 |         for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
      |                                                                 ^~~~~
a.cc:8:9: error: 'dist' was not declared in this scope
    8 |         dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
      |         ^~~~
a.cc:8:22: error: 'color' was not declared in this scope; did you mean 'tolower'?
    8 |         dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
      |                      ^~~~~
      |                      tolower
a.cc:8:33: error: 'GRAY' was not declared in this scope
    8 |         dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
      |                                 ^~~~
a.cc:8:39: error: 'Q' was not declared in this scope
    8 |         dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
      |                                       ^
a.cc:11:70: error: 'BLACK' was not declared in this scope
   11 |                 long long a1 = pa.first, a2 = pa.second; color[a2] = BLACK;
      |                                                                      ^~~~~
Language: C++

#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
#define WHITE 0
#define GRAY 1
#define BLACK 2
#define INF 1000000000000000000LL
using namespace std;
long long prim(int V, vector<pair<long long, long long>> X[]) {
	for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
	dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
	while (!Q.empty()) {
		pair<long long, long long>pa = Q.top(); Q.pop();
		long long a1 = pa.first, a2 = pa.second; color[a2] = BLACK;
		for (int i = 0; i < X[a2].size(); i++) {
			long long to = X[a2][i].first, leng = X[a2][i].second;
			if (dist[to] > leng && color[to] < BLACK) {
				dist[to] = leng; Q.push(make_pair(dist[to], to));
			}
		}
	}
	long long sum = 0; for (int i = 0; i < V; i++) { sum += dist[i]; }//0-indexed
	return sum;
}
int n, m, u, v, w; vector<pair<long long, long long> > g[100];
int main() {
	while(cin >> n >> m) {
		for(int i = 0; i < n; i++) g[i].clear();
		for(int i = 0; i < m; i++) {
			scanf("%d,%d,%d", u, v, w);
			g[u].push_back(make_pair(v, w / 100 - 1));
			g[v].push_back(make_pair(u, w / 100 - 1));
		}
		cout << prim(n, g) << endl;
	}
}

Compiler output:
a.cc: In function 'long long int prim(int, std::vector<std::pair<long long int, long long int> >*)':
a.cc:11:39: error: 'dist' was not declared in this scope
   11 |         for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
      |                                       ^~~~
a.cc:11:54: error: 'color' was not declared in this scope; did you mean 'tolower'?
   11 |         for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
      |                                                      ^~~~~
      |                                                      tolower
a.cc:12:9: error: 'dist' was not declared in this scope
   12 |         dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
      |         ^~~~
a.cc:12:22: error: 'color' was not declared in this scope; did you mean 'tolower'?
   12 |         dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
      |                      ^~~~~
      |                      tolower
a.cc:12:39: error: 'Q' was not declared in this scope
   12 |         dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
      |                                       ^
Language: C++

#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
#define WHITE 0
#define GRAY 1
#define BLACK 2
#define INF 1000000000000000000LL
using namespace std;
long long prim(int V, vector<pair<long long, long long>> X[]) {
	queue<pair<long long, long long> > Q; long long dist[100], color[100];
	for (int i = 0; i < V; i++) { dist[i] = INF; color[i] = WHITE; }
	dist[0] = 0; color[0] = GRAY; Q.push(make_pair(0, 0));
	while (!Q.empty()) {
		pair<long long, long long>pa = Q.top(); Q.pop();
		long long a1 = pa.first, a2 = pa.second; color[a2] = BLACK;
		for (int i = 0; i < X[a2].size(); i++) {
			long long to = X[a2][i].first, leng = X[a2][i].second;
			if (dist[to] > leng && color[to] < BLACK) {
				dist[to] = leng; Q.push(make_pair(dist[to], to));
			}
		}
	}
	long long sum = 0; for (int i = 0; i < V; i++) { sum += dist[i]; }//0-indexed
	return sum;
}
int n, m, u, v, w; vector<pair<long long, long long> > g[100];
int main() {
	while(cin >> n >> m) {
		for(int i = 0; i < n; i++) g[i].clear();
		for(int i = 0; i < m; i++) {
			scanf("%d,%d,%d", u, v, w);
			g[u].push_back(make_pair(v, w / 100 - 1));
			g[v].push_back(make_pair(u, w / 100 - 1));
		}
		cout << prim(n, g) << endl;
	}
}

Compiler output:
a.cc: In function 'long long int prim(int, std::vector<std::pair<long long int, long long int> >*)':
a.cc:15:50: error: 'class std::queue<std::pair<long long int, long long int> >' has no member named 'top'; did you mean 'pop'?
   15 |                 pair<long long, long long>pa = Q.top(); Q.pop();
      |                                                  ^~~
      |                                                  pop
Language: C++

#include <iostream>
#include <array>
#include <algorithm>
#include <cstdlib>

using namespace std;

constexpr int MAX_N = 100;
constexpr int MAX_M = MAX_N * MAX_N;
int par[MAX_N];
int myrank[MAX_N];
int n, m;


struct edge {
    int a, b, d;

    bool operator<(const edge &r) {
      return d < r.d;
    }
};

array<edge, MAX_M> e;


// Union Find Tree?????????????????????
//????????¶?????§??????????????????????????§???
//?????¨??????????´???????????????????
void init() {
  for (int i = 0; i < MAX_N; i++) {
    par[i] = i;
    myrank[i] = 0;
  }
}

// x?????????????´?????±??????????????????£??¨????????????
int find(int x) {
  if (par[x] == x) {
    return x;
  } else {
    return par[x] = find(par[x]);
  }
}

// x,y????±?????????????????????¨??????
bool unite(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y)
    return false;

  if (myrank[x] < myrank[y]) {
    par[x] = y;
  } else {
    par[y] = x;
    if (myrank[x] == myrank[y]) myrank[x]++;
  }

  return true;
}

int main() {
  int count, t;

  while (cin >> n, n) {
    cin >> m;
    init();

    t = 0;
    for (int i = 0; i < m; i++)
      scanf("%d,%d,%d", &(e[i].a), &(e[i].b), &(e[i].d));

    sort(e.begin(), e.begin() + m);?\
    for (int i = 0; i < m; ++i) {
      if (unite(e[i].a, e[i].b))
        t += e[i].d - 100 ;
    }
    cout << t / 100 << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:36: error: expected primary-expression before '?' token
   73 |     sort(e.begin(), e.begin() + m);?\
   74 |     for (int i = 0; i < m; ++i) {
a.cc:74:5: error: expected primary-expression before 'for'
   74 |     for (int i = 0; i < m; ++i) {
      |     ^~~
a.cc:74:1: error: expected ':' before 'for'
   74 |     for (int i = 0; i < m; ++i) {
      | ^   ~~~
      | :
a.cc:74:5: error: expected primary-expression before 'for'
   74 |     for (int i = 0; i < m; ++i) {
      |     ^~~
a.cc:74:21: error: 'i' was not declared in this scope
   74 |     for (int i = 0; i < m; ++i) {
      |                     ^
Language: C++

#include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<functional>
using namespace std;
struct P {
	int from, to, cost;
};
int parent[10000];
int root(int x) {
	if (parent[x] == x) return x;
	return parent[x] = root(parent[x]);
}
void unite(int x, int y) {
	x = parent[x];
	y = parent[y];
	parent[x] = y;
}
bool same(int x, int y) {
	return root(x) == root(y);
}
bool operator<(P a, P b) {
	return a.cost < b.cost;
}
bool operator>(P a, P b) {
	return a.cost > b.cost;
}
int main() {
	int n, m;
	while (cin >> n&&n != 0) {
		cin >> m;
		priority_queue<P, vector<P>, greater<P>>p;
		int a, b, c;
		for (int i = 0; i < m; i++) {
			scanf_s("%d,%d,%d", &a, &b, &c);
			p.push(P{ a,b,c });
		}
		for (int i = 0; i < n; i++) parent[i] = i;
		int d = 0,sum=0;
		while (d != n - 1) {
			P t = p.top(); p.pop();
			if (!same(t.from, t.to)) {
				unite(t.from, t.to);
				d++;
				sum += t.cost;
			}
		}
		sum /= 100;
		sum = sum - n + 1;
		cout << sum << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   37 |                         scanf_s("%d,%d,%d", &a, &b, &c);
      |                         ^~~~~~~
      |                         scanf
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
#include<iterator>

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, char> plc;

int par[110], rk[110];
void init(int n) {
	for (int i = 1; i <= n; i++) {
		par[i] = i;
		rk[i] = 0;
	}
}

int find(int x) {
	if (par[x] == x)return x;
	else
		return par[x] = find(par[x]);
}

void unite(int x, int y) {
	x = find(x);
	y = find(y);
	if (x == y)return;

	if (rk[x] < rk[y])
		par[x] = y;
	else {
		par[y] = x;
		if (rk[x] == rk[y])rk[x]++;
	}
}

bool same(int x, int y) {
	return find(x) == find(y);
}

struct edge {
	int u, v, cost;
};

bool comp(const edge& e1, const edge& e2) {
	return e1.cost < e2.cost;
}


edge es[110];
int n, m;

int kruskal() {
	sort(es, es + m, comp);
	init(n);
	ll res = 0;
	for (int i = 0; i < m; i++) {
		edge e = es[i];
		if (!same(e.u, e.v)) {
			unite(e.u, e.v);
			res += (e.cost) / 100 - 1;
		}
	}
	return res;
}

int main()
{
	while (cin >> n, n) {
		cin >> m;
		for (int i = 0; i < m; i++) {
			int a, b, d;
			scanf_s("%d,%d,%d", &a, &b, &d);
			es[i].u = a, es[i].v = b, es[i].cost = d;
		}
		cout << kruskal() << endl;
	}
	return	0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:88:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   88 |                         scanf_s("%d,%d,%d", &a, &b, &d);
      |                         ^~~~~~~
      |                         scanf
Language: C++

using namespace std;
#define rep(i, n) for ( int i = 0; i < n; i++)
#define MAX 100
#define INFTY (1<<21)
int G[MAX][MAX], n;

void prim(){
    int D[MAX], V[MAX], P[MAX], sum = 0;
    rep(i, n) { D[i] = INFTY; V[i] = 0; }
    D[0] = 0;

    while(1){
	int u, minv = INFTY;
	rep(i, n) if ( !V[i] && minv > D[i]) { 
	    minv = D[i], u = i; 
	}
	if ( minv == INFTY ) break;
	V[u] = 1;
	if ( u ) sum += G[u][P[u]];
	rep(v, n){
	    if ( !V[v] && G[u][v] < D[v] ){
		D[v] = G[u][v];
		P[v] = u;
	    }
	}
    }

    cout << sum<< endl;
}

main(){
    int m, s, t, c;
    char ch;
    while( cin >> n >> m && n ){
	rep(i, n) rep(j, n) G[i][j] = INFTY;
	rep(i, m) {
	    cin >> s >> ch >> t >> ch >> c; 
	    G[s][t] = G[t][s] = c/100-1;
	}
	prim();
    }
}

Compiler output:
a.cc: In function 'void prim()':
a.cc:28:5: error: 'cout' was not declared in this scope
   28 |     cout << sum<< endl;
      |     ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:28:19: error: 'endl' was not declared in this scope
   28 |     cout << sum<< endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc: At global scope:
a.cc:31:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   31 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:34:12: error: 'cin' was not declared in this scope
   34 |     while( cin >> n >> m && n ){
      |            ^~~
a.cc:34:12: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'