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

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

    }

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,first,second,third,fourth;
  cin >> n;
  first = n / 1000;
  second = n / 100 % 10;
  third = n / 10 % 10;
  fourth = n % 10;
  string res = "No";
  if(fist == second && second == third){
    res = "Yes";
  }else if(second == third && third == fourth){
    res = "Yes";
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'fist' was not declared in this scope; did you mean 'first'?
   11 |   if(fist == second && second == third){
      |      ^~~~
      |      first
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,first,second,third,fourth;
  cin >> n;
  first = n / 1000;
  second = n / 100 % 10;
  third = n / 10 % 10;
  fourth = n % 10;
  string res = "No";
  if(fist == second && second == third){
    res = "Yes";
  }else if(second == third && third == fourth){
    res = "Yes"
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'fist' was not declared in this scope; did you mean 'first'?
   11 |   if(fist == second && second == third){
      |      ^~~~
      |      first
a.cc:14:16: error: expected ';' before '}' token
   14 |     res = "Yes"
      |                ^
      |                ;
   15 |   }
      |   ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: lvalue required as left operand of assignment
    7 |   if(n/100%111==0||n%1000%111=0) cout << "Yes" << endl;
      |      ~~~~~~~~~~~~^~~~~~~~~~~~
Language: C++

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

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:47: error: expected primary-expression before '=' token
    6 |   if(N%1111==0 || (N%1000)%111==0 && (N%111)!==0){
      |                                               ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected '}' before 'else'
    8 |     else {
      |     ^~~~
a.cc:6:28: note: to match this '{'
    6 |   if (N%1111==0||N%111<10) {
      |                            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'COUT' was not declared in this scope
    9 |     COUT >> "No";
      |     ^~~~
a.cc:11:5: error: 'COUT' was not declared in this scope
   11 |     COUT >> "Yes";
      |     ^~~~
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 % 100)/10
  d = N % 10
  if ((a == b == c)||(b == c == d)){
    cout << "Yes" << endl;
  }
  else{
  	cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7: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,b,c,d:
  cin >> N;
  a = N / 1000
  b = (N % 1000)/100
  c = (N % 100)/10
  d = N % 10
  if ((a == b == c)||(b == c == d)){
    cout << "Yes" << endl;
  }
  else{
  	cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: found ':' in nested-name-specifier, expected '::'
    5 |   int N,a,b,c,d:
      |                ^
      |                ::
a.cc:5:15: error: 'd' has not been declared
    5 |   int N,a,b,c,d:
      |               ^
a.cc:6:7: error: qualified-id in declaration before '>>' token
    6 |   cin >> N;
      |       ^~
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,b,c,d;
  cin >> a >> b >> c >> d;
  
  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:12:20: error: expected ')' before '{' token
   12 |   else if ( b==c==d   {
      |           ~        ^  ~
      |                    )
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a;
b=a%1000;
c=a%1110;
if(a%1111==0)cout<<"Yes";
else if(b%111=0||c<=9)cout<<"Yes";
else cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: lvalue required as left operand of assignment
    9 | else if(b%111=0||c<=9)cout<<"Yes";
      |         ~^~~~
Language: C++

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

int main() {
  int N, a, b, c, d;
  cin >> N;
  
  d = N % 10;
  c = ((N - d) / 10) % 10;
  b = ((N - d - c*10) / 100) % 10;
  a = ((N - d - c*10 - b*100) / 1000;
  
  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:11:37: error: expected ')' before ';' token
   11 |   a = ((N - d - c*10 - b*100) / 1000;
      |       ~                             ^
      |                                     )
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int main(){
    char a[5],p=1;
    for(int b=1;b<=4;b++){
        cin>>a[b];
        if(a[b]==a[b-1])p++;
        if(p==3){
            cout<<"Yes";
            break;
        }
    }
    if(p!=3)cout<<"No"
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: expected ';' before 'return'
   14 |     if(p!=3)cout<<"No"
      |                       ^
      |                       ;
   15 |     return 0;
      |     ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
int aa=5;
int a[5];
int flag=0;
int main()
{
    cin>>n;
    while(n!=0)
    {
        a[--aa]=n%10;
        n/=10;
    }
    //cout<<a[1]<<a[2]<<a[3]<<a[4];
    if(a[1]==a[2==a[3]||a[2]==a[3]==a[4]) flag=1; 
    if(flag==1) cout<<"Yes";
    else cout<<"No";
    //system("pause");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:41: error: expected ']' before ')' token
   16 |     if(a[1]==a[2==a[3]||a[2]==a[3]==a[4]) flag=1;
      |                                         ^
      |                                         ]
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 % 100) / 10;
  d = N % 10;
  if (a == b && b == c) cout "Yes" << endl;
  else if (d == c && c == b) cout "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: expected ';' before string constant
   11 |   if (a == b && b == c) cout "Yes" << endl;
      |                             ^~~~~~
      |                             ;
a.cc:12:34: error: expected ';' before string constant
   12 |   else if (d == c && c == b) cout "Yes" << endl;
      |                                  ^~~~~~
      |                                  ;
Language: C++

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

int main() {
  int N;
  cin >> N;
  int d1,d2,d3,d4;
  d1 = N%10; d2 = N/10%10; d3 = N/100%10; d4 = N/1000;
  if((d1=d2 && d2=d3)||(d2=d3 && d3=d4)) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: lvalue required as left operand of assignment
    9 |   if((d1=d2 && d2=d3)||(d2=d3 && d3=d4)) cout << "Yes" << endl;
      |          ~~~^~~~~
a.cc:9:31: error: lvalue required as left operand of assignment
    9 |   if((d1=d2 && d2=d3)||(d2=d3 && d3=d4)) cout << "Yes" << endl;
      |                            ~~~^~~~~
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%100))/10
  d = N%10

    
    
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'a'
    6 |   cin >> N
      |           ^
      |           ;
    7 | 
    8 |   a = N/1000
      |   ~
Language: C++

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

int main(){
  int N = 0;
  int a,b,c,d = 0;
  cin >> N;
  d = N %10;
  c = N /10 %10;
  b = N /100 %10;
  a = N /1000 %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:12:11: error: expected primary-expression before '=' token
   12 |   if((a === b === c) || (b === c === d))
      |           ^
a.cc:12:17: error: expected primary-expression before '=' token
   12 |   if((a === b === c) || (b === c === d))
      |                 ^
a.cc:12:30: error: expected primary-expression before '=' token
   12 |   if((a === b === c) || (b === c === d))
      |                              ^
a.cc:12:36: error: expected primary-expression before '=' token
   12 |   if((a === b === c) || (b === c === d))
      |                                    ^
Language: C++

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

int main() {
  int x,a,b,c,d;
  cin >> x;
   a = x / 1000;
   x = x % 1000;
   b = x / 100;
   x = x % 100;
   c = x / 10;
   x = x % 10;
   d = x
  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:13:9: error: expected ';' before 'if'
   13 |    d = x
      |         ^
      |         ;
   14 |   if (a == b && b == c) {
      |   ~~     
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else if (b == c && c == d) {
      |   ^~~~
Language: C++

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

int main() {
  int x,a,b,c,d;
  cin >> x;
   a = x / 1000
   x = x % 1000
   b = x / 100
   x = x % 100
   c = x / 10
   x = x % 10
   d = x
  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:16: error: expected ';' before 'x'
    7 |    a = x / 1000
      |                ^
      |                ;
    8 |    x = x % 1000
      |    ~            
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else if (b == c && c == d) {
      |   ^~~~
Language: C++

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

int main() {
  int x,a,b,c,d;
  cin >> x;
  int a = x / 1000
      x = x % 1000
      b = x / 100
      x = x % 100
      c = x / 10
    　x = x % 10
      d = x
  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:12:5: error: extended character 　 is not valid in an identifier
   12 |     　x = x % 10
      |     ^
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int a'
    7 |   int a = x / 1000
      |       ^
a.cc:5:9: note: 'int a' previously declared here
    5 |   int x,a,b,c,d;
      |         ^
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else if (b == c && c == d) {
      |   ^~~~
Language: C++

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

int main() {
  int x,a,b,c,d;
  cin >> x;
  int a = x / 1000
      x = x % 1000
      b = x / 100
      x = x % 100
      c = x / 10
    　x = x % 10
      d = x
  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:12:5: error: extended character 　 is not valid in an identifier
   12 |     　x = x % 10
      |     ^
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int a'
    7 |   int a = x / 1000
      |       ^
a.cc:5:9: note: 'int a' previously declared here
    5 |   int x,a,b,c,d;
      |         ^
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else if (b == c && c == d) {
      |   ^~~~
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;
  
  a = N % 1000;
  b = N % 100 - a;
  c = N % 10 -a - b;
  d = N - a - b -c;
  
  if (a == b == c == d) {
    cout << "Yes" << endl;
  }
  
  else if (a == b == c) {
    cout << "Yes" << endl;
  }
  
  else if (a == b == d) {
    cout << "Yes" << endl;
  }
  
  else if (a == d == c) {
    cout << "Yes" << endl;
  }
  
  else if (d == b == c) {
    cout << "Yes" << endl;
  }
  
  else {
    cout << "No" << endl;
  }
  
}

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

# include < cstdio >
char s [5];
int main ()
{
scanf ("% s " ,& s );
int a = s [0] - ’0 ’ , b = s [1] - ’0 ’ , c = s [2] - ’0 ’ , d = s [3] - ’0 ’;
if (a -b -c - d ==7) printf ("% d -% d -% d -% d =7\ n " ,a ,b ,c , d );
else if (a -b - c + d ==7) printf ("% d -% d -% d +% d =7\ n " ,a ,b ,c , d );
else if (a - b +c - d ==7) printf ("% d -% d +% d -% d =7\ n " ,a ,b ,c , d );
else if (a - b + c + d ==7) printf ("% d -% d +% d +% d =7\ n " ,a ,b ,c , d );
else if ( a +b -c - d ==7) printf ("% d +% d -% d -% d =7\ n " ,a ,b ,c , d );
else if ( a +b - c + d ==7) printf ("% d +% d -% d +% d =7\ n " ,a ,b ,c , d );
else if ( a + b +c - d ==7) printf ("% d +% d +% d -% d =7\ n " ,a ,b ,c , d );
else if ( a + b + c + d ==7) printf ("% d +% d +% d +% d =7\ n " ,a ,b ,c , d );
}

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

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

int main() {
  int N;
  cin >> N;
  
  int a==N/10,b==a/
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected initializer before '==' token
    8 |   int a==N/10,b==a/
      |        ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;

int main(){
  int n;
  cin >> n;
  int a1,a2,a3,a4;
  a1 = n % 10;
  a2 = (n % 100 - a1) / 10;
  a3 = (n % 1000 - a2 * 10 - a1) / 100;
  a4 = n - 100 * a3 - 10 * a2 - a1;
  vector<int> vec= {a1,a2,a3,a4};
  sort(vec.begin(),vec.end());
  erase(unique(vec.begin(),vec.end()),vec.end());
  if (vec.size() <=2){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'erase' was not declared in this scope
   15 |   erase(unique(vec.begin(),vec.end()),vec.end());
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;

int main(){
  int n;
  cin >> n;
  int a1,a2,a3,a4;
  a1 = n % 10;
  a2 = (n % 100 - a1) / 10;
  a3 = (n % 1000 - a2 * 10 - a1) / 100;
  a4 = n - 100 * a3 - 10 * a2 - a1;
  vector<int> vec= {a1,a2,a3,a4};
  vec.sort(vec.begin(),vec.end());
  vec.erase(vec.unique(vec.begin(),vec.end()),vec.end());
  if (vec.size() <=2){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'class std::vector<int>' has no member named 'sort'
   14 |   vec.sort(vec.begin(),vec.end());
      |       ^~~~
a.cc:15:17: error: 'class std::vector<int>' has no member named 'unique'
   15 |   vec.erase(vec.unique(vec.begin(),vec.end()),vec.end());
      |                 ^~~~~~
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 (n1==n2&&n2==n3)||(n2==n3&&n3==n4){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected primary-expression before '||' token
    8 |   if (n1==n2&&n2==n3)||(n2==n3&&n3==n4){
      |                      ^~
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 (
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '}' token
    9 | }
      | ^
a.cc:8:7: error: expected ')' before '}' token
    8 |   if (
      |      ~^
      |       )
    9 | }
      | ~      
a.cc:9:1: error: expected primary-expression before '}' token
    9 | }
      | ^
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a:
  cin >> a;
  int b;
  int c;
  int d;
  int e;
  int count;
  e = a % 10;
  d = (a-e) % 100 /10;
  c = (a-e-10*d) % 1000 /100;
  b = (a-e-10*d-100*c)%10000/1000;
  cout << a << b << c << d << endl;
  if(a == b && b == c){
    cout << "Yes" << endl;
  }else if(b == c && c == d){
    cout << "Yes" << endl;
  }else if(c == d && d == a){
    cout << "Yes" << endl;
  }else if(d == a && a == b){
    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 a:
      |        ^
      |        ::
a.cc:5:7: error: 'a' has not been declared
    5 |   int a:
      |       ^
a.cc:6:7: error: qualified-id in declaration before '>>' token
    6 |   cin >> a;
      |       ^~
a.cc:12:7: error: 'a' was not declared in this scope
   12 |   e = a % 10;
      |       ^
Language: C++

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

}

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

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

int main() {
  string 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:17: error: lvalue required as left operand of assignment
    7 |   if ((N[0]=N[1]&&N[1]=N[2]) || (N[1]=N[2]&&N[2]=N[3])) {
a.cc:7:43: error: lvalue required as left operand of assignment
    7 |   if ((N[0]=N[1]&&N[1]=N[2]) || (N[1]=N[2]&&N[2]=N[3])) {
Language: C++

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

int main() {
  string N;
  cin >> N;
  if ((N[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:16: error: expected ']' before '}' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2]) || (N[1]=N[2]&&N[2]=N[3])) {
      |                ^
      |                ]
a.cc:7:16: error: expected ')' before '}' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2]) || (N[1]=N[2]&&N[2]=N[3])) {
      |       ~        ^
      |                )
a.cc:7:16: error: expected ')' before '}' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2]) || (N[1]=N[2]&&N[2]=N[3])) {
      |      ~         ^
      |                )
a.cc:7:16: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:7:23: error: expected constructor, destructor, or type conversion before '=' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2]) || (N[1]=N[2]&&N[2]=N[3])) {
      |                       ^
a.cc:10:15: error: expected unqualified-id before 'else'
   10 |               else {
      |               ^~~~
a.cc:13:15: error: expected declaration before '}' token
   13 |               }
      |               ^
Language: C++

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

int main() {
  string 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:16: error: expected ']' before '}' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2] || (N[1]=N[2]&&N[2]=N[3])) {
      |                ^
      |                ]
a.cc:7:16: error: expected ')' before '}' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2] || (N[1]=N[2]&&N[2]=N[3])) {
      |       ~        ^
      |                )
a.cc:7:16: error: expected ')' before '}' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2] || (N[1]=N[2]&&N[2]=N[3])) {
      |      ~         ^
      |                )
a.cc:7:16: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:7:23: error: expected constructor, destructor, or type conversion before '=' token
    7 |   if ((N[0]=N[1}&&N[1]=N[2] || (N[1]=N[2]&&N[2]=N[3])) {
      |                       ^
a.cc:10:15: error: expected unqualified-id before 'else'
   10 |               else {
      |               ^~~~
a.cc:13:15: error: expected declaration before '}' token
   13 |               }
      |               ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int b'
    7 |   int b = a / 1000;
      |       ^
a.cc:5:9: note: 'int b' previously declared here
    5 |   int a,b,c,d,e;
      |         ^
a.cc:8:7: error: redeclaration of 'int c'
    8 |   int c = (a % 1000);
      |       ^
a.cc:5:11: note: 'int c' previously declared here
    5 |   int a,b,c,d,e;
      |           ^
a.cc:9:7: error: redeclaration of 'int d'
    9 |   int d = (a % 100);
      |       ^
a.cc:5:13: note: 'int d' previously declared here
    5 |   int a,b,c,d,e;
      |             ^
a.cc:10:7: error: redeclaration of 'int e'
   10 |   int e = (a % 10);
      |       ^
a.cc:5:15: note: 'int e' previously declared here
    5 |   int a,b,c,d,e;
      |               ^
Language: Java


    }
}
import java.util.Scanner;

public class Main {

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

        if (Integer.valueOf(n.substring(0, 3)) % 111 == 0 ||
            Integer.valueOf(n.substring(1, 4)) % 111 == 0) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
    }
}




Compiler output:
Main.java:2: error: class, interface, enum, or record expected
    }
    ^
1 error
Language: C++

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

int main() {
  int N;
  cin >> N;
  int A.B; //A回1111を引く
  //1111で割った時余りが0~8⇨良い整数
  //1111の倍数を引いた時の余りが1000の倍数
  if (N % 1111 < 9) {
    cout << "Yes" << endl;
  } else if (N - 1111 * A >= 0 && N - 1111 * A == 1000 * B) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected initializer before '.' token
    7 |   int A.B; //A回1111を引く
      |        ^
a.cc:12:25: error: 'A' was not declared in this scope
   12 |   } else if (N - 1111 * A >= 0 && N - 1111 * A == 1000 * B) {
      |                         ^
a.cc:12:58: error: 'B' was not declared in this scope
   12 |   } else if (N - 1111 * A >= 0 && N - 1111 * A == 1000 * B) {
      |                                                          ^
Language: C++

#include <iostream>
using namespace std;

string N;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: expected '}' at end of input
   16 |     }
      |      ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
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(b==c){
    else 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:13:5: error: expected '}' before 'else'
   13 |     else if ( a==b || c==d){
      |     ^~~~
a.cc:12:11: note: to match this '{'
   12 |   if(b==c){
      |           ^
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else{
      |   ^~~~
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(b!=c){
    cout<<"No"<<endl;
  }
  else if ( a==b || c==d){
    cout<<"Yes"<<endl;
  }
  
  else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ',' or ';' before ')' token
   10 |   int d=((n%1000)%100)%10);
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin>>n;
  int a=(n/1000);
  n=n%1000;
  int b=(n/100);
  n=n%100;
  int c=(b/10);
  n=n%10;
  int d=(n);
  if(b==c){
    if((a==b) || (c==d)){
      cout<<"Yes"<<endl;
    }
    else 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:25:3: error: expected '}' before 'else'
   25 |   else{
      |   ^~~~
a.cc:14:11: note: to match this '{'
   14 |   if(b==c){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string n;
int main() {
	cin>>n;
	for(int i=2; i<=s.size(); s++) {
		if(n[s]==n[s[s-1]&&n[s]==n[s-2]) {
		cout<<"Yes"<<endl;
		retrun 0;
	}
}
cout<<"No"<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 's' was not declared in this scope
    6 |         for(int i=2; i<=s.size(); s++) {
      |                         ^
a.cc:7:48: error: expected ']' before ')' token
    7 |                 if(n[s]==n[s[s-1]&&n[s]==n[s-2]) {
      |                                                ^
      |                                                ]
a.cc:9:17: error: 'retrun' was not declared in this scope
    9 |                 retrun 0;
      |                 ^~~~~~
Language: C++

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

int main() {
  int N, a, b, c, d;
  cin >> N;

  N = 1000 * a + 100 * b + 10 * c + d;
  
  if ( a = b = c || b = c = d ) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


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

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

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

  N = 1000 * a + 100 * b + 10 * c + d;
  
  if ( a = b = c || b = c = d ) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'a' was not declared in this scope
    8 |   N = 1000 * a + 100 * b + 10 * c + d;
      |              ^
a.cc:8:24: error: 'b' was not declared in this scope
    8 |   N = 1000 * a + 100 * b + 10 * c + d;
      |                        ^
a.cc:8:33: error: 'c' was not declared in this scope
    8 |   N = 1000 * a + 100 * b + 10 * c + d;
      |                                 ^
a.cc:8:37: error: 'd' was not declared in this scope
    8 |   N = 1000 * a + 100 * b + 10 * c + d;
      |                                     ^
Language: C++

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

Compiler output:
a.cc:3:3: error: 'cin' does not name a type
    3 |   cin >> N;
      |   ^~~
a.cc:4:3: error: 'a' does not name a type
    4 |   a = N/1000;
      |   ^
a.cc:5:3: error: 'N' does not name a type
    5 |   N = N%1000;
      |   ^
a.cc:6:3: error: 'b' does not name a type
    6 |   b = N/100;
      |   ^
a.cc:7:3: error: 'N' does not name a type
    7 |   N = N%100;
      |   ^
a.cc:8:3: error: 'c' does not name a type
    8 |   c = N/10;
      |   ^
a.cc:9:3: error: 'N' does not name a type
    9 |   N = N%10;
      |   ^
a.cc:10:3: error: expected unqualified-id before 'if'
   10 |   if(a == b){
      |   ^~
a.cc:18:4: error: expected unqualified-id before 'else'
   18 |    else if(b == c){
      |    ^~~~
a.cc:26:3: error: expected unqualified-id before 'else'
   26 |   else{
      |   ^~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:63: error: expected ';' before 'cout'
    8 |   if (N[1] == N[2] &&(N[0] == N[1] || N[2] == N[3])) ans="Yes"
      |                                                               ^
      |                                                               ;
    9 | 
   10 |   cout << ans << endl;
      |   ~~~~
Language: C++

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

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

}

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

n = input()
cnt = 1
m = 0
for i in range(3):
    if n[i] == n[i+1]:
        cnt += 1
    else:
        m = max(m, cnt)
        cnt = 1
m = max(m, cnt)
if m >= 3:
    print("Yes")
else:
    print("No")


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | n = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'cnt'
    2 | cnt = 1
      | ^~~
Language: C++

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

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


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

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

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

  if ((N/10)%111== || (N-(N/1000)*1000)%111==0) 
  
  {
    cout  << "Yes" << endl;
  }
  else  {
    cout << "No" << endl;
}
}


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

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

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

  if ((N/10)%111==||(N-(N/1000)*1000)%111==0) 
  
  {
    cout  << "Yes" << endl;
  }
  else  {
    cout << "No" << endl;
}
}


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

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

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

  if ((N/10)%111==0) || ((N-(N/1000)*1000)%111==0) 
  
  {
    cout  << "Yes" << endl;
  }
  else  {
    cout << "No" << endl;
}
}


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

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

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

  if ((N/10)%111==0) &&((N-(N/1000)*1000)%111==0) 
  
  {
    cout  << "Yes" << endl;
  }
  else  {
    cout << "No" << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected identifier before '(' token
    8 |   if ((N/10)%111==0) &&((N-(N/1000)*1000)%111==0)
      |                        ^
Language: C++

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

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

  if ((N/10)%111==0) &&((N-(N/1000)*1000)%111==0) 
  
  {
    cout  << "Yes" << endl;
  }
  } 
  else  {
    cout << "No" << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected identifier before '(' token
    8 |   if ((N/10)%111==0) &&((N-(N/1000)*1000)%111==0)
      |                        ^
a.cc: At global scope:
a.cc:14:3: error: expected unqualified-id before 'else'
   14 |   else  {
      |   ^~~~
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/10)%111==0) {
    cout  << "Yes" << endl;
  }

  if (N-(N/1000)*1000)%111==0) {
    cout << "Yes" << endl;
  } 
  else  {
    cout << "No" << endl;
}
}


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

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

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

  if ((N/10)%111==0) {
    cout  << "Yes" << endl;
  }

  if else ((N-N/1000*1000)%111==0) {
    cout << "Yes" << endl;
  } 
  else  {
    cout << "No" << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: expected '(' before 'else'
   12 |   if else ((N-N/1000*1000)%111==0) {
      |      ^~~~
      |      (
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else  {
      |   ^~~~
Language: C++

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

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

  if ( (b == c == d) || (c == d == e)) {
    cout << "Yes" << endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before 'if'
   10 |   e = a%10
      |           ^
      |           ;
   11 | 
   12 |   if ( (b == c == d) || (c == d == e)) {
      |   ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,x1,x2,x3,x4; 
  cin >> N;
  x1=N/1000
  x2=N/100-N/1000*10
  x3=N/10-N/100*10
  x4=N%10

  if( x1==x2 && x1==x3){
		cout << "Yes" << endl;
  }
  else if(x2==x3 && x2==x4){
	cout << "Yes" << endl;
  }
  else{
	cout << "No" << endl;
  }
}

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

using namespace std;
 
int main() {
  int N, num1, num2, num3, remaining1, remaining2, remaining3;
  cin >> N;
 
  num1 = N / 10;
  remaining1 = num1 % 10;
  num2 = num1 / 10;
  remaining2 = num2 % 10;
  num3 = num2 / 10;
  remaining3 = num3 % 10;
  
  if (remaining1 == remaining2 && remaining2 == remaining3) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:22: error: 'endl' was not declared in this scope
   15 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << "No" << endl;
      |     ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:21: error: 'endl' was not declared in this scope
   18 |     cout << "No" << endl;
      |                     ^~~~
a.cc:18:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

puts gets.chomp.chars.uniq.size <= 2 ? 'Yes' : 'No'


Compiler output:
a.cc:1:40: warning: multi-character character constant [-Wmultichar]
    1 | puts gets.chomp.chars.uniq.size <= 2 ? 'Yes' : 'No'
      |                                        ^~~~~
a.cc:1:48: warning: multi-character character constant [-Wmultichar]
    1 | puts gets.chomp.chars.uniq.size <= 2 ? 'Yes' : 'No'
      |                                                ^~~~
a.cc:1:1: error: 'puts' does not name a type
    1 | puts gets.chomp.chars.uniq.size <= 2 ? 'Yes' : 'No'
      | ^~~~
Language: C++

int N, num1, num2, num3, remaining1, remaining2, remaining3;
  cin >> N;

  num1 = N / 10;
  remaining1 = num1 % 10;
  num2 = num1 / 10;
  remaining2 = num2 % 10;
  num3 = num2 / 10;
  remaining3 = num3 % 10;
  
  if (remaining1 == remaining2 && remaining2 == remaining3) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }


Compiler output:
a.cc:2:3: error: 'cin' does not name a type
    2 |   cin >> N;
      |   ^~~
a.cc:4:3: error: 'num1' does not name a type
    4 |   num1 = N / 10;
      |   ^~~~
a.cc:5:3: error: 'remaining1' does not name a type
    5 |   remaining1 = num1 % 10;
      |   ^~~~~~~~~~
a.cc:6:3: error: 'num2' does not name a type
    6 |   num2 = num1 / 10;
      |   ^~~~
a.cc:7:3: error: 'remaining2' does not name a type
    7 |   remaining2 = num2 % 10;
      |   ^~~~~~~~~~
a.cc:8:3: error: 'num3' does not name a type
    8 |   num3 = num2 / 10;
      |   ^~~~
a.cc:9:3: error: 'remaining3' does not name a type
    9 |   remaining3 = num3 % 10;
      |   ^~~~~~~~~~
a.cc:11:3: error: expected unqualified-id before 'if'
   11 |   if (remaining1 == remaining2 && remaining2 == remaining3) {
      |   ^~
a.cc:14:3: error: expected unqualified-id before 'else'
   14 |   else {
      |   ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
  string N;
  keep = int -1;
  count = int 0

  for (int i=0; i < N.length(); i++){
      if (keep==N[i]){ 
        count ++;
        if (count==3){
          cout << "Yes" << endl;
          exit(1);
        }
      }
      else {
        keep = N[i];
        count = 0;
      }
  }
  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'keep' was not declared in this scope
    6 |   keep = int -1;
      |   ^~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   keep = int -1;
      |          ^~~
a.cc:7:3: error: 'count' was not declared in this scope
    7 |   count = int 0
      |   ^~~~~
a.cc:7:11: error: expected primary-expression before 'int'
    7 |   count = int 0
      |           ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for (int i=0; i < N.length(); i++){
      |                 ^
Language: C++

v#include <bits/stdc++.h>

using namespace std ;

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



    if((s % 10 == s/10 % 10 && s % 10 == s/100 % 10) || (s/1000 % 10 == s/100 % 10 && s/100 % 10 == s/10 % 10))
    cout << "Yes" ;
    else cout << "No" ;
    return 0 ;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> s ;
      |     ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << "Yes" ;
      |     ^~~~
a.cc:14:10: error: 'cout' was not declared in this scope
   14 |     else cout << "No" ;
      |          ^~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.next();
    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:6: error: incompatible types: String cannot be converted to int
    int n = sc.next();
                   ^
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    String nn = n;
    int len = 0;
    int lenans = 0;
    for(int i = 0;i < 10;i++){
      nn.replace(i,"");
      len = nn.length();
      if(len > lenans){
        lenans = len;
      }
      if(lenans > 2){
        break;
      }
      nn = n;
    }
    if(lenans > 2){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:11: error: no suitable method found for replace(int,String)
      nn.replace(i,"");
        ^
    method String.replace(char,char) is not applicable
      (argument mismatch; possible lossy conversion from int to char)
    method String.replace(CharSequence,CharSequence) is not applicable
      (argument mismatch; int cannot be converted to CharSequence)
1 error