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

#include <iostream>
int main()
{
    int a,b,c;
    cin >> a >> b >> c;
    if(a!=b)
    {
        if(b!=c)
        {
            cout << b << endl;
        }
        else
        {
            cout << a << endl;
        }
    }
    else
    {
        cout << c << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> a >> b >> c;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |             cout << b << endl;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |             cout << b << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:14:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |             cout << a << endl;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |             cout << a << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |         cout << c << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |         cout << c << endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

A,B,C = list(map(int, input().split()))

if A == B:
    print(C)
elif B == C:
    print(A)
else:
    print(B)


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A,B,C = list(map(int, input().split()))
      | ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (a != b && a != c)


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected statement at end of input
    7 | if (a != b && a != c)
      |                      ^
a.cc:7:22: error: expected '}' at end of input
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

import java.util.*;
public class OneOutThree {

	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		
		int temp = a ^ b;
		temp = temp ^ c;
		System.out.println(temp);
		sc.close();

	}

}


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

using System;
class Program
{
  static void Main(string[] args)
  {
    // スペース区切りの整数の入力
    string[] input = Console.ReadLine().Split(' ');
    int a = int.Parse(input[0]);
    int b = int.Parse(input[1]);
    int c = int.Parse(input[2]);
    //出力
    int d=0;
    if (a==b){
      d=c;
    }else if (a==c){
      d=b;
    }else{
      d=a;
    }
    Console.WriteLine(d);
  }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:4:20: error: 'string' has not been declared
    4 |   static void Main(string[] args)
      |                    ^~~~~~
a.cc:4:29: error: expected ',' or '...' before 'args'
    4 |   static void Main(string[] args)
      |                             ^~~~
a.cc:22:2: error: expected ';' after class definition
   22 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:7:5: error: 'string' was not declared in this scope
    7 |     string[] input = Console.ReadLine().Split(' ');
      |     ^~~~~~
a.cc:7:12: error: expected primary-expression before ']' token
    7 |     string[] input = Console.ReadLine().Split(' ');
      |            ^
a.cc:8:13: error: expected primary-expression before 'int'
    8 |     int a = int.Parse(input[0]);
      |             ^~~
a.cc:9:13: error: expected primary-expression before 'int'
    9 |     int b = int.Parse(input[1]);
      |             ^~~
a.cc:10:13: error: expected primary-expression before 'int'
   10 |     int c = int.Parse(input[2]);
      |             ^~~
a.cc:20:5: error: 'Console' was not declared in this scope
   20 |     Console.WriteLine(d);
      |     ^~~~~~~
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if(a == c){
			System.out.println(b);
		}else if(b == c){
			System.out.println(a);
		}else if(b == c){
			System.out.println(c);
		}else{
			System.out.println("error!");
		}
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C

#include <stdio.h>

int main()
{
	int A = 0, B = 0, C = 0;
	scanf_s("%d %d %d", &A, &B, &C);
	if (A == B) {
		printf("%d", C);
	}
	else if (B == C) {
		printf("%d", A);
	}
	else if(A == C)
	{
		printf("%d", B);
	}
}

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



#include "stdafx.h"
#include "cstdio"
#include "iostream"
using namespace std;

#define REP(i,m,n)  for(int i = m; i < n ; i++)



int main()
{


    int a, b, c;
    int ans = 0;

    cin >> a >> b >> c;



    if (a == b)
        ans = c;
    else if (b == c)
        ans = a;
    else
        ans = b;


    cout << ans << endl;


    return 0;
}



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

#include<stdio.h>
int main(){
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(a==b){
		printf("%d\n",c);
	}else if(a==c){
		printf("%d\n",b);
	}else{
		printf("%d\n",a);
	}
	return 0;
}#include<stdio.h>
int main(){
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	if(a==b){
		printf("%d\n",c);
	}else if(a==c){
		printf("%d\n",b);
	}else{
		printf("%d\n",a);
	}
	return 0;
}

Compiler output:
a.cc:13:2: error: stray '#' in program
   13 | }#include<stdio.h>
      |  ^
a.cc:13:3: error: 'include' does not name a type
   13 | }#include<stdio.h>
      |   ^~~~~~~
Language: C++

use std::io;

fn main() {
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    let vs: Vec<i32> = s.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
    let a = vs[0];
    let b = vs[1];
    let c = vs[2];

    println!("{}", if a == b {c} else if b == c {a} else {b});
}


Compiler output:
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io;
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn main() {
      | ^~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int[] a = sc.nextInt();
    for(int i = 0; i < 3; i++) {
      a[i] = sc.nextInt();
    }
    int f = a[0];
    int ans = 0;
    int c = 0;
    for(int i = 0; i < 3; i++) {
      if(a[i] != f) {
        c++;
        ans = a[i];
      }
    }
    if(c == 2) ans = f;
    System.out.println(ans);
  }
}

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to int[]
    int[] a = sc.nextInt();
                        ^
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
#include <unordered_map> 
#include <map> 
#include <numeric>
#include <limits>
#include <utility>
#include <queue>
#include <random>
#include <atltime.h>
using namespace std;
typedef long long LL;

int main(void) {

	vector<int> a(3);
	cin >> a[0] >> a[1] >> a[2];

	sort(a.begin(), a.end());

	if (a[0] != a[1]) {
		cout << a[0] << endl;
	} else {
		cout << a[2] << endl;
	}



	return 0;
}

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

