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

#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int a;
	scanf("%d", &a);
		int b, c, d, e;
		b = a/1000;
		c = (a/100)%10;
		d = ((a/10)%100)%10;
		e = ((a%1000)%100)%10;
		while(1000 <= a <=9999){
			if((b == c && c ==d) || (c == d && d == e)){
			printf("Yes\n");
	}
	else{
		printf("No\n");
		}
		break;
	}

}
}

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

#include <stdio.h>  
  
int main()  
{  
    int n,i;  
    int num[10] = {0};  
    if (scanf("%d", &n)==1){ 
    
    do{  
        num[n%10]++;  
      
    }while((n = n/10) != 0 ); } 
 /* 
  for(i = 0; i < 10; i++){  
      printf("%d ", num[i]);  
  }  
  */
    
    for(i = 0; i < 10; i++){  
        if(num[i] >=3){  
            printf("Yes\n");  
                break;  
        }  
    }  
    else{  
        printf("No\n");  
    }  
    
  
  
    return 0;  
 }

Compiler output:
main.c: In function 'main':
main.c:25:5: error: 'else' without a previous 'if'
   25 |     else{
      |     ^~~~
Language: C++

#include <stdio.h>  
  
int main()  
{  
    int n,i;  
    int num[10] = {0};  
    if (scanf("%d", &n)==1){ 
    
    do{  
        num[n%10]++;  
      
    }while((n = n/10) != 0 ); } 
 /* 
  for(i = 0; i < 10; i++){  
      printf("%d ", num[i]);  
  }  
  */
    
    for(i = 0; i < 10; i++){  
        if(num[i] >=3){  
            printf("Yes\n");  
                break;  
        }  
    }  
    else{  
        printf("No\n");  
    }  
    
  
  
    return 0;  
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'else' without a previous 'if'
   25 |     else{
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
        int h,w;
        cin >> h >> w;
        int c[10][10];
        for(int i=0; i<10; i++) {
                for(int j=0; j<10; j++) {
                        cin >> c[i][j];
                }
        }
        for(int i=0; i<10; i++) {
                for(int j=0; j<10; j++) {
                        for(int k=0; k<10; k++) {
                                if(c[i][j]>c[i][k]+c[k][j]) {
                                        c[i][j]=c[i][k]+c[k][j];
                                }
                        }
                }
        }
        int a;
        for(int i=0; i<H; i++) {
                for(int j=0; j<W; j++) {
                        cin >> a;
                        if(a>=0) {
                                res+=c[a][1];
                        }
                }
        }
        cout << a << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: 'H' was not declared in this scope
   22 |         for(int i=0; i<H; i++) {
      |                        ^
a.cc:23:32: error: 'W' was not declared in this scope
   23 |                 for(int j=0; j<W; j++) {
      |                                ^
a.cc:26:33: error: 'res' was not declared in this scope
   26 |                                 res+=c[a][1];
      |                                 ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
        int h,w;
        cin >> h >> w;
        int c[10][10];
        for(int i=0; i<10; i++) {
                for(int j=0; j<10; j++) {
                        cin >> c[i][j];
                }
        }
        for(int i=0; i<10; i++) {
                for(int j=0; j<10; j++) {
                        for(int k=0; k<10; k++) {
                                if(c[i][j]>c[i][k]+c[k][j]) {
                                        c[i][j]=c[i][k]+c[k][j];
                                }
                        }
                }
        }
        int a[H][W];
        for(int i=0; i<H; i++) {
                for(int j=0; j<W; j++) {
                        cin >> a;
                        if(a>=0) {
                                res+=c[a][1];
                        }
                }
        }
        cout << a << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'H' was not declared in this scope
   21 |         int a[H][W];
      |               ^
a.cc:21:18: error: 'W' was not declared in this scope
   21 |         int a[H][W];
      |                  ^
a.cc:24:32: error: 'a' was not declared in this scope
   24 |                         cin >> a;
      |                                ^
a.cc:26:33: error: 'res' was not declared in this scope
   26 |                                 res+=c[a][1];
      |                                 ^~~
a.cc:30:17: error: 'a' was not declared in this scope
   30 |         cout << a << endl;
      |                 ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <queue>
#include <algorithm>
using namespace std;
int n;
typedef long long LL;
int main() {
	while(~scanf("%d", &n)) {
		int a = n % 10;//个位
		int b = (n % 100) / 10;//十位
		int c = (n % 1000) / 100;//百位
		int d = n / 1000;//千位
		if((a == b && b == c) || (b == c && c == d) || (a == b && b == c && c == d) puts("Yes");
		else puts("No");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:92: error: expected ';' before 'puts'
   17 |                 if((a == b && b == c) || (b == c && c == d) || (a == b && b == c && c == d) puts("Yes");
      |                                                                                            ^~~~~
      |                                                                                            ;
a.cc:18:17: error: expected primary-expression before 'else'
   18 |                 else puts("No");
      |                 ^~~~
a.cc:17:105: error: expected ')' before 'else'
   17 |                 if((a == b && b == c) || (b == c && c == d) || (a == b && b == c && c == d) puts("Yes");
      |                   ~                                                                                     ^
      |                                                                                                         )
   18 |                 else puts("No");
      |                 ~~~~
Language: Java

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int math[];
        int temp = 0;
        int j = 0;
        int tempo = 0;
        math = new int[4];
        int n = sc.nextInt();
        math[0] = n / 1000;
        n = n % 1000;
        math[1] = n / 100;
        n = n % 100;
        math[2] = n / 10;
        n = n % 10;
        math[3] = n;
        for (int i = 0; i <= 3; i++) {
            if (i == 0) {
                temp = math[0];
                continue;
            }
            if (temp == math[i]) {
                j++;
            } else {
                temp = math[i];
                tempo = j;
                j = 0;
            }
        }
        if (tempo < j) {
            tempo = j;
        }
        if (tempo >= 2) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

//written by libra9z
#define LOCAL_TIME
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned __int64 HASH;
typedef pair <int,int> pii;
typedef pair <ll,int> plli;
typedef pair <int,pii> pipii;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <vi> vvi;
typedef vector <pii> vpii;
typedef vector <vector<int> > mat;
#define rep(i,n) for (int i=0;i<(n);i++)
#define Rep(i,a,b) for (int i=(a);i<=(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rRep(i,a,b) for (int i=(a);i>=b;i--)
#define repit(it,a) for ((__typeof(a.begin())) it=a.begin();it!=a.end();it++)
#define repx(x,a) for (auto x:a)
#define pb push_back
#define mp make_pair()
#define eb emplace_back
#define X first
#define Y second
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define Debug(x) cerr<<#x<<" = "<<x<<endl
#define Debug22(x,y) cerr<<#x<<" = "<<x<<" , "<<#y<<" = "<<y<<endl
#define Debug2(x, y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<")\n"
#define Debug3(x,y,z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = ("<<x<<", "<<y<<", "<<z<<")\n"
#define Debug_arr(v,n) for(int i=0;i<n;++i) cerr<<#v<<"["<<i<<"]"<<" = "<<v[i]<<endl
#define eprintf(...) fprintf(stderr, __VA_ARGS__),fflush(stderr)
#define prl cerr << "called: " << __LINE__ << endl
#define get1(x,a) x>>a
#define get2(x,a,b) x>>a>>b
#define get3(x,a,b,c) x>>a>>b>>c
#define getn(x,n,v) rep(i,n) x>>v[i]
#define put1(x,a) x<<a
#define put2(x,a,b) x<<a<<" "<<b
#define put3(x,a,b,c) x<<a<<" "<<b<<" "<<c
#define putn(x,n,v) rep(i,n) x<<v[i]<<" ";
#define eaq(n,x) __typeof(x) n=x;
#define RET(p,x) return p<<x<<endl,0;
const ll h1=999999937;
const ll h2=1000000009;
const int inf=2e9;
const ll mod=1000000007;
const int dx[]={1,0,-1,0,1,0,-1,0};
const int dy[]={0,1,0,-1,1,0,-1,0};
const double pi=3.141592653589793;
const bool multitests=false,alotoftests=false;
ifstream fin("input.txt");ofstream fout("output.txt");
stringstream sinout;
int n;
int cnt[10];
bool solve(int __test)
{
	cin>>n;
	while (n)
	{
		cnt[n%10]++;
		n/=10;
	}
	rep(i,10)
	{
		if (cnt[i]>=3)
		{
			puts("Yes");
			return 0;
		}
	}
	puts("No");
	return false;
}
signed main()
{
	int __tests,__test=1;
	(multitests==true)?((alotoftests==false)?scanf("%d",&__tests):__tests=inf):__tests=1;
	for (;(alotoftests==true && multitests==true)?(!solve(__test)):(__test<=__tests);++__test)
	{
		if (!(multitests==true && alotoftests==true))
		{
			solve(__test);
		}
	}
	#ifdef LOCAL_TIME
	eprintf("\n\nSystem Time : %d ms",clock());
	#endif
	fin.close();fout.close();
	return 0;
}


Compiler output:
a.cc:7:26: error: expected initializer before 'HASH'
    7 | typedef unsigned __int64 HASH;
      |                          ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define size(x) ((int)(x).size())

bool solver(){
	string one;
	if(!(cin >> n))
		return 0;
	bool done = 0;
	int cnt=0;
	forn(i, sz(one)-1){
		if(one[i] == one[i+1]){
			cnt++;
		}
		if(cnt > 2){
			cout << "yes" << endl;
			return 0;
		}
	}
	return 1;	
}

signed main(){
	while(1){
		if(!solver())
			break;
	}
}

Compiler output:
a.cc: In function 'bool solver()':
a.cc:7:21: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |         if(!(cin >> n))
      |                     ^
      |                     yn
a.cc:11:14: error: 'i' was not declared in this scope
   11 |         forn(i, sz(one)-1){
      |              ^
a.cc:11:17: error: 'sz' was not declared in this scope
   11 |         forn(i, sz(one)-1){
      |                 ^~
a.cc:11:9: error: 'forn' was not declared in this scope; did you mean 'fork'?
   11 |         forn(i, sz(one)-1){
      |         ^~~~
      |         fork
Language: C++

int N;
cin<<N;
int cnt=0;
int previous = -1;
while(N!=0)
{
  int d = N/10;
  if(d==previous)cnt++
    else cnt=0;
  if(cnt==3) cout<<"Yes"<<endl;
  d/=10;
}
cout<<"No"<<endl;

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin<<N;
      | ^~~
a.cc:5:1: error: expected unqualified-id before 'while'
    5 | while(N!=0)
      | ^~~~~
a.cc:13:1: error: 'cout' does not name a type
   13 | cout<<"No"<<endl;
      | ^~~~
Language: C++

#include<stdio.h>

int main()
{  	int count1,count2
	char S[];
	scanf(%s,S[]);

	for(i=0;i<2;i++)
		if(S[0]==S[i+1])
          count1++;

	for(i=2;i<3;i++)
          if(S[1]==S[i])
            count2++;

	if count1>=3
      printf(%s,"Yes"){else
      count2=3
      printf(%s,"Yes")}{else
      printf(%s,"No")};

	return 0;
}

	
		

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'char'
    5 |         char S[];
      |         ^~~~
a.cc:6:15: error: expected primary-expression before '%' token
    6 |         scanf(%s,S[]);
      |               ^
a.cc:6:16: error: 's' was not declared in this scope
    6 |         scanf(%s,S[]);
      |                ^
a.cc:6:18: error: 'S' was not declared in this scope
    6 |         scanf(%s,S[]);
      |                  ^
a.cc:6:20: error: expected primary-expression before ']' token
    6 |         scanf(%s,S[]);
      |                    ^
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         for(i=0;i<2;i++)
      |             ^
a.cc:12:13: error: 'i' was not declared in this scope
   12 |         for(i=2;i<3;i++)
      |             ^
a.cc:14:13: error: 'count2' was not declared in this scope; did you mean 'count1'?
   14 |             count2++;
      |             ^~~~~~
      |             count1
a.cc:16:12: error: expected '(' before 'count1'
   16 |         if count1>=3
      |            ^~~~~~
      |            (
a.cc:19:25: error: 'else' without a previous 'if'
   19 |       printf(%s,"Yes")}{else
      |                         ^~~~
a.cc:20:14: error: expected primary-expression before '%' token
   20 |       printf(%s,"No")};
      |              ^
Language: C++

#include <stdio.h>
#include <string.h>
int main()
{
   int n,m,a,b,c,d;
   
  scanf("%d",&n)
  	
  	a=n/1000;
  		b=(n/100)%10;
  		c=(n%100)/10;
  		d=n%10;
  		if(a==b&&a==c||a==b&&a==d||b==c&&c==d||a==b&&a==c&&a==d||a==c&&a==d)
  		printf("Yes\n");
  		else 
  		printf("No\n");
  		
   		
  return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'a'
    7 |   scanf("%d",&n)
      |                 ^
      |                 ;
    8 | 
    9 |         a=n/1000;
      |         ~
Language: C++

#include <cstdio>
using namespace std;
int main()
{
	int N,a,b,c,d;
	while(~scanf("%d",&N)){
a=n/1000;
b=(n-a*1000)/100;
c=(n-a*1000-b*100)/10;
d=n-a*1000-b*100-c*10;
if(a==b&&a==c||b==c&&b==d||a==b==c==d)
	printf("yes\n");
	else
		printf("no\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'n' was not declared in this scope
    7 | a=n/1000;
      |   ^
Language: Java

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		
		 Scanner scan = new Scanner(System.in);
	try{
      int num = scan.nextInt();
      

      num = scan.nextInt();
      
    }catch (InputMismatchException e){
      
    }
        	int a[];
        	a = new int[num];
        	a[0] = 2;
        	a[1] = 1;
        	for(int i = 2;i < num; i++ ){
        		for(int g = 0;g < num; g++){
        		a[i] = a[g] + a[g+1];
        	}
        	}
        	System.out.println(a[num]);
	}
}

Compiler output:
Main.java:24: error: cannot find symbol
        	a = new int[num];
        	            ^
  symbol:   variable num
  location: class Ideone
Main.java:27: error: cannot find symbol
        	for(int i = 2;i < num; i++ ){
        	                  ^
  symbol:   variable num
  location: class Ideone
Main.java:28: error: cannot find symbol
        		for(int g = 0;g < num; g++){
        		                  ^
  symbol:   variable num
  location: class Ideone
Main.java:32: error: cannot find symbol
        	System.out.println(a[num]);
        	                     ^
  symbol:   variable num
  location: class Ideone
4 errors
Language: C++

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

int main()
{
    int n;
    int a[N];
    cin >>n;
    for(int i=0;i<4;i++){
        a[i]=n/10;
        n=n%10;
    }
    sort(a,a+3);
    if((a[0]==a[2])||(a[1]==a[3]))
        cout <<'Yes';
else
cout <<'No';
    }
    return 0;
}

Compiler output:
a.cc:16:16: warning: multi-character character constant [-Wmultichar]
   16 |         cout <<'Yes';
      |                ^~~~~
a.cc:18:8: warning: multi-character character constant [-Wmultichar]
   18 | cout <<'No';
      |        ^~~~
a.cc: In function 'int main()':
a.cc:8:11: error: 'N' was not declared in this scope
    8 |     int a[N];
      |           ^
a.cc:11:9: error: 'a' was not declared in this scope
   11 |         a[i]=n/10;
      |         ^
a.cc:14:10: error: 'a' was not declared in this scope
   14 |     sort(a,a+3);
      |          ^
a.cc: At global scope:
a.cc:20:5: error: expected unqualified-id before 'return'
   20 |     return 0;
      |     ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
 
int main(int argc,char**argv){
  char a[4];
  
  printf("4桁の数字を入力してください\n");
  a = scanf("%s",a);
  
  if(a[0] == a[1]){
    if(a[1] == a[2]){
      printf("Yes\n");
    }
    printf("No\n");
  }
  
  else if(a[1] == a[2]){
    if(a[2] == a[3]){
      printf("Yes\n");
    }
    printf("No\n");
  }
  
  else{
    printf("No\n");
  }
    
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:5: error: assignment to expression with array type
    8 |   a = scanf("%s",a);
      |     ^
Language: Java

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int math[];
        int temp = 0;
        int tempo = 0;
        int j = 0;
        math = new int[4];
        int n = sc.nextInt();
        math[0] = n / 1000;
        n = n % 1000;
        math[1] = n / 100; //3の表示
        n = n % 100; //iに１００で割った余りを代入 i = 21
        math[2] = n / 10; //２の表示
        n = n % 10; //iに１０で割った余りを代入 
        math[3] = 1; //1の表示

        for (int i = 0; i <= 3; i++) {
            if (i == 0) {
                temp = math[0];
                continue;
            }
            if (temp == math[i]) {
                j++;
            } else {
                temp = math[i];
            }
        }

        if (j >= 2) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include<stdio.h>
int main()
{
	int n,a,b,c,d;
	a=n/1000;
	b=n/100%10;
	c=n/10%10;
	d=n%10;
	scanf("%d",&n);
	if(a==b%%c==b||a==b&&b==d||a==c&&c==d||b==c&&c==d)
		printf("YES\n");
	else
		printf("NO\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected primary-expression before '%' token
   10 |         if(a==b%%c==b||a==b&&b==d||a==c&&c==d||b==c&&c==d)
      |                 ^
Language: C++

#include<stdio.h>
int main()
{
	int n,a,b,c,d;
	a=n/1000;
	b=n/100%10;
	c=n/10%10;
	d=n%10;
	if(a==b%%c==b||a==b&&b==d||a==c&&c==d||b==c&&c==d)
		printf("YES\n");
	else
		printf("NO\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before '%' token
    9 |         if(a==b%%c==b||a==b&&b==d||a==c&&c==d||b==c&&c==d)
      |                 ^
Language: C

#include <stdio.h>
#include <math.h>
int main(){
int *a;
scanf("%d",&a);
float b[a+1];
b[0]=2;
b[1]=1;
 
for(int i=2;i<=a;i++){
b[i]=b[i-1]+b[i-2];
}


printf("%.0f\n",b[a]);

}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: size of array 'b' has non-integer type
    6 | float b[a+1];
      |       ^
main.c:10:14: warning: comparison between pointer and integer
   10 | for(int i=2;i<=a;i++){
      |              ^~
main.c:15:18: error: array subscript is not an integer
   15 | printf("%.0f\n",b[a]);
      |                  ^
Language: C++

#include<stdio.h>
#include<math.h>
int main()
{
	double  t;
	int p;
	int i;
	int s[100];
	while(scanf("%lf",&t)!=EOF)
	{
		i=0;
		int f=1;
		if(t<1000||t>9999)f=0;
		p=t;
		if(t!=p)f=0;
		if(f){
				while(p){
			s[i]=p%10;
			i++;
			p=p/10;
		}		
		int z1=0,z2=0,z3=0,z4=0;
		for(i=0;i<4;i++)
		{
			if(s[0]==s[i])z1++;
			if(s[1]==s[i])z2++;
			if(s[2]==s[i])z3++;
			if(s[3]==s[i])z4++;
		}
		}
	
		if((z1>=3||z2>=3||z3>=3||z4>=3)&&f==1)printf("Yes\n");
		else printf("No\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:21: error: 'z1' was not declared in this scope; did you mean 'y1'?
   32 |                 if((z1>=3||z2>=3||z3>=3||z4>=3)&&f==1)printf("Yes\n");
      |                     ^~
      |                     y1
a.cc:32:28: error: 'z2' was not declared in this scope
   32 |                 if((z1>=3||z2>=3||z3>=3||z4>=3)&&f==1)printf("Yes\n");
      |                            ^~
a.cc:32:35: error: 'z3' was not declared in this scope
   32 |                 if((z1>=3||z2>=3||z3>=3||z4>=3)&&f==1)printf("Yes\n");
      |                                   ^~
a.cc:32:42: error: 'z4' was not declared in this scope
   32 |                 if((z1>=3||z2>=3||z3>=3||z4>=3)&&f==1)printf("Yes\n");
      |                                          ^~
Language: C

#include<stdio.h>
int main() {
	int N;
	int a, b, c, d;
    int bresult = 0;
	scanf("%d", &N);
 
	a = N / 1000;
	b = (N - 1000 * a) / 100;
	c = (N - 1000 * a -100*b) / 10;
	d = N - (1000 * a + 100 * b + 10 * c);
 
	if ((b == c) && ((a == b) || (c==d)) {
		bresult = 1;
	}
 
	printf("%s\n", (bresult=1) ? "Yes" : "No");
 
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:45: error: expected ')' before '{' token
   13 |         if ((b == c) && ((a == b) || (c==d)) {
      |            ~                                ^~
      |                                             )
main.c:20:1: error: expected expression before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int l[a],l[0]=2,l[1]=1;
    cin>>a;
    for(int i=0;i>0;i++){
        if(i=a){
            l[a]=l[a-2]+i[a-1]
        }
    }// Your code here!
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: 'a' was not declared in this scope
    4 |     int l[a],l[0]=2,l[1]=1;
      |           ^
a.cc:4:19: error: array must be initialized with a brace-enclosed initializer
    4 |     int l[a],l[0]=2,l[1]=1;
      |                   ^
a.cc:4:21: error: conflicting declaration 'int l [1]'
    4 |     int l[a],l[0]=2,l[1]=1;
      |                     ^
a.cc:4:14: note: previous declaration as 'int l [0]'
    4 |     int l[a],l[0]=2,l[1]=1;
      |              ^
Language: C++

#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<algorithm>
using namespace std;

int main()
{
	char a[4];
	int i;
    gets(a);
    if((a[0] == a[1] && a[1] == a[2]) || (a[1] == a[2] && a[2] == a[3]))
	{
    	printf("Yes\n");
	}
    else
	{
    	printf("No\n");
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   12 |     gets(a);
      |     ^~~~
      |     getw
Language: C

#include <stdio.h>
void main()
{
int n,a,b,c;
  scanf("%d",&n);
  a=n%10;
  n=n/10;
  b=n%10;
  n=n/10;
  c=n%10;
  n=n/10;
  if(a==b && a==c)
    printf("Yes");
  else if(b==c && b==n)
    printf("Yes");
  else
    printf("No");

Compiler output:
main.c: In function 'main':
main.c:17:5: error: expected declaration or statement at end of input
   17 |     printf("No");
      |     ^~~~~~
Language: C++

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

int main(){
	int a;
	std::cin >> a;

		if (a=1111||2222||3333||4444||5555||6666||7777||8888||9999||1112||1113||1114||1115||1116||1117||1118||1119||1110||2221||2223||2224||2225||2226||2227||2228||2229||2220||3331||3332||3334||3335||3336||3337||3338||3339||3330||4441||4442||4443||4445||4446||4447||4448||4449||4440||5550||5551||5552||5553||5554||5556||5557||5558||5559||6661||6662||6663||6664||6665||6667||6668||6669||7771||7772||7773||7774||7775||7776||7778||7779||8881||8882||8883||8884||8885||8886||8887||8889||9991||9992||9993||9994||9995||9996||9997||9998||2111||3111||4111||5111||6111||7111||8111||9111||1222||3222||4222||5222||6222||7222||8222||9222||1333||2333||4333||5333||6333||7333||8333||9333||1444||2444||3444||5444||6444||7444||8444||9444||1555||2555||3555||4555||6555||7555||8555||9555||1666||2666||3666||4666||5666||7666||8666||9666||1777||2777||3777||4777||5777||6777||8777||9777||1888||2888||3888||4888||5888||6888||7888||9888||1999||2999||3999||4999||5999||6999||7999||8999) {
			std::cout << "Yes" << std::endl;
		}

		else
		{
			std::cout << "No" << std::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++

#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using ld = long double;
const int INF = 1 << 29;
const ll LINF = 1l << 61;
const ld PI = abs(acos(-1));
#define pq priotity_queue
#define P pair<int, int>
#define P2 pair<int, P>
#define P3 pair<int, P2>
#define fr(i, a, b) for (int i = a; i < b; i++)    //[a, b)
#define frr(i, a, b) for (int i = b; i >= a; i--)  //[a, b]
#define rp(i, b) for (int i = 0; i < b; i++)       //[0, b)
#define rrp(i, b) for (int i = b; i >= 0; i--)     //[0, b]
#define cbuf(buf, init) memset(buf, init, sizeof(buf))

int N;

int main()
{
    /*
    //
    cin >> N;

    int p = N % 10;
    N /= 10;
    if (p == N % 10) {
        N /= 10;
        if (p == N % 10) {
            cout << "Yes" << endl;
        }
        else {
            cout << "No" << endl;
        }
    }
    else {
        p = N % 10;
        N /= 10;
        if (p == N % 10) {
            N /= 10;
            if (p == N % 10) {
                cout << "Yes" << endl;
            }
            else {
                cout << "No" << endl;
            }
        }
        else {
            cout << "No" << endl;
        }
    }
    */

    string input;
    cin >> input;
    rp(i, 3){
        if(input[i] == input[i + 1])    c++;
        else    c = 0;
    }
    cout << (c == 2 ? "Yes" : "No") << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:41: error: 'c' was not declared in this scope
   58 |         if(input[i] == input[i + 1])    c++;
      |                                         ^
a.cc:59:17: error: 'c' was not declared in this scope
   59 |         else    c = 0;
      |                 ^
a.cc:61:14: error: 'c' was not declared in this scope
   61 |     cout << (c == 2 ? "Yes" : "No") << endl;
      |              ^
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    int cnt;
    char n[5];
    gets(n);
    bool f = false;
    for(int i = 0; i < 4; i++)
    {
        cnt = 1;
        for(int j = i+1; j < 4; j++)
        {
            if(n[i] == n[j])
                cnt++;
            if(cnt>2)
            {
                f = true;
            }
        }
    }
    if(f)
        puts("YES");
    else
        puts("NO");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |     gets(n);
      |     ^~~~
      |     getw
Language: C++

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	 int n,q,w,e,s;
	 scanf("%d",&n);
	 q=n/1000;
	 w=(n%1000)/100;
	 e=(n%100)/10;
	 s=n%10;
	 if(q==w&&w==e&&e==s)  printf("Yes\n");
	 else if(w==e && e==s) printf("Yes\n");
	 else if(q==e && e==s) printf("Yes\n");
	 else if(q==w && w==e) printf("Yes\n");
	 else printf("No\n");
	 return 0;
}

	 

}


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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
int n, i, j, c;
int a[10];
int mani()
{
	scanf("%d", &n);
	a[1] = n / 1000;
	a[2] = (n - a[1] * 1000) / 100;
	a[3] = (n - a[2] * 100 - a[1] * 1000) / 10;
	a[4] = n - a[3] * 10 - a[2] * 100 - a[1] * 1000;
	for(i = 1; i <= 4; i++){
		for(j = i + 1; j <= 4; j++){
			if(a[i] == a[j])
				c++;
		}
	}
	if(c >= 3)
		printf("Yes");
	else
		printf("No");
}

Compiler output:
a.cc: In function 'int mani()':
a.cc:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
   28 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
using namespace std;
 
int main()
{
	char a[5];
	int j=1;
	while(~scanf("%s",&a))
	{
		j=1;
		for(int i=0;a[i]!='\0';i++)
		{
			if(a[i]==a[i+1])
				j++;
			if(a[1]!=a[2])
				break;
		}
		if(j>2) printf("Yes\n");
		else printf("No\n");
	}
	

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

function fibonacci(n) {
  var num1 = 1,
      num2 = 1,
      tmp = 1;
  for (var i = 1; i<n; i++) {
    tmp = num1 + num2;
    num1 = num2;
    num2 = tmp;
  }
  return tmp;
}

var result = fibonacci(40);
console.log(result);

Compiler output:
a.cc:1:1: error: 'function' does not name a type; did you mean 'union'?
    1 | function fibonacci(n) {
      | ^~~~~~~~
      | union
a.cc:13:1: error: 'var' does not name a type
   13 | var result = fibonacci(40);
      | ^~~
a.cc:14:1: error: 'console' does not name a type; did you mean 'const'?
   14 | console.log(result);
      | ^~~~~~~
      | const
Language: Java

public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int math[];
        int temp = 0;
        int tempo = 0;
        int j = 0;
        math = new int[4];
        for (int i = 0; i <= 3; i++) {
            math[i] = sc.nextInt();
            if (i == 0) {
                temp = math[0];
                continue;
            }
            if (temp == math[i]) {
                j++;
            } else {
                temp = math[i];
            }
        }

        if (j >= 2) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:27: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

import std.stdio;
void main(){
auto s = readln()
if( s.length() == 4 && s[1]==s[2] && 
(s[0] == s[1] || s[2] == s[3]))
writeln("Yes");
else writeln("No");

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:2:1: error: '::main' must return 'int'
    2 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:10: error: 'readln' was not declared in this scope
    3 | auto s = readln()
      |          ^~~~~~
a.cc:7:1: error: 'else' without a previous 'if'
    7 | else writeln("No");
      | ^~~~
a.cc:7:6: error: 'writeln' was not declared in this scope
    7 | else writeln("No");
      |      ^~~~~~~
a.cc:7:20: error: expected '}' at end of input
    7 | else writeln("No");
      |                    ^
a.cc:2:12: note: to match this '{'
    2 | void main(){
      |            ^
Language: C++

include <iostream>
#include <cstring>

using namespace std;

int a[20];

int main(){
    string s;
    cin >> s;
    for (int i = 0; i < s.size(); i++){
        a[s[i] - '0'] ++;
    }
    for (int i = 0; i <= 9; i++){
        if (a[i] >= 3){
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'string' was not declared in this scope
    9 |     string s;
      |     ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include <cstring>
  +++ |+#include <string>
    3 | 
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin >> s;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <cstring>
  +++ |+#include <iostream>
    3 | 
a.cc:10:12: error: 's' was not declared in this scope
   10 |     cin >> s;
      |            ^
a.cc:16:13: error: 'cout' was not declared in this scope
   16 |             cout << "Yes" << endl;
      |             ^~~~
a.cc:16:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:30: error: 'endl' was not declared in this scope
   16 |             cout << "Yes" << endl;
      |                              ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <cstring>
  +++ |+#include <ostream>
    3 | 
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << "No" << endl;
      |     ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:21: error: 'endl' was not declared in this scope
   20 |     cout << "No" << endl;
      |                     ^~~~
a.cc:20:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

include <iostream>

using namespace std;

int a[20];

int main(){
    string s;
    cin >> s;
    for (int i = 0; i < s.size(); i++){
        a[s[i] - '0'] ++;
    }
    for (int i = 0; i <= 9; i++){
        if (a[i] >= 3){
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string s;
      |     ^~~~~~
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> s;
      |     ^~~
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s;
      |            ^
a.cc:15:13: error: 'cout' was not declared in this scope
   15 |             cout << "Yes" << endl;
      |             ^~~~
a.cc:15:30: error: 'endl' was not declared in this scope
   15 |             cout << "Yes" << endl;
      |                              ^~~~
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << "No" << endl;
      |     ^~~~
a.cc:19:21: error: 'endl' was not declared in this scope
   19 |     cout << "No" << endl;
      |                     ^~~~
Language: Java

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
	     Scanner scanner = new Scanner(System.in);
        try {
        	System.out.println("数値を入力してください。");
        	int num = scanner.nextInt();
        	System.out.println("入力した数値は " + num + " です。");
        } catch (InputMismatchException e) {
        	System.out.println("数値以外が入力されました。");
        }
        int a[];
        a = new int[90];
        
        int t = 1110;
            for(int g = 0; g < 91 ; g++){              
              for(int i = 0; i < 10 ; i++){
                  a[g]=1110+i;
                  
                  
              }
             t = t + 1110;
            }
            for(int h = 0; h < 91; h++){
            if(num == a[h]){
                      System.out.println("YES");
                      
                  }else{
                      System.out.println("NO");
                  }
            }
	}
	
}


Compiler output:
Main.java:33: error: cannot find symbol
            if(num == a[h]){
               ^
  symbol:   variable num
  location: class Codechef
1 error
Language: C++

#include<cstdio>
#include<iostream>
#include<map>
using namespace std;
int n,a,b;
int ans=1;
int a[5];
int main()
{
	for(int i=1;i<=4;i++)
	{
		scanf("%1d",&a[i]);
	}
	if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}
	return 0;
}

Compiler output:
a.cc:7:5: error: conflicting declaration 'int a [5]'
    7 | int a[5];
      |     ^
a.cc:5:7: note: previous declaration as 'int a'
    5 | int n,a,b;
      |       ^
a.cc: In function 'int main()':
a.cc:12:31: error: invalid types 'int[int]' for array subscript
   12 |                 scanf("%1d",&a[i]);
      |                               ^
a.cc:14:14: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |              ^
a.cc:14:20: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |                    ^
a.cc:14:26: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |                          ^
a.cc:14:32: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |                                ^
a.cc:14:40: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |                                        ^
a.cc:14:46: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |                                              ^
a.cc:14:52: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |                                                    ^
a.cc:14:58: error: invalid types 'int[int]' for array subscript
   14 |         if((a[1]==a[2]&&a[2]==a[3])||(a[2]==a[3]&&a[3]==a[4]))
      |                                                          ^
Language: C++

import std.stdio;
void main(){
auto s = readln()
if( s.length() == 4 && s[1]==s[2] && 
(s[0] == s[1] || s[2] == s[3]))
writeln(“Yes”);
else writeln(“No”);
}

Compiler output:
a.cc:6:9: error: extended character “ is not valid in an identifier
    6 | writeln(“Yes”);
      |         ^
a.cc:6:9: error: extended character ” is not valid in an identifier
a.cc:7:14: error: extended character “ is not valid in an identifier
    7 | else writeln(“No”);
      |              ^
a.cc:7:14: error: extended character ” is not valid in an identifier
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:2:1: error: '::main' must return 'int'
    2 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:10: error: 'readln' was not declared in this scope
    3 | auto s = readln()
      |          ^~~~~~
a.cc:7:1: error: 'else' without a previous 'if'
    7 | else writeln(“No”);
      | ^~~~
a.cc:7:14: error: '\U0000201cNo\U0000201d' was not declared in this scope
    7 | else writeln(“No”);
      |              ^~~~
a.cc:7:6: error: 'writeln' was not declared in this scope
    7 | else writeln(“No”);
      |      ^~~~~~~
Language: Java

 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int math[];
        int temp = 0;
        int tempo = 0;
        int j = 0;
        math = new int[4];
        for (int i = 0; i <= 3; i++) {
            math[i] = sc.nextInt();
            if (i == 0) {
                temp = math[0];
                continue;
            }
            if (i == 1) {
                tempo = math[1];
                if (temp == tempo) {
                    j++;
                }
                continue;
            }
            if (temp == math[i] || tempo == math[i]) {
                j++;
            }
        }

        if (j >= 2) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
 public static void main(String[] args) {
               ^
  (use --enable-preview to enable unnamed classes)
Main.java:32: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

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

int main()
{

string s;
cin >> s;

for(int i = 0;i<s.size();i++)
{
char c = s[i];
int count = 0;
for(int j = i;j<s.size();j++)
{
if(s[i] == c) count++;
}
if(count >= 3) return cout << "Yes" << endl;
}
cout << "No" << "\n";

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:37: error: cannot convert 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' in return
   18 | if(count >= 3) return cout << "Yes" << endl;
      |                       ~~~~~~~~~~~~~~^~~~~~~
      |                                     |
      |                                     std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
Language: C++

int main(void){
int a;
  scanf("%d",a);
  int b=a/1000;
  int c=(a%1000)/100;
  int d=((a%100)/10);
    int e=(a%10);


  if((a==b&b==c)&(b==c&c==d))
  {
  printf("Yes");
  }
  else
  printf("No");

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d",a);
      |   ^~~~~
a.cc:12:3: error: 'printf' was not declared in this scope
   12 |   printf("Yes");
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void){
a.cc:15:3: error: 'printf' was not declared in this scope
   15 |   printf("No");
      |   ^~~~~~
a.cc:15:3: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
	     Scanner scanner = new Scanner(System.in);
        
        int num = scanner.nextInt();	//・・・①
        
        int a[];
        a = new int[90];
        
        int t = 1110;
            for(int g = 0; g < 91 ; g++){              
              for(int i = 0; i < 10 ; i++){
                  a[g]=1110+i;
                  
                  
              }
             t = t + 1110;
            }
            for(int h = 0; h < 91; h++){
            if(num == a[h]){
                      System.out.println("YES");
                      
                  }else{
                      System.out.println("NO");
                  }
            }
	}
	}
}


Compiler output:
Main.java:38: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include <iostream>
#include <stdio.h>
#include <string>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;
 
int main(){
	string n;
	cin >> n;
	if((s.at(0) == s.at(1) && s.at(0) == s.at(2))
		||(s.at(0) == s.at(1) && s.at(0) == s.at(3))
		||(s.at(0) == s.at(2) && s.at(0) == s.at(3))
		||(s.at(1) == s.at(2) && s.at(1) == s.at(3))){
		cout << "Yes" << endl;
	}else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 's' was not declared in this scope
   15 |         if((s.at(0) == s.at(1) && s.at(0) == s.at(2))
      |             ^
Language: C++

#include<stdio.h>


void main(void){
	int n;
	int i;
	int a,b;
	int count = 0;

	scanf_s("%d",&n);
		a = n%10;
		n = n/10;

	for(i=1;i<4;i++){
		b = n%10;
		if (a == b){
			a = b;
			count++;
		}
		else{
			count = 0;
		}
		n = n/10;

	}
	if(count >= 3){
		printf("Yes\n");
	}
	else{
		printf("No\n");
	}
}


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(void){
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d",&n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<algorithm>
using namespace std;

int main()
{
	char a[4];
	int i;
    gets(a);
    if(a[i] == a[i+1] && a[i] == a[i+2])
	{
    	printf("Yes\n");
	}
    else
	{
    	printf("No\n");
    }
	return 0;
}

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

#include <iostream>
#include <stdio.h>
#include <string>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;
 
int main(){
	string s;
	cin >> s;
	if((s.at(0) == s.at(1) && s.at(0) == s.at(2))
		||(s.at(0) == s.at(1) && s.at(0) == s.at(3))
		||(s.at(0) == s.at(2) && s.at(0) == s.at(3))
		||(s.at(1) == s.at(2) && s.at(1) == s.at(3)){
		cout << "Yes" << endl;
	}else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:61: error: expected ';' before '{' token
   18 |                 ||(s.at(1) == s.at(2) && s.at(1) == s.at(3)){
      |                                                             ^
      |                                                             ;
a.cc:20:10: error: expected primary-expression before 'else'
   20 |         }else cout << "No" << endl;
      |          ^~~~
a.cc:20:10: error: expected ')' before 'else'
   20 |         }else cout << "No" << endl;
      |          ^~~~
      |          )
a.cc:15:11: note: to match this '('
   15 |         if((s.at(0) == s.at(1) && s.at(0) == s.at(2))
      |           ^
Language: C++

#include<stdio.h>


void main(void){
	int n;
	int i;
	int a,b;
	int count = 0;

	scanf("%d",&n);
		a = n%10;
		n = n/10;

	for(i=1;i<4;i++){
		b = n%10;
		if (a == b){
			a = b;
			count++;
		}
		else{
			count = 0;
		}
		n = n/10;

	}
	if(count >= 3){
		printf("Yes\n");
	}
	else{
		printf("No\n");
	}
}


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(void){
      | ^~~~
Language: C++

public class Main {
    public static void main(String args[]) {
        java.util.Scanner sc = new java.util.Scanner(System.in);
        int S = sc.nextInt();
        int flag = 0;
        char[] A = new char[4];
        for (int i = 0; i < 4; i++) {
            A[i] = (char)('0' + (S % 10));
            S /= 10;
        }
        for (int i = 0; i < 2; i++) {
            flag = 0;
            for (int j = 0; j < 2; j++) {
                if (A[j+i] != A[j+1+i]) flag = 1;
            }
            if (flag == 0) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main {
      | ^~~~~~
Language: C++

#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
 
int b=0;
char s[105];
int main()
{
while(~scanf ("%s", s))
{
        int len = strlen(s);
        for(int i=0;i<len;i++)
        {
            for(int j=1;j<=3-i;j++)
			{
            if(s[i]==s[i+j])
            {
            	b++;
            }
			}
		}
			if(b >= 3)
			{
				printf("YES\n");
				b=0;
			}
			else
			{
				printf("NO\n");
				b=0;
			}
}
		return 0;
}

Compiler output:
a.cc:5:1: error: extended character   is not valid in an identifier
    5 |  
      | ^
a.cc:5:1: error: '\U000000a0' does not name a type
    5 |  
      | ^
a.cc: In function 'int main()':
a.cc:19:17: error: 'b' was not declared in this scope
   19 |                 b++;
      |                 ^
a.cc:23:28: error: 'b' was not declared in this scope
   23 |                         if(b >= 3)
      |                            ^