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

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

int main() {

  string GoodInteger; 
  cin >> GoodInteger;

  char c = GoodInteger[1];
  int Noflag = 0;
  
  int i = 0;
  for ( i = 0 ; i < GoodInteger.size () ; i++) {
    if (c == GoodInteger[i]) {
      continue;
    } else {
      break;
    }
  }

  if (i > 3) {
    cout << "Yes" << endl;
  } else {
    Noflag = 1;
  }

  int i = 1;
  for ( i = 1 ; i < GoodInteger.size () ; i++) {
    if (c == GoodInteger[i]) {
      continue;
    } else {
      break;
    }
  }

  if (i > 3) {
    cout << "Yes" << endl;
  } else {
    Noflag = 1;
  }

  if (Noflag == 1) {
    cout << "No" << endl;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:27:7: error: redeclaration of 'int i'
   27 |   int i = 1;
      |       ^
a.cc:12:7: note: 'int i' previously declared here
   12 |   int i = 0;
      |       ^
Language: C++

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

int main() {

  string GoodInteger; 
  cin >> GoodInteger;

  char c = GoodInteger[1];
  int Noflag = 0;
  
  int i = 0;
  for ( i = 0 ; i < goodInteger.size () ; i++) {
    if (c == goodInteger[i]) {
      continue;
    } else {
      break;
    }
  }

  if (i > 3) {
    cout << "Yes" << endl;
  } else {
    Noflag = 1;
  }

  int i = 1;
  for ( i = 1 ; i < goodInteger.size () ; i++) {
    if (c == goodInteger[i]) {
      continue;
    } else {
      break;
    }
  }

  if (i > 3) {
    cout << "Yes" << endl;
  } else {
    Noflag = 1;
  }

  if (Noflag == 1) {
    cout << "No" << endl;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'goodInteger' was not declared in this scope; did you mean 'GoodInteger'?
   13 |   for ( i = 0 ; i < goodInteger.size () ; i++) {
      |                     ^~~~~~~~~~~
      |                     GoodInteger
a.cc:27:7: error: redeclaration of 'int i'
   27 |   int i = 1;
      |       ^
a.cc:12:7: note: 'int i' previously declared here
   12 |   int i = 0;
      |       ^
a.cc:28:21: error: 'goodInteger' was not declared in this scope; did you mean 'GoodInteger'?
   28 |   for ( i = 1 ; i < goodInteger.size () ; i++) {
      |                     ^~~~~~~~~~~
      |                     GoodInteger
Language: C++

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

int main() {

  string GoodInteger; 

  cin >> GoodInteger;

  char *goodInt = GoodInteger.c_str ();

  char *p;
  p = goodInt;
  int i = 0;
  for ( i = 0 ; i < 4 ; i++, p++) {
    if (*p == goodInt[i]) {
      continue
    } else {
      cout << "No" << endl;
      break;
    }
  }
  if ( i < 3 ) {
    cout << "Yes" << endl;
  }

  p = goodInt;
  int i = 1;
  for ( i = 0 ; i < 4 ; i++, p++) {
    if (*p == goodInt[i]) {
      continue
    } else {
      cout << "No" << endl;
      break;
    }
  }
  if ( i < 3 ) {
    cout << "Yes" << endl;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
   10 |   char *goodInt = GoodInteger.c_str ();
      |                   ~~~~~~~~~~~~~~~~~~^~
      |                                     |
      |                                     const char*
a.cc:17:15: error: expected ';' before '}' token
   17 |       continue
      |               ^
      |               ;
   18 |     } else {
      |     ~          
a.cc:28:7: error: redeclaration of 'int i'
   28 |   int i = 1;
      |       ^
a.cc:14:7: note: 'int i' previously declared here
   14 |   int i = 0;
      |       ^
a.cc:31:15: error: expected ';' before '}' token
   31 |       continue
      |               ^
      |               ;
   32 |     } else {
      |     ~
Language: C++

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

int main() {

  string GoodInteger; 

  cin >> GoodInteger;

  char goodInt[5] = GoodInteger.c_str ();

  char *p;
  p = goodInt;
  int i = 0;
  for ( i = 0 ; i < 4 ; i++, p++) {
    if (*p == goodInt[i]) {
      continue
    } else {
      cout << "No" << endl;
      break;
    }
  }
  if ( i < 3 ) {
    cout << "Yes" << endl;
  }

  p = goodInt;
  int i = 1;
  for ( i = 0 ; i < 4 ; i++, p++) {
    if (*p == goodInt[i]) {
      continue
    } else {
      cout << "No" << endl;
      break;
    }
  }
  if ( i < 3 ) {
    cout << "Yes" << endl;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:39: error: array must be initialized with a brace-enclosed initializer
   10 |   char goodInt[5] = GoodInteger.c_str ();
      |                     ~~~~~~~~~~~~~~~~~~^~
a.cc:17:15: error: expected ';' before '}' token
   17 |       continue
      |               ^
      |               ;
   18 |     } else {
      |     ~          
a.cc:28:7: error: redeclaration of 'int i'
   28 |   int i = 1;
      |       ^
a.cc:14:7: note: 'int i' previously declared here
   14 |   int i = 0;
      |       ^
a.cc:31:15: error: expected ';' before '}' token
   31 |       continue
      |               ^
      |               ;
   32 |     } else {
      |     ~
Language: C++

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

int main() {

  string GoodInteger; 

  cin >> GoodInteger;

  char goodInt[5] = GoodInteger.cstr ();

  char *p;
  p = goodInt;
  int i = 0;
  for ( i = 0 ; i < 4 ; i++, p++) {
    if (*p == goodInt[i]) {
      continue
    } else {
      cout << "No" << endl;
      break;
    }
  }
  if ( i < 3 ) {
    cout << "Yes" << endl;
  }

  p = goodInt;
  int i = 1;
  for ( i = 0 ; i < 4 ; i++, p++) {
    if (*p == goodInt[i]) {
      continue
    } else {
      cout << "No" << endl;
      break;
    }
  }
  if ( i < 3 ) {
    cout << "Yes" << endl;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'cstr'; did you mean 'c_str'?
   10 |   char goodInt[5] = GoodInteger.cstr ();
      |                                 ^~~~
      |                                 c_str
a.cc:17:15: error: expected ';' before '}' token
   17 |       continue
      |               ^
      |               ;
   18 |     } else {
      |     ~          
a.cc:28:7: error: redeclaration of 'int i'
   28 |   int i = 1;
      |       ^
a.cc:14:7: note: 'int i' previously declared here
   14 |   int i = 0;
      |       ^
a.cc:31:15: error: expected ';' before '}' token
   31 |       continue
      |               ^
      |               ;
   32 |     } else {
      |     ~
Language: C++

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

int main() {
  string s;
  cin >> s;
  
  int cnt = 1;
  
  char p = "";
  for (int i = 0; i < s.size(); i++){
    if(p == s[i]){
      cnt++;
    }else{
      cnt = 1;
    }
    p = s[i];
  }
  if (cnt >= 3){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   10 |   char p = "";
      |            ^~
      |            |
      |            const char*
Language: C++

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

int main() {
  string s;
  cin >> s;
  
  int cnt = 0;
  
  char p = '';
  for (int i = 0; i < s.size(); i++){
    if(p == s[i]){
      cnt++;
    }
    p = s[i];
  }
  if (cnt >= 3){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }

  return 0;
}

Compiler output:
a.cc:10:12: error: empty character constant
   10 |   char p = '';
      |            ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: expected ';' before ':' token
   18 | cout << "Yes" << endl:
      |                      ^
      |                      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  int n;
  cin >> n;
  vector<int> dig(4);
  for(int i = 0; i < 4; i++){
    dig[i] = n % 10;
    n / 10;
  }
  if(dig[0] == dig[1] && dig[2] == dig[1]) cout << "Yes" << "\n";
  if(dig[1] == dig[2] %% dig[2] == dig[3]) cout << "Yes" << "\n";
  cout << "No" << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected primary-expression before '%' token
   13 |   if(dig[1] == dig[2] %% dig[2] == dig[3]) cout << "Yes" << "\n";
      |                        ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: lvalue required as left operand of assignment
   14 |   if(a=b=c && b=c=d){
      |          ~~^~~~
a.cc:15:14: error: 'Yes' was not declared in this scope
   15 |      cout << Yes <<endl;
      |              ^~~
a.cc:18:13: error: 'No' was not declared in this scope; did you mean 'N'?
   18 |     cout << No <<endl;
      |             ^~
      |             N
Language: C++

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'a' was not declared in this scope
    8 |   if ((a / 1000 &&  a % 1000 / 100 && a % 100 /10) || ( a % 1000 / 100 && a % 100 /10 && a % 10) ) {
      |        ^
Language: C++

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

int main() {
 int N;
   cin >> N;
  if (N[0] == N[1] && N[1] == N[2] || 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] || N[1] == N[2] && N[2] == N[3] ){
      |        ^
a.cc:7:16: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3] ){
      |                ^
a.cc:7:24: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3] ){
      |                        ^
a.cc:7:32: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3] ){
      |                                ^
a.cc:7:40: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3] ){
      |                                        ^
a.cc:7:48: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3] ){
      |                                                ^
a.cc:7:56: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3] ){
      |                                                        ^
a.cc:7:64: error: invalid types 'int[int]' for array subscript
    7 |   if (N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3] ){
      |                                                                ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid types 'int[int]' for array subscript
    7 |   if(n[0] == n[1]&& n[1] == n[2]){
      |       ^
a.cc:7:15: error: invalid types 'int[int]' for array subscript
    7 |   if(n[0] == n[1]&& n[1] == n[2]){
      |               ^
a.cc:7:22: error: invalid types 'int[int]' for array subscript
    7 |   if(n[0] == n[1]&& n[1] == n[2]){
      |                      ^
a.cc:7:30: error: invalid types 'int[int]' for array subscript
    7 |   if(n[0] == n[1]&& n[1] == n[2]){
      |                              ^
a.cc:10:12: error: invalid types 'int[int]' for array subscript
   10 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |            ^
a.cc:10:20: error: invalid types 'int[int]' for array subscript
   10 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |                    ^
a.cc:10:26: error: invalid types 'int[int]' for array subscript
   10 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |                          ^
a.cc:10:34: error: invalid types 'int[int]' for array subscript
   10 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |                                  ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: invalid types 'int[int]' for array subscript
    6 |   if(n[0] == n[1]&& n[1] == n[2]){
      |       ^
a.cc:6:15: error: invalid types 'int[int]' for array subscript
    6 |   if(n[0] == n[1]&& n[1] == n[2]){
      |               ^
a.cc:6:22: error: invalid types 'int[int]' for array subscript
    6 |   if(n[0] == n[1]&& n[1] == n[2]){
      |                      ^
a.cc:6:30: error: invalid types 'int[int]' for array subscript
    6 |   if(n[0] == n[1]&& n[1] == n[2]){
      |                              ^
a.cc:9:12: error: invalid types 'int[int]' for array subscript
    9 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |            ^
a.cc:9:20: error: invalid types 'int[int]' for array subscript
    9 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |                    ^
a.cc:9:26: error: invalid types 'int[int]' for array subscript
    9 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |                          ^
a.cc:9:34: error: invalid types 'int[int]' for array subscript
    9 |   else if(n[1] == n[2]&&n[2] == n[3]){
      |                                  ^
Language: C++

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

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



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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected initializer before '++' token
    6 |     int count++;
      |              ^~
a.cc:8:34: error: no post-increment operator for type
    8 |         if (s[i] == s[i+1]) count++;
      |                                  ^~
a.cc:10:15: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>='
   10 |     if (count >= 3) {
      |         ~~~~~~^~~~
Language: C++

#include <iostream>
using namespace std;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: expected ')' before '{' token
   18 |     else if (n.at(0) == n.at(1) {
      |             ~                  ^~
      |                                )
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected ')' before 'in'
    6 |   if(N in "111")
      |     ~ ^~~
      |       )
a.cc:6:6: error: could not convert 'N' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
    6 |   if(N in "111")
      |      ^
      |      |
      |      std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

int main() {
    string n;
    cin >> n;
    int counter = 0;
    for (int i=1; i<4; i++) {
        if (s[i-1] == s[i]) {
            counter++;
        }
    }
    if (counter >= 3) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 's' was not declared in this scope
    9 |         if (s[i-1] == s[i]) {
      |             ^
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  string Nstr=to_string(N);
  char current_char='';
  int count=0;
  string good="No";
  for(char c:Nstr){
    if(current_char==c){
      count++;
      if(count>=3)
        good="Yes";
    }else{
      current_char=c;
      count=1;
    }
  }
  cout<<good<<endl;
}
  

Compiler output:
a.cc:9:21: error: empty character constant
    9 |   char current_char='';
      |                     ^~
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  string Nstr=to_string(N);
  char current_char=='';
  int count=0;
  string good="No";
  for(char c:Nstr){
    if(current_char==c){
      count++;
      if(count>=3)
        good="Yes";
    }else{
      current_char=c;
      count=1;
    }
  }
  cout<<good<<endl;
}
  

Compiler output:
a.cc:9:22: error: empty character constant
    9 |   char current_char=='';
      |                      ^~
a.cc: In function 'int main()':
a.cc:9:20: error: expected initializer before '==' token
    9 |   char current_char=='';
      |                    ^~
a.cc:13:8: error: 'current_char' was not declared in this scope
   13 |     if(current_char==c){
      |        ^~~~~~~~~~~~
Language: C++

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

int main() {
  int n;
  cin >> n;
  
  set<int> a;
  for(int i = 0; i < 4; i++) a.insert(n.at(i));
  
  if(a.size() < 2) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:41: error: request for member 'at' in 'n', which is of non-class type 'int'
    9 |   for(int i = 0; i < 4; i++) a.insert(n.at(i));
      |                                         ^~
Language: C++

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


int main(){
  int a;
  cin >> a;
  string s;
  s = to_string(a);
  if(s.at(1) == s.at(2) && (s.at(1)==s.at(0) || s.at(2)==s.at(3))){
    cout << "Yes";
  }
  else{
    cout << "No";
  }
}

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

#include <string>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>s;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |                 cout<<"Yes";
      |                 ^~~~
a.cc:8:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout<<"No";
      |         ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() 
{
  int N;
  int A;
  int B:
  int C;
  int D;
  
  A = N / 1000;
  B = N / 100;
  C = N / 10;
  D = N / 1;
  
  cin >> N;
  
  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:8:8: error: expected initializer before ':' token
    8 |   int B:
      |        ^
a.cc:13:3: error: 'B' was not declared in this scope
   13 |   B = N / 100;
      |   ^
a.cc:14:3: error: 'C' was not declared in this scope
   14 |   C = N / 10;
      |   ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  int A,B,C,D;
  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:14:31: error: expected primary-expression before ')' token
   14 |   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,B,C,D;
  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 ';' before 'B'
    8 |   A=N/1000
      |           ^
      |           ;
    9 |   B=N%1000/100
      |   ~        
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else {
      |   ^~~~
Language: C++

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

int main() {
  int N,A,B,C,D;
  cin >> N;
  N%1000=A;
  N%100-A*10=B;
  N%10-A*100-B*10=C;
  N-A*1000-B*100-C*10=D;
  
  if(A==B&&B==C&&C==D){
  cout << "Yes" << endl;
  }
  if (A==B&&B==C) {
    cout << "Yes" << endl;
    }
  else if(B==C&&C==D){
    cout << "Yes" << endl;
    }
  else {
   cout << "No"<< endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: lvalue required as left operand of assignment
    7 |   N%1000=A;
      |   ~^~~~~
a.cc:8:8: error: lvalue required as left operand of assignment
    8 |   N%100-A*10=B;
      |   ~~~~~^~~~~
a.cc:9:13: error: lvalue required as left operand of assignment
    9 |   N%10-A*100-B*10=C;
      |   ~~~~~~~~~~^~~~~
a.cc:10:17: error: lvalue required as left operand of assignment
   10 |   N-A*1000-B*100-C*10=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%100-A*10
  C=N%10-A*100-B*10
  D=N-A*1000-B*100-C*10
  
  if ( A==B==C||A==B==D||A==C==D||B==C==D ) {
    cout << "Yes" << endl;
    }
  else {
    cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before 'B'
    7 |   A=N%1000
      |           ^
      |           ;
    8 |   B=N%100-A*10
      |   ~        
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:
  cin >> N;
  if ((N/10)%111 == 0)
    cout << "Yes" << endl;
  else if ((N%1000)%111 == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: found ':' in nested-name-specifier, expected '::'
    5 |   int N:
      |        ^
      |        ::
a.cc:5:7: error: 'N' has not been declared
    5 |   int N:
      |       ^
a.cc:6:7: error: qualified-id in declaration before '>>' token
    6 |   cin >> N;
      |       ^~
a.cc:7:8: error: 'N' was not declared in this scope
    7 |   if ((N/10)%111 == 0)
      |        ^
Language: C++

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

int main() {
  int A , B , C , D , E;
  cin >> A;
	B = A/1000;
  	C = A/100%10;
  	D = A/10%10;
  	E = A%10;
  if (C !== D ) {
    cout << "No" << endl;
  }
  else if (B == C ) {
    cout << "Yes" << endl;
  }
  else if (D == E ) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected primary-expression before '=' token
   11 |   if (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 / 100
  c = N % 1000 % 100 / 10
  d = N % 1000 % 100 % 10
  if ( (a == b && b == c) or (b==c && c ==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
      |               ^
      |               ;
    8 |   b = N % 1000 / 100
      |   ~            
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else {
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'a' was not declared in this scope
    6 |   a = N / 1000
      |   ^
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else {
      |   ^~~~
Language: C++

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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repd(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (b); i--)
#define FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
}

int ans = 0;
bool check = 0;
string s, t;
int N = 3;
vector<int> v(N);
int a, b, c;
int x, y;
char ch;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

int main()
{
  cin >> s;

  if ((s[0] == s[1] && s[2] == s[1]) || (s[3] == s[2] && s[2] == s[1]))111
    Yes();
  else
    No();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:68:75: error: expected ';' before 'printf'
   68 |   if ((s[0] == s[1] && s[2] == s[1]) || (s[3] == s[2] && s[2] == s[1]))111
      |                                                                           ^
      |                                                                           ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
     vector<int64_t> vec;
  vec.at(0)=2LL;
  vec.at(1)=1LL;
  for(i=2;i<n;i++){
    vec.at(i)=vec.at(i-1)+vec.at(i-2);
  }
  cout<<vec.at(n-1)<<endl;}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=2;i<n;i++){
      |       ^
Language: C++

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

int main(){
  
  int N;
  
  cin >> N;
  
  if ( N%1000 == 0 )
    
    cout << "Yes" << endl;
  
  if ( (N%1000)%111 == 0 )
    
    cout << "Yes" << endl;
  
  if ( N%1111 != 0 && N%1110 <= 9 )
    
    cout << "Yes" << endl;
  
  if (!( N%1000 == 0 || (N%1000)%111 == 0 ||  N%1111 != 0 && N%1110 <= 9  ))
    
    cout << "No" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: expected '}' at end of input
   24 |     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 == 0 )
    
    cout << "Yes" << endl;
  
  if ( (N%1000)%111 == 0 )
    
    cout << "Yes" << endl;
  
  if ( N%1111 != 0 && 0 <= N%1110 <= 9 )
    
    cout << "Yes" << endl;
  
  if (!( N%1000 == 0 || (N%1000)%111 == 0 || ( N%1111 != 0 && 0 <= N%1110 <= 9 ) ))
    
    cout << "No" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: expected '}' at end of input
   24 |     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 count;
  string a;
  cin >> a;
  
  for(int i=0;i<2;i++){

      if(a[i] == a[i+1]){
        count++;
      }
    }
  }
  if(count >= 3)
    cout << "Yes" << endl;
  else
    cout <<"No" << endl; 
/*
  if (A*B %2 == 0) {
    cout << "Odd" << endl;
  }else{
    cout << "Even" << endl;
  }
  */
  
  
  // ここにプログラムを追記
}


Compiler output:
a.cc:16:3: error: expected unqualified-id before 'if'
   16 |   if(count >= 3)
      |   ^~
a.cc:18:3: error: expected unqualified-id before 'else'
   18 |   else
      |   ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

int main(){
  int x;
  string N;
  cin >> N;
  for(int i = 0, i < (N.size() - 1), i++){
    if (N[i] == N[i+1]){
      x++;
      if(x == 2){
        cout << "Yes" << endl;
        break;
      }
    }
  }
  if(x > 2){
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before '<' token
    8 |   for(int i = 0, i < (N.size() - 1), i++){
      |                   ^~
      |                   ;
a.cc:8:20: error: expected primary-expression before '<' token
    8 |   for(int i = 0, i < (N.size() - 1), i++){
      |                    ^
a.cc:8:41: error: expected ';' before ')' token
    8 |   for(int i = 0, i < (N.size() - 1), i++){
      |                                         ^
      |                                         ;
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
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%100)/10)) || (((N%1000)/100) == (((N%100)/10) == (N%10))){
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
     

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

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

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

  if(N % 111 <= 9 && N => 1110){
    cout << "Yes" <<endl;
  }
  else{
    cout << "No" <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected primary-expression before '>' token
    8 |   if(N % 111 <= 9 && N => 1110){
      |                         ^
Language: C++

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before 'if'
   12 |   u1 = N % 10
      |              ^
      |              ;
   13 |   if(u100 == u10) {
      |   ~~          
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else {
      |   ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   14 |     cout<"Yes"<<endl;
      |          ~~~~~^~~~~~
Language: C++

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

 string n1,n2,n3,n4;
 string = N 
  cin >> N ;
  n1=N[0];
  n2=N[1];
  n3=N[2];
  n4=N[3];
  if(n1==n2 && n2==n3){
  	cout << "Yes" << endl;
  }else if(n2==n3 && n3==n4){
  	cout << "Yes" << endl;
  }else if(n1==n2 && n3==n4 && n1==n4){
   cout << "Yes" << endl;
  }else{
  	cout << "No" << endl;
  }
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before '=' token
    7 |  string = N
      |         ^
a.cc:9:6: error: 'N' was not declared in this scope
    9 |   n1=N[0];
      |      ^
Language: C++

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

 string n1,n2,n3,n4;
 string = N 
  cin >> N ;
  n1=N[0];
  n2=N[1];
  n3=N[2];
  n4=N[3];
  if(n1==n2 && n2==n3){
  	cout << "Yes" << endl;
  }else if(n2==n3 && n3==n4){
  	cout << "Yes" << endl;
  }else if(n1==n2 && n3==n4){
   cout << "Yes" << endl;
  }else{
  	cout << "No" << endl;
  }
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before '=' token
    7 |  string = N
      |         ^
a.cc:9:6: error: 'N' was not declared in this scope
    9 |   n1=N[0];
      |      ^
Language: C

#include <iostream>
#include <string>

int main(void){
  string str[5];
  std::cin >> str;
  if(str[0]==str[1] && str[1]==str[2] || str[1]==str[2] && str[2]==str[3])
    std::cout << "Yes" << std::endl;
  else std::cout << "No\n" std::endl;
  return 0;
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: expected '}' before 'else'
   13 |       else{
      |       ^~~~
a.cc:6:31: note: to match this '{'
    6 |     if(s[0]==s[1]||s[2]==s[3]){
      |                               ^
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: break statement not within loop or switch
    9 |         break;
      |         ^~~~~
a.cc:13:9: error: break statement not within loop or switch
   13 |         break;
      |         ^~~~~
a.cc:15:7: error: expected '}' before 'else'
   15 |       else{
      |       ^~~~
a.cc:6:31: note: to match this '{'
    6 |     if(s[0]==s[1]||s[2]==s[3]){
      |                               ^
a.cc: At global scope:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int a = N / 1000;
  int b = (N % 1000) / 100;
  int c = ((N % 1000) % 100) / 10;
  int d = (((N % 1000) % 100) % 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:11:47: error: expected ')' before '{' token
   11 |   if ((a == b && b == c) || (b == c && c == d) {
      |      ~                                        ^~
      |                                               )
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
Language: C++

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

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


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

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

int main() {
  int A;
  int B;
  int C;
  int D;
  1 <= A,B,C,D <= 9
  int N = A+B+C+D;
  cin >> N;
  
  if (A == B == C || B == C == D) {
    cout << "Yes" << endl;
  }
  
  else {
    cout << "No" << endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before 'int'
    9 |   1 <= A,B,C,D <= 9
      |                    ^
      |                    ;
   10 |   int N = A+B+C+D;
      |   ~~~               
a.cc:11:10: error: 'N' was not declared in this scope
   11 |   cin >> N;
      |          ^
Language: C++

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

int main() {
  int N = A+B+C+D;
  cin >> N;
  
  if (A==B==C || B==C==D) {
    cout << "Yes" << endl;
  }
  
  else {
    cout << "No" << endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'A' was not declared in this scope
    5 |   int N = A+B+C+D;
      |           ^
a.cc:5:13: error: 'B' was not declared in this scope
    5 |   int N = A+B+C+D;
      |             ^
a.cc:5:15: error: 'C' was not declared in this scope
    5 |   int N = A+B+C+D;
      |               ^
a.cc:5:17: error: 'D' was not declared in this scope
    5 |   int N = A+B+C+D;
      |                 ^
Language: C++

N = list(input())

ok = False

if N[0]==N[1] and N[1]==N[2]:
    ok =True

if N[1]==N[2] and N[2]==N[3]:
    ok = True

print("Yes" if ok else "No")

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = list(input())
      | ^
Language: C++

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

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

Compiler output:
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else {
      |   ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int y = N % 1000
      |   ^~~
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else if (N - y % 111 == 0)
      |   ^~~~
a.cc:12:16: error: 'y' was not declared in this scope
   12 |   else if (N - y % 111 == 0)
      |                ^
a.cc: At global scope:
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else {
      |   ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'x' was not declared in this scope
    7 |   x = N % 10
      |   ^
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else if (N - y % 111 == 0)
      |   ^~~~
a.cc:12:16: error: 'y' was not declared in this scope
   12 |   else if (N - y % 111 == 0)
      |                ^
a.cc: At global scope:
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else {
      |   ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a= (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= ((N - N%10)%100)/10;
  int d= N%10
  cout << (a==b==c ? 
           "Yes":"No") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'cout'
   10 |   cout << (a==b==c ?
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a= (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= ((N - N%10)%100)/10;
  int d= N%10;
  cout << (a==b==c || a==b==d || a==c==d ||b==c==d || a=b=c=d ? 
           "Yes":"No") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:63: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   10 |   cout << (a==b==c || a==b==d || a==c==d ||b==c==d || a=b=c=d ?
      |                                                             ~~^
      |                                                               |
      |                                                               const char*
   11 |            "Yes":"No") << endl;
      |            ~~~~~~~~~~                                          
a.cc:10:52: error: lvalue required as left operand of assignment
   10 |   cout << (a==b==c || a==b==d || a==c==d ||b==c==d || a=b=c=d ?
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a= (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= ((N - N%10)%100)/10;
  int d= N%10
  cout << (a==b==c || a==b==d || a==c==d ||b==c==d ? 
           "Yes":"No") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'cout'
   10 |   cout << (a==b==c || a==b==d || a==c==d ||b==c==d ?
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a = (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= ((N - N%10)%100)/10;
  int d= N%10
  cout << (a=b=c || a=b=d || a=c=d ||b=c=d ? 
           "Yes" :"No") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'cout'
   10 |   cout << (a=b=c || a=b=d || a=c=d ||b=c=d ?
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a = (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= (( N - N%10)%100)/10;
  int d= N%10
  cout << (a=b=c || a=b=d || a=c=d ||b=c=d ? 
           "Yes" :"No") << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'cout'
   10 |   cout << (a=b=c || a=b=d || a=c=d ||b=c=d ?
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a = (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= (( N - N%10)%100)/10;
  int d= N%10
  cout << (a=b=c || a=b=d || a=c=d ||b=c=d ? "Yes" :"No")   << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'cout'
   10 |   cout << (a=b=c || a=b=d || a=c=d ||b=c=d ? "Yes" :"No")   << endl;
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a = (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= (( N - N%10)%100)/10;
  int d= N%10
  cout << (a=b=c || a=b=d || a=c=d ||b=c=d ? "Yes" :"No")   << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'cout'
   10 |   cout << (a=b=c || a=b=d || a=c=d ||b=c=d ? "Yes" :"No")   << endl;
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
	cin >> N ;
  int a = (N - N%1000)/1000;
  int b= ((N - N%100)%1000)/100;
  int c= (( N - N%10)%100)/10;
  int d= N%10
	 if{(I <= B ) cout << I  << endl;
  else cout << B << endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected ',' or ';' before 'if'
   10 |          if{(I <= B ) cout << I  << endl;
      |          ^~
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  //数字を「dcba」と書いている＠以下の4行
  int a, b, c, d;
  a = N % 10;
  b = (N - a) / 10 % 10;
  c = (N - a - 10 * b) /100 % 10;
  d = (N - a - 10 * b - 100 * c) / 1000 % 10;
  
  cin >> a >> b >> c >> d;
  
  if (a == b == c) || (a == b == d) || (d == b == c) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


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

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

int main() {
  int N;
  cin >> N;
  
  //数字を「dcba」と書いている＠以下の4行
  a = N % 10;
  b = (N - a) / 10 % 10;
  c = (N - a - 10 * b) /100 % 10;
  d = (N - a - 10 * b - 100 * c) / 1000 % 10;
  
  if (a == b == c || a == b == d || d == b == c) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'a' was not declared in this scope
    9 |   a = N % 10;
      |   ^
a.cc:10:3: error: 'b' was not declared in this scope
   10 |   b = (N - a) / 10 % 10;
      |   ^
a.cc:11:3: error: 'c' was not declared in this scope
   11 |   c = (N - a - 10 * b) /100 % 10;
      |   ^
a.cc:12:3: error: 'd' was not declared in this scope
   12 |   d = (N - a - 10 * b - 100 * c) / 1000 % 10;
      |   ^