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

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using ll=long long;
using ld=long double;
//#define int long long
//#define _CRT_SECURE_NO_WARNINGS
#define rep(i, n) for (int i = 0; i < n; i++)
#define _GLIBCXX_DEBUG
const int MOD = 1e9 + 7;
const int INF = 1e18 + 9;
constexpr long double pi = 3.141592653589793238462643383279;
int fact(int i) {
    if (i == 0) return 1;
    return (fact(i - 1)) * i;
}
int gcd(int a, int b) {
    if (b == 0) return a;
    return gcd(b, a % b);
}
int lcm(int a, int b) {
    return a * b / gcd(a, b);
}
int keta(int n) {
    if (n == 0) return 1;
    int count = 0;
    while (n != 0) {
        n /= 10;
        count++;
    }
    return count;
}
int ketasum(int n) {
    int sum = 0;
    while (n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
string s;
int main(void) {
    cin >> s;
    if (s[0] == s[1] == s[2] || s[1] == s[2] == s[3]) cout << "Yes" << endl;
    else cout < , "No" << endl;
    return 0;
}

Compiler output:
a.cc:43:22: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   43 | const int INF = 1e18 + 9;
      |                 ~~~~~^~~
a.cc: In function 'int main()':
a.cc:91:17: error: expected primary-expression before ',' token
   91 |     else cout < , "No" << endl;
      |                 ^
a.cc:91:24: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   91 |     else cout < , "No" << endl;
      |                   ~~~~~^~~~~~~
Language: C++

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before 'a'
    7 |   tmp = num / 1000
      |                   ^
      |                   ;
    8 |   a = num / 10;
      |   ~
Language: C++

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

int main(){
  int num, a, b, tmp;
  cin >> num;
  tmp = num / 1000
  a = num / 10;
  b = num - (tmp * 1000);
  if (!(a % 111 || b % 111)){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before 'a'
    7 |   tmp = num / 1000
      |                   ^
      |                   ;
    8 |   a = num / 10;
      |   ~
Language: C

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

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

Compiler output:
main.c: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(){
  int num, a, b;
  cin >> num;
  a = num / 10;
  b = num - (num / 1000 * 1000);
  if (!(a % 111 || b % 111)){
    cout << "Yes" << endl;
  }else{
    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:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: storage size of 'num' isn't known
    5 |   int num[];
      |       ^~~
a.cc:6:14: error: expected primary-expression before ']' token
    6 |   cin >> num[];
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  //500円で払える分だけ払う
  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:8: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2]) {
      |        ^
a.cc:8:16: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2]) {
      |                ^
a.cc:8:24: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2]) {
      |                        ^
a.cc:8:32: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2]) {
      |                                ^
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |   }else if(N[1] == N[2] && N[2] == N[3]){
      |             ^
a.cc:10:21: error: invalid types 'int[int]' for array subscript
   10 |   }else if(N[1] == N[2] && N[2] == N[3]){
      |                     ^
a.cc:10:29: error: invalid types 'int[int]' for array subscript
   10 |   }else if(N[1] == N[2] && N[2] == N[3]){
      |                             ^
a.cc:10:37: error: invalid types 'int[int]' for array subscript
   10 |   }else if(N[1] == N[2] && N[2] == N[3]){
      |                                     ^
Language: C++

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected primary-expression before ']' token
   13 |     ]
      |     ^
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:14: note: to match this '{'
    4 | int main ( ) {
      |              ^
Language: C

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

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

Compiler output:
main.c: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() {
  int N ;
  cin >> N;
  if (N / 1000 == N % 1000 / 100 && N % 100 / 10 == N / 1000 || N % 1000 / 100 == N % 100 / 10 && N % 10 / 1 == N % 1000 / 100){
    cout << "Yse" << endl; 
  }else{
    cout << "No" << endl;
  }
}

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

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

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

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

typedef long long ll;
#define rep(i,x) for(int i=0;i<x;i++)
#define put(ans)    cout << ans << endl;

double kaijyo(int n){
    int k(1);
    for(int i=n;i>0;i--){
        k *= i;
    }

    return k;
}

double distance(int x[],int y[],int i,int j){
    int dx = (x[i] - x[j]) * (x[i] - x[j]);
    int dy = (y[i] - y[j]) * (y[i] - y[j]);
    return sqrt(dx+dy);
}

int main(){
    char c; cin >> n;
    int m(1);
    rep(i,3){
        char t; cin >> t;
        if(c==t){
            m++;
        }else{
            c = t;
        }
    }

    if(m>=3)    cout << "Yes" << endl;
    else    cout << "No" << endl;

    return 0;
}

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

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

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

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

#include <bits/stdc++.h>
using namespace std;
int main ( ) {
    
    int N=A*1000+B*100+C*10+D;
    cin >> N;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'A' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D;
      |           ^
a.cc:5:18: error: 'B' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D;
      |                  ^
a.cc:5:24: error: 'C' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D;
      |                        ^
a.cc:5:29: error: 'D' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D;
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main ( ) {
    int N;
    int N=A*1000+B*100+C*10+D
    cin >> N;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: redeclaration of 'int N'
    5 |     int N=A*1000+B*100+C*10+D
      |         ^
a.cc:4:9: note: 'int N' previously declared here
    4 |     int N;
      |         ^
a.cc:5:11: error: 'A' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D
      |           ^
a.cc:5:18: error: 'B' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D
      |                  ^
a.cc:5:24: error: 'C' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D
      |                        ^
a.cc:5:29: error: 'D' was not declared in this scope
    5 |     int N=A*1000+B*100+C*10+D
      |                             ^
Language: C++

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

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


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

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

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

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin N;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << "Yes" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         cout << "Yes" << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         cout << "No" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |         cout << "No" << endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>

int main()
{
 char n[5];

 scanf("%s",n);

 if((n[0]==n[1])&&(n[1]==n[2]))printf("Yes\n");
 else if((n[1]==n[2])&&(n[2]==n[3]))printf("Yes\n");
 else pritnf("No\n");

 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:7: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |  else pritnf("No\n");
      |       ^~~~~~
      |       printf
Language: C++

//AUTHOR:BlackBox Inc.//
#include<bits/stdc++.h>
#include<unordered_map>
#include<tr1/unordered_map>
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vlli vector<long long int>
#define vvi vector<vector<int>>
#define endl "\n"
#define vpii vector<pair<int,int>>
#define vs vector<string>
#define lin1(x) ll int x; x = scan();
#define lin2(x,y) ll int x, y; x = scan(), y = scan();
#define lin3(x,y,z) ll int x, y, z; x = scan(), y = scan(), z = scan();
#define pb(x) push_back(x)
#define makep(x,y) make_pair(x,y)
#define mx(a,b) (a)>(b)?(a):(b)
#define mn(a,b) (a)<(b)?(a):(b)
#define fori(s,e) for(i=s;i<=e;i++)
#define forj(s,e) for(j=s;j<=e;j++)
#define fork(s,e) for(k=s;k<=e;k++)
#define rep(i,s,e) for(int i=s;i<=e;i++)
#define brep(i,s,e) for(int i=s;i>=e;i--)
#define all(x) x.begin(),x.end()
#define mem(x,y) memset(x,y,sizeof(x));
#define bits1(x) __builtin_popcount(x)
#define pi 3.14159265358979323846264338327950
#define MOD7 1000000007
#define MOD9 1000000009
#define cn cin>>
#define co cout<<
#define fast std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
using namespace std;
using namespace std::tr1;

char a[4];
int main()


long long b,c,d,e,f,g,h;
cin>>a;


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

return 0;
}

Compiler output:
a.cc:41:1: error: expected initializer before 'long'
   41 | long long b,c,d,e,f,g,h;
      | ^~~~
a.cc:42:1: error: 'cin' does not name a type; did you mean 'cn'?
   42 | cin>>a;
      | ^~~
      | cn
a.cc:45:1: error: expected unqualified-id before 'if'
   45 | if(a[0]==a[1] and a[1]==a[2])
      | ^~
a.cc:49:1: error: expected unqualified-id before 'else'
   49 | else if(a[1]==a[2] and a[2]==a[3]){
      | ^~~~
a.cc:52:1: error: expected unqualified-id before 'else'
   52 | else{
      | ^~~~
a.cc:56:1: error: expected unqualified-id before 'return'
   56 | return 0;
      | ^~~~~~
a.cc:57:1: error: expected declaration before '}' token
   57 | }
      | ^
Language: C++

#include<string>
#inlude<iostream>
using namespace std;
int main(){
string s;
  cin>>s;
  if(s[0]==s[1]==s[2]||s[1]==s[2]==s[3])
    cout<<"yes"<<endl;cout<<"no"<<endl;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlude; did you mean #include?
    2 | #inlude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>s;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | #inlude<iostream>
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<"yes"<<endl;cout<<"no"<<endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout<<"yes"<<endl;cout<<"no"<<endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | #inlude<iostream>
a.cc:8:23: error: 'cout' was not declared in this scope
    8 |     cout<<"yes"<<endl;cout<<"no"<<endl;
      |                       ^~~~
a.cc:8:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:35: error: 'endl' was not declared in this scope
    8 |     cout<<"yes"<<endl;cout<<"no"<<endl;
      |                                   ^~~~
a.cc:8:35: 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() {
  string N; cin >> N;
  if(N[0] == N[1] && N[1] == N[2]) cout << "Yes" << endl;
  else if(N[2] == N[3] && N[1] == N[2]) cout << "Yes" << endl;
  else cout << "No" << endl;

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

using namespace std;

void Main() {
    string N;
    cin >> N;
    bool good = false;
    if ((N[0] == N[1] && N[1] == N[2]) || (N[1] == N[2] && N[2] == N[3])) {
        good = true;
    }
    cout << (good ? "Yes" : "No") << endl;
}

int main() {
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}


Compiler output:
a.cc: In function 'void Main()':
a.cc:4:5: error: 'string' was not declared in this scope
    4 |     string N;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:5: 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:5:12: error: 'N' was not declared in this scope
    5 |     cin >> N;
      |            ^
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << (good ? "Yes" : "No") << endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:38: error: 'endl' was not declared in this scope
   10 |     cout << (good ? "Yes" : "No") << 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: In function 'int main()':
a.cc:14:10: error: 'cout' is not a member of 'std'
   14 |     std::cout << std::fixed << std::setprecision(15);
      |          ^~~~
a.cc:14:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:23: error: 'fixed' is not a member of 'std'
   14 |     std::cout << std::fixed << std::setprecision(15);
      |                       ^~~~~
a.cc:1:1: note: 'std::fixed' is defined in header '<ios>'; this is probably fixable by adding '#include <ios>'
  +++ |+#include <ios>
    1 | using namespace std;
a.cc:14:37: error: 'setprecision' is not a member of 'std'
   14 |     std::cout << std::fixed << std::setprecision(15);
      |                                     ^~~~~~~~~~~~
a.cc:1:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
  +++ |+#include <iomanip>
    1 | using namespace std;
Language: C

#include <stdio.h>

int main(void)
{
        char s[4];
        int i,s=0;
        scanf("%s",s);

        for(i=1;i<4;i++)
                if(s[i]==s[i-1])s++;

        if(s>3)printf("Yes\n");
        else printf("No\n");
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:15: error: conflicting types for 's'; have 'int'
    6 |         int i,s=0;
      |               ^
main.c:5:14: note: previous declaration of 's' with type 'char[4]'
    5 |         char s[4];
      |              ^
Language: C++

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:40: error: expected ')' before ']' token
   12 |                   (n[1] == n[2] && n[3]] == n[2])){
      |                   ~                    ^
      |                                        )
a.cc:14:10: error: expected ')' before 'cout'
   14 |         }
      |          ^
      |          )
   15 |         cout << ans << endl;
      |         ~~~~
a.cc:11:12: note: to match this '('
   11 |         if ((n[0] == n[1] && n[2] == n[1]) ||
      |            ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
#include <set>
#include <deque>
using namespace std;
typedef long long ll;
const int mod = 1000000007;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    string a;
    cin >> a;
    sort( a.begin() , a.end() );
    if( s[1] == s[2] && s[2] == s[3] && s[3] == 0  ) cout << "Yes";
    else if( a[1] == a[2] && a[2] == a[3] ) cout << "Yes";
    else cout << "No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 's' was not declared in this scope
   22 |     if( s[1] == s[2] && s[2] == s[3] && s[3] == 0  ) cout << "Yes";
      |         ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: lvalue required as left operand of assignment
   10 |   else if (N%1000%111=0) {
      |            ~~~~~~^~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String n[] = sc.next().split("");
    if (n[0].equals(n[1]) && n[1].equals(n[2])){
      System.out.println("Yes");
    }else if (n[1].equals(n[2]) && n[2].equals(n[3]){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:9: error: ')' expected
    }else if (n[1].equals(n[2]) && n[2].equals(n[3]){
                                                    ^
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().split("");
    if (n[1].equals(n[2])){
      if(n[0].equals(n[1])){
        System.out.println("Yes");
      }else if (n[2].equals(n[3]){
        System.out.println("Yes");
      }
    }else{
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:10: error: ')' expected
      }else if (n[2].equals(n[3]){
                                 ^
1 error
Language: C++

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

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


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

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

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


return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: invalid types 'char[int]' for array subscript
    7 |   if (N[0] = N[1] = N[2] = N[3]) {
      |        ^
a.cc:7:15: error: invalid types 'char[int]' for array subscript
    7 |   if (N[0] = N[1] = N[2] = N[3]) {
      |               ^
a.cc:7:22: error: invalid types 'char[int]' for array subscript
    7 |   if (N[0] = N[1] = N[2] = N[3]) {
      |                      ^
a.cc:7:29: error: invalid types 'char[int]' for array subscript
    7 |   if (N[0] = N[1] = N[2] = N[3]) {
      |                             ^
a.cc:10:6: error: invalid types 'char[int]' for array subscript
   10 | if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3]  ) {
      |      ^
a.cc:10:13: error: invalid types 'char[int]' for array subscript
   10 | if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3]  ) {
      |             ^
a.cc:10:20: error: invalid types 'char[int]' for array subscript
   10 | if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3]  ) {
      |                    ^
a.cc:10:28: error: invalid types 'char[int]' for array subscript
   10 | if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3]  ) {
      |                            ^
a.cc:10:35: error: invalid types 'char[int]' for array subscript
   10 | if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3]  ) {
      |                                   ^
a.cc:10:42: error: invalid types 'char[int]' for array subscript
   10 | if (N[0] = N[1] = N[2] || N[1] = 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[2] = N[3]) {
 cout << "Yes" << endl;
}
if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3]  ) {
cout << "Yes" << endl;
}
else   {
 cout << "No" << endl;
}


return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: lvalue required as left operand of assignment
   10 | if (N[0] = N[1] = N[2] || N[1] = 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[2] = N[3]) {
 cout << "Yes" << endl;
}
if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3] || ) {
cout << "Yes" << endl;
}
else   {
 cout << "No" << endl;
}


return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:49: error: expected primary-expression before ')' token
   10 | if (N[0] = N[1] = N[2] || N[1] = 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[2] = N[3]) {
 cout << "Yes" << endl;
}
else if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3] || ) {
cout << "Yes" << endl;
}
else if () {
 cout << "No" << endl;
}


return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:54: error: expected primary-expression before ')' token
   10 | else if (N[0] = N[1] = N[2] || N[1] = N[2] = N[3] || ) {
      |                                                      ^
a.cc:13:10: error: expected primary-expression before ')' token
   13 | else if () {
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int N;
int main(){
  cin >> N ;
  if(N.at(0)==N.at(1)==N.at(2) || N.at(1)==N.at(2)==N.at(3)){
    puts("Yes");
  }
  else {
    puts("No")
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: request for member 'at' in 'N', which is of non-class type 'int'
    6 |   if(N.at(0)==N.at(1)==N.at(2) || N.at(1)==N.at(2)==N.at(3)){
      |        ^~
a.cc:6:17: error: request for member 'at' in 'N', which is of non-class type 'int'
    6 |   if(N.at(0)==N.at(1)==N.at(2) || N.at(1)==N.at(2)==N.at(3)){
      |                 ^~
a.cc:6:26: error: request for member 'at' in 'N', which is of non-class type 'int'
    6 |   if(N.at(0)==N.at(1)==N.at(2) || N.at(1)==N.at(2)==N.at(3)){
      |                          ^~
a.cc:6:37: error: request for member 'at' in 'N', which is of non-class type 'int'
    6 |   if(N.at(0)==N.at(1)==N.at(2) || N.at(1)==N.at(2)==N.at(3)){
      |                                     ^~
a.cc:6:46: error: request for member 'at' in 'N', which is of non-class type 'int'
    6 |   if(N.at(0)==N.at(1)==N.at(2) || N.at(1)==N.at(2)==N.at(3)){
      |                                              ^~
a.cc:6:55: error: request for member 'at' in 'N', which is of non-class type 'int'
    6 |   if(N.at(0)==N.at(1)==N.at(2) || N.at(1)==N.at(2)==N.at(3)){
      |                                                       ^~
a.cc:10:15: error: expected ';' before '}' token
   10 |     puts("No")
      |               ^
      |               ;
   11 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
 char N[4];
scanf("%s",&N);
if([0] == [1] && [1] == [2])
cout << "Yes" << endl;
if([1] == [2] && [2] == [3])
cout << "Yes" << endl;
else if
cout << "No" << endl;
 
 
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected identifier before numeric constant
    7 | if([0] == [1] && [1] == [2])
      |     ^
a.cc: In lambda function:
a.cc:7:8: error: expected '{' before '==' token
    7 | if([0] == [1] && [1] == [2])
      |        ^~
a.cc: In function 'int main()':
a.cc:7:12: error: expected identifier before numeric constant
    7 | if([0] == [1] && [1] == [2])
      |            ^
a.cc: In lambda function:
a.cc:7:15: error: expected '{' before '&&' token
    7 | if([0] == [1] && [1] == [2])
      |               ^~
a.cc: In function 'int main()':
a.cc:7:19: error: expected identifier before numeric constant
    7 | if([0] == [1] && [1] == [2])
      |                   ^
a.cc: In lambda function:
a.cc:7:22: error: expected '{' before '==' token
    7 | if([0] == [1] && [1] == [2])
      |                      ^~
a.cc: In function 'int main()':
a.cc:7:26: error: expected identifier before numeric constant
    7 | if([0] == [1] && [1] == [2])
      |                          ^
a.cc: In lambda function:
a.cc:7:28: error: expected '{' before ')' token
    7 | if([0] == [1] && [1] == [2])
      |                            ^
a.cc: In function 'int main()':
a.cc:9:5: error: expected identifier before numeric constant
    9 | if([1] == [2] && [2] == [3])
      |     ^
a.cc: In lambda function:
a.cc:9:8: error: expected '{' before '==' token
    9 | if([1] == [2] && [2] == [3])
      |        ^~
a.cc: In function 'int main()':
a.cc:9:12: error: expected identifier before numeric constant
    9 | if([1] == [2] && [2] == [3])
      |            ^
a.cc: In lambda function:
a.cc:9:15: error: expected '{' before '&&' token
    9 | if([1] == [2] && [2] == [3])
      |               ^~
a.cc: In function 'int main()':
a.cc:9:19: error: expected identifier before numeric constant
    9 | if([1] == [2] && [2] == [3])
      |                   ^
a.cc: In lambda function:
a.cc:9:22: error: expected '{' before '==' token
    9 | if([1] == [2] && [2] == [3])
      |                      ^~
a.cc: In function 'int main()':
a.cc:9:26: error: expected identifier before numeric constant
    9 | if([1] == [2] && [2] == [3])
      |                          ^
a.cc: In lambda function:
a.cc:9:28: error: expected '{' before ')' token
    9 | if([1] == [2] && [2] == [3])
      |                            ^
a.cc: In function 'int main()':
a.cc:12:1: error: expected '(' before 'cout'
   12 | cout << "No" << endl;
      | ^~~~
      | (
Language: C++

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



int main() {
  int N;
  cin >> N;
  
  if (N[0] == N[1] && N[1] == N[2]) {
    cout << "YES" << endl;
  }
  
  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:10:8: error: invalid types 'int[int]' for array subscript
   10 |   if (N[0] == N[1] && N[1] == N[2]) {
      |        ^
a.cc:10:16: error: invalid types 'int[int]' for array subscript
   10 |   if (N[0] == N[1] && N[1] == N[2]) {
      |                ^
a.cc:10:24: error: invalid types 'int[int]' for array subscript
   10 |   if (N[0] == N[1] && N[1] == N[2]) {
      |                        ^
a.cc:10:32: error: invalid types 'int[int]' for array subscript
   10 |   if (N[0] == N[1] && N[1] == N[2]) {
      |                                ^
a.cc:14:13: error: invalid types 'int[int]' for array subscript
   14 |   else if (N[1] == N[2] && N[2] == N[3]) {
      |             ^
a.cc:14:21: error: invalid types 'int[int]' for array subscript
   14 |   else if (N[1] == N[2] && N[2] == N[3]) {
      |                     ^
a.cc:14:29: error: invalid types 'int[int]' for array subscript
   14 |   else if (N[1] == N[2] && N[2] == N[3]) {
      |                             ^
a.cc:14:37: error: invalid types 'int[int]' for array subscript
   14 |   else if (N[1] == N[2] && N[2] == N[3]) {
      |                                     ^
Language: C++

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

string N;
cin >> N;

int main() {
  
  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:5:1: error: 'cin' does not name a type
    5 | cin >> N;
      | ^~~
Language: C++

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

int main() {
  str N;
  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:5:3: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   str N;
      |   ^~~
      |   std
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N;
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before 'N'
   10 |   hyaku N / 100 % 10;
      |        ^~
      |        ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:41: error: expected ';' before 'N'
    8 |   iti = N % 10, juu = N / 10 % 10, hyaku N / 100 % 10, sen = N / 1000;
      |                                         ^~
      |                                         ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, A, B, C, D , b, c,;
   cin >> N ;
 A = N / 1000 ;
 B = N - 1000 * A ;
 b = B /100 ;
 C = B - b * 100 ;
 c = C / 100 ;
 D = C - 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:5:28: error: expected unqualified-id before ';' token
    5 |   int N, A, B, C, D , b, c,;
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, A, B, C, D , b, c,;
   cin >> N ;
 A = N / 1000 ;
 B = N - 1000 * A ;
 b = B /100 ;
 C = B - b * 100 ;
 c = C / 100 ;
 D = C - 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:5:28: error: expected unqualified-id before ';' token
    5 |   int N, A, B, C, D , b, c,;
      |                            ^
a.cc:13:49: error: expected ')' before '{' token
   13 |   if ( (A == b && b == c ) || (b == c && c == D){
      |      ~                                          ^
      |                                                 )
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, A, B, C, D , b, c, d;
   cin >> N ;
 A = N / 1000 ;
 B = N - 1000 * A ;
 b = B /100 ;
 C = B - b * 100 ;
 c = C / 100 ;
 d = C - 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:13:49: error: expected ')' before '{' token
   13 |   if ( (A == b && b == c ) || (b == c && c == d){
      |      ~                                          ^
      |                                                 )
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
Language: C++

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

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

  a = n % 1000;
  b = (n / 10) % 100;
  c = (n / 100) % 10;
  d = n / 1000;
  
  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:8:7: error: 'n' was not declared in this scope
    8 |   a = n % 1000;
      |       ^
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:
main.c: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;
const long long MOD = 1e9+7;
#define rep(i,n) for(int i=0;i<n;++i)
typedef long long int ll;
typedef unsigned long long ull;
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
typedef pair<ll,ll> P;


int main()
{
    string n;
    cin>>n;
    int cnt=0;
    rep(i,3){
        if(cnt>=2){
            cout<<"Yes"<<endl;
            return 0;
        }
        if(n[i]==n[i+1])cnt++;
        else cnt=0;
    }
   cout<<"No"<<endl;
    return 0;

}


Compiler output:
main.c:1:9: 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() {
  int N;
  int a,b,c,d;
  a=N/1000;
  b=(N-1000*a)/100;
  c=(N-1000*a-100*b)/10;
  d=N-1000*a-100*b-10*c;
  cin >> N;
  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:12:9: error: lvalue required as left operand of assignment
   12 |   if(a=b&&b=c){
      |        ~^~~
a.cc:14:15: error: lvalue required as left operand of assignment
   14 |   }else if(b=c&&c=d){
      |              ~^~~
a.cc:16:15: error: lvalue required as left operand of assignment
   16 |   }else if(c=d&&d=a){
      |              ~^~~
a.cc:18:15: error: lvalue required as left operand of assignment
   18 |   }else if(d=a&&a=b){
      |              ~^~~
Language: C++


#pragma GCC optimize ("O3")

#include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define bcnt __builtin_popcountll
#define dump(x)  cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl

using namespace std;

typedef long long ll;
typedef pair<ll,ll> Pll;
typedef pair<int,int> Pin;

ll INF = 1e16;
int inf = 1e9;
ll MOD = 1e9+7;

template<typename T>
ostream& operator << (ostream& os, const vector<T>& vec) {
    os << "[ ";
    REP(i, vec.size()) {
        os << vec[i] << " ";
    }
    os << "]";

    return os;
}

ll pow_mod(ll a, ll p) {
    ll res = 1;
    while(p) {
        if (p & 1) res = (res * a) % MOD;
        a = (a * a) % MOD;
        p >>= 1;
    }

    return res;
}


ll mod_inv(ll a, ll m) {
    ll b = m, u = 0, v = 1;
    while(a) {
        ll t = b / a;
        swap(b -= t * a, a);
        swap(u -= t * v, v);
    }

    return (u % m + m) % m;
}

ll gcd(ll a, ll b) {
    if(b == 0) return a;
    return gcd(b, a%b);
}


int main(){
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(20);

    int N;
    cin >> N;

    vector<int >cnt(10, 0);

    int c = 0;
    int s = -1;
    bool f = false;
    REP(i, 4) {
        if (s != N % 10) {
            s = N % 10;
            c = 0;
        } else {
            c++;
        }
        n /= 10;

        if (c >= 3) {
            f = true;
        }
    }

    if (f) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:86:9: error: 'n' was not declared in this scope
   86 |         n /= 10;
      |         ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	string s;
	cin>>s;
	map<char,int>m;
	for(int i=0;i<4;i++){
		m[s[i]]++;
	}
	for(auto i:m){
		if(i.S>=3){
			cout<<"Yes";
			return 0;
		}
	}
	cout<<"No";


 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'struct std::pair<const char, int>' has no member named 'S'
   13 |                 if(i.S>=3){
      |                      ^
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int b = (N - 1000 * a ) / 100
      |   ^~~
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else if ( a == b || c == d ) {
      |   ^~~~
a.cc:15:18: error: 'b' was not declared in this scope
   15 |   else if ( a == b || c == d ) {
      |                  ^
a.cc:15:23: error: 'c' was not declared in this scope
   15 |   else if ( a == b || c == d ) {
      |                       ^
a.cc:15:28: error: 'd' was not declared in this scope
   15 |   else if ( a == b || c == d ) {
      |                            ^
Language: C++


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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>N;
      |   ^~~
a.cc:9:11: error: 'cout' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout<<"Yes"<<endl;else cout<<"No"<<endl;}
      |           ^~~~
a.cc:9:24: error: 'endl' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                        ^~~~
a.cc:9:42: error: 'cout' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                                          ^~~~
a.cc:9:55: error: 'endl' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                                                       ^~~~
a.cc:9:65: error: 'cout' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                                                                 ^~~~
a.cc:9:77: error: 'endl' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                                                                             ^~~~