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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=0;(i)<(n);i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define MOD 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define ALL(v) v.begin(), v.end()
typedef long long ll;



int main(){

char s[5];
rep(i,4)cin >> s[i];
if(s[0]==s[1] and s[1]==s[2])cout << "Yes" << endl;
else if(s[1]==s[2] and s[2]==s[3])cout << "Yes" << endl;
else cout << "No" << endl;


return 0;
}



#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=0;(i)<(n);i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define MOD 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define ALL(v) v.begin(), v.end()
typedef long long ll;



int main(){

char s[5];
rep(i,4)cin >> s[i];
if(s[0]==s[1] and s[1]==s[2])cout << "Yes" << endl;
else if(s[1]==s[2] and s[2]==s[3])cout << "Yes" << endl;
else cout << "No" << endl;


return 0;
}





Compiler output:
a.cc:34:23: error: redefinition of 'template<class T> bool chmax(T&, const T&)'
   34 | template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
      |                       ^~~~~
a.cc:7:23: note: 'template<class T> bool chmax(T&, const T&)' previously declared here
    7 | template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
      |                       ^~~~~
a.cc:35:23: error: redefinition of 'template<class T> bool chmin(T&, const T&)'
   35 | template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
      |                       ^~~~~
a.cc:8:23: note: 'template<class T> bool chmin(T&, const T&)' previously declared here
    8 | template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
      |                       ^~~~~
