criyle/codenet-compile-errors huggingface dataset:
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) {
      |   ^~~~
a.cc:14:30: error: expected identifier before '(' token
   14 |   else if (N1000 == N100) && (N100 == N10) {
      |                              ^
a.cc:17:24: error: expected identifier before '(' token
   17 |   else if (N100==N10)&&(N10 ==N1){
      |                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int n;
      |   ^~~
a.cc:7:16: error: 'n' was not declared in this scope
    7 |         cin >> n;
      |                ^
Language: C++

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

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




Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
   11 |     cout<<"Yes"endl;
      |           ^~~~~~~~~
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0]==N[1]==N[2]) {
      |        ^
a.cc:7:14: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0]==N[1]==N[2]) {
      |              ^
a.cc:7:20: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0]==N[1]==N[2]) {
      |                    ^
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |   else if (N[1]==N[2]==N[3]) {
      |             ^
a.cc:10:19: error: invalid types 'int[int]' for array subscript
   10 |   else if (N[1]==N[2]==N[3]) {
      |                   ^
a.cc:10:25: error: invalid types 'int[int]' for array subscript
   10 |   else if (N[1]==N[2]==N[3]) {
      |                         ^
a.cc:11:11: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
   11 |     cout<<"Yes"endl;
      |           ^~~~~~~~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'b'
    7 |   a = N / 1000 // 1000の位
      |               ^
      |               ;
    8 |   b = N / 100 - a * 10// 100の位
      |   ~            
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else {
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, a, b, c, d;
  cin >> N;
  a = N % 10; // 1の位
  b = (N % 100 - a) / 10; // 10の位
  c = (N % 1000) - (b * 10 + a) /100; // 100の位
  d = N - (c * 100 + b * 10 + a ) /1000;
  
  if (a == b == c || b == c == d) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  

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

#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <ios> 
#include <iomanip>
using namespace std;
 
#define N_MAX   (100000)
#define LL_MAX_NUM (1LL<<60)
#define INF 1e7
 
typedef long long ll;
typedef long long int lli;
 
int main() {
    string N, res;
	cin >> S;
    res = "No";
    for (int i = 0; i < S.size() - 2; i++) {
        if (S[i] == S[i+1] && S[i] == S[i+2])
        {
            res = "Yes";
        }
    }
    cout << res << endl;   
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: 'S' was not declared in this scope
   25 |         cin >> S;
      |                ^
Language: C++

#include <iostream>

using namespace std;

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

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |         if ((str[0] == str[1] && str[1] == str[2])
      |              ^~~
      |              std
Language: C++

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

int main() {
  int A, B, C, D;
  string input;
  cin >> input;
  A = stoi(input.substr(0, 1));
  B = stoi(input.substr(1, 1));
  C = stoi(input.substr(2, 1));
  D = stoi(input.substr(3, 1));
  
  message = "No"; // Noの確率が高い

  // 3つ連続して同じ数字＜BとCは同じ数字
  if (B == C) {
    // 3つ連続して同じ数字
    // -> AとB または CとD は同じ数字
    if (A == B || C == D){
      message = "Yes";
    }
  }

  cout << message << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'message' was not declared in this scope
   13 |   message = "No"; // Noの確率が高い
      |   ^~~~~~~
Language: C++

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

int main() {
  int A, B, C, D;
  string input;
  cin >> input;
  A = stoi(input.substr(0, 1));
  B = stoi(input.substr(1, 1));
  C = stoi(input.substr(2, 1));
  D = stoi(input.substr(3, 1);
  
  message = "No"; // Noの確率が高い

  // 3つ連続して同じ数字＜BとCは同じ数字
  if (B == C) {
    // 3つ連続して同じ数字
    // -> AとB または CとD は同じ数字
    if (A == B || C == D){
      message = "Yes";
    }
  }

  cout << message << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected ')' before ';' token
   11 |   D = stoi(input.substr(3, 1);
      |           ~                  ^
      |                              )
a.cc:13:3: error: 'message' was not declared in this scope
   13 |   message = "No"; // Noの確率が高い
      |   ^~~~~~~
Language: C++

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

int main() {
  int A, B, C, D;
  string input;
  cin >> input;
  A = input.substr(0, 1);
  B = input.substr(1, 1);
  C = input.substr(2, 1);
  D = input.substr(3, 1);
  
  message = "No"; // Noの確率が高い

  // 3つ連続して同じ数字＜BとCは同じ数字
  if (B == C) {
    // 3つ連続して同じ数字
    // -> AとB または CとD は同じ数字
    if (A == B || C == D){
      message = "Yes";
    }
  }

  cout << message << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
    8 |   A = input.substr(0, 1);
      |       ~~~~~~~~~~~~^~~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
a.cc:9:19: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
    9 |   B = input.substr(1, 1);
      |       ~~~~~~~~~~~~^~~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
a.cc:10:19: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
   10 |   C = input.substr(2, 1);
      |       ~~~~~~~~~~~~^~~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
a.cc:11:19: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
   11 |   D = input.substr(3, 1);
      |       ~~~~~~~~~~~~^~~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
a.cc:13:3: error: 'message' was not declared in this scope
   13 |   message = "No"; // Noの確率が高い
      |   ^~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'b'
    7 |   a  =  N  /  10
      |                 ^
      |                 ;
    8 |   b  =  N  %  1000
      |   ~              
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else {
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int N;
  cin>>N;
  int sum=0;
  for(int i=0;i<4;i++){
    if(N.at(i)=N.at(i+1)){
      sum++;
    }
  }
  if(sum>=3){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |     if(N.at(i)=N.at(i+1)){
      |          ^~
a.cc:8:18: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |     if(N.at(i)=N.at(i+1)){
      |                  ^~
Language: C++

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





Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'b$$b' was not declared in this scope
    7 |     if((a==b$$b==c)||(b==c&&c==d)){
      |            ^~~~
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'if'
    7 |     if(a==b==c||b==c==d){
      |     ^~
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else{
      |   ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: 'N' was not declared in this scope
    6 |   int a=n/1000,b=(n-(N/1000)*1000)/100,c=(n-(n/100)*100)/10,d=n%10
      |                      ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:138: error: expected ';' before '{' token
    7 |   if (N / 1000 == (N % 1000) / 100 == ((N % 1000) % 100) / 10 || (N % 1000) / 100 == ((N % 1000) % 100) / 10 == (((N % 1000) % 100) % 10) {
      |                                                                                                                                          ^~
      |                                                                                                                                          ;
a.cc:10:3: error: expected primary-expression before 'else'
   10 |   else {
      |   ^~~~
a.cc:9:4: error: expected ')' before 'else'
    9 |   }
      |    ^
      |    )
   10 |   else {
      |   ~~~~
a.cc:7:6: note: to match this '('
    7 |   if (N / 1000 == (N % 1000) / 100 == ((N % 1000) % 100) / 10 || (N % 1000) / 100 == ((N % 1000) % 100) / 10 == (((N % 1000) % 100) % 10) {
      |      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: expected primary-expression before '||' token
    7 |   if(s[0]==s[1] && s[1]==s[2]) || (s[1]==s[2] && s[2]==s[3]))ans="Yes";
      |                                ^~
Language: C++

#include<stdc++.h>
using namespace std;
int main()
{
  int N;
  cin >> N;
  
  int a,b;
  
  if (N == a + a*10 + a*100 + b){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
 int N;
  cin >> N;
  if (N % 1110 < 10 || (N-1000) % 111 == 0 || (N-2000) % 111 == 0 || (N-3000) % 111 == 0 || (N-4000) % 111 == 0 || (N-5000) % 111 == 0 || (N-6000) % 111 == 0 || (N-7000) % 111 == 0 || (N-8000) % 111 == 0 || (N-9000) % 111 == 0 || ){
  cout << "Yes" << endl;
  }
  else {
  cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:231: error: expected primary-expression before ')' token
    6 |   if (N % 1110 < 10 || (N-1000) % 111 == 0 || (N-2000) % 111 == 0 || (N-3000) % 111 == 0 || (N-4000) % 111 == 0 || (N-5000) % 111 == 0 || (N-6000) % 111 == 0 || (N-7000) % 111 == 0 || (N-8000) % 111 == 0 || (N-9000) % 111 == 0 || ){
      |                                                                                                                                                                                                                                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 string N;
  cin N;
  if (N == "111*" || N == "222*" || N == "333*" || N == "444*" || N == "555*" || N == "666*" || N == "777*" || N == "888*" || N == "999*" || N == "*111" || N == "*222" || N == "*333" || N == "*444" || N == "*555" || N == "*666" || N == "*777" || N == "*888" || N == "*999"){
  cout << "Yes" << endl;
  }
  else {
  cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'N'
    5 |   cin N;
      |      ^~
      |      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 int main ()
 {
   int n, one, ten, hund, thou;
   cin >> n;
   thou = n / 1000;
   hund = (n - 1000 * thou) / 100;
   ten = (n - 1000 * thou - 100 * hund) / 10;
   one = n - 1000 * thou - 100 * hund -  10 * ten;
   if (ten == hund && (ten == one || hund == thou)) {
     cout << "Yes" << endl;
   }
   else {
     cout << "No" << endl;
 }

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'even' was not declared in this scope
    8 |   even if((N%10)*111==(N%1000)) cout<<"Yes"<<endl;
      |   ^~~~
a.cc:9:7: error: expected ';' before 'if'
    9 |   even if((N/10)==((N/1000)*111)) cout<<"Yes"<<endl;
      |       ^~~
      |       ;
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else cout<<"No"<<endl;
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'even' was not declared in this scope
    8 |   even if((N%10)*111==(N%1000)) cout<<"Yes"<<endl;
      |   ^~~~
a.cc:9:7: error: expected ';' before 'if'
    9 |   even if((N/10)==(N/1000)*111) cout<<"Yes"<<endl;
      |       ^~~
      |       ;
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else cout<<"No"<<endl;
      |   ^~~~
Language: C++

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

Compiler output:
a.cc:8:3: error: extended character 　 is not valid in an identifier
    8 |   even　if((N/"1000")*111==(N/"10")) cout<<"Yes"<<endl;
      |   ^
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >>N;
      |   ^~~
a.cc:7:7: error: 'N' was not declared in this scope
    7 |   if((N/"1000")*1111==M) cout<<"Yes"<<endl;
      |       ^
a.cc:7:23: error: 'M' was not declared in this scope
    7 |   if((N/"1000")*1111==M) cout<<"Yes"<<endl;
      |                       ^
a.cc:8:13: error: 'N' was not declared in this scope
    8 |   even　if((N/"1000")*111==(N/"10")) cout<<"Yes"<<endl;
      |             ^
a.cc:8:3: error: 'even\U00003000if' was not declared in this scope
    8 |   even　if((N/"1000")*111==(N/"10")) cout<<"Yes"<<endl;
      |   ^~~~~~~~
a.cc:9:3: error: 'even' was not declared in this scope
    9 |   even if((N%10)*111==(N%"1000")) cout<<"Yes"<<endl;
      |   ^~~~
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else cout<<"No"<<endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N
  cin >>N;
  //４つの数が等しい
  if((N/"1000")*1111==M)cout<<"Yes"<<endl;
  //上3つが等しい
  even if((N/"1000")*111==(N/"10"))cout<<"Yes"<<endl;
  //下3つが等しい
  even if((N%10)*111==(N%"1000"))cout<<"Yes"<<endl;
  even cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >>N;
      |   ^~~
a.cc:8:7: error: 'N' was not declared in this scope
    8 |   if((N/"1000")*1111==M)cout<<"Yes"<<endl;
      |       ^
a.cc:8:23: error: 'M' was not declared in this scope
    8 |   if((N/"1000")*1111==M)cout<<"Yes"<<endl;
      |                       ^
a.cc:10:3: error: 'even' was not declared in this scope
   10 |   even if((N/"1000")*111==(N/"10"))cout<<"Yes"<<endl;
      |   ^~~~
a.cc:12:7: error: expected ';' before 'if'
   12 |   even if((N%10)*111==(N%"1000"))cout<<"Yes"<<endl;
      |       ^~~
      |       ;
a.cc:13:7: error: expected ';' before 'cout'
   13 |   even cout<<"No"<<endl;
      |       ^~~~~
      |       ;
Language: C++

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

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




Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0]==N[1]==N[2]) {
      |        ^
a.cc:7:14: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0]==N[1]==N[2]) {
      |              ^
a.cc:7:20: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0]==N[1]==N[2]) {
      |                    ^
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |   else if (N[1]==N[2]==N[3]) {
      |             ^
a.cc:10:19: error: invalid types 'int[int]' for array subscript
   10 |   else if (N[1]==N[2]==N[3]) {
      |                   ^
a.cc:10:25: error: invalid types 'int[int]' for array subscript
   10 |   else if (N[1]==N[2]==N[3]) {
      |                         ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//String S = sc.next();
		//int N = sc.nextInt();
		//System.out.println();
		String s = sc.next();
		System.out.println(s.matches("[0-9]?[0-9]{3,4}[0-9]?") ? "Yes":"No")
	}
}


Compiler output:
Main.java:9: error: ';' expected
		System.out.println(s.matches("[0-9]?[0-9]{3,4}[0-9]?") ? "Yes":"No")
		                                                                    ^
1 error
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
    int A,B,C,D,E,X,cou=0,v[3];
    char S[10];
    scanf("%d",&A);
    B=A/1000;
    C=A/100-B*10;
    D=A/10-A/100*10;
    E=A%10;
    if((B==C)&&(C==D){
        printf("Yes");
    }else if((C==D)&&(D==E)){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected ')' before '{' token
   11 |     if((B==C)&&(C==D){
      |       ~              ^
      |                      )
main.c:19:1: error: expected expression before '}' token
   19 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int abcd;
  cin>>abcd;
  if (a==b==c!=d){
    cout<<"Yes"<<endl;
  }
   else if (a!=b==c==d){
    cout<<"Yes"<<endl;
   }
   else if (a==b==c==d){
    cout<<"Yes"<<endl;
   }
  else{
    cout<<"No"<,endl;
  }
}
    
     

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'a' was not declared in this scope
    7 |   if (a==b==c!=d){
      |       ^
a.cc:7:10: error: 'b' was not declared in this scope
    7 |   if (a==b==c!=d){
      |          ^
a.cc:7:13: error: 'c' was not declared in this scope
    7 |   if (a==b==c!=d){
      |             ^
a.cc:7:16: error: 'd' was not declared in this scope
    7 |   if (a==b==c!=d){
      |                ^
a.cc:17:16: error: expected primary-expression before ',' token
   17 |     cout<<"No"<,endl;
      |                ^
Language: C++

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

int main ()
{
  int n,a,a1,b,b1,c,c1,p = 0;
  a1 = n / 1000;
  a = n % 1000;
  b1 = a / 100;
  b = a % 100;
  c1 = b / 10;
  d1 = b % 10;
  
  
 
  
  if(a1 == b1){
    p++;
  }
  if(a1 == c1){
    p++;
  }
  if(a1 == d1){
    p++;
  }
  if(b1 == c1){
    p++;
  }
  if(b1 == d1){
    p++;
  }
  if(c1 == d1){
    p++;
  }
  
  if(p >= 3){
	cout << "Yes" << endl;
  }else{
   	cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'd1' was not declared in this scope; did you mean 'c1'?
   12 |   d1 = b % 10;
      |   ^~
      |   c1
Language: C++

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

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

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

#include <stdio.h>
int main(void){
char s[10];
  scanf("%s",&s);
  if(s[0]==s[1]%%s[1]==s[2]&&s[2]==s[3]){printf("Yes");}
    if(s[0]==s[1]%%s[1]==s[2]){printf("Yes");}
    if(s[0]==s[1]%%s[1]==s[3]){printf("Yes");}
    if(s[0]==s[2]%%s[2]==s[3]){printf("Yes");}
    if(s[1]==s[2]%%d[2]==s[3]){printf("Yes");}
  else{printf("No");}
              
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: expected expression before '%' token
    5 |   if(s[0]==s[1]%%s[1]==s[2]&&s[2]==s[3]){printf("Yes");}
      |                 ^
main.c:6:19: error: expected expression before '%' token
    6 |     if(s[0]==s[1]%%s[1]==s[2]){printf("Yes");}
      |                   ^
main.c:7:19: error: expected expression before '%' token
    7 |     if(s[0]==s[1]%%s[1]==s[3]){printf("Yes");}
      |                   ^
main.c:8:19: error: expected expression before '%' token
    8 |     if(s[0]==s[2]%%s[2]==s[3]){printf("Yes");}
      |                   ^
main.c:9:19: error: expected expression before '%' token
    9 |     if(s[1]==s[2]%%d[2]==s[3]){printf("Yes");}
      |                   ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |         return;
      |         ^~~~~~
a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |         return;
      |         ^~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
    9 |   else {
      |   ^~~~
a.cc:7:55: note: to match this '{'
    7 |   if (s[1] == s[2] && (s[0] == s[1] || s[2] == s[3])) {
      |                                                       ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
    9 |   else {
      |   ^~~~
a.cc:7:55: note: to match this '{'
    7 |   if (s[1] == s[2] && (s[0] == s[1] || s[2] == s[3])) {
      |                                                       ^
a.cc:10:25: error: expected ';' before ':' token
   10 |     cout << "No" << endl:
      |                         ^
      |                         ;
Language: C++

#include<iostream>
using namespace std;
int N;
int main(){
  cin>>N;
  cout<<N%1000%111&&N/10%111?"No":"Yes"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:40: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   cout<<N%1000%111&&N/10%111?"No":"Yes"<<endl;
      |                                   ~~~~~^~~~~~
Language: C++

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

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






Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2]){
      |        ^
a.cc:7:16: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2]){
      |                ^
a.cc:7:24: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2]){
      |                        ^
a.cc:7:32: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2]){
      |                                ^
a.cc:10:8: error: invalid types 'int[int]' for array subscript
   10 |   if (N[1] == N[2] && N[2] == N[3]){
      |        ^
a.cc:10:16: error: invalid types 'int[int]' for array subscript
   10 |   if (N[1] == N[2] && N[2] == N[3]){
      |                ^
a.cc:10:24: error: invalid types 'int[int]' for array subscript
   10 |   if (N[1] == N[2] && N[2] == N[3]){
      |                        ^
a.cc:10:32: error: invalid types 'int[int]' for array subscript
   10 |   if (N[1] == N[2] && N[2] == N[3]){
      |                                ^
Language: C++

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

int main(){
  string 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;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:85: error: expected primary-expression before ')' token
    7 |   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;
      |                                                                                     ^
Language: C++

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

int main(){
  string 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;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:85: error: expected primary-expression before ')' token
    6 |   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;
      |                                                                                     ^
Language: C++

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


Compiler output:
a.cc:10:11: error: extended character 　 is not valid in an identifier
   10 |   if(b != c　|| (b == c && a != b) || (b == c && c != d)){
      |           ^
a.cc: In function 'int main()':
a.cc:10:11: error: 'c\U00003000' was not declared in this scope
   10 |   if(b != c　|| (b == c && a != b) || (b == c && c != d)){
      |           ^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected primary-expression before '=' token
   10 |   if(b ?= c){
      |         ^
a.cc:10:12: error: expected ':' before ')' token
   10 |   if(b ?= c){
      |            ^
      |            :
a.cc:10:12: error: expected primary-expression before ')' token
Language: C++

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

int main() {
  int N, a, b, c, d;
  cin >> x;
  a = N % 10;
  b = N / 10 % 10;
  c = N / 100 % 10;
  d = N / 1000;

  if (a == b == c || b == c == d) {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
}


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

#include <iostream> 
#include <iomanip> 
#include <vector> 
#include <algorithm> 
#include <numeric> 
#include <functional> 
#include <cmath> 
#include <queue> 
#include <stack> 

#define Ford(i,a,b) for (int i=(a);i<(b);i++) 
#define For(i,n) Ford(i,0,n) 
typedef long long ll; 

using namespace std;

int main(){
  ina a[4],num;
  cin>>num;
  For(4) {
    num/10=a[i];
    num/=10;
  }
  For(2){
  if((a[i]==a[i+1]) &&(a[i+i]==a[i+2])) 
  {cout << "Yes" << endl;return 0;}
  }
  cout << "No" << endl;
}

Compiler output:
a.cc:20:8: error: macro "For" requires 2 arguments, but only 1 given
   20 |   For(4) {
      |        ^
a.cc:12:9: note: macro "For" defined here
   12 | #define For(i,n) Ford(i,0,n)
      |         ^~~
a.cc:24:8: error: macro "For" requires 2 arguments, but only 1 given
   24 |   For(2){
      |        ^
a.cc:12:9: note: macro "For" defined here
   12 | #define For(i,n) Ford(i,0,n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:18:3: error: 'ina' was not declared in this scope; did you mean 'int'?
   18 |   ina a[4],num;
      |   ^~~
      |   int
a.cc:19:8: error: 'num' was not declared in this scope; did you mean 'enum'?
   19 |   cin>>num;
      |        ^~~
      |        enum
a.cc:20:3: error: 'For' was not declared in this scope
   20 |   For(4) {
      |   ^~~
a.cc:24:6: error: expected ';' before '{' token
   24 |   For(2){
      |      ^  ~
      |      ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected '(' before '{' token
   10 |  }else if{N/100 == N % 100/10 == N % 10){
      |          ^
      |          (
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/1000 == N % 1000 / 100){
   if (N/1000 == N % 100 /10){
   cout << "Yes" << endl;
 }
  else {
    cout << "No" << endl;
  }
 } else if (N / 100 == N% 100/10){
     if (N/100 == N%10){
   cout << "Yes" << endl;
     }else{
       cout << "No" << endl;
     }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
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/1000 == N % 1000 / 100){
   if (N/1000 == N % 100 /10){
   cout << "Yes" << endl;
 }
  else {
    cout << "No" << endl;
  }
   else {
     cout << "no" << endl;
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' before 'else'
   15 |    else {
      |    ^~~~
a.cc:8:31: note: to match this '{'
    8 |  if (N/1000 == N % 1000 / 100){
      |                               ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected '(' before '{' token
   12 |   else if {
      |           ^
      |           (
a.cc:15:4: error: expected '}' before 'else'
   15 |    else {
      |    ^~~~
a.cc:8:31: note: to match this '{'
    8 |  if (N/1000 == N % 1000 / 100){
      |                               ^
Language: Java

package com.wkodate.atcoder.abc079.a;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] n = sc.next().split("");
        if (n[1].equals(n[2]) &&
                (n[0].equals(n[1]) || n[2].equals(n[3]))) {
            System.out.println("Yes");
            return;
        }
        System.out.println("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++

int main() {
  int n,a,b,c,d;
  cin >> n;
  
    a=n/1000;
    b=(n-a*1000)/100;
    c=(n-a*1000-b*100)/10;
    d=n-a*1000-b*100-c*10;

  if (a == b && a == c && b ==c) {
    cout << "Yes" << endl;
  }
  else if (b == c && c == d && d == b) {
    cout << "Yes" << endl;
  }
  else if (a == b && a == c && a == d && b == c && b == d && c == d) {
    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: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 << "Yes" << endl;
      |     ^~~~
a.cc:14:22: error: 'endl' was not declared in this scope
   14 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:17:22: error: 'endl' was not declared in this scope
   17 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << "No" << endl;
      |     ^~~~
a.cc:20:21: error: 'endl' was not declared in this scope
   20 |     cout << "No" << endl;
      |                     ^~~~
Language: C++


int main() {
  int n,a,b,c,d;
  cin >> n;
  
    a=n/1000;
    b=(n-a*1000)/100;
    c=(n-a*1000-b*100)/10;
    d=n-a*1000-b*100-c*10;

  if (a == b == c) {
    cout << "Yes" << endl;
  }
  else if (b == c == d) {
    cout << "Yes" << endl;
  }
  else if (a == b == c == d) {
    cout << "Yes" << endl;
  }
    else {
    cout << "No" << endl;
  }
}


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


int main() {
  int X,a,b,c,d;
  cin >> X;
  
    a=X/1000;
    b=(X-a*1000)/100;
    c=(X-a*1000-b*100)/10;
    d=X-a*1000-b*100-c*10;

  if (a == b == c) {
    cout << "Yes" << endl;
  }
  else if (b == c == d) {
    cout << "Yes" << endl;
  }
  else if (a == b == c == d) {
    cout << "Yes" << endl;
  }
    else {
    cout << "No" << endl;
  }
}


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

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

int main() {
  int X,a,b,c,d;
  cin >> X;
  
    a=X/1000;
    b=(X-a*1000)/100;
    c=(X-a*1000-b*100)/10;
    d=X-a*1000-b*100-c*10;

  if (a == b == c) {
    cout << "Yes" << endl;
  }
  even if (b == c == d) {
    cout << "Yes" << endl;
  }
  even if (a == b == c == d) {
    cout << "Yes" << endl;
  }
    even {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'even' was not declared in this scope
   16 |   even if (b == c == d) {
      |   ^~~~
a.cc:19:7: error: expected ';' before 'if'
   19 |   even if (a == b == c == d) {
      |       ^~~
      |       ;
a.cc:22:9: error: expected ';' before '{' token
   22 |     even {
      |         ^~
      |         ;
Language: C++

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

int main() {
  int N , A , B , C , D;
  
  cin >> N;
  
  D = N % 10
  C = (N - D) % 100 / 10
  B = (N - D - C * 10) % 1000 / 100
  A = (N - D - C * 10 - B * 100) % 10000 / 1000

    if ((A == B && B == C) || (B == C && C == D))
      cout << "Yes" << endl;
  	else
      cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'C'
    9 |   D = N % 10
      |             ^
      |             ;
   10 |   C = (N - D) % 100 / 10
      |   ~          
a.cc:16:9: error: 'else' without a previous 'if'
   16 |         else
      |         ^~~~
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:25:4: error: expected '}' at end of input
   25 |   }
      |    ^
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 ;
  int a = N/1000;
  int b = N/100 - a*10;
  int c = N/10 - a*100 - b*10;
  int d = N % 10;
  if(a == b && b == c){
  cout << "Yes" << endl;
  }
  else if(a == c && c == d){
  cout << "Yes" << endl;
  }
  else if(a == b && b == d){
  cout << "Yes" << endl;
  }
  else if(b == C && c == d){
  cout << "Yes" << endl;
 }
  else {
  cout << "No" << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: 'C' was not declared in this scope
   20 |   else if(b == C && c == d){
      |                ^
a.cc:25:4: error: expected '}' at end of input
   25 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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


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

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

Compiler output:
a.cc:3:6: error: expected identifier before numeric constant
    3 | char[10];
      |      ^~
a.cc:3:6: error: expected ']' before numeric constant
    3 | char[10];
      |      ^~
      |      ]
a.cc:3:5: error: structured binding declaration cannot have type 'char'
    3 | char[10];
      |     ^
a.cc:3:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:3:5: error: empty structured binding declaration
a.cc:3:9: error: expected initializer before ';' token
    3 | char[10];
      |         ^
a.cc: In function 'int main()':
a.cc:5:8: error: 'x' was not declared in this scope
    5 |   cin>>x;
      |        ^
Language: C++

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

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

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

#include <iostream>
using namespace std;

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  if(!(N%1111)){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid types 'int[int]' for array subscript
    8 |   if(a[0]==a[1]==a[2]||a[1]==a[2]==a[3]){
      |       ^
a.cc:8:13: error: invalid types 'int[int]' for array subscript
    8 |   if(a[0]==a[1]==a[2]||a[1]==a[2]==a[3]){
      |             ^
a.cc:8:19: error: invalid types 'int[int]' for array subscript
    8 |   if(a[0]==a[1]==a[2]||a[1]==a[2]==a[3]){
      |                   ^
a.cc:8:25: error: invalid types 'int[int]' for array subscript
    8 |   if(a[0]==a[1]==a[2]||a[1]==a[2]==a[3]){
      |                         ^
a.cc:8:31: error: invalid types 'int[int]' for array subscript
    8 |   if(a[0]==a[1]==a[2]||a[1]==a[2]==a[3]){
      |                               ^
a.cc:8:37: error: invalid types 'int[int]' for array subscript
    8 |   if(a[0]==a[1]==a[2]||a[1]==a[2]==a[3]){
      |                                     ^
a.cc:11:19: error: expected primary-expression before ',' token
   11 |   else cout<<"No"<,endl;
      |                   ^
Language: C

    #include<stdio.h>
    #include<stdlib.h>
    #include<math.h>
   int  main()
    { int N,c=0,n=4,*T;
    scanf("%d",&N);
    T=(int*)malloc(4*sizeof(int));
    if( 9999<=N && N>=1000)
    {
        for(i=0;i<4;i++)
        { T[i]=N%10;
        N=N/10;
        }
    for(i=0;i<n-1;i++)
    {
        if (T[i]==T[i+1])
        c++;
        if (i==0 && T[0]!=T[1])
            {
            if (T[n-2-i]==T[n-i])
            c=0;
            else
            break;
            }
    }
    printf("%d",N);
    if(c<3)
    printf("\nNO");
    else
    printf("\nN is good,since it contains %d consecutive 1.",c);
    }
    else
        return ;
}



















Compiler output:
main.c: In function 'main':
main.c:10:13: error: 'i' undeclared (first use in this function)
   10 |         for(i=0;i<4;i++)
      |             ^
main.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   33 |         return ;
      |         ^~~~~~
main.c:4:9: note: declared here
    4 |    int  main()
      |         ^~~~