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

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

int main() {
  string a;
  int n;
  
  cin >> a;
  
  for (i = 0; i < a.lenght(); i++){
    n = 0;
    
    for ( j = i; j < a.lenght(); j++) {
      if(a[i] == a[j]) n++;
    }
    
    if(n >= 3){
      puts("Yes");
      exit(0);
    }
  }
  
  puts("No");
  exit(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   for (i = 0; i < a.lenght(); i++){
      |        ^
a.cc:10:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   10 |   for (i = 0; i < a.lenght(); i++){
      |                     ^~~~~~
      |                     length
a.cc:13:11: error: 'j' was not declared in this scope
   13 |     for ( j = i; j < a.lenght(); j++) {
      |           ^
a.cc:13:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
   13 |     for ( j = i; j < a.lenght(); j++) {
      |                        ^~~~~~
      |                        length
Language: C

#include <stdio.h>
int main(void)
{
    int N;
    scanf("%d",&N);
    if(((N/10)%111==0)||((N%1000)%111=0)||(N<10))
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:38: error: lvalue required as left operand of assignment
    6 |     if(((N/10)%111==0)||((N%1000)%111=0)||(N<10))
      |                                      ^
Language: C

#include <stdio.h>
int main(void)
{
    int N;
    scanf("%d",&N);
    if(((N/1000)%111==0)||((N%1000)%111=0)||(N<10))
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:40: error: lvalue required as left operand of assignment
    6 |     if(((N/1000)%111==0)||((N%1000)%111=0)||(N<10))
      |                                        ^
Language: C

#include <stdio.h>
int main(void)
{
    int N,s;
    scanf("%d",&N);
    if(((N/1000)%111=0)||((N%1000)%111=0))
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:21: error: lvalue required as left operand of assignment
    6 |     if(((N/1000)%111=0)||((N%1000)%111=0))
      |                     ^
main.c:6:39: error: lvalue required as left operand of assignment
    6 |     if(((N/1000)%111=0)||((N%1000)%111=0))
      |                                       ^
Language: C++

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

int main(){
  int N,N1,N10,N100,N1000;
  cin >> N;
  N1=N%10,N10=(N%100-N1)/10;
  N100=(N%1000-10*N10-N1)/100;
  N1000=(N%10000-100*N100-10*N10-N1)/1000;
  if(N1==N10 && N10=N100){
    cout << "Yes" <<endl;
  }
  else if(N10==N100 && N100==N1000){
    cout << "No" <<endl;
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: lvalue required as left operand of assignment
   10 |   if(N1==N10 && N10=N100){
      |      ~~~~~~~~^~~~~~
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:63: error: expected ')' before '{' token
    8 |   if (((n0 == n1) && (n0 == n2)) || ((n1 == n3) && (n2 == n3)) {
      |      ~                                                        ^~
      |                                                               )
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: lvalue required as left operand of assignment
    8 |   if(N % 111 <= 9 || N % 1000 / 111 = 0){
      |      ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
a.cc:12:22: error: 'emdl' was not declared in this scope
   12 |      cout << "No" << emdl;
      |                      ^~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  
  for (int i = 0; i < 2; i++) {
    if (s.at(i) == s.at(i + 1) && s.at(i + 1) == s.at(i + 2)) {
      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,a,b,c,d;
  cin >> N;
  
  int N = 1000*a + 100*b + 10*c + d;
  
  if(a==b==c || b==c==d){
    cout <<" Yes" << endl;
  }
  
  
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int N'
    8 |   int N = 1000*a + 100*b + 10*c + d;
      |       ^
a.cc:5:7: note: 'int N' previously declared here
    5 |   int N,a,b,c,d;
      |       ^
Language: C++

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

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

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

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

int main(){
  int N;
  int n1, n2;
  int sho, amari1, amari2;
  cin >> N;
  n1 = N / 10;
  n2 = N % 1000;
  if ( (n1 % 111) == 0 ) || ( n2 % 111) == 0  ){
     cout << "Yes" << endl;
  }
  else {
     cout << "No" << endl;
  }
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected primary-expression before '||' token
   11 |   if ( (n1 % 111) == 0 ) || ( n2 % 111) == 0  ){
      |                          ^~
Language: C++

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

int main(){
  int N;
  int n1, n2;
  int sho, amari1, amari2;
  cin >> N;
  n1 = N / 10;
  n2 = N % 1000;
  if ( (n1 % 111) == 0 || ( n2 % 111) == 0 ) ){
     cout << "Yes" << endl;
  }
  else {
     cout << "No" << endl;
  }
 }



Compiler output:
a.cc: In function 'int main()':
a.cc:11:46: error: expected primary-expression before ')' token
   11 |   if ( (n1 % 111) == 0 || ( n2 % 111) == 0 ) ){
      |                                              ^
Language: C++

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

int main(){
  int N;
  int n1, n2;
  int sho, amari1, amari2;
  cin >> N;
  n1 = N / 10;
  n2 = n % 1000;
  if ( (n1 % 111) == 0 || ( n2 % 111) == 0 ) ){
     cout << "Yes" << endl;
  }
  else {
     cout << "No" << endl;
  }
 }



Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'n' was not declared in this scope
   10 |   n2 = n % 1000;
      |        ^
a.cc:11:46: error: expected primary-expression before ')' token
   11 |   if ( (n1 % 111) == 0 || ( n2 % 111) == 0 ) ){
      |                                              ^
Language: C++

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

int main(){
  int N;
  int n1, n2;
  sho, amari1, amari2;
  cin >> N;
  n1 = N / 10;
  n2 = n % 1000;
  if ( (n1 % 111) == 0 || ( n2 % 111) == 0 ) ){
     cout << "Yes" << endl;
  }
  else {
     cout << "No" << endl;
  }
 }



Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'sho' was not declared in this scope
    7 |   sho, amari1, amari2;
      |   ^~~
a.cc:7:8: error: 'amari1' was not declared in this scope
    7 |   sho, amari1, amari2;
      |        ^~~~~~
a.cc:7:16: error: 'amari2' was not declared in this scope
    7 |   sho, amari1, amari2;
      |                ^~~~~~
a.cc:10:8: error: 'n' was not declared in this scope
   10 |   n2 = n % 1000;
      |        ^
a.cc:11:46: error: expected primary-expression before ')' token
   11 |   if ( (n1 % 111) == 0 || ( n2 % 111) == 0 ) ){
      |                                              ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid types 'int[int]' for array subscript
    7 |   if(a[0]==a[1]==a[2]||a[3]==a[1]==a[2]){cout <<"Yes"<< endl;}
      |       ^
a.cc:7:13: error: invalid types 'int[int]' for array subscript
    7 |   if(a[0]==a[1]==a[2]||a[3]==a[1]==a[2]){cout <<"Yes"<< endl;}
      |             ^
a.cc:7:19: error: invalid types 'int[int]' for array subscript
    7 |   if(a[0]==a[1]==a[2]||a[3]==a[1]==a[2]){cout <<"Yes"<< endl;}
      |                   ^
a.cc:7:25: error: invalid types 'int[int]' for array subscript
    7 |   if(a[0]==a[1]==a[2]||a[3]==a[1]==a[2]){cout <<"Yes"<< endl;}
      |                         ^
a.cc:7:31: error: invalid types 'int[int]' for array subscript
    7 |   if(a[0]==a[1]==a[2]||a[3]==a[1]==a[2]){cout <<"Yes"<< endl;}
      |                               ^
a.cc:7:37: error: invalid types 'int[int]' for array subscript
    7 |   if(a[0]==a[1]==a[2]||a[3]==a[1]==a[2]){cout <<"Yes"<< endl;}
      |                                     ^
Language: C++

// ABC079A - 

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

typedef unsigned long long int ull;
typedef long long int ll;

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

	if ((S[0] == S[1])&&((S[1] == S[2])) {
		cout << "Yes" << endl;
		return 0;
	}

	if ((S[1] == S[2])&&((S[2] == S[3])) {
		cout << "Yes" << endl;
		return 0;
	}

	cout << "No" << endl;

	return 0;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:78: error: 'hudred' was not declared in this scope; did you mean 'hundred'?
   15 |     if (thousan == hundred && thousan == ten && thousan == one || thousan == hudred && thousan == ten && thousan != one) {
      |                                                                              ^~~~~~
      |                                                                              hundred
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'hudred' was not declared in this scope; did you mean 'hundred'?
   15 |     if (thousan == hudred && thousan == ten && thousan == one || thousan == hudred && thousan == ten && thousan != one) {
      |                    ^~~~~~
      |                    hundred
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: expected ';' before '}' token
   16 |   cout << "Yes" << endl
      |                        ^
      |                        ;
   17 |   }
      |   ~                     
a.cc:20:24: error: expected ';' before '}' token
   20 |   cout << "Yes" << endl
      |                        ^
      |                        ;
   21 |   }
      |   ~                     
a.cc:24:23: error: expected ';' before '}' token
   24 |   cout << "No" << endl
      |                       ^
      |                       ;
   25 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: expected '}' before 'else'
   21 |   else {
      |   ^~~~
a.cc:20:3: note: to match this '{'
   20 |   {
      |   ^
a.cc:21:3: error: expected '}' before 'else'
   21 |   else {
      |   ^~~~
a.cc:13:17: note: to match this '{'
   13 |   if ( b == c ) {
      |                 ^
Language: C++

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

int main() {
  int x;
  cin >> x;
  
  if ( ( x - x % 1111 ) % 1111 == 0 ) {
    cout << "Yes" << endl;
  }

  else if ( (x - x % 1111) % 1111 == 1110 {
    cout << "Yes" << endl;
  }
   
  else {
    cout << "No" << endl;
  }
}
           

Compiler output:
a.cc: In function 'int main()':
a.cc:12:42: error: expected ')' before '{' token
   12 |   else if ( (x - x % 1111) % 1111 == 1110 {
      |           ~                              ^~
      |                                          )
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
Language: C++

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

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


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

clude <bits/stdc++.h>
using namespace std;
 
int main() {
  int A;
  cin >> A;
  if ( (A/1000)<1 ) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude <bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> A;
      |   ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << "No" << endl;
      |     ^~~~
a.cc:8:21: error: 'endl' was not declared in this scope
    8 |     cout << "No" << endl;
      |                     ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:10:22: error: 'endl' was not declared in this scope
   10 |     cout << "Yes" << endl;
      |                      ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected '(' before '{' token
    9 |   } else if {
      |             ^
      |             (
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A;
  cin >> A;
  if ( (A/1000)<1 ) {
    cout << No << endl;
  } else if {
    cout << Yes << endl+
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'No' was not declared in this scope
    8 |     cout << No << endl;
      |             ^~
a.cc:9:13: error: expected '(' before '{' token
    9 |   } else if {
      |             ^
      |             (
Language: C++

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inculde; did you mean #include?
    1 | #inculde <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | #inculde <bits/stdc++.h>
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:22: 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 | #inculde <bits/stdc++.h>
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:22: error: 'endl' was not declared in this scope
   12 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:12:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:22: error: 'endl' was not declared in this scope
   15 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:15:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << "No" << endl;
      |     ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:21: error: 'endl' was not declared in this scope
   18 |     cout << "No" << endl;
      |                     ^~~~
a.cc:18:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

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


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

using namespace std;

int main(){
  string s;
  int count=0;
  cin >> s;
  for(int i=2;i<4;i++){
    if(s.at(i-1)==s.at(i) && s.at(i-2)==s.at(i-1)){
      count++;
      break;
    }
  }
  if(count>=1){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s;
      |   ^~~~~~
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:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> s;
      |   ^~~
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:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:22: error: 'endl' was not declared in this scope
   14 |     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:16:5: error: 'cout' was not declared in this scope
   16 |     cout << "No" << endl;
      |     ^~~~
a.cc:16:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:21: error: 'endl' was not declared in this scope
   16 |     cout << "No" << endl;
      |                     ^~~~
a.cc:16:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
   int N,N1,N2,N3,N4;
  cin N ;
  N1 = N /1000 ;
  N2 = (N-N1*1000)/1000 ;
  N3 = (N-N1*1000-N2*100)/1000 ;
  N4 =  N-N1*1000-N2*100-N3*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:6:6: error: expected ';' before 'N'
    6 |   cin N ;
      |      ^~
      |      ;
Language: C++

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

int main() {
   cin >> S ;
   string S ;
 
  if (S.at(1)== S.at(2)==S.at(3) || S.at(2)==S.at(3)==S.at(4)){
    cout << "Yes" << endl ;
  }
  else{
    cout << "No" << endl ;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'S' was not declared in this scope
    5 |    cin >> S ;
      |           ^
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 ||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:24: error: lvalue required as left operand of assignment
   11 |   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;
  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 ||b==c==d)
        cout<<"Yes"<<endl;
  else
    	cout<<"No"<<endl;
}


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'b'
    7 |         a=N/1000
      |                 ^
      |                 ;
    8 |     b=(N-a*1000)/100
      |     ~            
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   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-a*1000)/100
    c=(N-a*1000-b*100)/10
    d=(N-a*1000-b*100-C*10)
  if(a=b=c ||b=c=d)
        cout<<"Yes"<<endl;
  else
    	cout<<"No"<<endl;
}

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

#include <iostream>
using namespace std;
int main()
{
  int N,cnt=0,p=-1;
  cin>>N;
  while(N) {
    int x = N % 10;
    if (x == p) ++cnt;
    else {
      p = x;
      cnt = 1;
    }
    if (cnt == 3) {
      cout << "Yes";
      return;
    }
    N /= 10;
  }
  cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |       return;
      |       ^~~~~~
Language: C++

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

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

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

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

int main () {
 int N;
  cin >> N;
  int a, b, c, d;
  N = a b c d ;
  if (a == b == c != d) {
    cout << "Yes" << endl;
    else if (a != b == c == d) {
      cout << "Yes" << endl;
      else if (a == b == c == d) {
        cout << "Yes" << endl;
        else {
          cout << "No" << endl;
          }
        }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected ';' before 'b'
    8 |   N = a b c d ;
      |        ^~
      |        ;
a.cc:11:5: error: expected '}' before 'else'
   11 |     else if (a != b == c == d) {
      |     ^~~~
a.cc:9:25: note: to match this '{'
    9 |   if (a == b == c != d) {
      |                         ^
a.cc:13:7: error: expected '}' before 'else'
   13 |       else if (a == b == c == d) {
      |       ^~~~
a.cc:11:32: note: to match this '{'
   11 |     else if (a != b == c == d) {
      |                                ^
a.cc:15:9: error: expected '}' before 'else'
   15 |         else {
      |         ^~~~
a.cc:13:34: note: to match this '{'
   13 |       else if (a == b == c == d) {
      |                                  ^
a.cc: At global scope:
a.cc:19:5: error: expected declaration before '}' token
   19 |     }
      |     ^
a.cc:20:3: error: expected declaration before '}' token
   20 |   }
      |   ^
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

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

int main () {
 int N;
  cin >> N;
  int a, b, c, d;
  N = abcd;
  if (a == b == c != d) {
    cout << "Yes" << endl;
  }
  if (a != b == c == d) {
    cout << "Yes" << endl;
  }
  if (a == b == c == d) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'abcd' was not declared in this scope
    8 |   N = abcd;
      |       ^~~~
Language: C++

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

int main() {
  int N;
  
  cin >> N;
  
  if ((N / 10) % 111 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 111) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 222) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 333) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 444) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 555) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 666) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 777) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 888) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else if ((N - 999) % 1000 = 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: lvalue required as left operand of assignment
    9 |   if ((N / 10) % 111 = 0) {
      |       ~~~~~~~~~^~~~~
a.cc:12:22: error: lvalue required as left operand of assignment
   12 |   else if ((N - 111) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:15:22: error: lvalue required as left operand of assignment
   15 |   else if ((N - 222) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:18:22: error: lvalue required as left operand of assignment
   18 |   else if ((N - 333) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:21:22: error: lvalue required as left operand of assignment
   21 |   else if ((N - 444) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:24:22: error: lvalue required as left operand of assignment
   24 |   else if ((N - 555) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:27:22: error: lvalue required as left operand of assignment
   27 |   else if ((N - 666) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:30:22: error: lvalue required as left operand of assignment
   30 |   else if ((N - 777) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:33:22: error: lvalue required as left operand of assignment
   33 |   else if ((N - 888) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
a.cc:36:22: error: lvalue required as left operand of assignment
   36 |   else if ((N - 999) % 1000 = 0) {
      |            ~~~~~~~~~~^~~~~~
Language: C++

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:39: error: 'c$$c' was not declared in this scope
   15 |   if ((a==b&&b==c)||(a==b&&b==d)||(a==c$$c==d)||(b==c&&c==d)) {
      |                                       ^~~~
Language: C++

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected unqualified-id before ';' token
    5 |   int a,b,c,d,p,q,;
      |                   ^
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N ;
      |          ^
a.cc:15:13: error: 'C' 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 main() {
  int N;
  cin >> N;
  if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
    cout << "Yes" << endl;
  else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
    cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |        ^~
a.cc:7:19: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |                   ^~
a.cc:7:30: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |                              ^~
a.cc:7:41: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |                                         ^~
a.cc:9:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |              ^~
a.cc:9:25: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |                         ^~
a.cc:9:36: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |                                    ^~
a.cc:9:47: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |                                               ^~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |        ^~
a.cc:7:19: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |                   ^~
a.cc:7:30: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |                              ^~
a.cc:7:41: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if(N.at(0) == N.at(1) && N.at(1) == N.at(2))
      |                                         ^~
a.cc:9:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |              ^~
a.cc:9:25: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |                         ^~
a.cc:9:36: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |                                    ^~
a.cc:9:47: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   else if (N.at(1) == N.at(2) && N.at(2) == N.at(3))
      |                                               ^~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |         ^~
a.cc:7:20: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |                    ^~
a.cc:7:31: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |                               ^~
a.cc:7:42: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |                                          ^~
a.cc:7:55: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |                                                       ^~
a.cc:7:66: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |                                                                  ^~
a.cc:7:77: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |                                                                             ^~
a.cc:7:88: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if((N.at(0) == N.at(1) && N.at(1) == N.at(2)) || (N.at(1) == N.at(2) && N.at(2) == N.at(3)))
      |                                                                                        ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected primary-expression before 'int'
    8 |   for(int i = 0;i < 2;int++){
      |                       ^~~
a.cc:8:23: error: expected ')' before 'int'
    8 |   for(int i = 0;i < 2;int++){
      |      ~                ^~~
      |                       )
a.cc:8:26: error: expected unqualified-id before '++' token
    8 |   for(int i = 0;i < 2;int++){
      |                          ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected '(' before 'else'
    8 |   if else (s[1] == s[2] && s[2] == s[3]) out << "Yes" << endl;
      |      ^~~~
      |      (
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else cout << "No" << endl;
      |   ^~~~
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(a==b&&b==c){
    cout << "Yes" << endl;
  }
  else(b==c&&c==d){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected ';' before '{' token
   16 |   else(b==c&&c==d){
      |                   ^
      |                   ;
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else{
      |   ^~~~
Language: C++

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

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

  return 0;
}



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

}#include <iostream>
using namespace std;
 
int main() {
	int  A;
	cin >> A;
	if((A-A/1000*1000)%111==0||
       (A-A/100*100+A/1000*1000)%1011==0||
       (A-A/10*10+A/100*100)%1101==0||
       (A/10)%111==0
      ){cout <<"Yes"<<endl;
}
 else{cout <<"No"<<endl;
     }

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | }#include <iostream>
      |  ^
a.cc:1:1: error: expected declaration before '}' token
    1 | }#include <iostream>
      | ^
a.cc:1:3: error: 'include' does not name a type
    1 | }#include <iostream>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> A;
      |         ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |       ){cout <<"Yes"<<endl;
      |         ^~~~
a.cc:11:23: error: 'endl' was not declared in this scope
   11 |       ){cout <<"Yes"<<endl;
      |                       ^~~~
a.cc:13:7: error: 'cout' was not declared in this scope
   13 |  else{cout <<"No"<<endl;
      |       ^~~~
a.cc:13:20: error: 'endl' was not declared in this scope
   13 |  else{cout <<"No"<<endl;
      |                    ^~~~
a.cc:14:7: error: expected '}' at end of input
   14 |      }
      |       ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
	int  A;
	cin >> A;
	if((A-A/1000*1000)%111==0||
       (A-A/100*100+A/1000*1000)%1011=0||
       (A-A/10*10+A/1000*1000+A/100*100)%1101==0||
       A/10%111=0
      ){cout <<"Yes"<<endl;
}
 else{cout <<"No"<<endl;
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:49: error: lvalue required as left operand of assignment
    8 |        (A-A/100*100+A/1000*1000)%1011=0||
      |                                       ~~~        
    9 |        (A-A/10*10+A/1000*1000+A/100*100)%1101==0||
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
   10 |        A/10%111=0
      |        ~~~~~~~~
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[1] == N[2] && N[2] == N[3]) {
    cout << "Yes" << endl;
  }
  
  else {
    cout << "No" << endl;
  }
}  


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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: 'res' was not declared in this scope
    7 |   if(s[0] == s[1] && s[1] == s[2]) res = "Yes";
      |                                    ^~~
a.cc:8:41: error: 'res' was not declared in this scope
    8 |   else if(s[1] == s[2] && s[2] == s[3]) res = "Yes";
      |                                         ^~~
a.cc:9:8: error: 'res' was not declared in this scope
    9 |   else res = "No";
      |        ^~~
a.cc:10:11: error: 'res' was not declared in this scope
   10 |   cout << res;
      |           ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: invalid types 'int[int]' for array subscript
    8 |   p = N[0];
      |        ^
a.cc:9:7: error: invalid types 'int[int]' for array subscript
    9 |   if(N[1] == p){
      |       ^
a.cc:10:9: error: invalid types 'int[int]' for array subscript
   10 |     if(N[2] == p){
      |         ^
a.cc:14:13: error: invalid types 'int[int]' for array subscript
   14 |   else if (N[1] == N[2]){
      |             ^
a.cc:14:21: error: invalid types 'int[int]' for array subscript
   14 |   else if (N[1] == N[2]){
      |                     ^
a.cc:15:9: error: invalid types 'int[int]' for array subscript
   15 |     if(N[2] == N[3]){
      |         ^
a.cc:15:17: error: invalid types 'int[int]' for array subscript
   15 |     if(N[2] == N[3]){
      |                 ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected primary-expression before 'else'
    8 |   else cout<<"No"<<else;
      |                    ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:31: error: expected ')' before 'N'
    6 |   if(N.at(0)==N.at(1)&&N.at(1)N.at(2)||N.at(1)==N.at(2)&&N.at(2)==N.at(3)) {
      |     ~                         ^
      |                               )
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected primary-expression before '%' token
    7 |   if(N>1000 %%(N[0]==N[1]==N[2]  ||N[1]==N[2]==N[3] ||N[0]==N[1]==N[2]==N[3])){
      |              ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid types 'int[int]' for array subscript
    7 |   if(N[0]==N[1]==N[2]  ||N[1]==N[2]==N[3]){
      |       ^
a.cc:7:13: error: invalid types 'int[int]' for array subscript
    7 |   if(N[0]==N[1]==N[2]  ||N[1]==N[2]==N[3]){
      |             ^
a.cc:7:19: error: invalid types 'int[int]' for array subscript
    7 |   if(N[0]==N[1]==N[2]  ||N[1]==N[2]==N[3]){
      |                   ^
a.cc:7:27: error: invalid types 'int[int]' for array subscript
    7 |   if(N[0]==N[1]==N[2]  ||N[1]==N[2]==N[3]){
      |                           ^
a.cc:7:33: error: invalid types 'int[int]' for array subscript
    7 |   if(N[0]==N[1]==N[2]  ||N[1]==N[2]==N[3]){
      |                                 ^
a.cc:7:39: error: invalid types 'int[int]' for array subscript
    7 |   if(N[0]==N[1]==N[2]  ||N[1]==N[2]==N[3]){
      |                                       ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'B'
    7 |   A == N / 1000
      |                ^
      |                ;
    8 |   B == (N % 1000) /100
      |   ~             
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else if (A == B && B == D) {
      |   ^~~~