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

#include <iostream>
int main(){
  char N[5];
  scanf("%s", &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:4:18: error: expected ';' before 'if'
    4 |   scanf("%s", &N)
      |                  ^
      |                  ;
    5 |   if(N[0]==N[1]&&N[1]==N[2]){
      |   ~~              
a.cc:8:3: error: 'else' without a previous 'if'
    8 |   else if ( N[1]== N[2]&& N[2]== N[3]){
      |   ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<"Yes"<<endl;
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     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:12:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<"No"<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: At global scope:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <iostream>
int main(){
  char N[5];
  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:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>N;
      |   ^~~
      |   std::cin
In file included 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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     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:6:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     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:9:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     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:12:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<"No"<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: At global scope:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <iostream>
int main(){
  char N[5];
  cin>>N;
  if(N[0]==N[1]&&N[1]==N[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:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>N;
      |   ^~~
      |   std::cin
In file included 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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     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:6:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:13: error: 's' was not declared in this scope
    8 |   else if ( s [1]== s [2]&& s [2]== s [3]){
      |             ^
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     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:9:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<"Yes"<<endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     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:12:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout<<"No"<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: At global scope:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iosteram>
#include<map>
#include<string>
using namespace std;
int main(){
  string a;
  cin >> a;
  for(int i = 0;i < 9;i++){
  	map('0'+i+1) = 0;
  }
  for(int i = 0;i < n;i++){
    map(a[i])++;
  }
  string ans = "No";
  for(int i = 0;i < n;i++){
	if(map('0'+i+1) >= 3) ans = "Yes";
  }
  cout << ans << endl;
  
}

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

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

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

  if (n % 1111 == 0) {
    cout << "Yes"<< endl;
  }else {
  	cout << No << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'No' was not declared in this scope
   11 |         cout << No << endl;
      |                 ^~
Language: C++

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

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

  if (n % 1111 == 0) {
    cout << "Yes"<< endl;
  }else {
  	cout << No << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'No' was not declared in this scope
   11 |         cout << No << endl;
      |                 ^~
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

using namespace std;

 int main(){
  int N;
  cin >> N;
   int M=N%1000;
   
  if( N%1111 == 0 ){
  	cout << "Yes" << endl;
  }
  else if( N%1110 < 10 ){
  	cout << "Yes" << endl;
  }
  else if( M%111 == 0 ){
  	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:9:9: error: 'cout' was not declared in this scope
    9 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:26: error: 'endl' was not declared in this scope
    9 |         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:12:9: error: 'cout' was not declared in this scope
   12 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:26: error: 'endl' was not declared in this scope
   12 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:12:26: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:26: error: 'endl' was not declared in this scope
   15 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:15:26: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << "No" << endl;
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:25: error: 'endl' was not declared in this scope
   19 |         cout << "No" << endl;
      |                         ^~~~
a.cc:19:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int>vec(4);
int p=n%10;
n/=10;
int q=n%10;
n/=10;
  int r=n%10;
  n/=10
    int s=n%10;
  vec.at(0)=p;
  vec.at(1)=q;
  vec.at(2)=r;
  vec.at(3)=s;
  int counter =0;
  for(int i=0;i<3;i++){
  if(vec.at(i)==vec.at(i+1)){counter++;}}
  if(counter>1)cout <<"Yes" <<endl;
  else cout << "No" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: expected ';' before 'int'
   12 |   n/=10
      |        ^
      |        ;
   13 |     int s=n%10;
      |     ~~~ 
a.cc:17:13: error: 's' was not declared in this scope
   17 |   vec.at(3)=s;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x;
  cin >> x;//xは4桁の問題となる整数
  
  int a,b,c,d;//判定に使う変数を宣言
  
  a = x/1000;//aは1000の位を表す
  b=(x-1000*a)/100 //bは100の位
  c=(x-1000*a-100*b)/10
  d=x-1000*a-100*b-10*c//ここで位取り終わり
    
    if (a==b && b == c){
      cout << "Yes" << endl;
    }
  else if (b==c && c==d){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before 'c'
   10 |   b=(x-1000*a)/100 //bは100の位
      |                   ^
      |                   ;
   11 |   c=(x-1000*a-100*b)/10
      |   ~                
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 a,N;
  cin >> N;
  a = N / 1000
  if (N % 1110 < 10) {
    cout << "Yes" << endl;
  }
  else if ((N - a * 1000)%111 == 0){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

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

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

int main(){
    string S;
    cin >> S;
    bool Flag = false;
    
    if (S[0] == S[1] && S[1] == S[2]) {
        Flag = true;
    } else {
        if (S[1] == S[2] && S[2] == S[3]) {
            Flag = true;
        }
    }
    
    cout << ((Flag) ? "Yes" : "No") << endl;
    return 0;
}

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

#include<iostream>
using namespace std;

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<3;i++){
      |       ^
Language: Java

import java.util.*;

class Main{
	publis static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int n = sc.nextInt();
      	System.out.println(n%111 < 10 ? "Yes" : "No");
    }
}


Compiler output:
Main.java:4: error: <identifier> expected
	publis static void main(String[] args){
	      ^
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'N'
    5 |     N = a * 1000 + b * 100 + c * 10 + d;
      |     ^
a.cc:6:12: error: 'N' was not declared in this scope
    6 |     cin >> N;
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: expected primary-expression before ';' token
    5 |     cin >> N >>;
      |                ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define pback push_back
#define mpair make_pair
#define divceil(A, B) ((A + (B - 1)) / B)
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end()
#define CERR if(false) cerr

using namespace std;

int main(){

    string s;
    cin >> s;
    bool ans = s[1] == s[2] && (s[0] == s[1] OR s[2] == s[3]);

    cout << (ans ? "Yes" : "No") << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:45: error: expected ')' before 'OR'
   18 |     bool ans = s[1] == s[2] && (s[0] == s[1] OR s[2] == s[3]);
      |                                ~            ^~~
      |                                             )
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int a,b,c,w,e,q,t;
    cin >> a;
    if(a>=1000 && a<=9999)
    {
     w=a%10;
     q=(a/10)%10;
     e=(a/100)%10;
     t=(a/1000)%10;
     if(w==q && w==e || w==q && w==t || w==e && w==t|| q==e && q==t)
     {
         cout << "Yes";
     }
     else
        cout << "No";
    }
        return 0;
}
#include <iostream>

using namespace std;

int main()
{
    int a,b,c,w,e,q,t;
    cin >> a;
    if(a>=1000 && a<=9999)
    {
     w=a%10;
     q=(a/10)%10;
     e=(a/100)%10;
     t=(a/1000)%10;
     if(w==q && w==e || w==q && w==t || w==e && w==t|| q==e && q==t)
     {
         cout << "Yes";
     }
     else
        cout << "No";
    }
        return 0;
}


Compiler output:
a.cc:28:5: error: redefinition of 'int main()'
   28 | int main()
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main()
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() 
{
 vector<char> n(4);
 cin>>n.at(0,1,2,3);
 if(n.at(0)==n.at(1)==n.at(2) || n.at(1)==n.at(2)==n.at(3)){
 cout<<"Yes"<<endl;
 }
else{
	cout<<"No"<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: no matching function for call to 'std::vector<char>::at(int, int, int, int)'
    7 |  cin>>n.at(0,1,2,3);
      |       ~~~~^~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = char; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:7: note:   candidate expects 1 argument, 4 provided
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = char; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note:   candidate expects 1 argument, 4 provided
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;cin >> n;
  if(n%1110<10 || n%111=1)cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: lvalue required as left operand of assignment
    5 |   if(n%1110<10 || n%111=1)cout << "Yes" << endl;
      |      ~~~~~~~~~~^~~~~~~~
Language: C++

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

int main() {
  int n,;
  cin >> n;
  int n1000 = n / 1000;
  int n100 = (n - (n1000 * 100)) / 100;
  int n10 = (n- (n1000 * 100 + n100 * 10)) / 10;
  int n1 = n -(n1000 * 100 + n100 * 10 + n10 * 10 );
  
  if (n1000 == n100 == n10 || n100 == n10 == n1) {
    cout << "Yes" << endl;
  }
  else
  {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int n,;
      |         ^
Language: C++

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

int main() {
  int n,;
  cin >> n;
  int n1000 = n / 1000;
  int n100 = (n - (n1000 * 100)) / 100
  int n10 = (n- (n1000 * 100 + n100 * 10)) / 10
  int n1 = n -(n1000 * 100 + n100 * 10 + n10 * 10 )
  
  if (n1000 == n100 == n10 || n100 == n10 == n1) {
    cout << "Yes" << endl;
  }
  else
  {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 |   int n,;
      |         ^
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int n10 = (n- (n1000 * 100 + n100 * 10)) / 10
      |   ^~~
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else
      |   ^~~~
Language: C++

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

int main(){
	int N,a,b,c,d,x,y;
  
  	cin >> N;
  	a = N/1000;
  	x = N%1000;
  	b = x/100;
  	y = x%100;
  	c = y/10;
	d = y%10;
  
  	if(a==b==c || b=c=d || a==b==c==d){
    	cout << "良い整数" << endl;
    }else{
    	cout << "No" <<endl;
    }


}

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

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

int main(){
	int N,a,b,c,d,x,y;
  
  	cin >> N;
  	a = N/1000;
  	x = N%1000;
  	b = x/100;
  	y = x%100;
  	c = y/10;
	d = y%10;
  
  	if(a==b==c　|| a==b==d || a==c==d || b==c==d ){
    	cout << "良い整数" << endl;
    }else{
    	cout << "No" <<endl;
    }


}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:52: error: expected ';' before 'cout'
    7 |   if((b==c&&c==d&&d==e)||(b==c&&c==d)||(c==d&&d==e)cout<<"Yes"<<endl;
      |                                                    ^~~~
      |                                                    ;
a.cc:8:3: error: expected primary-expression before 'else'
    8 |   else cout<<"No"<<endl;
      |   ^~~~
a.cc:7:70: error: expected ')' before 'else'
    7 |   if((b==c&&c==d&&d==e)||(b==c&&c==d)||(c==d&&d==e)cout<<"Yes"<<endl;
      |     ~                                                                ^
      |                                                                      )
    8 |   else cout<<"No"<<endl;
      |   ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: invalid types 'int[int]' for array subscript
    8 |     int b=a[i],c=a[i+1];
      |            ^
a.cc:9:11: error: 'c' was not declared in this scope
    9 |     if(b==c)count++;
      |           ^
a.cc:9:13: error: reference to 'count' is ambiguous
    9 |     if(b==c)count++;
      |             ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:5: note:                 'int count'
    4 | int count=0;
      |     ^~~~~
a.cc:11:6: error: reference to 'count' is ambiguous
   11 |   if(count>2)cout<<"Yes"<<endl;
      |      ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:5: note:                 'int count'
    4 | int count=0;
      |     ^~~~~
Language: C

#include<stdio.h>
int judge(int n){
  int a=n%10;
  int b=(int)(n%100)/10;
  int c=(int)n/100;
  if(a==b&&b==c){
    return 1;
  }else{
    return 0;
  }
int main()
{
  int n;
  puts(judge((int)n/10)||judge(n%1000)?"Yes":"No");
  return 0;
}   

Compiler output:
main.c: In function 'judge':
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before 'd'
   12 |   c = (N % 100) / 10
      |                     ^
      |                     ;
   13 |   d = N % 10;
      |   ~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before 'd'
   12 |   c = (N % 100) / 10
      |                     ^
      |                     ;
   13 |   d = N % 10;
      |   ~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before 'd'
   12 |   c = (N % 100) / 10
      |                     ^
      |                     ;
   13 |   d = N % 10;
      |   ~                  
a.cc:18:10: error: expected '(' before '{' token
   18 |   else if{
      |          ^
      |          (
Language: C++

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

int main() {
  int N;
  cin >> N;
  int n1=N/1000, n2=n/100 - n1*10, n3=N/10 - n1*100 - n2*10, n4=N%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:7:21: error: 'n' was not declared in this scope
    7 |   int n1=N/1000, n2=n/100 - n1*10, n3=N/10 - n1*100 - n2*10, n4=N%10;
      |                     ^
a.cc:9:25: error: 'n3' was not declared in this scope; did you mean 'n2'?
    9 |   if((n1 == n2 && n2 == n3) || (n2 == n3 && n3 == n4)) {
      |                         ^~
      |                         n2
a.cc:9:51: error: 'n4' was not declared in this scope; did you mean 'n2'?
    9 |   if((n1 == n2 && n2 == n3) || (n2 == n3 && n3 == n4)) {
      |                                                   ^~
      |                                                   n2
Language: C++

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


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

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

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

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

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

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

#include<iostream>
#include<iomanip>

using namespace std;

#define rep(i, a, n) for (int i = (a); i < (n); ++i)
#define repr(i, a, n) for (int i = (n); i >= (a); --i)

void Main(){
  string n;
  cin>>n;

  (s[0]==s[1] && s[1]==s[2])||(s[1]==s[2] && s[2]==s[3]) ? cout<<"Yes"<<endl : cout<<"No"<<endl;
}

int main(){
  std::cin.tie(nullptr);                  // 標準入出力高速化
  std::ios_base::sync_with_stdio(false);  // SとS++の入出力出力を非同期
  Main();
}

Compiler output:
a.cc: In function 'void Main()':
a.cc:13:4: error: 's' was not declared in this scope
   13 |   (s[0]==s[1] && s[1]==s[2])||(s[1]==s[2] && s[2]==s[3]) ? cout<<"Yes"<<endl : cout<<"No"<<endl;
      |    ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'n1'
    6 | cin >> n
      |         ^
      |         ;
    7 | n1 = n/1000;
      | ~~       
a.cc:12:9: error: 'Yes' was not declared in this scope
   12 | cout << Yes << endl;
      |         ^~~
a.cc:15:9: error: 'Yes' was not declared in this scope
   15 | cout << Yes << endl;
      |         ^~~
a.cc:18:9: error: 'No' was not declared in this scope
   18 | cout << No << endl;
      |         ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'n1'
    6 | cin >> n
      |         ^
      |         ;
    7 | n1 = n/1000;
      | ~~       
a.cc:12:9: error: 'Yes' was not declared in this scope
   12 | cout << Yes << endl;
      |         ^~~
a.cc:15:9: error: 'Yes' was not declared in this scope
   15 | cout << Yes << endl;
      |         ^~~
a.cc:17:6: error: expected ')' before '!' token
   17 | if(n2! == n3){
      |   ~  ^
      |      )
a.cc:18:9: error: 'No' was not declared in this scope
   18 | cout << No << endl;
      |         ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'n1'
    6 | cin >> n
      |         ^
      |         ;
    7 | n1 = n/1000;
      | ~~       
a.cc:12:9: error: 'Yes' was not declared in this scope
   12 | cout << Yes << endl;
      |         ^~~
a.cc:15:9: error: 'Yes' was not declared in this scope
   15 | cout << Yes << endl;
      |         ^~~
a.cc:17:6: error: expected ')' before '!' token
   17 | if(n2! == n3){
      |   ~  ^
      |      )
a.cc:18:9: error: 'No' was not declared in this scope
   18 | cout << No << endl;
      |         ^~
Language: C++

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


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

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

        if ( i==0 and (s[i]==s[i+1])and (s[i+1]==s[i+2]))
            cout<<"Yes";
    else if ( i==0 (s[i]==s[i+1]) and (s[i+1]==s[i+2]) and (s[i+2]==s[i+3]));
        cout<<"Yes"
    else
        cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'i' was not declared in this scope
    8 |         if ( i==0 and (s[i]==s[i+1])and (s[i+1]==s[i+2]))
      |              ^
a.cc:10:33: error: expression cannot be used as a function
   10 |     else if ( i==0 (s[i]==s[i+1]) and (s[i+1]==s[i+2]) and (s[i+2]==s[i+3]));
      |                                 ^
a.cc:11:20: error: expected ';' before 'else'
   11 |         cout<<"Yes"
      |                    ^
      |                    ;
   12 |     else
      |     ~~~~
Language: C++

# include <iostream>
using namespace std ;
int main()
{
string s;
cin>>s;
for (int i=0; i<=4; i++)
if ((s[i]==s[i+1])and (s[i+1]==s[i+2]))
cout<<"Yes";
else if ( (s[i]==s[i+1]) and (s[i+1]==s[i+2]) and (s[i+2]==s[i+3]))
else
    cout<<"No";
}

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

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

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


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

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

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

#include<iostream>
#define size(array) (sizeof(array) / sizeof(array[0]))
using namespace std;
int main(void){
    int a,b;
    cin >> a;
  if(((a/100) % 10) == ((a/10) % 10)){
    if((a/1000) == (a/100) % 10)){
      cout << "Yes";
    }else if((a/1000) ==(a % 10)){
      cout << "Yes";
    }else{
      cout << "No";
    }
  }else{
      cout << "No";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected primary-expression before ')' token
    8 |     if((a/1000) == (a/100) % 10)){
      |                                 ^
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;
int main(){
  int N,A,B,C,D;
  cin >> N;
  A = N%10;
  B = (N-A)%100/10;
  C = ((N-A-10*B)%1000)/100;
  D = ((-A-10*B-100*C)%10000)1000;
  if(A==B==C || B==C==D)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected ';' before numeric constant
    9 |   D = ((-A-10*B-100*C)%10000)1000;
      |                              ^~~~
      |                              ;
Language: C

#include<stdio.h>
int main(void)
{
  int ;
  char str[8];
  
  fgets(str,sizeof(str),stdin);
  
  for(i=0;i<3;i++)
  {
    if(str[i] == str[i+1])
    {
      good++;
    }
  }
  if(str[1] == str[2])
  {
    need++;
  }
  
  if((need != 0)&&(good > 2))
  {
    puts("Yes");
  }else
  {
    puts("No");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: warning: useless type name in empty declaration
    4 |   int ;
      |   ^~~
main.c:9:7: error: 'i' undeclared (first use in this function)
    9 |   for(i=0;i<3;i++)
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:7: error: 'good' undeclared (first use in this function)
   13 |       good++;
      |       ^~~~
main.c:18:5: error: 'need' undeclared (first use in this function)
   18 |     need++;
      |     ^~~~
Language: C++

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

int main() {
  string s;
  char c='';
  int counter;
  cin >> s;
  for(int i = 0; i < s.length(); i++){
    if(c != s[i]){
      counter = 1;
      c = s[i];
    }else{
      ++counter;
    }
  }
  if(counter >=3){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


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

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

int main() {
  string x;
  char c='';
  int counter;
  cin >> x;
  for(int i = 0; i < s.length(); i++){
    if(c != s[i]){
      counter = 0;
      c = s[i];
    }else{
      ++counter;
    }
  }
  if(counter >=3){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc:6:10: error: empty character constant
    6 |   char c='';
      |          ^~
a.cc: In function 'int main()':
a.cc:9:22: error: 's' was not declared in this scope
    9 |   for(int i = 0; i < s.length(); i++){
      |                      ^
Language: C++

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

int main() {
  string s;
  priority_queue<int> a;
  
  cin >> s;
  for(int i=0; i<4; i++){
    a.push((int)s.at(i));
  }
  
  if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |        ^~
a.cc:13:19: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |                   ^~
a.cc:13:30: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |                              ^~
a.cc:13:41: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |                                         ^~
a.cc:13:52: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |                                                    ^~
a.cc:13:63: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |                                                               ^~
a.cc:13:74: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |                                                                          ^~
a.cc:13:85: error: 'class std::priority_queue<int>' has no member named 'at'
   13 |   if(a.at(0) == a.at(1) && a.at(1) == a.at(2) || a.at(1) == a.at(2) && a.at(2) == a.at(3)) cout << "Yes" << endl;
      |                                                                                     ^~
Language: C++

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

int main() {
  int N, n1, n2, n3, n4;
  cin >> N;
  n4 = N/1000;
  n3 = (N - n4 * 1000) / 100;
  n2 = (N - n4 * 1000 - n3 * 100) / 10;
  n1 = (N - n4 * 1000 - n3 * 100 -n2 * 10)
  if (n1 == n2 && n2 == n3) {
    cout << "Yes" << endl;
  }
  else if (n2 == n3 && n3 == n4) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:43: error: expected ';' before 'if'
   10 |   n1 = (N - n4 * 1000 - n3 * 100 -n2 * 10)
      |                                           ^
      |                                           ;
   11 |   if (n1 == n2 && n2 == n3) {
      |   ~~                                       
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else if (n2 == n3 && n3 == n4) {
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;

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

#include <iostream>
using namespace std;
int main(){
string a;
  int c;
  cin>>a;
  for(int i=0;i<3;i++){
  if(a.at(i)==a.at(i+1)){
  c++;
  }
  }
  if(c=>2){
  cout<<"Yes"<<endl;
  }
  else cout<<"No"<<endl;
}

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

#include <iostream>
using namespace std;
int main(){
string a;
  int c;
  cin>>a;
  for(int i=0;i<3;i++){
  if(a.at(i)==a.at(i+1)){
  c++;
  }
  }
  if(c=<3){
  cout<<"Yes"<<endl;
  }
  else cout<<"No"<<endl;
}

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

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

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

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

}


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

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

int main() {
	int n;
	cin >> n;
	
	int thousands_place = n / 1000
	int hundreds_place = (n - 1000 * thousands_place) / 100
	int tens_place = (n - 1000 * thousands_place - 100 * hundreds_place) / 10
	int units_digit = n - 1000 * thousands_place - 100 * hundreds_place - tens_place *10
	
	if (thousands_place == hundreds_place and hundreds_place == tens_place) {
		cout <<  "Yes" << endl;
	}
	else if (hundreds_place == tens_place and tens_place == units_digit) {
		cout <<  "Yes" << endl;
	}
	else {
		cout <<  "No" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected ',' or ';' before 'int'
    9 |         int hundreds_place = (n - 1000 * thousands_place) / 100
      |         ^~~
a.cc:16:9: error: 'else' without a previous 'if'
   16 |         else if (hundreds_place == tens_place and tens_place == units_digit) {
      |         ^~~~
a.cc:16:18: error: 'hundreds_place' was not declared in this scope
   16 |         else if (hundreds_place == tens_place and tens_place == units_digit) {
      |                  ^~~~~~~~~~~~~~
a.cc:16:36: error: 'tens_place' was not declared in this scope
   16 |         else if (hundreds_place == tens_place and tens_place == units_digit) {
      |                                    ^~~~~~~~~~
a.cc:16:65: error: 'units_digit' was not declared in this scope; did you mean 'isxdigit'?
   16 |         else if (hundreds_place == tens_place and tens_place == units_digit) {
      |                                                                 ^~~~~~~~~~~
      |                                                                 isxdigit