criyle/codenet-compile-errors huggingface dataset:
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;
	 //printf("%d %d %d %d",q,w,e,s);
	 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");
N

Compiler output:
a.cc: In function 'int main()':
a.cc:18:1: error: 'N' was not declared in this scope
   18 | N
      | ^
a.cc:18:2: error: expected '}' at end of input
   18 | N
      |  ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

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

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

/* -------------------------------------------------

Author :- Vaibhav Pal
College :- Northern India Engineering College, New Delhi
Coding Handle :- underdog_eagle
Title :-

----------------------------------------------------*/
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef vector<ii> vii;
typedef vector<pll> vpll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;

#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define INF 1000000000000000000          // 10^18
#define nl '\n'
#define sp ' '
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define fo(i, a, b) for(int (i) = (a); (i) <= (b); (i)++)

inline ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
inline ll lcm(ll a, ll b) { return a * (b / gcd(a, b)); }

int main()
{
	FAST_IO
    #ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
    #endif
	string n;
	cin >> n;
	if ((n[0] == n[1] && n[1] == n[2]) || (n[1] == n[2] && n[1] == n[3]) cout << "Yes\n";
	else cout << "No\n";
				
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:77: error: expected ';' before 'cout'
   47 |         if ((n[0] == n[1] && n[1] == n[2]) || (n[1] == n[2] && n[1] == n[3]) cout << "Yes\n";
      |                                                                             ^~~~~
      |                                                                             ;
a.cc:48:9: error: expected primary-expression before 'else'
   48 |         else cout << "No\n";
      |         ^~~~
a.cc:47:94: error: expected ')' before 'else'
   47 |         if ((n[0] == n[1] && n[1] == n[2]) || (n[1] == n[2] && n[1] == n[3]) cout << "Yes\n";
      |            ~                                                                                 ^
      |                                                                                              )
   48 |         else cout << "No\n";
      |         ~~~~
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 <iostream>
#include <cmath>
#include <cstring>
using namespace std;

int main(){
  int N = 0;
  cin >> N;
  int a,b,c,d;
  a = N%10;
  N/=10;
  b = N%10;
  N/=10;
  c = N%10;
  N/=10;
  d = N%10;
  if( a == b && b == c){
    cout << "Yes" << endl;
  }else if(b == c && c == d){
    cout << "Yes" <<endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> N;
      |   ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <cstring>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:22: error: 'endl' was not declared in this scope
   18 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include <cstring>
  +++ |+#include <ostream>
    4 | using namespace std;
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << "Yes" <<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 << "Yes" <<endl;
      |                     ^~~~
a.cc:20:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout << "No" << endl;
      |     ^~~~
a.cc:22:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:21: error: 'endl' was not declared in this scope
   22 |     cout << "No" << endl;
      |                     ^~~~
a.cc:22:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
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();	//・・・①
        
    
        ArrayList<Integer> a = new ArrayList<Integer>();
        int t = 1110;
            for(int g = 1; g < 10 ; g++){              
              for(int i = 0; i < 10 ; i++){
                  a.add(1110+i);
                  
                  
              }
              t += 1110;
            }
            for(int b = 0; b < a.length; b++){
            if(num == a[i]){
                      System.out.println("YES");
                      
                  }else{
                      System.out.println("NO");
                  }
            }
	}
}


Compiler output:
Main.java:27: error: cannot find symbol
            for(int b = 0; b < a.length; b++){
                                ^
  symbol:   variable length
  location: variable a of type ArrayList<Integer>
Main.java:28: error: cannot find symbol
            if(num == a[i]){
                        ^
  symbol:   variable i
  location: class Codechef
Main.java:28: error: array required, but ArrayList<Integer> found
            if(num == a[i]){
                       ^
3 errors
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();	//・・・①
        
    
        ArrayList<Integer> a = new ArrayList<Integer>();
        int a = 1110;
            for(int g = 1; g < 10 ; g++){              
              for(int i = 0; i < 10 ; i++){
                  a.add(1110+i);
                  
                  
              }
              a += 1110;
            }
            for(int b = 0; b < a.length; b++){
            if(num == a[i]){
                      System.out.println("YES");
                      
                  }else{
                      System.out.println("NO");
                  }
            }
	}
}


Compiler output:
Main.java:18: error: variable a is already defined in method main(String[])
        int a = 1110;
            ^
Main.java:21: error: int cannot be dereferenced
                  a.add(1110+i);
                   ^
Main.java:27: error: int cannot be dereferenced
            for(int b = 0; b < a.length; b++){
                                ^
Main.java:28: error: cannot find symbol
            if(num == a[i]){
                        ^
  symbol:   variable i
  location: class Codechef
Main.java:28: error: array required, but int found
            if(num == a[i]){
                       ^
5 errors
Language: C++

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

int main()
{
	long n;
	int a,b,c,d;
	scanf("%ld",&n)
	if(n == 1000)
	{
		a = 1;
		b = 0;
		c = 0;
		d = 0;
	}
	else{
		a = n / 1000;
		b = n / 100 % 10;
		c = n / 10 % 10;
		d = n % 10;
	}
	if( a == b) 
	{
		if(a == c || a==d)
			printf("YES\n");
		else printf("NO\n");
	}
	else if( a == c)
	{
		if( a == d )
			printf("YES\n");
		else printf("NO\n");
	}
	else if( b == c)
		if( c == d) printf("YES\n");
		else printf("NO\n");
	else printf("NO\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before 'if'
   11 |         scanf("%ld",&n)
      |                        ^
      |                        ;
   12 |         if(n == 1000)
      |         ~~              
a.cc:19:9: error: 'else' without a previous 'if'
   19 |         else{
      |         ^~~~
Language: C++

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

int main()
{
	int N, a, b, c, d;
	scanf("%d",&N);
	a = N % 10;
	b = N / 10 % 10;
	c = N / 100 % 10;
	d = N / 1000 % 10;
	if(a == b == c == d)
	{
		printf("yes\n");
	}
	if(a == b == c)
	{
		printf("yes\n");
	}
	if(a == c == d)
	{
		printf("yes\n");
	}
	if(b == c == d)
	{
		printf("yes\n");
	}
	if(a == b == d)
	{
		printf("yes\n");
	}
	else
		printf("no\n");
		return 0;
}

Compiler output:
a.cc:2:9: fatal error: sctdlib: No such file or directory
    2 | #include<sctdlib>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		no1();
	}

	static void no1() {
		try (Scanner sc = new Scanner(System.in)) {
			String N = sc.nextInt();

			Integer a = N / 1000;
			Integer b = (N-a*1000) /100;
			Integer c = (N-a*1000-b*100)/10;
			Integer d = (N-a*1000-b*100-c*10);

			if ((a==b && b ==c) || (b ==c && c ==d))
				System.out.println("Yes");
			else
				System.out.println("No");
		}
	}
}

Compiler output:
Main.java:11: error: incompatible types: int cannot be converted to String
			String N = sc.nextInt();
			                     ^
Main.java:13: error: bad operand types for binary operator '/'
			Integer a = N / 1000;
			              ^
  first type:  String
  second type: int
Main.java:14: error: bad operand types for binary operator '-'
			Integer b = (N-a*1000) /100;
			              ^
  first type:  String
  second type: int
Main.java:15: error: bad operand types for binary operator '-'
			Integer c = (N-a*1000-b*100)/10;
			              ^
  first type:  String
  second type: int
Main.java:16: error: bad operand types for binary operator '-'
			Integer d = (N-a*1000-b*100-c*10);
			              ^
  first type:  String
  second type: int
5 errors
Language: C++

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

int mian(){
	int n;
	int a,b,c,d;
	scanf("%d",&n);
	a = n % 10;
	b = n % 100 / 10;
	c = n % 1000 / 100;
	d = n / 1000;
	if(a == b&&b == c)
		printf("Yes\n");
	if(b == c&&c == d)
		printf("Yes\n");
	if(a != b&&b !=c)
		printf("No\n");
	if(b != c&&c !=d)
		printf("No\n");
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
   24 | }
      | ^
/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<stdio.h>
 
int main() {
	int N;
	int a, b, c, d;
	BOOL result = FALSE;
	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 (a == b) {
		if (a == c || a == d)result = TRUE;
	} else {
		if (a == c || b == c) {
			if (c == d)result = TRUE;
		}
	}
 
	printf("%s\n", result ? "Yes" : "No");
 
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'BOOL'
    6 |         BOOL result = FALSE;
      |         ^~~~
main.c:6:23: error: 'FALSE' undeclared (first use in this function)
    6 |         BOOL result = FALSE;
      |                       ^~~~~
main.c:6:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:47: error: 'TRUE' undeclared (first use in this function)
   15 |                 if (a == c || a == d)result = TRUE;
      |                                               ^~~~
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
        int N;
        cin >> N;
 

        int c = 0;
        for (i=0; i<3; i++)
        {
                if (N % 10 == (N / 10) % 10)
                {
                         c++;
                         N = N /10;
                }
                else
                {
                         c = 0;
                }
         }
      
        if (c >= 2)
        {
                 cout << " Yes ";
        }
        else
        {
                 cout << " No ";
        }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'i' was not declared in this scope
   11 |         for (i=0; i<3; i++)
      |              ^
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: In function 'int main()':
a.cc:34:26: error: expected '}' at end of input
   34 |                 return 0;
      |                          ^
a.cc:9:1: note: to match this '{'
    9 | {
      | ^
Language: C

#include <stdio.h>
int main(){
int a=getchar();
int b[a];
b[0]=2;
b[1]=1;

for(int i=2;i<a<i++){
b[i]=b[i-1]+b[i-2]
}
printf("%d",b[a]);
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: expected ';' before ')' token
    8 | for(int i=2;i<a<i++){
      |                    ^
      |                    ;
main.c:9:19: error: expected ';' before '}' token
    9 | b[i]=b[i-1]+b[i-2]
      |                   ^
      |                   ;
   10 | }
      | ~
Language: C

    #include <stdio.h>
     
    int main(void) {
      int num[4];
     
      scanf("%d", &num[0]);
      num[3] = num[0] / 1000;
      num[2] = (num[0] - num[3] * 1000) / 100;
      num[1] = (num[0] - num[3] * 1000 - num[2] * 100) / 10;
      num[0] = num[0] - num[3] * 1000 - num[2] * 100 - num[1] * 10;
     
      if(num[0] == num[1] && num[0] == num[2]) {
        printf("Yes");
      }
      else if(num[0] == num[1] && num[0] == num[3]) {
        printf("Yes");
      }
      else if(num[0] == num[2] && num[0] == num[3]) {
        printf("Yes");
      }
      else if(num[1] == num[2] && num[1] == num[3]) {
        printf("Yes");
      }
      else if(num[0] == num[1] && num[1] == num[2] && num[2] == num[3]) {

      else {
        printf("No");
      }
     
      return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:26:7: error: expected '}' before 'else'
   26 |       else {
      |       ^~~~
Language: C++

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

int main(){
   int n,a,b,c,d;
  cin >> n;
	a=n/1000;
	b=n/100-a*10;
	c=n/10-a*100-b*10;
	d=n%10;
	if(((a == b)&&(b == c))||((b == c)&&(c == d))){
	cout << "Yes" << endl;
         }else{
		cout << ''No" << endl;
}
	return 0;
 }
 

Compiler output:
a.cc:14:25: error: empty character constant
   14 |                 cout << ''No" << endl;
      |                         ^~~~
a.cc:14:29: warning: missing terminating " character
   14 |                 cout << ''No" << endl;
      |                             ^
a.cc:14:29: error: missing terminating " character
   14 |                 cout << ''No" << endl;
      |                             ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:25: error: unable to find character literal operator 'operator""No' with 'char' argument
   14 |                 cout << ''No" << endl;
      |                         ^~~~
Language: C

#include<stdio.h>
int main(){
    int x=10, y, i, n, cnt=0;
    scanf_s("%d", &n);
    for(i=0;i<4;i++){
        n/=10;
        y=n%10;
        if(x==y) cnt++;
        x=y;
    }
    if(cnt>=2) printf("Yes");
    else printf("No");
    return 0;
}


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

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	char x,b,c,d;
	while(cin>>x>>b>>c>>d){
		ans=0;
		if(x==b&&b==c)
			ans=1;
		if(b==c&&b==d)
			ans=1;
		if(ans)
			puts("Yes");
		else
			puts("No");
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |                 ans=0;
      |                 ^~~
      |                 abs
Language: C++

#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>

using namespace std;
char a[1000] = {0};
int flage;

int main()
{
	flage = 0;
	gets(a);
	for(int i = 0;i <= 3;i++)
	{
		for(int j = 0;j <= 3;j++)
		{
			if(a[i] == a[j]){
				flage = flage + 1;
			}
		}
		if(flage < 3)
			flage = 0;
	}
	if(flage >= 3)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}


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


import java.util.Scanner;

public class Main2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		//リュカ数の配列を作成
		int L0 = 2;
		int L1 = 1;
		int L2;

		int[] numList = new int[86];

		numList[0] = L0;
		numList[1] = L1;

		for (int i=2; i < 86; i++){
			L2 = L0 + L1;

			numList[i] = L2;

			L0 = L1;
			L1 = L2;
		}

		// 整数の入力
		int n = sc.nextInt();

		System.out.println(numList[n-1]);

		sc.close();
	}

}


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

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

Compiler output:
main.c: In function 'main':
main.c:5:7: error: expected identifier or '(' before '[' token
    5 |   char[4][4];
      |       ^
main.c:8:15: error: 'a' undeclared (first use in this function)
    8 |   scanf("%s",&a);
      |               ^
main.c:8:15: note: each undeclared identifier is reported only once for each function it appears in
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 = java.util.stream.IntStream.rangeClosed(1110, 1119).toArray();
       a = java.util.stream.IntStream.rangeClosed(2220, 2229).toArray();
        a = java.util.stream.IntStream.rangeClosed(3330, 3339).toArray();
         a = java.util.stream.IntStream.rangeClosed(4440, 4449).toArray();
          a = java.util.stream.IntStream.rangeClosed(5550, 5559).toArray();
           a = java.util.stream.IntStream.rangeClosed(6660, 6669).toArray();
            a = java.util.stream.IntStream.rangeClosed(7770, 7779).toArray();
             a = java.util.stream.IntStream.rangeClosed(8880, 8889).toArray();
              a = java.util.stream.IntStream.rangeClosed(9990, 9999).toArray();
              
              for(i = 0; i < a.length ; i++){
                  if(num == a[i]){
                      System.out.println("YES");
                      
                  }else{
                      System.out.println("NO");
                  }
              }
	}
}


Compiler output:
Main.java:27: error: cannot find symbol
              for(i = 0; i < a.length ; i++){
                  ^
  symbol:   variable i
  location: class Codechef
Main.java:27: error: cannot find symbol
              for(i = 0; i < a.length ; i++){
                         ^
  symbol:   variable i
  location: class Codechef
Main.java:27: error: cannot find symbol
              for(i = 0; i < a.length ; i++){
                                        ^
  symbol:   variable i
  location: class Codechef
Main.java:28: error: cannot find symbol
                  if(num == a[i]){
                              ^
  symbol:   variable i
  location: class Codechef
4 errors
Language: C

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

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

Compiler output:
main.c: In function 'main':
main.c:8:9: error: expected expression before '%' token
    8 |   scanf(%s,&a);
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string str; cin >> str;
  if ((str[0] == str[1] and str[1] == str[2]) or
      (str[1] == str[2] and str[2] == str[3]))
    cout << “Yes“ << endl;
  else
    cout << “No“ << endl;

  return 0;
}


Compiler output:
a.cc:8:13: error: extended character “ is not valid in an identifier
    8 |     cout << “Yes“ << endl;
      |             ^
a.cc:8:13: error: extended character “ is not valid in an identifier
a.cc:10:13: error: extended character “ is not valid in an identifier
   10 |     cout << “No“ << endl;
      |             ^
a.cc:10:13: error: extended character “ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:13: error: '\U0000201cYes\U0000201c' was not declared in this scope
    8 |     cout << “Yes“ << endl;
      |             ^~~~~
a.cc:10:13: error: '\U0000201cNo\U0000201c' was not declared in this scope
   10 |     cout << “No“ << endl;
      |             ^~~~
Language: C++

#include <iostream>
using namespace std;

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

        int c = 0;
        for (i=0; i<3; i++)
        {
                if (N % 10 == (N / 10) % 10)
                {
                         c++;
                         N = N /10;
                }
                else
                {
                         c = 0;
                }
         }
      
        if (c >= 2)
        {
                 cout << " Yes ";
        }
        else
        {
                 cout << " No ";
        }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'i' was not declared in this scope
   10 |         for (i=0; i<3; i++)
      |              ^
Language: C++

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
int main()
{
	char n[4];
	int flag=0;
	scanf("%s",n);
	if((int)n>9999||(int)n<1000) return 0;
	for(int i=0;i<4;i++){
		for(int j=0;j<4;j++){
		if(n[i]==n[j])flag++;
		}
	}
	if(flag/2>=3)printf("Yes\n");
	else printf("No\n");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   10 |         if((int)n>9999||(int)n<1000) return 0;
      |            ^~~~~~
a.cc:10:25: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   10 |         if((int)n>9999||(int)n<1000) return 0;
      |                         ^~~~~~
Language: C++

#include <stdio.h>

int main(void) {
  int num[4];

  scanf("%d", &num[0]);
  num[3] = num[0] / 1000;
  num[2] = (num[0] - num[3] * 1000) / 100;
  num[1] = (num[0] - num[3] * 1000 - num[2] * 100) / 10;
  num[0] = num[0] - num[3] * 1000 - num[2] * 100 - num[1] * 10;
  
  if(num[0] == num[1] && num[0] == num[2]) {


Compiler output:
a.cc: In function 'int main()':
a.cc:12:45: error: expected '}' at end of input
   12 |   if(num[0] == num[1] && num[0] == num[2]) {
      |                                            ~^
a.cc:12:45: error: expected '}' at end of input
a.cc:3:16: note: to match this '{'
    3 | int main(void) {
      |                ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string str; cin >> str;
  if ((str[0] == str[1] and str[1] == str[2]) or
      (str[1] == str[2] and str[2] == str[3]))
    cout << “Yes“ << endl;
  else
    cout << “No“ << endl;

  return 0;
}

Compiler output:
a.cc:8:13: error: extended character “ is not valid in an identifier
    8 |     cout << “Yes“ << endl;
      |             ^
a.cc:8:13: error: extended character “ is not valid in an identifier
a.cc:10:13: error: extended character “ is not valid in an identifier
   10 |     cout << “No“ << endl;
      |             ^
a.cc:10:13: error: extended character “ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:13: error: '\U0000201cYes\U0000201c' was not declared in this scope
    8 |     cout << “Yes“ << endl;
      |             ^~~~~
a.cc:10:13: error: '\U0000201cNo\U0000201c' was not declared in this scope
   10 |     cout << “No“ << endl;
      |             ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int input;
	int number[4];

	cin >> input;

	for (int i = 0; i < 4; i++) {
		number[i] = input / pow(10, 3 - i);
		input -= number[i] * pow(10, 3 - i);
	}

	if (number[0] == number[1] == number[2] || number[3] == number[1] == number[2]) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:37: error: 'pow' was not declared in this scope
   11 |                 number[i] = input / pow(10, 3 - i);
      |                                     ^~~
Language: C++

#include <iostream>

int main()
{
	int a;
	std::cin >> a;
	int b = a / 1000;
	int c = a % 1000;
	int d = c / 100;
	int e = c % 100;
	int f = e / 10;
	int g = e % 10;
		if (b==d==f||b==d==g||b==f==g||b=d=f=g) {
			std::cout << "Yes" << std::endl;
		}
		else
		{
			std::cout << "No" << std::endl;
		}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:46: error: lvalue required as left operand of assignment
   13 |                 if (b==d==f||b==d==g||b==f==g||b=d=f=g) {
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Language: C++

//競技プログラミング　テンプレ
//
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
	int n;
	cin >> n;
 if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
  cout << "Yes" <<endl;}
  

  else cout <<"No" << endl;


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |       ^~
a.cc:12:16: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |                ^~
a.cc:12:25: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |                         ^~
a.cc:12:34: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |                                  ^~
a.cc:12:43: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |                                           ^~
a.cc:12:52: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |                                                    ^~
a.cc:12:61: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |                                                             ^~
a.cc:12:70: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |  if(n.at(0)==n.at(1)&&n.at(1)==n.at(2)||n.at(1)==n.at(2)&&n.at(2)==n.at(3)){
      |                                                                      ^~
Language: C

#include <stdio.h>
int luca(int);
int main(){
int a =getchar()

printf("%d",luca(a));

}
int luca(int n){
if(n==0){
return 2
}else if(n==1)
return 1
 else{
return luca(n-1)+luca(n-2)
}
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: expected ',' or ';' before 'printf'
    6 | printf("%d",luca(a));
      | ^~~~~~
main.c: In function 'luca':
main.c:11:9: error: expected ';' before '}' token
   11 | return 2
      |         ^
      |         ;
   12 | }else if(n==1)
      | ~        
main.c:13:9: error: expected ';' before 'else'
   13 | return 1
      |         ^
      |         ;
   14 |  else{
      |  ~~~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
 
void main(){
  char IN[4];
  for(int i=0;i!=4;i++){
  	scanf("%d", &IN[i]);
  }
  if(IN[0]==IN[1]&&IN[1]==IN[2]){
  	printf("%c\n", "Yes");
  }else if(IN[1]==IN[2]&&IN[2]==IN[3]){
  	printf("%c\n", "No");
  }

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:5:12: note: to match this '{'
    5 | void main(){
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string str; cin >> str;
  if ((str0 str1 str1 str2) or
      (str1 str2 str2 str3))
    cout << “Yes“ << endl;
  else
    cout << “No“ << endl;

  return 0;
}

Compiler output:
a.cc:8:13: error: extended character “ is not valid in an identifier
    8 |     cout << “Yes“ << endl;
      |             ^
a.cc:8:13: error: extended character “ is not valid in an identifier
a.cc:10:13: error: extended character “ is not valid in an identifier
   10 |     cout << “No“ << endl;
      |             ^
a.cc:10:13: error: extended character “ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:8: error: 'str0' was not declared in this scope; did you mean 'str'?
    6 |   if ((str0 str1 str1 str2) or
      |        ^~~~
      |        str
a.cc:6:12: error: expected ')' before 'str1'
    6 |   if ((str0 str1 str1 str2) or
      |       ~    ^~~~~
      |            )
a.cc:8:26: error: expected ')' before ';' token
    8 |     cout << “Yes“ << endl;
      |                          ^
      |                          )
a.cc:6:6: note: to match this '('
    6 |   if ((str0 str1 str1 str2) or
      |      ^
a.cc:10:13: error: '\U0000201cNo\U0000201c' was not declared in this scope
   10 |     cout << “No“ << endl;
      |             ^~~~
Language: C

#include<stdio.h>

void main(){
  int v;
  int g = -1;
  int d[4];
  int c;
  scanf("%d",&v);
  d[0] = v / 1000;
  d[1] = v / 100;
  d[2] = v / 10;
  d[3] = v % 10;
  for(int i = 0; i < 4; i++){
    if(g == d[i]){
      c++;
    }else{
      g = d[i]
    }
    if(c > 2)break;
  }
  if(c > 2){
    printf("Yes");
  }else{
    printf("No");
  }
}

Compiler output:
main.c: In function 'main':
main.c:17:15: error: expected ';' before '}' token
   17 |       g = d[i]
      |               ^
      |               ;
   18 |     }
      |     ~
Language: C++

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
int main()
{
	char n[4];
	int flag=0;
	scanf("%s",n);
	for(int i=0;i<4;i++){
		for(int j=0;j<4;j++){
		if(n[i]==n[j])flag++;
		}
	}
	if(flag/2>=3)printf("Yes\n");
	else printf("No\n);
	return 0;
}


Compiler output:
a.cc:16:21: warning: missing terminating " character
   16 |         else printf("No\n);
      |                     ^
a.cc:16:21: error: missing terminating " character
   16 |         else printf("No\n);
      |                     ^~~~~~~
a.cc: In function 'int main()':
a.cc:17:9: error: expected primary-expression before 'return'
   17 |         return 0;
      |         ^~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(int argc, const char * argv[]) {
    int count=0,len;
    char n[100000];
    cin >>n;
    len=(int)strlen(n);
    for(int i=0;i<len;i++){
        if(count==2){
            printf("YES\n");break;
        }
        if(n[i]==n[i-1]){
            count+=1;
        }
        else{
            count=0;
        }
        if(i+1==len){
            printf("NO\n");
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:8:14: error: 'strlen' was not declared in this scope
    8 |     len=(int)strlen(n);
      |              ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	int i,j,cnt=0;
	char a[8];
	gets(a);
	for(i=0;i<4;i++)
	{
		if(a[i]==a[i+1])
		{
			cnt++;
		}
		else
		{
			cnt=0;
		}
		if(cnt==2)break;
	}
	if(cnt==2)
	{
		printf("Yes\n");
	}
	else{
		printf("No\n");
	}
	
	
} 

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

#include <iostream>
using namespace std;

int main(){
  string str; cin >> str;
  if ((str0 str1 str1 str2) or
       str1 str2 str2 str3))
    cout << “Yes“ << endl;
  else
    cout << “No“ << endl;

  return 0;
}

Compiler output:
a.cc:8:13: error: extended character “ is not valid in an identifier
    8 |     cout << “Yes“ << endl;
      |             ^
a.cc:8:13: error: extended character “ is not valid in an identifier
a.cc:10:13: error: extended character “ is not valid in an identifier
   10 |     cout << “No“ << endl;
      |             ^
a.cc:10:13: error: extended character “ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:8: error: 'str0' was not declared in this scope; did you mean 'str'?
    6 |   if ((str0 str1 str1 str2) or
      |        ^~~~
      |        str
a.cc:6:12: error: expected ')' before 'str1'
    6 |   if ((str0 str1 str1 str2) or
      |       ~    ^~~~~
      |            )
a.cc:8:26: error: expected ')' before ';' token
    8 |     cout << “Yes“ << endl;
      |                          ^
      |                          )
a.cc:6:6: note: to match this '('
    6 |   if ((str0 str1 str1 str2) or
      |      ^
a.cc:10:13: error: '\U0000201cNo\U0000201c' was not declared in this scope
   10 |     cout << “No“ << endl;
      |             ^~~~
Language: C++

#include <iostream>
#include <cstring>
using namespace std;
int main(){
string n;
cin >>n;
if (n[0]==n[1] & n[1]==n[2]) {
cout<<”Yes”<<endl;
}
else if(n[1]==n[2] & n[2]==n[3] ){
cout<<”Yes”<<endl;
}
else{
cout<<”No”<<endl;
}

return 0;
}

Compiler output:
a.cc:8:7: error: extended character ” is not valid in an identifier
    8 | cout<<”Yes”<<endl;
      |       ^
a.cc:8:7: error: extended character ” is not valid in an identifier
a.cc:11:7: error: extended character ” is not valid in an identifier
   11 | cout<<”Yes”<<endl;
      |       ^
a.cc:11:7: error: extended character ” is not valid in an identifier
a.cc:14:7: error: extended character ” is not valid in an identifier
   14 | cout<<”No”<<endl;
      |       ^
a.cc:14:7: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:7: error: '\U0000201dYes\U0000201d' was not declared in this scope
    8 | cout<<”Yes”<<endl;
      |       ^~~~~
a.cc:11:7: error: '\U0000201dYes\U0000201d' was not declared in this scope
   11 | cout<<”Yes”<<endl;
      |       ^~~~~
a.cc:14:7: error: '\U0000201dNo\U0000201d' was not declared in this scope
   14 | cout<<”No”<<endl;
      |       ^~~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
 
void main(){
  char IN[4];
  for(int i=0;i!=4;i++){
  	scanf("%d", &IN[i]);
  }
  if(IN[0]==IN[1]&&IN[1]==IN[2]){
  	printf("%d\n", "Yes");
  }else if(IN[1]==IN[2]&&IN[2]==IN[3]){
  	printf("%d\n", "No");
  }
 return 0;
}

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

#include<stdio.h>

int main() {
	int N;
	int a, b, c, d;
	bool result = false;
	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 (a == b) {
		if (a == c || a == d)result = true;
	} else {
		if (a == c || b == c) {
			if (c == d)result = true;
		}
	}

	printf("%s\n", result ? "Yes" : "No");

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'bool'
    6 |         bool result = false;
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:6:23: error: 'false' undeclared (first use in this function)
    6 |         bool result = false;
      |                       ^~~~~
main.c:6:23: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:47: error: 'true' undeclared (first use in this function)
   15 |                 if (a == c || a == d)result = true;
      |                                               ^~~~
main.c:15:47: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include <iostream>
using namespace std;

int main(){
  string str; cin >> str;
  if ((str0 str1 str1 str2) or
       str1 str2 str2 str3))
    cout << ”Yes” << endl;
  else
    cout << ”No” << endl;

  return 0;
}

Compiler output:
a.cc:8:13: error: extended character ” is not valid in an identifier
    8 |     cout << ”Yes” << endl;
      |             ^
a.cc:8:13: error: extended character ” is not valid in an identifier
a.cc:10:13: error: extended character ” is not valid in an identifier
   10 |     cout << ”No” << endl;
      |             ^
a.cc:10:13: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:8: error: 'str0' was not declared in this scope; did you mean 'str'?
    6 |   if ((str0 str1 str1 str2) or
      |        ^~~~
      |        str
a.cc:6:12: error: expected ')' before 'str1'
    6 |   if ((str0 str1 str1 str2) or
      |       ~    ^~~~~
      |            )
a.cc:8:26: error: expected ')' before ';' token
    8 |     cout << ”Yes” << endl;
      |                          ^
      |                          )
a.cc:6:6: note: to match this '('
    6 |   if ((str0 str1 str1 str2) or
      |      ^
a.cc:10:13: error: '\U0000201dNo\U0000201d' was not declared in this scope
   10 |     cout << ”No” << endl;
      |             ^~~~
Language: C++

import sys,collections
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

x = S()

ans = "No"
for i in range(len(x)):
    if x.count(x[i]) >= 3:
        ans = "Yes"
print(ans)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys,collections
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <string>
#include <vector>
#include <algorithm>
 
using namespace std;
 
 
int main () {
	string N;
	cin >> N;
	if ((N[1]== N[2]) &&((N[0] == N[1]) || (N[2] == N[3]))) cout << "Yes";
	else cout << "No";
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> N;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <algorithm>
  +++ |+#include <iostream>
    4 | 
a.cc:11:65: error: 'cout' was not declared in this scope
   11 |         if ((N[1]== N[2]) &&((N[0] == N[1]) || (N[2] == N[3]))) cout << "Yes";
      |                                                                 ^~~~
a.cc:11:65: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:14: error: 'cout' was not declared in this scope
   12 |         else cout << "No";
      |              ^~~~
a.cc:12:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java


import java.util.Scanner;

public class CodeForces {

		public static void main(String[] args){
			
			Scanner s = new Scanner(System.in);
			int n = s.nextInt();
			int n4 = n%10;
			n/=10;
			int n3 = n%10;
			n/=10;
			int n2 = n%10;
			n/= 10;
			
			if(n==n2 && n2 ==n3)
				System.out.println("Yes");
			else if(n2==n3 && n3==n4){
				System.out.println("Yes");
			}
			else{
				System.out.println("No");
			}
			
	        
	    }
}



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

#include<iostream>
#include<cstring>
using namespace std;
int main(){
string n;
cin >>n;
if (n[0]==n[1] & n[1]==n[2]) {
cout<<”Yes”<<endl;
}
else if(n[1]==n[2] & n[2]==n[3] ){
cout<<”Yes”<<endl;
}
else{
cout<<”No”<<endl;
}

return 0;
}

Compiler output:
a.cc:8:7: error: extended character ” is not valid in an identifier
    8 | cout<<”Yes”<<endl;
      |       ^
a.cc:8:7: error: extended character ” is not valid in an identifier
a.cc:11:7: error: extended character ” is not valid in an identifier
   11 | cout<<”Yes”<<endl;
      |       ^
a.cc:11:7: error: extended character ” is not valid in an identifier
a.cc:14:7: error: extended character ” is not valid in an identifier
   14 | cout<<”No”<<endl;
      |       ^
a.cc:14:7: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:7: error: '\U0000201dYes\U0000201d' was not declared in this scope
    8 | cout<<”Yes”<<endl;
      |       ^~~~~
a.cc:11:7: error: '\U0000201dYes\U0000201d' was not declared in this scope
   11 | cout<<”Yes”<<endl;
      |       ^~~~~
a.cc:14:7: error: '\U0000201dNo\U0000201d' was not declared in this scope
   14 | cout<<”No”<<endl;
      |       ^~~~
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int a = x/1000;
		int b = x/100 -a*10;
		int c = x/10 -a*100 + b*10;
		int d = x-a*1000-b*100-c*10;


		if(a==b&&b==c||b==c&&c==d) {
			System.out.print("Yes");
		}
		else {
			System.out.print("No");
		}
	}

}


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

#include<iostream>
using namespace std;

int flag[12];
int get_num;

void hash(){
	for(int i=0; i<4; i++)
	{
		flag[get_num%10]+=1;
		get_num/=10;
	}
}

int main(){
	cin >> get_num;
	hash();
	for(int i=1; i<10; i++){
		if(flag[i]>=3){
			cout << "Yes"<<endl;
			return 0;
		}
	}
	cout << "No" <<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: reference to 'hash' is ambiguous
   17 |         hash();
      |         ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:7:6: note:                 'void hash()'
    7 | void hash(){
      |      ^~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
	string s;
	cin >> string;
	if ((s[0] == s[1] && s[1] == s[2])||(s[3] == s[1] && s[1] == s[2]))cout << "Yes"<<endl;
	else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: expected primary-expression before ';' token
    5 |         cin >> string;
      |                      ^
Language: C++

#include<iostream>
using namespace std;
int main() {
	string s;
	cin >> string;
	if (s[0] == s[1] && s[1] == s[2])cout << "Yes"<<endl;
	else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: expected primary-expression before ';' token
    5 |         cin >> string;
      |                      ^
Language: Java


import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
import java.util.Stack;


public class CodeForces {

		public static void main(String[] args){
			
			Scanner s = new Scanner(System.in);
			int n = s.nextInt();
			int n4 = n%10;
			n/=10;
			int n3 = n%10;
			n/=10;
			int n2 = n%10;
			n/= 10;
			
			if(n==n2 && n2 ==n3)
				System.out.println("Yes");
			else if(n2==n3 && n3==n4){
				System.out.println("Yes");
			}
			else{
				System.out.println("No");
			}
			
	        
	    }
}



Compiler output:
Main.java:9: error: class CodeForces is public, should be declared in a file named CodeForces.java
public class CodeForces {
       ^
1 error