#include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
typedef long long int ll;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define EREP(i, n) for (int i = (n - 1); i >= 0; --i)
#define D(n, retu)                                                             \
  REP(i, n) { cin >> retu[i]; }
#define mod 1000000007
#define INF 93193111451418101
#define MIN -93193111451418101
//#define INF 931931114518101
using namespace std;
typedef pair<ll, ll> P;
template <typename T> void fill_all(T &arr, const T &v) { arr = v; }
template <typename T, typename ARR> void fill_all(ARR &arr, const T &v) {
  for (auto &i : arr) {
    fill_all(i, v);
  }
}
#define yo 100001
//------------------変数-----------------------//
ll a, b, c, n;
map<ll, ll> r;
//-------------------関数----------------------//

int main() {
  cin >> a >> b >> c;
  r[a]++;
  r[b]++;
  r[c]++;
  if (r[a] == 1) {
    cout << a << endl;
  }
  if (r[b] == 1) {
    cout << b << endl;
  } else {
    cout << c << endl;
  }
  return 0;
}


Compiler output:
a.cc:33:1: error: 'map' does not name a type
   33 | map<ll, ll> r;
      | ^~~
a.cc: In function 'int main()':
a.cc:38:3: error: 'r' was not declared in this scope
   38 |   r[a]++;
      |   ^
Language: C++

#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{
	int A, B, C;

	cin >> A >> B >> C;


	if (A == B) {
		cout << C << endl;
	}
	else if(B == C) {
		cout << A << endl;
	}
	else {
		cout << B << endl;
	}

    return 0;
}



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

A,B,C = map(int, input().split())

if A==B:
    print(C)
elif A==C:
    print(B)
elif B==C:
    print(A)
    


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A,B,C = map(int, input().split())
      | ^
Language: C++

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

#define MOD 1000000007
#define ll long long int
#define vi vector<int>
#define vii vector< vector<int> >
#define PI 3.1415926535897932384626433832795
#define INF 9223372036854775807LL


