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

#include<bits/stdc++.h>
using namespace std;
int main(){

string N;
  cin>>N;
  for(int i=0;i<N.size();i++){
    if((N.at(0)==N.at(1)==N.at(2))||(N.at(1)==N.at(2)=-N.at(3))){
      cout<<"Yes"<<endl;
    }
    else{
      cout<<"No"<<endl;
    }
  }

    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:45: error: lvalue required as left operand of assignment
    8 |     if((N.at(0)==N.at(1)==N.at(2))||(N.at(1)==N.at(2)=-N.at(3))){
      |                                      ~~~~~~~^~~~~~~~~
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main() {
	// 変数の宣言
	int N, N1, N2, N3, N4;

	// 値の取得
	cin >> N;
	
	// 1000のくらい
	N1 = N/1000;
	// 100の位
	N2 = N%1000/100;
	// 10の位
	N3 = (N%1000)%100/10;
	// 1の位
	N4 = ((N%1000)%100)%10;

	// 判定
	if (N1==N2==N3 || N1==N3==N4 || N1==N2==N4 || N2==N3==N4)
	{
		// 良い整数
		cout<< "Yes";
	}else
	{
		cout<< "No"
	}
	
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:28: error: expected ';' before '}' token
   27 |                 cout<< "No"
      |                            ^
      |                            ;
   28 |         }
      |         ~
Language: C++

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

int main(){
  
  string S; cin >> S;
  
  if(S[0] == S[1] && S[1] == S[2]){
    cout << "Yes" << endl;
  }
  
  else if(S[1] == S[2] && S[2] == S[3]){
    cout << "Yes" << endl;
  }
  else if(S[2] == S[3] && S[3] == S[0]{
    cout << "Yes" << endl;
  }
  
  else if(S[3] == S[0] && S[0] == S[1]){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:39: error: expected ';' before '{' token
   15 |   else if(S[2] == S[3] && S[3] == S[0]{
      |                                       ^
      |                                       ;
a.cc:19:3: error: expected primary-expression before 'else'
   19 |   else if(S[3] == S[0] && S[0] == S[1]){
      |   ^~~~
a.cc:17:4: error: expected ')' before 'else'
   17 |   }
      |    ^
      |    )
   18 | 
   19 |   else if(S[3] == S[0] && S[0] == S[1]){
      |   ~~~~
a.cc:15:10: note: to match this '('
   15 |   else if(S[2] == S[3] && S[3] == S[0]{
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 int main(void){
   int N,A,B,C,D;
     cin >> N;
   A=N%1000;
   B=N-N%10;
   C=A%111;
   D=B%111;
   if (C=0 || D=0) {
     cout << "Yes" << endl;
   }
   else {
     cout << "No" << endl;
   }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: lvalue required as left operand of assignment
   10 |    if (C=0 || D=0) {
      |          ~~^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 int main(void){
   int N,A,B,C,D
     cin >> N;
   A=N%1000;
   B=N-N%10;
   C=A%111;
   D=B%111;
   if (C=0 || D=0) {
     cout << "Yes" << endl;
   }
   else {
     cout << "No" << endl;
   }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected initializer before 'cin'
    5 |      cin >> N;
      |      ^~~
a.cc:9:4: error: 'D' was not declared in this scope
    9 |    D=B%111;
      |    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
  string s;
  cin>>s;
  int m=0;
  for(int i=1;i<s.size();i++){
      if(s.at(i-1)==s.at(i)){
          m++;
          if (m==3) {cout<<"Yes"<<endl;return 0;}
      }
      else m=0;
  } 
  else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else cout<<"No"<<endl;
      |   ^~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  int a[4]
  a[0] = N%10; N /= 10;
  a[1] = N%10; N /= 10;
  a[2] = N%10; N /= 10;
  a[3] = N%10; N /= 10;

  if (0==1){
  	if (1==2)
  	cout << "Yes" <<endl;
  } 
  else if (1==2){
  	if (2==3)
  	cout << "Yes" <<endl;
  }
  else{
  	cout << "No" <<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'a'
    8 |   a[0] = N%10; N /= 10;
      |   ^
a.cc:9:3: error: 'a' was not declared in this scope
    9 |   a[1] = N%10; N /= 10;
      |   ^
Language: C++

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

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

  if ((n / 1000 == (n % 1000 / 100) && n / 1000 == (n % 100 / 10)) || (n / 100 == (n % 100 / 10) && n / 100 == (n % 10)){
    cout << "Yes" << endl;
  }else{
    cout << "Yes" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:121: error: expected ')' before '{' token
    8 |   if ((n / 1000 == (n % 1000 / 100) && n / 1000 == (n % 100 / 10)) || (n / 100 == (n % 100 / 10) && n / 100 == (n % 10)){
      |      ~                                                                                                                  ^
      |                                                                                                                         )
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

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

  if ((n / 1000 == (n % 1000 / 100) && n / 1000 == (n % 100 / 10)) || 
      (n / 100 == (n % 100 / 10) && n / 100 == (n % 10)){
    cout << "Yes" << endl;
  }else{
        cout << "Yes" << endl;
      }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:57: error: expected ')' before '{' token
    9 |       (n / 100 == (n % 100 / 10) && n / 100 == (n % 10)){
      |                                                         ^
      |                                                         )
a.cc:8:6: note: to match this '('
    8 |   if ((n / 1000 == (n % 1000 / 100) && n / 1000 == (n % 100 / 10)) ||
      |      ^
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <numeric>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    int n;
    cin >> n;
    string s;
    if(n[0]==n[1]&&n[1]==n[2]) s="Yes";
    else if(n[1]==n[2]&&n[2]==n[3]) s="Yes";
    else s="No";
    cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: invalid types 'int[int]' for array subscript
   12 |     if(n[0]==n[1]&&n[1]==n[2]) s="Yes";
      |         ^
a.cc:12:15: error: invalid types 'int[int]' for array subscript
   12 |     if(n[0]==n[1]&&n[1]==n[2]) s="Yes";
      |               ^
a.cc:12:21: error: invalid types 'int[int]' for array subscript
   12 |     if(n[0]==n[1]&&n[1]==n[2]) s="Yes";
      |                     ^
a.cc:12:27: error: invalid types 'int[int]' for array subscript
   12 |     if(n[0]==n[1]&&n[1]==n[2]) s="Yes";
      |                           ^
a.cc:13:14: error: invalid types 'int[int]' for array subscript
   13 |     else if(n[1]==n[2]&&n[2]==n[3]) s="Yes";
      |              ^
a.cc:13:20: error: invalid types 'int[int]' for array subscript
   13 |     else if(n[1]==n[2]&&n[2]==n[3]) s="Yes";
      |                    ^
a.cc:13:26: error: invalid types 'int[int]' for array subscript
   13 |     else if(n[1]==n[2]&&n[2]==n[3]) s="Yes";
      |                          ^
a.cc:13:32: error: invalid types 'int[int]' for array subscript
   13 |     else if(n[1]==n[2]&&n[2]==n[3]) s="Yes";
      |                                ^
Language: C++

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

int main(){
  
  string N;
  cin >> N;
  
  if(N[0]==N[1]){
    if(N[1]==N[2]){
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
  }
  else{
    if(N[1]==N[2]){
      if(N[2]==N[3]){
        cout << "Yes" << endl;
      }
      else{
        cout << "No" << endl;
      }
    else{
      cout << "No" << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: expected '}' before 'else'
   25 |     else{
      |     ^~~~
a.cc:18:19: note: to match this '{'
   18 |     if(N[1]==N[2]){
      |                   ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

  int main(){
    String s;
    cin>>s;
    if(s[0]==s[1]&&s[1]==s[2]){
       cout<<"Yes"<<endl;
    } else if(s[3]==s[2]&&s[2]==s[1]){
       cout<<"Yes"<<endl;
    }else{
      cout<<"No"<<endl;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'String' was not declared in this scope
    6 |     String s;
      |     ^~~~~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |     cin>>s;
      |          ^
Language: C++

#include<bits/stdc++>

using namespace std;

  int main(){
    String s;
    cin>>s;
    if(s[0]==s[1]&&s[1]==s[2]){
       cout<<"Yes"<<endl;
    } else if(s[3]==s[2]&&s[2]==s[1]){
       cout<<"Yes"<<endl;
    }else{
      cout<<"No"<<endl;
    }
  }

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

#include <cstdio > 
char s[5];
int main ()
{
scanf("%s",&s); if(s[0]==s[1]&&s[1]==s[2])puts("Yes");
else if(s[1]==s[2]&&s[2]==s[3])puts("Yes"); else puts("No");
}

Compiler output:
main.c:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio >
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio > 
char s[5];
int main ()
{
scanf("%s",&s); if(s[0]==s[1]&&s[1]==s[2])puts("Yes");
else if(s[1]==s[2]&&s[2]==s[3])puts("Yes"); else puts("No");
}

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

#include <iostream>
using namespace std;

int main()
{
	char c1, c2, c3, c4;
	cin >> c1 >> c2 >> c3 >> c4;
	if ((c1 == c2 && c2 == c3)||(c2==c3&&c3==c4) {
		cout<<"Yes"<<endl;
	}
	else {
		cout<<"No"<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:53: error: expected ')' before '{' token
    8 |         if ((c1 == c2 && c2 == c3)||(c2==c3&&c3==c4) {
      |            ~                                        ^~
      |                                                     )
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
Language: C++

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

int main(){
	int n,a,b,c,d;
  cin>>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==c==d)
    cout<<"Yes"<<endl;
  else{
    if(a==b==c||a==b==d||a==c==d||d==b==c||)
    	cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;    
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'C' was not declared in this scope
    9 |   C=(n-1000*a-100*b)/10;
      |   ^
a.cc:14:44: error: expected primary-expression before ')' token
   14 |     if(a==b==c||a==b==d||a==c==d||d==b==c||)
      |                                            ^
Language: C++

int main() {
  int n;
  cin >> n;
  int p1000 = n / 1000, p100 = n % 1000 / 100, 
      p10 = n % 1100 / 10, p1 = n % 1110 / 1;

  if (n == 1000 || n == 1100) {
    cout << "Yes" << endl;
  } 
  else if ((p1000 == p100 && p100 == p10) || (p100 == p10 && p10 == p1)) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> n;
      |   ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope
    8 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:11:22: error: 'endl' was not declared in this scope
   11 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "No" << endl;
      |     ^~~~
a.cc:14:21: error: 'endl' was not declared in this scope
   14 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,a,b,c;
  cin >> N;
  a=N % 1110;
  b=N & 1000;
  c=b % 111;
  if (a < 10) {
    cout << "Yes" << endl;
  }
  else if (c = 0) {
    cout << "Yes" << endl;
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected '}' before 'else'
   15 |   else {
      |   ^~~~
a.cc:13:19: note: to match this '{'
   13 |   else if (c = 0) {
      |                   ^
Language: C++

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

int maim(){
  int n ;
  cin >> n;
  int a=n%10;
  int b=n/10%10;
  int c=(n/100)%10;
  int d=(n/1000)%10;
  if ((a==b&&b==c)||(b==c&&c==d))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int maim()':
a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
/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 <bits/stdc++.h>
using namespace std;

int maim(){
  int n ;
  cin >> n endl;
  int a=n%10;
  int b=n/10%10;
  int c=(n/100)%10;
  int d=(n/1000)%10;
  if ((a==b&&b==c)||(b==c&&c==d))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int maim()':
a.cc:6:11: error: expected ';' before 'endl'
    6 |   cin >> n endl;
      |           ^~~~~
      |           ;
a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int x;
  x=N%1000;
  
  if(x==0 ||
     x==111 ||
    x==222 ||
    x==333 ||
    x==444  ||
    x==555  ||
    x==666  || 
    x==777  ||
    x==888  ||
    x==999  ){
    cout << "Yes";}
   else if(N%1110 < 10){
     cout << "Yes";}
   else {
     cout << "No";}
           
     
}
}

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

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

int main() {
  int N;
  cin >> N;
  int x;
  x=N%1000;
  
  if(x==0 ||
     x==111 ||
    x==222 ||
    x==333 ||
    x==444  ||
    x==555  ||
    x==666  || 
    x==777  ||
    x==888  ||
    x==999  ){
    cout << "Yes";}
   else if(N%1110 < 10){
     cout << "Yes";}
   else {
     cout << "No";}
           
     
    )
}

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if ((n % 1000) % 111 == 0) {
    cout << "Yes" << endl;
  }else if ((n /10) % 111 == 0) {
    cout << "Yes" << endl;
  }else
    cout << "No"
}

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

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

int main() {
  int N ;
  cin >> N ;
  if ((N % 1000) % 111 == 0 || (N / 10) ) % 111 == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}









Compiler output:
a.cc: In function 'int main()':
a.cc:7:43: error: expected primary-expression before '%' token
    7 |   if ((N % 1000) % 111 == 0 || (N / 10) ) % 111 == 0) {
      |                                           ^
Language: C++

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

int main() {
  int N ;
  cin >> N ;
  if (N % 1000 % 111 == 0) || ((N - (N % 10) ) % 10 % 111 == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}







Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected primary-expression before '||' token
    7 |   if (N % 1000 % 111 == 0) || ((N - (N % 10) ) % 10 % 111 == 0) {
      |                            ^~
Language: C++

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

int main() {
  int N ;
  cin >> N ;
  if (N % 1000 % 111 == 0 || (N - (N % 10) ) % 10 % 111 == 0 {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}






Compiler output:
a.cc: In function 'int main()':
a.cc:7:61: error: expected ')' before '{' token
    7 |   if (N % 1000 % 111 == 0 || (N - (N % 10) ) % 10 % 111 == 0 {
      |      ~                                                      ^~
      |                                                             )
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

int main() {
  int N ;
  cin >> N ;
  if (N % 1000 % 111 == 0 || (N - (N % 10) ) % 10 % 111 == 0 
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}





Compiler output:
a.cc: In function 'int main()':
a.cc:7:61: error: expected ';' before 'cout'
    7 |   if (N % 1000 % 111 == 0 || (N - (N % 10) ) % 10 % 111 == 0
      |                                                             ^
      |                                                             ;
    8 |     cout << "Yes" << endl;
      |     ~~~~                                                     
a.cc:9:3: error: expected primary-expression before '}' token
    9 |   }
      |   ^
a.cc:8:27: error: expected ')' before '}' token
    8 |     cout << "Yes" << endl;
      |                           ^
      |                           )
    9 |   }
      |   ~                        
a.cc:7:6: note: to match this '('
    7 |   if (N % 1000 % 111 == 0 || (N - (N % 10) ) % 10 % 111 == 0
      |      ^
a.cc:9:3: error: expected primary-expression before '}' token
    9 |   }
      |   ^
a.cc: At global scope:
a.cc:10:3: error: expected unqualified-id before 'else'
   10 |   else {
      |   ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

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

int main() {
  int N ;
  cin >> N ;
  if (N % 111 < 10 ){
    cout << "Yes" << endl;
  }
  else if (N % 1000 == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
}



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

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

int main() {
  int N, ;
  cin >> N;
  if (N % 111 < 10){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before ';' token
    5 |   int N, ;
      |          ^
Language: C++

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

int main() {
    string n;
    string ans = "No";
    cin >> n;
    if ((n[0]==n[1]==n[2])||(n[1]==n[2]=n[3])) ans = "Yes";
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: lvalue required as left operand of assignment
    8 |     if ((n[0]==n[1]==n[2])||(n[1]==n[2]=n[3])) ans = "Yes";
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string n;
  cin >> n;
  
  if (n[2] == n[3]){
    if(n[1] == n[2]){
    	cout << Yes << endl;
    }
    else if(n[1] == n[4]){
    	cout << Yes << endl;
    }
    else{
    	cout << No << endl;
    }
   }
  else {
    cout << No << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'Yes' was not declared in this scope
   10 |         cout << Yes << endl;
      |                 ^~~
a.cc:13:17: error: 'Yes' was not declared in this scope
   13 |         cout << Yes << endl;
      |                 ^~~
a.cc:16:17: error: 'No' was not declared in this scope
   16 |         cout << No << endl;
      |                 ^~
a.cc:20:13: error: 'No' was not declared in this scope
   20 |     cout << No << endl;
      |             ^~
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<iomanip>



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

using namespace std;
stirng a;

int main(){
  cin >> a;
  if(a[0]==a[1]&&a[1]==a[2]) cout << "Yes" <<endl;
  else if(a[1]==a[2]&&a[2]==a[3]) cout << "Yes" <<endl;
  else cout << "No" <<endl;
  return 0;
}


Compiler output:
a.cc:16:1: error: 'stirng' does not name a type
   16 | stirng a;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:19:10: error: 'a' was not declared in this scope
   19 |   cin >> a;
      |          ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'a'
    7 |   cin a = N / 1000;
      |      ^~
      |      ;
a.cc:8:6: error: expected ';' before 'b'
    8 |   cin b = (N % 1000) / 100;
      |      ^~
      |      ;
a.cc:9:6: error: expected ';' before 'c'
    9 |   cin c = (N % 100) / 10;
      |      ^~
      |      ;
a.cc:10:6: error: expected ';' before 'd'
   10 |   cin d = N % 10;
      |      ^~
      |      ;
a.cc:12:6: error: 'a' was not declared in this scope
   12 |   if(a == b == c == d){
      |      ^
a.cc:12:11: error: 'b' was not declared in this scope
   12 |   if(a == b == c == d){
      |           ^
a.cc:12:16: error: 'c' was not declared in this scope
   12 |   if(a == b == c == d){
      |                ^
a.cc:12:21: error: 'd' was not declared in this scope
   12 |   if(a == b == c == d){
      |                     ^
Language: C++

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

int main() {
  int N, a, b, c, d;
  cin >> N;
  a = N / 1000;
  b = (N - 1000 * a) / 100;
  c = (N - 1000 * a - 100 * b);
  d = N- 1000 * a - 100 * b - 10 * c;
  if (b != c) {
    cout << "No" << endl;
  }
  else if (a = b || c = d) {
    cout << "Yes" << endl;
  }
  else {
     cout << "No" << endl;
  }
}


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

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

int main() {

	string a;

	cin >> a;

	if (a[0] == a[1] == a[2] || a[1] == a[2] == a[3]) {
		puts("Yes");
	}

	else {
		puts("No")
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: expected ';' before '}' token
   18 |                 puts("No")
      |                           ^
      |                           ;
   19 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(void){
  string a;
  int ans;
  
  cin>>a;
  if(a[0]==a[1]&&a[1]==a[2])
     ans++;
  if(a[0]==a[1]&&a[1]==a[3])
     ans++;
  if(a[0]==a[3]&&a[3]==a[2])
     ans++;
  if(a[1]==a[2]&&a[2]==a[3])
    ans++
  cout<<(ans>=1?"Yes":"No")<<endl;
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected ';' before 'cout'
   18 |     ans++
      |          ^
      |          ;
   19 |   cout<<(ans>=1?"Yes":"No")<<endl;
      |   ~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(void){
  string a;
  int ans;
  
  cin>>a;
  if(a[0]==a[1]
     ans++;
  if(a[0]==a[2])
     ans++;
  if(a[0]==a[3])
     ans++;
  if(a[1]==a[2])
     ans++;
  if(a[1]==a[3])
     ans++;
  if(a[2]==a[3])
     ans++;
  cout<<(ans>=3?"Yes":"No")<<endl;
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before 'ans'
   11 |   if(a[0]==a[1]
      |                ^
      |                ;
   12 |      ans++;
      |      ~~~        
a.cc:13:3: error: expected primary-expression before 'if'
   13 |   if(a[0]==a[2])
      |   ^~
a.cc:12:12: error: expected ')' before 'if'
   12 |      ans++;
      |            ^
      |            )
   13 |   if(a[0]==a[2])
      |   ~~        
a.cc:11:5: note: to match this '('
   11 |   if(a[0]==a[1]
      |     ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  if(N/1000 == (N%1000)/100 && (N%1000)/100 == (N%100)/10 && (N%100)/10 == N/1)
     cout << "Yes" << endl;
  else cout << "No" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected '}' at end of input
    9 |   else cout << "No" << endl;
      |                             ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  if(N/1000 == ((N%1000)/100 && (N%1000)/100 == (N%100)/10 && (N%100)/10 == (N%10)/1)
     cout << "Yes" << endl;
     else cout << "No" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:86: error: expected ';' before 'cout'
    7 |   if(N/1000 == ((N%1000)/100 && (N%1000)/100 == (N%100)/10 && (N%100)/10 == (N%10)/1)
      |                                                                                      ^
      |                                                                                      ;
    8 |      cout << "Yes" << endl;
      |      ~~~~                                                                             
a.cc:9:6: error: expected primary-expression before 'else'
    9 |      else cout << "No" << endl;
      |      ^~~~
a.cc:8:28: error: expected ')' before 'else'
    8 |      cout << "Yes" << endl;
      |                            ^
      |                            )
    9 |      else cout << "No" << endl;
      |      ~~~~                   
a.cc:7:5: note: to match this '('
    7 |   if(N/1000 == ((N%1000)/100 && (N%1000)/100 == (N%100)/10 && (N%100)/10 == (N%10)/1)
      |     ^
a.cc:9:32: error: expected '}' at end of input
    9 |      else cout << "No" << endl;
      |                                ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  if((n/1000 == (n%1000)/100) && (n/1000 == (n%100)/10)
     cout << "Yes" << endl;
  else if (((n%100)/10 == (n%1000)/100) && (n%10 == (n%100)/10)
     cout << "Yes" << endl;
  else
     cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:56: error: expected ';' before 'cout'
    7 |   if((n/1000 == (n%1000)/100) && (n/1000 == (n%100)/10)
      |                                                        ^
      |                                                        ;
    8 |      cout << "Yes" << endl;
      |      ~~~~                                               
a.cc:9:3: error: expected primary-expression before 'else'
    9 |   else if (((n%100)/10 == (n%1000)/100) && (n%10 == (n%100)/10)
      |   ^~~~
a.cc:8:28: error: expected ')' before 'else'
    8 |      cout << "Yes" << endl;
      |                            ^
      |                            )
    9 |   else if (((n%100)/10 == (n%1000)/100) && (n%10 == (n%100)/10)
      |   ~~~~                      
a.cc:7:5: note: to match this '('
    7 |   if((n/1000 == (n%1000)/100) && (n/1000 == (n%100)/10)
      |     ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  int n;
  int a[4];
  REP(i,4){
    a[i] = n%10;
    n /= 10;
  }
  
  if((a[0]==a[1] && a[1]==a[2]){
    cout<<"Yes"<<endl;
  }else if(a[1]==a[2] && a[2]==a[3]){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before '{' token
   12 |   if((a[0]==a[1] && a[1]==a[2]){
      |                                ^
      |                                ;
a.cc:14:4: error: expected primary-expression before 'else'
   14 |   }else if(a[1]==a[2] && a[2]==a[3]){
      |    ^~~~
a.cc:14:4: error: expected ')' before 'else'
   14 |   }else if(a[1]==a[2] && a[2]==a[3]){
      |    ^~~~
      |    )
a.cc:12:5: note: to match this '('
   12 |   if((a[0]==a[1] && a[1]==a[2]){
      |     ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  int n;
  int a[4];
  REP(i,4){
    a[i] = n%10;
    n /= 10;
  }
  
  if((a[0]==a[1] && a[1]==a[2]){
    cout<<"Yes"<<endl;
  }else if((a[1]==a[2] && a[2]==a[3])){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before '{' token
   12 |   if((a[0]==a[1] && a[1]==a[2]){
      |                                ^
      |                                ;
a.cc:14:4: error: expected primary-expression before 'else'
   14 |   }else if((a[1]==a[2] && a[2]==a[3])){
      |    ^~~~
a.cc:14:4: error: expected ')' before 'else'
   14 |   }else if((a[1]==a[2] && a[2]==a[3])){
      |    ^~~~
      |    )
a.cc:12:5: note: to match this '('
   12 |   if((a[0]==a[1] && a[1]==a[2]){
      |     ^
Language: C++

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

int main(){
  int N,a;
  cin>>N;
  a=N%1000
  if (N%1110<10|N%1111==0|a%111==0){
    cout<<"Yes"<<endl;
  }
  else {
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before 'if'
    7 |   a=N%1000
      |           ^
      |           ;
    8 |   if (N%1110<10|N%1111==0|a%111==0){
      |   ~~       
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else {
      |   ^~~~
Language: C++

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

int main(){
  vector<char> N(4);
  for(int i=0; i<4; i++)
    cin >>N.at(i);
  int s=0;
  for(int i=0; i<3; i++){
    if(N.at(i)==N.at(i+1))
      s++
  }
  if(s>=2)
    cout <<"Yes" <<endl;
  else
    cout <<"No" <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected ';' before '}' token
   11 |       s++
      |          ^
      |          ;
   12 |   }
      |   ~
Language: C++

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

int main(){
  vector<char> N(4);
  for(int i=0; i<4; i++)
    cin >>N.at(i);
  int s=0
  for(int i=0; i<3; i++){
    if(N.at(i)==N.at(i+1))
      s++
  }
  if(s>=2)
    cout <<"Yes" <<endl;
  else
    cout <<"No" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for(int i=0; i<3; i++){
      |   ^~~
a.cc:9:16: error: 'i' was not declared in this scope
    9 |   for(int i=0; i<3; i++){
      |                ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  if (1000 <= n <= 9999){
    t=n%1110;
      if (t <= 9){
        cout << "Yes" <<endl;
      }
    else{
      cout << "No" <<endl;
      
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 't' was not declared in this scope
    7 |     t=n%1110;
      |     ^
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <cstdio>

int main()
{
  char N[5];
  scanf("%s", &s);
  if(N[0]==N[1]&&N[1]==N[2]) {
    puts("Yes");
  }else if(N[1]==N[2]&&N[2]==N[3]) {
    puts("Yes");
  }else{
    puts("No");
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 's' was not declared in this scope
    6 |   scanf("%s", &s);
      |                ^
Language: C++

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll,ll> P;
typedef vector<P> vp;
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define REPR(i,n) for(int i=n-1;i>=0;i--)
#define FORR(i,n,m) for(int i=n-1;i>=m;i--)
#define all(in) in.begin(),in.end()
#define ALL(in,K) in,in+K
#define INF 1e18
#define MOD 100000007
#define SIZE 10005
#define PI 	3.14159265358979323846


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    string s;
    cin >> s;
    int ans[10] = {0};
    REP(i,4)ans[s[i]-32]++;
    REP(i,10)if(ans[s[i]]<2){
        cout << "Yes" << endl;
        return 0;
    }
    cout MM "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:116:9: error: expected ';' before 'MM'
  116 |     cout MM "No" << endl;
      |         ^~~
      |         ;
Language: C++

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

int main() {
  int n, a, b;  cin >> N;
  a = n % 1110;
  b = n % 1000;

  //kkkl
  if(a >=1 && a <= 9 ) {
    cout << "Yes" << endl;
 }
  //klll
  else if(b % 111 == 0) {
    cout << "Yes" << endl;
 }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: 'N' was not declared in this scope
    5 |   int n, a, b;  cin >> N;
      |                        ^
Language: C++

#include <iostream>
#include <math.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <stdlib.h>
#include <deque>  
#include <iomanip>

using namespace std;

using ll = long long;
#define INF 1e9
#define MOD 1e9 + 7
#define rep(i, n) for(int i = 0; i < n; i++)
#define loop(i, a, n) for(int i = a; i < n; i++)
#define all(in) in.begin(), in.end()
int main(){
    string S;
    cin >> S;
    bool flag = false;
    if(S[1] != S[2] ) cout << "No" << endl;
    else cout << "Yes" << endl;
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:29:14: error: expected '}' at end of input
   29 |     return 0;
      |              ^
a.cc:23:11: note: to match this '{'
   23 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <math.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <stdlib.h>
#include <deque>  
#include <iomanip>

using namespace std;

using ll = long long;
#define INF 1e9
#define MOD 1e9 + 7
#define rep(i, n) for(int i = 0; i < n; i++)
#define loop(i, a, n) for(int i = a; i < n; i++)
#define all(in) in.begin(), in.end()
int main(){
    string S;
    cin >> S;
    bool flag = false;
    if(S[1]] != S[2] ) cout << "No" << endl;
    else cout << "Yes" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:12: error: expected ')' before ']' token
   27 |     if(S[1]] != S[2] ) cout << "No" << endl;
      |       ~    ^
      |            )
a.cc:27:12: error: expected primary-expression before ']' token
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double n;
  int a,b,c,x;
  cin >> n;
  a = n / 1000;
  b = ((n / 1000) - a) * 10;
  c = (((n / 1000) - a) * 10 - b) * 10;
  x = ((((n / 1000) - a) * 10 - b) * 10 - c) * 10;
  
  if (a == b == c || b == c == x) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl+
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double n;
  int a,b,c,x;
  cin >> n;
  a = n / 1000;
  b = ((n / 1000) - a) * 10;
  c = (((n / 1000) - a) * 10 - b) * 10;
  x = ((((n / 1000) - a) * 10 - b) * 10 - c) * 10;
  
  if (a == b == c || b == c == x) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl+
  }
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double n;
  int a,b,c,x;
  cin >> n;
  a = n / 1000;
  b = ((n / 1000) - a) * 10;
  c = (((n / 1000) - a) * 10 - b) * 10;
  x = ((((n / 1000) - a) * 10 - b) * 10 - c) * 10;
  
  if (a == b == c || b == c == x) {
    cout << "Yes" << endl;
  }
  else {
    cout "No" << endl+
  }
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: expected ';' before string constant
   17 |     cout "No" << endl+
      |         ^~~~~
      |         ;
Language: C++

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

int main() {
  int n;
  cin >> n;
  
  int ds[4]
    
  for (int i = 0; i < 4; i++) {
    ds[3 - i] = n % 10;
    n /= 10;
  }
  
  if (ds[0] == ds[1] && ds[1] == ds[2] || ds[1] == ds[2] && ds[2] == ds[3]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'for'
   10 |   for (int i = 0; i < 4; i++) {
      |   ^~~
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for (int i = 0; i < 4; i++) {
      |                   ^
a.cc:15:7: error: 'ds' was not declared in this scope
   15 |   if (ds[0] == ds[1] && ds[1] == ds[2] || ds[1] == ds[2] && ds[2] == ds[3]) {
      |       ^~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int N3, N2, N1, N0
  
  N3 = N/1000;
  N2 = (N%1000)/100;
  N1 = ((N-N3*1000)%100)/10;
  N0 = ((N-N3*1000-N2*100)%10);
  
  if (N3==N2==N1 || N2==N1==N0) {
	cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'N3'
   10 |   N3 = N/1000;
      |   ^~
a.cc:13:3: error: 'N0' was not declared in this scope; did you mean 'N1'?
   13 |   N0 = ((N-N3*1000-N2*100)%10);
      |   ^~
      |   N1
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  N3 = N/1000;
  N2 = (N%1000)/100;
  N1 = ((N-N3*1000)%100)/10;
  N0 = ((N-N3*1000-N2*100)%10);
  
  if (N3==N2==N1 || N2==N1==N0) {
	cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'N3' was not declared in this scope; did you mean 'N'?
    8 |   N3 = N/1000;
      |   ^~
      |   N
a.cc:9:3: error: 'N2' was not declared in this scope; did you mean 'N'?
    9 |   N2 = (N%1000)/100;
      |   ^~
      |   N
a.cc:10:3: error: 'N1' was not declared in this scope; did you mean 'N'?
   10 |   N1 = ((N-N3*1000)%100)/10;
      |   ^~
      |   N
a.cc:11:3: error: 'N0' was not declared in this scope; did you mean 'N'?
   11 |   N0 = ((N-N3*1000-N2*100)%10);
      |   ^~
      |   N
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  N3 = N/1000;
  N2 = (N%1000)/100;
  N1 = ((N-N3*1000)%100)/10;
  N0 = ((N-N3*1000-N2*100)%10);
  
  if (N3==N2==N1 && N2==N1==N0) {
	cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'N3' was not declared in this scope; did you mean 'N'?
    8 |   N3 = N/1000;
      |   ^~
      |   N
a.cc:9:3: error: 'N2' was not declared in this scope; did you mean 'N'?
    9 |   N2 = (N%1000)/100;
      |   ^~
      |   N
a.cc:10:3: error: 'N1' was not declared in this scope; did you mean 'N'?
   10 |   N1 = ((N-N3*1000)%100)/10;
      |   ^~
      |   N
a.cc:11:3: error: 'N0' was not declared in this scope; did you mean 'N'?
   11 |   N0 = ((N-N3*1000-N2*100)%10);
      |   ^~
      |   N
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  N3 = N/1000
  N2 = (N%1000)/100
  N1 = ((N-N3*1000)%100)/10
  N0 = ((N-N3*1000-N2*100)%10)
  
  if (N3==N2==N1 && N2==N1==N0) {
	cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'N3' was not declared in this scope; did you mean 'N'?
    8 |   N3 = N/1000
      |   ^~
      |   N
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else{
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  	str N;
  	cin >> N;
  	if (N[1]==N[2] and (N[0]==N[1] or N[2]==N[3])){
      cout << "Yes";
    }
  	else{
      cout << "No";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |         str N;
      |         ^~~
      |         std
a.cc:6:16: error: 'N' was not declared in this scope
    6 |         cin >> N;
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  	str N;
  	cin >> N;
  	if (N[1]==N[2] and (N[0]==N[1] or N[2]==N[3])){
      cout << "Yes";
    }
  	else{
      cout "No";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |         str N;
      |         ^~~
      |         std
a.cc:6:16: error: 'N' was not declared in this scope
    6 |         cin >> N;
      |                ^
a.cc:11:11: error: expected ';' before string constant
   11 |       cout "No";
      |           ^~~~~
      |           ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    string a;
    cin>> a;
    if(a[0]==a[1] && a[2]==a[1] ||a[3]==a[1] && a[2]==a[1] ||){
        std::cout << "Yes" << std::endl;
    }else{
        std::cout << "No" << std::endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:62: error: expected primary-expression before ')' token
    7 |     if(a[0]==a[1] && a[2]==a[1] ||a[3]==a[1] && a[2]==a[1] ||){
      |                                                              ^
Language: Java

#include<iostream>
#include <algorithm>
#include <string>
#include<math.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
int main() {
    string a;
    cin >> a;
    if (a[0] == a[1] && a[1] == a[2] || a[1] == a[2] && a[2] == a[3]) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include <algorithm>
^
Main.java:3: error: illegal character: '#'
#include <string>
^
Main.java:4: error: illegal character: '#'
#include<math.h>
^
Main.java:5: error: illegal character: '#'
#define rep(i,n)for(int i=0;i<n;i++)
^
Main.java:5: error: class, interface, enum, or record expected
#define rep(i,n)for(int i=0;i<n;i++)
                            ^
Main.java:5: error: class, interface, enum, or record expected
#define rep(i,n)for(int i=0;i<n;i++)
                                ^
Main.java:9: error: not a statement
    cin >> a;
        ^
Main.java:11: error: not a statement
        cout << "Yes" << endl;
                      ^
Main.java:14: error: not a statement
        cout << "No" << endl;
                     ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
11 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  NA = N/1000;
  NB = N%1000/100;
  NC = N%100/10;
  ND =N%10;
  if ( NA == NB && NC == NB && NC==ND) {
    cout << "Yes" << endl;
  }
  else if (NA == NB && NB == NC) {
    cout << "Yes" << endl;
  }
  else if (NB ==NC && NC ==ND){
    cout<< "Yes" <<endl;
  }
  else {
    cout<< "No" <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'NA' was not declared in this scope; did you mean 'N'?
    7 |   NA = N/1000;
      |   ^~
      |   N
a.cc:8:3: error: 'NB' was not declared in this scope; did you mean 'N'?
    8 |   NB = N%1000/100;
      |   ^~
      |   N
a.cc:9:3: error: 'NC' was not declared in this scope; did you mean 'N'?
    9 |   NC = N%100/10;
      |   ^~
      |   N
a.cc:10:3: error: 'ND' was not declared in this scope; did you mean 'N'?
   10 |   ND =N%10;
      |   ^~
      |   N
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  NA = N/1000;
  NB = N%1000/100;
  NC = N%100/10;
  ND =N%10
  if ( NA == NB && NC == NB && NC==ND) {
    cout << "Yes" << endl;
  }
  else if (NA == NB && NB == NC) {
    cout << "Yes" << endl;
  }
  else if (NB ==NC && NC ==ND){
    cout<< "Yes" <<endl;
  }
  else {
    cout<< "No" <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'NA' was not declared in this scope; did you mean 'N'?
    7 |   NA = N/1000;
      |   ^~
      |   N
a.cc:8:3: error: 'NB' was not declared in this scope; did you mean 'N'?
    8 |   NB = N%1000/100;
      |   ^~
      |   N
a.cc:9:3: error: 'NC' was not declared in this scope; did you mean 'N'?
    9 |   NC = N%100/10;
      |   ^~
      |   N
a.cc:10:3: error: 'ND' was not declared in this scope; did you mean 'N'?
   10 |   ND =N%10
      |   ^~
      |   N
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else if (NA == NB && NB == NC) {
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  N1000 = N/1000;
  N100 = (N%1000)/100;
  N10 = (N%100)/10;
  N1 =N%10
  if ( N1000 == N100 && N100 == N10 && N10==N1) {
    cout << "Yes" << endl;
  }
  else if (N1000 == N100 && N100 == N10) {
    cout << "Yes" << endl;
  }
  else if (N100==N10 && N10 ==N1){
    cout<< "Yes" <<endl;
  }
  else {
    cout<< "No" <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'N1000' was not declared in this scope
    7 |   N1000 = N/1000;
      |   ^~~~~
a.cc:8:3: error: 'N100' was not declared in this scope
    8 |   N100 = (N%1000)/100;
      |   ^~~~
a.cc:9:3: error: 'N10' was not declared in this scope
    9 |   N10 = (N%100)/10;
      |   ^~~
a.cc:10:3: error: 'N1' was not declared in this scope; did you mean 'N'?
   10 |   N1 =N%10
      |   ^~
      |   N
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else if (N1000 == N100 && N100 == N10) {
      |   ^~~~