a.cc:41:5: error: redefinition of 'int main()'
   41 | int main(){
      |     ^~~~
a.cc:14:5: note: 'int main()' previously defined here
   14 | int main(){
      |     ^~~~
Language: C++

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

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

  if (N > 110) {
    cout << Yes << endl;
  }
  else {
    cout << No << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'Yes' was not declared in this scope
    9 |     cout << Yes << endl;
      |             ^~~
a.cc:12:13: error: 'No' was not declared in this scope; did you mean 'N'?
   12 |     cout << No << endl;
      |             ^~
      |             N
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected primary-expression before '<' token
   12 |     cout ,<"Yes"<<endl;
      |           ^
a.cc:12:17: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   12 |     cout ,<"Yes"<<endl;
      |            ~~~~~^~~~~~
Language: C++

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


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string A;
  cin A;
  bool F;
  if(A.at(0) == A.at(1) && A.at(1) == A.at(2)) F = true;
  if(A.at(1) == A.at(2) && A.at(3) == A.at(2)) F = true;
  if(F) cout << "YES";
  else cout << "NO";
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'a' was not declared in this scope
    7 |   a=N/1000;
      |   ^
a.cc:8:3: error: 'b' was not declared in this scope
    8 |   b=N%1000/100;
      |   ^
a.cc:9:3: error: 'c' was not declared in this scope
    9 |   c=N%100/10;
      |   ^
a.cc:10:3: error: 'd' was not declared in this scope
   10 |   d=N%10;
      |   ^
Language: C++

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

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


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

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

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


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

#incldue<iostream>
#include<string>
std::string S;
int x;
int main(){
  std::cin >> S;
  x = std::stoi(S);
  if (( x /10 ) %111 == 0 || ( x % 1000) % 111 = 0 )
    std::cout << "Yes"<< std::endl;
  else{
    std::cout << "No" << std::endl;
  }
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:8: error: 'cin' is not a member of 'std'
    6 |   std::cin >> S;
      |        ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<string>
  +++ |+#include <iostream>
    3 | std::string S;
a.cc:8:27: error: lvalue required as left operand of assignment
    8 |   if (( x /10 ) %111 == 0 || ( x % 1000) % 111 = 0 )
      |       ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:9:10: error: 'cout' is not a member of 'std'
    9 |     std::cout << "Yes"<< std::endl;
      |          ^~~~
a.cc:9:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:31: error: 'endl' is not a member of 'std'
    9 |     std::cout << "Yes"<< std::endl;
      |                               ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<string>
  +++ |+#include <ostream>
    3 | std::string S;
a.cc:11:10: error: 'cout' is not a member of 'std'
   11 |     std::cout << "No" << std::endl;
      |          ^~~~
a.cc:11:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:31: error: 'endl' is not a member of 'std'
   11 |     std::cout << "No" << std::endl;
      |                               ^~~~
a.cc:11:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before 'if'
   12 |   N4 = N-N1*1000-N2*100-N3*10
      |                              ^
      |                              ;
   13 | 
   14 |   if (N1==N2==N3==N4) {
      |   ~~
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int64_t> luc(n+1);
  luc.at(0)=2;
  if(n>0) luc.at(1)=1;
  for(int i=2;i<n+1;i++){
    luc.at(i)=luc.at(i-1)+luc.at(i-2)
  }
  cout << luc.at(n) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:38: error: expected ';' before '}' token
   11 |     luc.at(i)=luc.at(i-1)+luc.at(i-2)
      |                                      ^
      |                                      ;
   12 |   }
      |   ~
Language: C++

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

int main() {
  int n;
  cin >> n;
  int n1,n2,n3,n4;
  n1 = n%10;
  n2 = ((n-n1)%100)/10;
  n3 = ((n-n1-10*n2)%1000)/100;
  n4 = (n-n1-10*n2-100*n3)/1000;
  if (n1 == n2 && n2 == n3) {
    cout << "Yes" << endl;
  }
  else if (n2 == n3 && n3 == n4) {
    cout << "Yes" << endl:
  }
  else if (n1 == n2 && n2 == n3 && n3 == n4) {
    cout <<"Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
 

}


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

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

int main() {
  int n;
  cin >> n;
  int n1,n2,n3,n4;
  n1 = n%10;
  n2 = ((n-n1)%100)/10;
  n3 = ((n-n1-10*n2)%1000)/100;
  n4 = (n-n1-10*n2-100*n3)/1000;
  if (n1 == n2 && n2 == n3) {
    cout << "Yes" << endl;
  }
  else if (n2 == n3 && n3 == n4) {
    cout << "Yes" << endl:
  }
  else if (n1 == n2 && n2 == n3 && n3 == n4) {
    cout <<"Yes" << endl;
  }
  else {
    coupt << "No" << endl;
  }
 

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected ';' before ':' token
   16 |     cout << "Yes" << endl:
      |                          ^
      |                          ;
a.cc:22:5: error: 'coupt' was not declared in this scope
   22 |     coupt << "No" << endl;
      |     ^~~~~
Language: C++

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

int main() {
  int n;
  cin >> n;
  int n1,n2,n3,n4;
  n1 = n%10;
  n2 = ((n-n1)%100)/10;
  n3 = ((n-n1-10*n2)%1000)/100;
  n4 = ((n-n1-10*n2-100*n3)/1000;
  if (n1 == n2 && n2 == n3) {
    cout << "Yes" << endl;
  }
  else if (n2 == n3 && n3 == n4) {
    cout << "Yes" << endl:
  }
  else if (n1 == n2 && n2 == n3 && n3 == n4) {
    cout <<"Yes" << endl;
  }
  else {
    coupt << "No" << endl;
  }
 

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: expected ')' before ';' token
   11 |   n4 = ((n-n1-10*n2-100*n3)/1000;
      |        ~                        ^
      |                                 )
a.cc:16:26: error: expected ';' before ':' token
   16 |     cout << "Yes" << endl:
      |                          ^
      |                          ;
a.cc:22:5: error: 'coupt' was not declared in this scope
   22 |     coupt << "No" << endl;
      |     ^~~~~
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 - a * 1000) / 100;
  c = (N - a * 1000 - b * 100) / 10;
  d = (N - a * 1000 - b * 100 - c * 10)
    
  if (a == b == c == d || a == b == c || a == c == d || b == c == d) {
      cout << "Yes" << endl;
    }
  
  else {
    cout << "No" << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: expected ';' before 'if'
   11 |   d = (N - a * 1000 - b * 100 - c * 10)
      |                                        ^
      |                                        ;
   12 | 
   13 |   if (a == b == c == d || a == b == c || a == c == d || b == c == d) {
      |   ~~                                    
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;
cin >> n;
int tmp = n%1000;
if ((tmp/10)%11!=0)
  cout << "No" << endl;
else{
  if (tmp!=((tmp/10)/10) && ((tmp/10)/10!=tmp/10) )
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'N' was not declared in this scope
    6 |   1000<=N<=9999;
      |         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'N' was not declared in this scope
    7 |     if(N < 10 || N%1000 == 0) {
      |        ^
Language: C++

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

void gb_num(char x,char y,char z,char w){
if(x==y&y==z&z==x){
cout << "YES"l;
}
else if(x==y&y==w&w==x){
cout << "YES";
}
else if(x==z&z==w&w==x){
cout << "YES";
}
  
else if(z==y&z==w&w==y){
cout << "YES";
}
else{
cout<<"NO";
}
}
  
  

int main(){
int N;
string s;
cin >>N;
char a,b,c,d;
s = to_string(N);
a =s.at(0);
 b=s.at(1) ;
 c=s.at(2);
d=s.at(3);


gb_num(a,b,c,d);
}  

Compiler output:
a.cc: In function 'void gb_num(char, char, char, char)':
a.cc:6:9: error: unable to find string literal operator 'operator""l' with 'const char [4]', 'long unsigned int' arguments
    6 | cout << "YES"l;
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  if (N == 1000) {
    cout << "Yes" << endl;
  }
  else if (1050 <= N <= 9999) {
    if (N % 111 <= 9) {
      cout << "Yes" << endl;
    }
    else if ((N % 1000 ==0) {
      cout << "Yes" << endl;
    }
    else if ((N - 111) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 222) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 333) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 444) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 555) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 666) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 777) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 888) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else if ((N - 999) % 1000 == 0) {
      cout << "Yes" << endl;
    }
    else {
      cout << "No" << endl;
    }
  }
  else {
    cout << "No" << endl;
  }
}

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

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

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

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


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

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

  for(int i=0;i<4;i++)
  {
    cin >> N.at(i);
  }
  
  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:16:26: error: expected '}' at end of input
   16 |     cout << "No" << endl;
      |                          ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

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

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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) {
    if (b == c || b == d)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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 && b==c) || (b==c && c==d))
	  cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
 
  if (N / 111 % 10 == 0　&& N % 111 < 10) {
    cout << "Yes" << endl;
  }
  // 上三桁が同じ数字で、111で割った
  
  else if(N % 1000 % 111 == 0){
    cout << "Yes" << endl; 
  }
 
  else if(N % 1111 == 0){
    cout << "Yes" << endl; 
  }
  
  
   else {
    cout << "No" << endl;
  }
   
}

Compiler output:
a.cc:8:23: error: extended character 　 is not valid in an identifier
    8 |   if (N / 111 % 10 == 0　&& N % 111 < 10) {
      |                       ^
a.cc: In function 'int main()':
a.cc:8:23: error: unable to find numeric literal operator 'operator""\U00003000'
    8 |   if (N / 111 % 10 == 0　&& N % 111 < 10) {
      |                       ^~~
Language: C++

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

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


Compiler output:
a.cc:11:13: warning: missing terminating " character
   11 |     cout << "No << endl;
      |             ^
a.cc:11:13: error: missing terminating " character
   11 |     cout << "No << endl;
      |             ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
Language: C++

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

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


Compiler output:
a.cc:11:13: warning: missing terminating " character
   11 |     cout << "No << endl;
      |             ^
a.cc:11:13: error: missing terminating " character
   11 |     cout << "No << endl;
      |             ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
Language: C++

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

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


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

#include <bits/stdc++.h>
using namespace std;
    
int main() {
    int a;
    cin >> a;
    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:7:48: error: lvalue required as left operand of assignment
    7 |     if ((a/1000) == (a%1000)/100 == (a%100)/10 || (a%1000)/100 == (a%100)/10 = (a%10)))
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:7:87: error: expected primary-expression before ')' token
    7 |     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 A;
    cin >> A;
    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:7:10: error: 'a' was not declared in this scope
    7 |     if ((a/1000) == (a%1000)/100 == (a%100)/10 || (a%1000)/100 == (a%100)/10 = (a%10)))
      |          ^
a.cc:7:87: error: expected primary-expression before ')' token
    7 |     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() {
  string n;
  cin>>n;
  if(n[1]==n[2],n[0]==n[2],)cout<<"Yes"<<endl;
  else if(n[2]==n[3],n[1]==n[3])cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected primary-expression before ')' token
    7 |   if(n[1]==n[2],n[0]==n[2],)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
  B=(N-1000*A)/100
  C=(N-1000*A-100*B)/10
  D=(N-1000*A-100*B-10*C)  
  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:8:11: error: expected ';' before 'B'
    8 |   A=N/1000
      |           ^
      |           ;
    9 |   B=(N-1000*A)/100
      |   ~        
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else if (B == C && C == D) {
      |   ^~~~
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before 'B'
    8 |   A=N/1000
      |           ^
      |           ;
    9 |   B=(N-1000*A)/100
      |   ~        
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else if (B == C == D) {
      |   ^~~~
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int = n = sc.nextInt();
    if((n/10)%111==0){
      System.out.println("Yes");
    }else if((n%1000)%111==0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
      
  }
  

  
}

Compiler output:
Main.java:5: error: not a statement
    int = n = sc.nextInt();
    ^
Main.java:5: error: ';' expected
    int = n = sc.nextInt();
       ^
2 errors
Language: C++

#include <iostram>
#include<string>
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<<"No"<<endl;
}

Compiler output:
a.cc:1:10: fatal error: iostram: No such file or directory
    1 | #include <iostram>
      |          ^~~~~~~~~
compilation terminated.
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<<"No"<<emdl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: 'emdl' was not declared in this scope
    8 |   else if(n[1]==n[2]==n[3])cout<<"No"<<emdl;
      |                                        ^~~~
Language: C++

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

int main() {

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


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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ')' before '$$'
   10 |   if (a == b $$ b == c ){
      |      ~      ^~~
      |             )
a.cc:13:18: error: expected ')' before '$$'
   13 |   else if (a == b $$ b == d ){
      |           ~      ^~~
      |                  )
a.cc:16:18: error: expected ')' before '$$'
   16 |   else if (a == c $$ c == d ){
      |           ~      ^~~
      |                  )
a.cc:19:18: error: expected ')' before '$$'
   19 |   else if (c == b $$ b == d ){
      |           ~      ^~~
      |                  )
Language: C++

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected ')' before '$$'
    7 |   if (a == b $$ b == c ){
      |      ~      ^~~
      |             )
a.cc:10:18: error: expected ')' before '$$'
   10 |   else if (a == b $$ b == d ){
      |           ~      ^~~
      |                  )
a.cc:13:18: error: expected ')' before '$$'
   13 |   else if (a == c $$ c == d ){
      |           ~      ^~~
      |                  )
a.cc:16:18: error: expected ')' before '$$'
   16 |   else if (c == b $$ b == d ){
      |           ~      ^~~
      |                  )
Language: C++

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before '==' token
    6 |   int a == N/1000 , b == (N-a*1000)/100 , c == (N-a*1000-b*100)/10 , d == N%10;
      |         ^~
a.cc:7:7: error: 'a' was not declared in this scope
    7 |   if (a == b $$ b == c ){
      |       ^
a.cc:7:12: error: 'b' was not declared in this scope
    7 |   if (a == b $$ b == c ){
      |            ^
a.cc:7:13: error: expected ')' before '$$'
    7 |   if (a == b $$ b == c ){
      |      ~      ^~~
      |             )
a.cc:10:18: error: expected ')' before '$$'
   10 |   else if (a == b $$ b == d ){
      |           ~      ^~~
      |                  )
a.cc:13:17: error: 'c' was not declared in this scope
   13 |   else if (a == c $$ c == d ){
      |                 ^
a.cc:13:18: error: expected ')' before '$$'
   13 |   else if (a == c $$ c == d ){
      |           ~      ^~~
      |                  )
a.cc:16:18: error: expected ')' before '$$'
   16 |   else if (c == b $$ b == d ){
      |           ~      ^~~
      |                  )
Language: C++

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'reverce' was not declared in this scope
   15 |         reverce(a, a+10);
      |         ^~~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'a' was not declared in this scope
    7 |   a = (n / 1000);
      |   ^
a.cc:8:3: error: 'b' was not declared in this scope
    8 |   b = (n / 100) - (a * 10);
      |   ^
a.cc:9:3: error: 'c' was not declared in this scope
    9 |   c = (n / 10) - (a * 100 + b * 10);
      |   ^
a.cc:10:3: error: 'd' was not declared in this scope
   10 |   d = n - (a * 1000 + b * 100 + c * 10);
      |   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected primary-expression before '<' token
   10 |     cout < <"No" << endl;
      |            ^
a.cc:10:18: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |     cout < <"No" << endl;
      |             ~~~~~^~~~~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
    if (count(s.begin(), s.end(), s[0]) =< 3 || count(s.begin(), s.end(), s[1]) =< 3) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:42: error: expected primary-expression before '<' token
    8 |     if (count(s.begin(), s.end(), s[0]) =< 3 || count(s.begin(), s.end(), s[1]) =< 3) {
      |                                          ^
a.cc:8:82: error: expected primary-expression before '<' token
    8 |     if (count(s.begin(), s.end(), s[0]) =< 3 || count(s.begin(), s.end(), s[1]) =< 3) {
      |                                                                                  ^
Language: C++

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

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 && b ==c)||(b == c && c == d) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected primary-expression before '||' token
   11 |   if (a == b && b ==c)||(b == c && 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-a*1000)/100,c=(N-a*1000-b*100)/10
    d=N-a*1000-b*100-c*10;
  if (b==c){
    if(a==b || c==d){cout<<"Yes"<<endl;}
    else{cout<<"No"<<endl;}
  }
  else{cout<<"No"<<endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:50: error: expected ';' before 'd'
    7 |   a=N/1000,b=(N-a*1000)/100,c=(N-a*1000-b*100)/10
      |                                                  ^
      |                                                  ;
    8 |     d=N-a*1000-b*100-c*10;
      |     ~
Language: C++

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


int main() {
    int A, B, C, D, N;

    cin >> N;

    A = int(N/1000);
    B = int((N%1000)/100);
    C = int((N%100)/10);
    D = N%10

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: expected ';' before 'if'
   14 |     D = N%10
      |             ^
      |             ;
   15 | 
   16 |     if (A==B && A==C )
      |     ~~       
a.cc:18:5: error: 'else' without a previous 'if'
   18 |     else if (A==B && A==D)
      |     ^~~~
Language: C++

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


int main() {
    int A, B, C, D, N;

    cin >> N;
    
    A = int(N/1000);
    B = int((N%1000)/100);
    C = int((N%100)/10);
    D = N%10

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: expected ';' before 'if'
   14 |     D = N%10
      |             ^
      |             ;
   15 | 
   16 |     if (A==B && A==C )
      |     ~~       
a.cc:18:5: error: 'else' without a previous 'if'
   18 |     else if (A==B && A==D)
      |     ^~~~
a.cc:24:30: error: 'AA' was not declared in this scope; did you mean 'A'?
   24 |     else if (A==B && A==C && AA==D)
      |                              ^~
      |                              A
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 % 1000) / 100) == ((N % 100) / 10) == (N % 10)) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
} 
                                                     
    
  
      

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

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

int main() {
  str n;
  int a=0;
  cin>>n;
  for (size_t i = 1; i < 4; i++) {
    if (n[i]==n[i-1]) {
      a+=1;
    }
    else if (n[i]!=n[i-1] && a!=2) {
      a=0;
    }
    if (a>=2) {
      cout<<"Yes"<<endl;
    }
    else{
      cout<<"No"<<endl;
    }
  }
}


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

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

int main() {
  int N；
  cin >> N;
  int a=N-(N%1000);
  int b=N-a-((N-a)%100);
  int c=N-a-b-((N-a-b)%10);
  int d=N-a-b-c;
  int A=a/1000;
  int B=b/100;
  int C=c/10;
  if (A == B == C || B == C == d || A == C == d || A == B == d){
  cout << "Yes" << endl;
  }
  else {
  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:7:9: error: 'N' was not declared in this scope
    7 |   int a=N-(N%1000);
      |         ^
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: 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;
  int a=N-(N%1000);
  int b=N-a-((N-a)%100);
  int c=N-a-b-((N-a-b)%10);
  int d=N-a-b-c;
  int A=a/1000;
  int B=b/100;
  int C=c/10;
  if (A == B == C || B == C == d || A == C == d || A == B == d){
  cout << "Yes" << endl;
  }
  else {
  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:7:9: error: 'N' was not declared in this scope
    7 |   int a=N-(N%1000);
      |         ^
a.cc:18:11: error: 'No' was not declared in this scope
   18 |   cout << No << endl;
      |           ^~
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'if'
   10 |   N4 = N % 10
      |              ^
      |              ;
   11 | 
   12 |   if (N1 == N2 == N3) {
      |   ~~          
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else if (N1 == N2 == N4) {
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected '(' before 'else'
   10 |   }if else( (N-n)%1110==0 ){
      |       ^~~~
      |       (
a.cc:12:4: error: 'else' without a previous 'if'
   12 |   }else{
      |    ^~~~
Language: C++

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

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


Compiler output:
a.cc:8:6: error: extended character 　 is not valid in an identifier
    8 |   if(　(N%1000)%111==0　){
      |      ^
a.cc:8:22: error: extended character 　 is not valid in an identifier
    8 |   if(　(N%1000)%111==0　){
      |                      ^
a.cc:10:12: error: extended character 　 is not valid in an identifier
   10 |   }if else(　(N-n)%1110==0　){
      |            ^
a.cc:10:26: error: extended character 　 is not valid in an identifier
   10 |   }if else(　(N-n)%1110==0　){
      |                          ^
a.cc: In function 'int main()':
a.cc:8:6: error: '\U00003000' was not declared in this scope
    8 |   if(　(N%1000)%111==0　){
      |      ^~
a.cc:8:22: error: unable to find numeric literal operator 'operator""\U00003000'
    8 |   if(　(N%1000)%111==0　){
      |                      ^~~
a.cc:10:7: error: expected '(' before 'else'
   10 |   }if else(　(N-n)%1110==0　){
      |       ^~~~
      |       (
a.cc:12:4: error: 'else' without a previous 'if'
   12 |   }else{
      |    ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected '(' before 'else'
   10 |   }if else((N-n)%1110==0){
      |       ^~~~
      |       (
a.cc:12:4: error: 'else' without a previous 'if'
   12 |   }else{
      |    ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected primary-expression before '%' token
   10 |   }else if(N-n)%1110==0){
      |                ^
Language: C++

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

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


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

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

int main(){
 int N;
  cin >> N;
  int suzi,num;
  num = 1;
  suzi = N % 10;
  int max;
  max = suzi;
  N /= 10;
//  cout << "1:" << max << endl;
  if(N % 10 == suzi){
    num++;
    N /= 10;
  }else{
    suzi = N % 10;
    if(num <2){
    	num = 1;
      	max = suzi;
    }
    N /= 10;
  }
 //   cout << "1:" << max << endl;

  if(N % 10 == suzi){
    num++;
    N /= 10;
  }else{
    suzi = N % 10;
    if(num <2){
    	num = 1;
      max = suzi;
    }
    N /= 10;

  }
 ..   cout << "1:" << max << endl;
  if(N % 10 == suzi){
    num++;
    N /= 10;
  }else{
    suzi = N % 10;
    if(num <2){
    	num = 1;
      max = suzi;
    }
    N /= 10;

  }
 ..   cout << "1:" << max << endl;

  if(num >= 3){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:2: error: expected primary-expression before '.' token
   39 |  ..   cout << "1:" << max << endl;
      |  ^
a.cc:39:3: error: expected unqualified-id before '.' token
   39 |  ..   cout << "1:" << max << endl;
      |   ^
a.cc:52:2: error: expected primary-expression before '.' token
   52 |  ..   cout << "1:" << max << endl;
      |  ^
a.cc:52:3: error: expected unqualified-id before '.' token
   52 |  ..   cout << "1:" << max << endl;
      |   ^
Language: C++

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

int main(){
  int N;
  vector<int> bits(4);
  
  cin >> N;
  for (int i=3,i>-1,i--){
    bits.at(i)=N/(10^i);
    N=N-bits.at(i)*10^i;
  }
  if(((bits.at(0)==bits.at(1))&&(bits.at(0)==bits.at(1))) || ((bits.at(1)==bits.at(2))&&(bits.at(1)==bits.at(3)))){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before '>' token
    9 |   for (int i=3,i>-1,i--){
      |                 ^
      |                 ;
a.cc:9:17: error: expected primary-expression before '>' token
a.cc:9:24: error: expected ';' before ')' token
    9 |   for (int i=3,i>-1,i--){
      |                        ^
      |                        ;