int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	int h,w;
	cin >> h >> w;
	bool table[100][100];
	memset(table,false,sizeof(table));
	for(int i = 1; i <= h; i++) {
		for(int j = 1; j <= w; j++) {
			char ch;
			cin >> ch;
			table = (ch == '#');
		}
	}
	for(int i = 1; i <= h; i++) {
		for(int j = 1; j <= w; j++) {
			if(table[i][j]) {
				cout << "#";
			} else {
				int sum = 0;
				sum+= table[i-1][j-1];
				sum+= table[i-1][j];
				sum+= table[i-1][j+1];
				sum+= table[i][j-1];
				sum+= table[i][j+1];
				sum+= table[i+1][j-1];
				sum+= table[i+1][j];
				sum+= table[i+1][j+1];
				cout << sum;
			}
 		}
		cout << "\n";
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:31: error: incompatible types in assignment of 'bool' to 'bool [100][100]'
   23 |                         table = (ch == '#');
      |                         ~~~~~~^~~~~~~~~~~~~
Language: C++

import std.stdio;

void main(){
	int a, b, c;
	readf!"%d %d %d"(a,b,c);
	
	if(a == b) writeln(c);
	else if(a == c) writeln(b);
	else writeln(a);
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'readf' was not declared in this scope
    5 |         readf!"%d %d %d"(a,b,c);
      |         ^~~~~
a.cc:7:20: error: 'writeln' was not declared in this scope
    7 |         if(a == b) writeln(c);
      |                    ^~~~~~~
a.cc:8:25: error: 'writeln' was not declared in this scope
    8 |         else if(a == c) writeln(b);
      |                         ^~~~~~~
a.cc:9:14: error: 'writeln' was not declared in this scope
    9 |         else writeln(a);
      |              ^~~~~~~
Language: C++

#include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
typedef long long int ll;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define EREP(i, n) for (int i = (n - 1); i >= 0; --i)
#define D(n, retu)                                                             \
  REP(i, n) { cin >> retu[i]; }
#define mod 1000000007
#define INF 93193111451418101
#define MIN -93193111451418101
//#define INF 931931114518101
using namespace std;
typedef pair<ll, ll> P;
template <typename T> void fill_all(T &arr, const T &v) { arr = v; }
template <typename T, typename ARR> void fill_all(ARR &arr, const T &v) {
  for (auto &i : arr) {
    fill_all(i, v);
  }
}
#define yo 100001
//------------------変数-----------------------//
ll a, b, c, n, r[114514];
//-------------------関数----------------------//

int main() {
  cin >> a >> b >> c;
  r[a]++;
  r[b]++;
  r[c]++;
  if (r[a] == 1) {
    cout << a << endl;
  }
  if (r[b] == 1) {
    cout << b << endl;
  }
  se { cout << c << endl; }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:3: error: 'se' was not declared in this scope
   46 |   se { cout << c << endl; }
      |   ^~
Language: C++

#include <iostream>

using namespace std;

int main()
{
	cin >> a,b,c;
	
	if (a == b)
	{
		cout << c << endl;
	}
	else if (b == c)
	{
		cout << a;
	}
	else
	{
		cout << b << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'a' was not declared in this scope
    7 |         cin >> a,b,c;
      |                ^
a.cc:7:18: error: 'b' was not declared in this scope
    7 |         cin >> a,b,c;
      |                  ^
a.cc:7:20: error: 'c' was not declared in this scope
    7 |         cin >> a,b,c;
      |                    ^
Language: C++

// ConsoleApplication2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{
	int A, B, C;

	cin >> A >> B >> C;


	if (A == B) {
		cout << C << endl;
	}
	else if(B == C) {
		cout << A << endl;
	}
	else {
		cout << B << endl;
	}

    return 0;
}



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

#include <iostream>
#include <iomanip>
#include <map>
#include <vector>
#include <cmath>
#include <string> // これがないとstringの出力がエラー
#include <sstream>
#include <algorithm>
#include <bitset>
#include <list>
#include <set>
using namespace std;

typedef long long ll;

void flip(string& str, int n) {
	str[n] = '0';
	str[n + 1] = '1';
	str[n + 2] = '0';
}

map<string,ll> dp;
ll dfs(string str, ll cnt)
{
	if (dp.count(str) != 0) {
		return dp[str];
	}
	//cerr << str << " " << cnt << endl;
	ll maximum = 0;
	for (int i = 0; i < str.size() - 2; ++i) {
		if (i + 2 >= str.size()) continue;
		if (str[i] == '1' && str[i + 1] == '0' && str[i + 2] == '1') {
			string next = str;
			flip(next, i);
			maximum = max(maximum, dfs(next, cnt + 1));
		}
	}
	ll ret = max(cnt, maximum);
	dp[str] = ret;
	return ret;
}

void pA()
{
	int A, B, C; cin >> A >> B >> C;
    if (A == B)
      cout << C << endl;
    else (B == C)
      cout << A << endl;
    else
      cout << B << endl;
}

void pB()
{
	int A, B, C, D;
	cin >> A >> B >> C >> D;
	cout << A * 1728 + B * 144 + C * 12 + D << endl;
}

unsigned bit_count(unsigned n)
{
	unsigned i = 0;

	while (n) {
		i += n & 1;
		n >>= 1;
	}

	return i;
}

int N, M;
set<int> path[100004];

ll addPath()
{
	ll cnt = 0;
	for (int n0 = 1; n0 <= N; ++n0) {
		for (auto n1 : path[n0]) {
			if (n0 == n1) continue;
			for (auto n2 : path[n1]) {
				if (n1 == n2) continue;
				if (n0 == n2) continue;
				for (auto n3 : path[n2]) {
					if (n2 == n3) continue;
					if (n1 == n3) continue;
					if (n0 == n3) continue;
					if (path[n0].find(n3) == path[n0].end()) {
						cnt++;
						path[n0].insert(n3);
						path[n3].insert(n0);
					}
				}
			}
		}
	}
	return cnt;
}

void pC()
{
	cin >> N >> M;
	for (int m = 0; m < M; ++m) {
		int a, b; cin >> a >> b;
		path[a].insert(b);
		path[b].insert(a);
	}

	cout << addPath() << endl;
}

int main()
{
	pA();

	return 0;
}

Compiler output:
a.cc: In function 'void pA()':
a.cc:48:18: error: expected ';' before 'cout'
   48 |     else (B == C)
      |                  ^
      |                  ;
   49 |       cout << A << endl;
      |       ~~~~        
a.cc:50:5: error: 'else' without a previous 'if'
   50 |     else
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c
  if(a==b)cout<<c<<endl;
  else if(b==c)cout<<a<<endl;
  else if(c==a)cout<<b<<endl;
  return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected ';' before 'if'
    5 |   cin>>a>>b>>c
      |               ^
      |               ;
    6 |   if(a==b)cout<<c<<endl;
      |   ~~           
a.cc:7:3: error: 'else' without a previous 'if'
    7 |   else if(b==c)cout<<a<<endl;
      |   ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <map>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <queue>
#include <vector>
const int Max=0x7fffffff;
const int P=1000000007;
using namespace std;
int mmp(node x,node y)
{
    if(x.e==y.e) return x.w<y.w;
    return x.e<=y.e;
}
int main()
{
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    if(a==b)cout<<c<<endl;
    if(a==c)cout<<b<<endl;
    if(b==c)cout<<a<<endl;
    return 0;
}

Compiler output:
a.cc:12:9: error: 'node' was not declared in this scope
   12 | int mmp(node x,node y)
      |         ^~~~
a.cc:12:16: error: 'node' was not declared in this scope
   12 | int mmp(node x,node y)
      |                ^~~~
a.cc:12:22: error: expression list treated as compound expression in initializer [-fpermissive]
   12 | int mmp(node x,node y)
      |                      ^
Language: C++

#include "bits/stdc++.h"
#include <sys/timeb.h>
#include <fstream>

using namespace std;

#define repr(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repr(i,0,n)
#define reprrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define reprev(i,n) reprrev(i,0,n)
#define repi(itr,ds) for(auto itr=ds.begin();itr!=ds.end();itr++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define mp make_pair
#define mt make_tuple
#define INF 1050000000
#define INFL 1100000000000000000LL
#define EPS (1e-10)
#define MOD 1000000007
#define PI 3.1415926536
#define RMAX 4294967295

typedef long long ll;
typedef pair<int, int> Pi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<Pi> vPi;
typedef vector<vector<int> > vvi;
typedef vector<vector<bool> > vvb;
typedef vector<vector<ll> > vvll;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<double> > vvd;
typedef vector<vector<Pi> > vvPi;
typedef priority_queue<int, vector<int>, greater<int> > pqli;
typedef priority_queue<ll, vector<ll>, greater<ll> > pqlll;
typedef priority_queue<Pi, vector<Pi>, greater<Pi> > pqlP;
struct Edge {
	int from, to, cost;
	bool operator<(Edge e) {
		return cost < e.cost;
	}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;
template <class T>
using vec = vector<T>;
template<class T>
using pql = priority_queue<T, vector<T>, greater<T>>;
string debug_show(Pi a) {
	return "(" + to_string(a.first) + "," + to_string(a.second) + ")";
}

template<class T>
struct augEdge {
	T from, to;
	int cost;
	bool operator<(augEdge e) { return cost < e.cost; }
	bool operator>(augEdge e) { return cost > e.cost; }
};
template<class T>
using augGraph = vector<augEdge<T>>;



int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);ac

	int a, b, c;
	cin >> a >> b >> c;
	if (a == b)cout << c << endl;
	else if (b == c)cout << a << endl;
	else cout << b << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:37: error: 'ac' was not declared in this scope; did you mean 'vc'?
   72 |         ios::sync_with_stdio(false);ac
      |                                     ^~
      |                                     vc
a.cc:75:16: error: 'a' was not declared in this scope
   75 |         cin >> a >> b >> c;
      |                ^
a.cc:75:21: error: 'b' was not declared in this scope; did you mean 'vb'?
   75 |         cin >> a >> b >> c;
      |                     ^
      |                     vb
a.cc:75:26: error: 'c' was not declared in this scope; did you mean 'vc'?
   75 |         cin >> a >> b >> c;
      |                          ^
      |                          vc
Language: C++

#include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
typedef long long int ll;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define EREP(i, n) for (int i = (n - 1); i >= 0; --i)
#define D(n, retu)                                                             \
  REP(i, n) { cin >> retu[i]; }
#define mod 1000000007
#define INF 93193111451418101
#define MIN -93193111451418101
//#define INF 931931114518101
using namespace std;
typedef pair<ll, ll> P;
template <typename T> void fill_all(T &arr, const T &v) { arr = v; }
template <typename T, typename ARR> void fill_all(ARR &arr, const T &v) {
  for (auto &i : arr) {
    fill_all(i, v);
  }
}
#define yo 100001
//------------------変数-----------------------//
ll a, b, c, n, r[114514];
//-------------------関数----------------------//

int main() {
  cin >> a >> b >> c;
  r[a]++;
  r[b]++;
  r[c]++;
  if (r[a] == 1) {
    cout << a << endl;
  }
  if (r[b] == 1) {
    cout << b << endl;
  }
  e;
  se { cout << c << endl; }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:3: error: 'e' was not declared in this scope
   46 |   e;
      |   ^
a.cc:47:3: error: 'se' was not declared in this scope
   47 |   se { cout << c << endl; }
      |   ^~
Language: C++

#include <cstdio>

int main() {
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  printf("%d\n". a^b^c);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: request for member 'a' in '"%d\012"', which is of non-class type 'const char [4]'
    6 |   printf("%d\n". a^b^c);
      |                  ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define RREP(i,a,b) for(int i=(a);i>=(b);i--)
typedef long long ll; typedef long double ld;
using namespace std;
const int INF=1e9, MOD=1e9+7;
int n,m,a,b,c,d;
string s,w;

int main(){
	cin >> a >> b >> c;
	
	if(a==b) cout << c;
	else if(b==c) cout << a;
	else cout << b
	
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: expected ';' before 'cout'
   15 |         else cout << b
      |                       ^
      |                       ;
   16 | 
   17 |         cout << endl;
      |         ~~~~
Language: C++

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

int main(){
  int h,w;
  cin >> h >> w;
  vector<string> str(h);
  for(int i=0;i<h;i++){
    cin >> str.at(i);
  }
  for(int i=0;i<h;i++){
    for(int j=0:j<w;j++){
      if(str.at(i).at(j)=='#'){continue;}
      int cnt=0;
      if(str.at(i-1).at(j-1)=='#'){cnt++;}
      if(str.at(i-1).at(j)=='#'){cnt++;}
      if(str.at(i-1).at(j+1)=='#'){cnt++;}
      if(str.at(i).at(j-1)=='#'){cnt++;}
      if(str.at(i).at(j+1)=='#'){cnt++;}
      if(str.at(i+1).at(j-1)=='#'){cnt++;}
      if(str.at(i+1).at(j)=='#'){cnt++;}
      if(str.at(i+1).at(j+1)=='#'){cnt++;}
	  str.at(i).at(j)=cnt;
    }
  }
  for(int i=0;i<h;i++){
    cout << str.at(i) <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: initializer in range-based 'for' loop
   12 |     for(int j=0:j<w;j++){
      |              ^
a.cc:12:20: error: expected ')' before ';' token
   12 |     for(int j=0:j<w;j++){
      |        ~           ^
      |                    )
a.cc:12:21: error: 'j' was not declared in this scope
   12 |     for(int j=0:j<w;j++){
      |                     ^
Language: C++

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

int main(void){
  int h, w;
  cin >> h >> w;
  string board[50];

  for(int i = 0; i < h; ++i){
    cin >> board[i];
    const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
    const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
    for (int i = 0; i < h; ++i) {
      for (int j = 0; j < w; ++j) {
        if (board[i][j] == ’#’){
          continue;
        }
        int num = 0;
        for (int d = 0; d < 8; ++ d) {
          const int ni = i + dy[d];
          const int nj = j + dx[d];
          if (ni < 0 or h <= ni){
            continue;
          }
          if (nj < 0 or w <= nj){
            continue;
          }
          if (board[ni][nj] == ’#’){
            num++;
          }
          board[i][j] = char(num + ’0’);
        }
      }
    }
  }
  for (int i = 0; i < h; ++i){
    cout << board[i] << endl;
  }
  return 0;
}

Compiler output:
a.cc:15:28: error: extended character ’ is not valid in an identifier
   15 |         if (board[i][j] == ’#’){
      |                            ^
a.cc:15:29: error: stray '#' in program
   15 |         if (board[i][j] == ’#’){
      |                             ^
a.cc:15:30: error: extended character ’ is not valid in an identifier
   15 |         if (board[i][j] == ’#’){
      |                              ^
a.cc:28:32: error: extended character ’ is not valid in an identifier
   28 |           if (board[ni][nj] == ’#’){
      |                                ^
a.cc:28:33: error: stray '#' in program
   28 |           if (board[ni][nj] == ’#’){
      |                                 ^
a.cc:28:34: error: extended character ’ is not valid in an identifier
   28 |           if (board[ni][nj] == ’#’){
      |                                  ^
a.cc:31:36: error: extended character ’ is not valid in an identifier
   31 |           board[i][j] = char(num + ’0’);
      |                                    ^
a.cc:31:36: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:15:28: error: '\U00002019' was not declared in this scope
   15 |         if (board[i][j] == ’#’){
      |                            ^
a.cc:15:29: error: expected ')' before '\U00002019'
   15 |         if (board[i][j] == ’#’){
      |            ~                ^~
      |                             )
a.cc:28:32: error: '\U00002019' was not declared in this scope
   28 |           if (board[ni][nj] == ’#’){
      |                                ^
a.cc:28:33: error: expected ')' before '\U00002019'
   28 |           if (board[ni][nj] == ’#’){
      |              ~                  ^~
      |                                 )
a.cc:31:36: error: '\U000020190\U00002019' was not declared in this scope
   31 |           board[i][j] = char(num + ’0’);
      |                                    ^~~
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> S(H); //H個の文字列
  for(int i = 0; i < H; i++){
    cin >> S[i];
  }

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

      if(S[i][j] == '.'){ //もし空きマスなら0にする
        S[i][j] == '0';

        for(int dx = -1; dx <= 1; dx++){ // 変数dxを-1,0,1で回す
          for(int dy = -1; dy <= 1; dy++){
            int nx = i + dx;  ny = j + dy;
            // i,j と足すことで周囲八方を確認するためのnx,nyを用意
            if(0 <= nx && nx < H && 0 <= ny && ny < W){
              if(S[nx][ny] == '#') S[i][j]++;
              //  もし爆弾マスなら元のマスをインクリメント
            }
          }
        }
      }
    }
  }
  for(int i = 0; i < H; i++){
    cout << S[i] << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: 'ny' was not declared in this scope; did you mean 'nx'?
   20 |             int nx = i + dx;  ny = j + dy;
      |                               ^~
      |                               nx
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;

#define vec              vector<int>
#define vecll            vector<ll>
#define vecd             vector<double>
#define vecst            vector<string>
#define vecb             vector<bool>
#define v2(v,n,m,init)   vector<vector<int>>  v(n, vector<int>(m, init))
#define vb2(v,n,m,init)  vector<vector<bool>> v(n, vector<bool>(m, init))
#define vll2(v,n,m,init) vector<vector<ll>>   v(n, vector<ll>(m, init))

#define rep(i,n)         for(ll i=(ll)0; i<(ll)n; i++)
#define REP(i,m,n)       for(ll i=(ll)m; i<(ll)n; i++)
#define arr(var, n)      vec var(n); rep(i,n){cin >> var[i];}
#define arrll(var, n)    vecll var(n); rep(i,n){cin >> var[i];}
#define arrst(var, n)    vecst var(n); rep(i,n){cin >> var[i];}
#define all(var)         (var).begin(), (var).end()
#define sortall(var)     sort(all(var))
#define uniqueall(v)     v.erase(unique(v.begin(), v.end()), v.end());
#define pb(var)          push_back(var)
#define prt(var)         cout << (var) << "\n"
#define prtd(n, var)     cout << fixed << setprecision(n) << (var) << "\n"
#define prtfill(n, var)  cout << setw(n) << setfill('0') << (var);
#define prt2(v1, v2)     cout << (v1) << " " << (v2) << "\n"
#define prt3(v1, v2, v3) cout << (v1) << " " << (v2) << " " << (v3) << "\n"
#define prtall(v)        rep(i,v.size()){cout<<v[i]<<(i!=v.size()-1?" ":"\n");}
template <typename T>
bool chmax(T &a, const T& b){if(a<b){a=b; return true;} return false;}
template <typename T>
bool chmin(T &a, const T& b){if(a>b){a=b; return true;} return false;}
//------------------------------------------------------------------
int

int main(void){
  int h, w;
  cin >> h >> w;
  arrst(s,h);

  vecst ans(h);
  rep(i,h){
    rep(j,w){
      if(s[i][j]=='#') {ans[i].push_back('#'); continue;}
      int tmp=0;
      if(i!=0){
        if(j!=0) tmp += s[i-1][j-1]=='#';
        tmp += s[i-1][j]=='#';
        if(j!=w-1) tmp += s[i-1][j+1]=='#';
      }
      if(j!=0) tmp += s[i][j-1]=='#';
      if(j!=w-1) tmp += s[i][j+1]=='#';
      if(i!=h-1){
        if(j!=0) tmp += s[i+1][j-1]=='#';
        tmp += s[i+1][j]=='#';
        if(j!=w-1) tmp += s[i+1][j+1]=='#';
      }
      char x = '0'+tmp;
      ans[i].push_back(x);
    }
  }

  rep(i,h){
    prt(ans[i]);
  }
}


Compiler output:
a.cc:35:1: error: two or more data types in declaration of 'main'
   35 | int
      | ^~~
Language: C++

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

int main(){
int n,w;
  cin >> n >> w;
string d[50];
  for(int i=0;i<n;i++) cin >> d[i];
  int dx[8]={1,0,-1,0,1,1,-1,-1};
  int dy[8]={0,-1,0,1,1,-1,-1,1};
for(int i=0;i<n;i++){
  for(int j=0;j<w;j++){
    int num=0;
    for(int k=0;k<8;k++){
    int x=j+dx[k];
    int y=i+dy[k];
    
    if(d[i][j]=='#')continue;
    if(x<0 | x>=w)continue;
    if(y<0 | y>=n)continue;
    if(d[x][y]=='#')num++      
    }
    d[i][j]=char(num+'0');
  }
}  
for(int i=0;i<n;i++){
  
    cout << d[i] << endl;
  
}  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: expected ';' before '}' token
   21 |     if(d[x][y]=='#')num++
      |                          ^
      |                          ;
   22 |     }
      |     ~
Language: C++

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


string g[55];
int main() {
  int n, m;
  cin>>n>>m;
  for (int i=0; i<n; i++) cin>>g[i];
  for (int i=0; i<n; i++) {
    for (int j=0; j<m; j++) {
      if (g[i][j]=='#') {
        cout<<"#"; continue;
      }
      int res=0;
      for (int dx=-1; dx<=1; dx++) {
        for (int dy=-1; dy<=1; dy++) {
          if (dx==0 && dy=0) continue;
          int x=dx+i; int y=dy+j;
          if (x>=0 && x<n && y>=0 && y<m) {
            res += (g[x][y]=='#');
          }
        }
      }
      cout<<res;
    }
    cout<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: lvalue required as left operand of assignment
   18 |           if (dx==0 && dy=0) continue;
      |               ~~~~~~^~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int x_offset[8] = {-1, 0, 1,-1, 1,-1, 0, 1};
const int y_offset[8] = {-1,-1,-1, 0, 0, 1, 1, 1};
int main()
{
  int H, W;
  vector <string> S(H);
  vector <string> ans(H);
  for (int i = 0; i < H; i++) {
    cin >> S[i];
    ans[i] = S[i];
  }
  
  vector <string> ans(H);
  for (int h = 0; h < H; h++) {
    for (int w = 0; w < W; w++) {
      if (ans[h][w]=='#') continue;
      int boms = 0;
      for (int i = 0; i < 8; i++) {
        int x = w + x_offset[i];
        int y = h + y_offset[i];
        if (x < 0) continue;
        if (y < 0) continue;
        if (x >= W) continue;
        if (y >= H) continue;
        if (S[y][x]=='#') boms++;
      }
      ans[h][w] = boms;
    }
  }
  for (int h = 0; h < H; h++) {
    cout << S[h] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: redeclaration of 'std::vector<std::__cxx11::basic_string<char> > ans'
   17 |   vector <string> ans(H);
      |                   ^~~
a.cc:11:19: note: 'std::vector<std::__cxx11::basic_string<char> > ans' previously declared here
   11 |   vector <string> ans(H);
      |                   ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int x_offset[8] = {-1, 0, 1,-1, 1,-1, 0, 1};
const int y_offset[8] = {-1,-1,-1, 0, 0, 1, 1, 1};
int main()
{
  int H, W;
  vector <string> S(H);
  vector <string> ans(H);
  for (int i = 0; i < H; i++) {
    cin >> S[i];
    abs[i] = S[i];
  }
  
  vector <string> ans(H);
  for (int h = 0; h < H; h++) {
    for (int w = 0; w < W; w++) {
      if (ans[h][w]=='#') continue;
      int boms = 0;
      for (int i = 0; i < 8; i++) {
        int x = w + x_offset;
        int y = h + y_offset;
        if (x < 0) continue;
        if (y < 0) continue;
        if (x >= W) continue;
        if (y >= H) continue;
        if (S[y][x]=='#') boms++;
      }
      ans[h][w] = boms;
    }
  }
  for (int h = 0; h < H; h++) {
    cout << S[h] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |     abs[i] = S[i];
      |        ^
a.cc:17:19: error: redeclaration of 'std::vector<std::__cxx11::basic_string<char> > ans'
   17 |   vector <string> ans(H);
      |                   ^~~
a.cc:11:19: note: 'std::vector<std::__cxx11::basic_string<char> > ans' previously declared here
   11 |   vector <string> ans(H);
      |                   ^~~
a.cc:23:19: error: invalid conversion from 'const int*' to 'int' [-fpermissive]
   23 |         int x = w + x_offset;
      |                 ~~^~~~~~~~~~
      |                   |
      |                   const int*
a.cc:24:19: error: invalid conversion from 'const int*' to 'int' [-fpermissive]
   24 |         int y = h + y_offset;
      |                 ~~^~~~~~~~~~
      |                   |
      |                   const int*
Language: C++

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

int main(){
  int H,W;cin>>H>>W;
  string S[H];
  for(int i=0;i<H;i++) cin>>S[i];
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:8:23: note: to match this '{'
    8 |   for(int i=0;i<H;i++){
      |                       ^
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

H, W = (int(x) for x in input().split())
S = [input() for _ in range(H)]
ans = [''] * H  
for i in range(H):
    for j in range(W):
        if S[i][j] == '#':
            ans[i] += '#'
            continue
        bom = 0
        for k in range(3):
            for l in range(3):
                if 0 <= i-1+k < H and 0 <= j-1+l < W:
                    if S[i-1+k][j-1+l] == '#':
                        bom += 1
        ans[i] += str(bom)
for s in ans:
    print(s)
                    


Compiler output:
a.cc:3:8: error: empty character constant
    3 | ans = [''] * H
      |        ^~
a.cc:1:1: error: 'H' does not name a type
    1 | H, W = (int(x) for x in input().split())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    string Sa,Sb,Sc,MANNAKA;
	int TATE, YOKO , LOOK;
    cin >> TATE >> YOKO >>Sa ;

    
    for (int tate = 0; tate  < TATE ; tate++){

     LOOK = 1;
    

       for (LOOK < YOKO ; LOOK++){
         int sum = 0;
  
  		if ( tate == 0){
   			    MANNAKA = ".";
    			Sa = "." + MANNAKA + ".";
    				}else{
    			cin >> Sc;
  
   				 if (LOOK==1){
  					  Sa = "."+Sa;
   					 }
   				 if (LOOK==YOKO){
  					  Sa = Sa+".";
   					 }else {
    
    
    
    char A,B,C,D,E,F,G,H,I,OUT;
    A = Sa.at(LOOK);
    B = Sa.at(LOOK+1);
    C = Sa.at(LOOK+2);
    D = Sb.at(LOOK);
    E = Sb.at(LOOK+1);
    F = Sb.at(LOOK+2);
    G = Sc.at(LOOK);
    H = Sc.at(LOOK+1);
    I = Sc.at(LOOK+2);
  
  
     if (E == '#'){
    OUT = '#';
    }else{
    if (A == '#'){
    sum++;
    }if (B == '#'){
    sum++;
    }if (C == '#'){
    sum++;
    }if (D == '#'){
    sum++;
    }if (F == '#'){
    sum++;
    }if (G == '#'){
    sum++;
    }if (H == '#'){
    sum++;
    }if (I == '#'){
    sum++;
    }
    if (sum == 0){
    OUT = '0';
    }else if (sum == 1){
    OUT = '1';
    }else if (sum == 2){
    OUT = '2';
    }else if (sum == 3){
    OUT = '3';
    }else if (sum == 4){
    OUT = '4';
    }else if (sum == 5){
    OUT = '5';
    }else if (sum == 6){
    OUT = '6';
    }else if (sum == 7){
    OUT = '7';
    }else if (sum == 8){
    OUT = '8';
    }

    cout << OUT;
       
     }
                   
     Sa = Sb;
     Sb = Sc;
                 }
                   
                 }
       }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: expected ';' before ')' token
   15 |        for (LOOK < YOKO ; LOOK++){
      |                                 ^
      |                                 ;
a.cc:94:9: error: expected '}' at end of input
   94 |        }
      |         ^
a.cc:10:46: note: to match this '{'
   10 |     for (int tate = 0; tate  < TATE ; tate++){
      |                                              ^
a.cc:94:9: error: expected '}' at end of input
   94 |        }
      |         ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  	string str ;
	int N  , A , LOOK = 0 ,TATE = 1, YOKO = 0 ;
  cin >> N >> A ;
  B = N ;
  
  for (int i = 0; i < TATE; i++) {
    cin >> str;
    if ( str.at (LOOK) == '#') {
      cout << "#" << endl;
     break;
    }
    else if  (LOOK == 0!){
      if (str.at(LOOK-1)=='#'{
        count++;}
          }
    else if ((LOOK+1) == (N-1)!){
	  if (str.at(LOOK+1))=='#'{
        count++;}
    }
          
  }
         int UE = 0,SITA = 0;
   while (UE == 1 && SITA == 1){
     if (TATE ==1){
        UE ++;
     }else {
 		TATE --;
       int ii = 0;
     
     
     
     if (TATE == (A-1){
     a ++
      else { 
        
        
     }
  	
   }
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'B' was not declared in this scope
    8 |   B = N ;
      |   ^
a.cc:16:24: error: expected ')' before '!' token
   16 |     else if  (LOOK == 0!){
      |              ~         ^
      |                        )
a.cc:17:30: error: expected ')' before '{' token
   17 |       if (str.at(LOOK-1)=='#'{
      |          ~                   ^
      |                              )
a.cc:19:11: error: expected primary-expression before '}' token
   19 |           }
      |           ^
a.cc:20:31: error: expected ')' before '!' token
   20 |     else if ((LOOK+1) == (N-1)!){
      |             ~                 ^
      |                               )
a.cc:21:30: error: expected primary-expression before '==' token
   21 |           if (str.at(LOOK+1))=='#'{
      |                              ^~
a.cc:36:23: error: expected ')' before '{' token
   36 |      if (TATE == (A-1){
      |         ~             ^
      |                       )
a.cc:45:1: error: expected primary-expression before '}' token
   45 | }
      | ^
a.cc:45:2: error: expected '}' at end of input
   45 | }
      |  ^
a.cc:27:32: note: to match this '{'
   27 |    while (UE == 1 && SITA == 1){
      |                                ^
a.cc:45:2: error: expected '}' at end of input
   45 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <vector>

void fitInFrame(int numOfRow, int numOfColumn, std::vector<std::string>& mineField);
int countMine(int row, int column,const std::vector<std::string>& mineField);

int main() {
    int numOfRow;
    int numOfColumn;
    std::cin >> numOfRow >> numOfColumn;
    
    std::vector<std::string> mineField;
    std::string row;
    for(int i =0; i < numOfRow; ++i) {
        std::cin >> row;
        mineField.push_back(row);
    }

    fitInFrame(numOfRow, numOfColumn, mineField);

    std::vector<std::string> convertedMineField(numOfRow);
    for(int i = 1; i <= numOfRow; ++i) {
        for(int j = 1; j <= numOfColumn; ++j) {
            if(mineField.at(i).at(j) == '.') {
                convertedMineField.at(i - 1).push_back(countMine(i, j, mineField));
            } else {
                convertedMineField.at(i - 1).push_back('#');
            }
        }
    }    
    for(std::string row : convertedMineField) {
        std::cout << row << std::endl;
    }    
}

void fitInFrame(int numOfRow, int numOfColumn, std::vector<std::string>& mineField) { 
    for(int i = 0; i < numOfRow; ++i) {
        mineField.at(i) = "." + mineField.at(i) + ".";
    }
    
    std::string frame;
    for(int i = 0; i < numOfColumn + 2; ++i) {
        frame += ".";
    }
        
    mineField.insert(mineField.begin(), frame);
    mineField.push_back(frame);
}

char countMine(int row, int column, const std::vector<std::string>& mineField) {
    int numOfMine = 0;
    
    if(mineField.at(row - 1).at(column - 1) == '#') ++numOfMine;
    if(mineField.at(row - 1).at(column)     == '#') ++numOfMine;
    if(mineField.at(row - 1).at(column + 1) == '#') ++numOfMine; 
    
    if(mineField.at(row).at(column - 1)     == '#') ++numOfMine;
    if(mineField.at(row).at(column + 1)     == '#') ++numOfMine;
    
    if(mineField.at(row + 1).at(column - 1) == '#') ++numOfMine;
    if(mineField.at(row + 1).at(column)     == '#') ++numOfMine;
    if(mineField.at(row + 1).at(column + 1) == '#') ++numOfMine;
     
    return numOfMine;
}

Compiler output:
a.cc:51:6: error: ambiguating new declaration of 'char countMine(int, int, const std::vector<std::__cxx11::basic_string<char> >&)'
   51 | char countMine(int row, int column, const std::vector<std::string>& mineField) {
      |      ^~~~~~~~~
a.cc:6:5: note: old declaration 'int countMine(int, int, const std::vector<std::__cxx11::basic_string<char> >&)'
    6 | int countMine(int row, int column,const std::vector<std::string>& mineField);
      |     ^~~~~~~~~
Language: C++

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

int main()
{
  int height;
  int width;
  cin >> height;
  cin >> width;
  vector<<vector char>> vec;
  for(int i = 0; i < height; ++i)
  {
    for(int j = 0; j < width; ++j)
    {
      cin >> vec[i][j];
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected unqualified-id before '<<' token
   11 |   vector<<vector char>> vec;
      |         ^~
a.cc:16:14: error: 'vec' was not declared in this scope
   16 |       cin >> vec[i][j];
      |              ^~~
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();
        String[][] map;
      	int[][] result;
      	map=new String [H][W];
      	result=new int[H][W];
       	
      
      	for(int i=0;i<H;i++) {//データの打ち込み
          for(int j=0;j<W;j++){
			map[i][j]=sc.next();
          }
		}
     	for(int i=0;i<H;i++) {//データの打ち込み
          for(int j=0;j<W;j++){
			result[i][j]=-1;
          }
		}
      
      	for(int i=0;i<H;i++) {//変換
          for(int j=0;j<W;j++){
           	if(map[i][j]=="."){
              result[H][W]=0;
              
              if(map[i][j+1]=="#"){
				result[i][j]+=1;
              }
              if(map[i][j-1]=="#"){
				result[i][j]+=1;
              }
              if(map[i+1][j]=="#"){
				result[i][j]+=1;
              }
              if(map[i-1][j]=="#"){
				result[i][j]+=1;
              }
              if(map[i+1][j+1]=="#"){
				result[i][j]+=1;
              }
              if(map[i-1][j+1]=="#"){
				result[i][j]+=1;
              }
              if(map[i+1][j-1]=="#"){
				result[i][j]+=1;
              }
              if(map[i-1][j-1]=="#"){
				result[i][j]+=1;
              }
              
           	}
          }
		}
      
      
      for(int i=0;i<H;i++) {//データの書き出し
        for(int j=0;j<W-1;j++){
          if(result[i][j]==-1){
			System.out.print(map[i][j]);
          }else{
          	System.out.print(result[i][j]);
          }
        }
      }  
		if(result[i][W]==-1){
		  System.out.println(map[i][W]);
        }else{
          System.out.println(result[i][W]);
        } 
        
	  
      
    }
}


Compiler output:
Main.java:70: error: cannot find symbol
		if(result[i][W]==-1){
		          ^
  symbol:   variable i
  location: class Main
Main.java:71: error: cannot find symbol
		  System.out.println(map[i][W]);
		                         ^
  symbol:   variable i
  location: class Main
Main.java:73: error: cannot find symbol
          System.out.println(result[i][W]);
                                    ^
  symbol:   variable i
  location: class Main
3 errors