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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>N;
      |   ^~~
a.cc:9:11: error: 'cout' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cou<<"Yes"<<endl;else cout<<"No"<<endl;}
      |           ^~~~
a.cc:9:24: error: 'endl' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cou<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                        ^~~~
a.cc:9:42: error: 'cou' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cou<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                                          ^~~
a.cc:9:54: error: 'endl' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cou<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                                                      ^~~~
a.cc:9:64: error: 'cout' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cou<<"Yes"<<endl;else cout<<"No"<<endl;}
      |                                                                ^~~~
a.cc:9:76: error: 'endl' was not declared in this scope
    9 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cou<<"Yes"<<endl;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=a%111;
  int c=N/10;
  int d=c%111;
  if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout"Yes"<<endl;else cout<<"No"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:46: error: expected ';' before string constant
   11 |   if(b==0)cout<<"Yes"<<endl;else{if(d==0)cout"Yes"<<endl;else cout<<"No"<<endl;}
      |                                              ^~~~~
      |                                              ;
Language: C++

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

int main() {
  int N, a, b, c, d;
  cin >> N;
  
  a = N / 1000;
  b = (N % 1000) / 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:14:13: warning: missing terminating " character
   14 |     cout << "Yes << endl;
      |             ^
a.cc:14:13: error: missing terminating " character
   14 |     cout << "Yes << endl;
      |             ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:3: error: expected primary-expression before '}' token
   15 |   } else {
      |   ^
Language: C++

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

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

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

Compiler output:
a.cc:14:13: warning: missing terminating " character
   14 |     cout << "Yes << endl;
      |             ^
a.cc:14:13: error: missing terminating " character
   14 |     cout << "Yes << endl;
      |             ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:13:47: error: expected ')' before '{' token
   13 |   if ((a == b && b == c) || (b == c && c == d) {
      |      ~                                        ^~
      |                                               )
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
Language: C++

/*
 * cpp_filepath
 */

// C++ 14
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring> // memset
#include <cassert>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++)
template <class T> ostream & operator << (ostream & out, vector<T> const & v) {
  for (auto &&a: v) out << a << " "; out << endl; return out;
}
template <class T> void dump(T &a) { cout << a << endl; }
void solve();
int main() { solve(); return 0; }

template <class T, class T2>
void group(T &xs, vector<pair<T2, int> > &result) {
  int i=0, j;
  while (i<xs.size()) {
    j=i;
    while (j < xs.size() and xs[j] == xs[i]) j++;
    result.push_back({ xs[i], j-i });
    if (j==i) i++;
    i=j;
  }
}

void solve() {
  string s;
  cin >> s;
  vector<pair<char, int> > G;
  group(s, G);
  int n = 0;
  for (auto &&g: G) if (n < g.second) n = g.second;
  if (n >= 3) cout << "Yes" << endl;
  else "No" << endl;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:42:13: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   42 |   else "No" << endl;
      |        ~~~~~^~~~~~~
Language: C++

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

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

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

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

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

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

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

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

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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: lvalue required as left operand of assignment
   11 |   if (N / 10 % 111 = 0) {
      |       ~~~~~~~^~~~~
a.cc:14:16: error: lvalue required as left operand of assignment
   14 |   if (N % 1000 % 111 = 0) {
      |       ~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int) (n); i++)
#define ll long long
#define scout cout << fixed << setprecision(20)
ll INF = 9e17;
ll mod = 1e9 + 7;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:37: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
    4 | #define rep(i,n) for(int i = 0; i < (int) (n); i++)
      |                                     ^~~~~~~~~
a.cc:13:9: note: in expansion of macro 'rep'
   13 |         rep(i,n) {
      |         ^~~
a.cc:15:20: error: 'a' was not declared in this scope
   15 |                 if(a[i]==a[i+1]) co ++;
      |                    ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: lvalue required as left operand of assignment
    8 |   if (N[0] == N[1] && N[1] = N[2])
a.cc:12:25: error: lvalue required as left operand of assignment
   12 |   else if (N[2] == N[1] && N[2] = N[3])
Language: C++

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

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

#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:22:10: fatal error: cstdio : No such file or directory
   22 | #include <cstdio >
      |          ^~~~~~~~~
compilation terminated.
Language: C++

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

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

#include<iostream>
using namespace std;
int main(){
  int a,b,c,d,x;
  cin>>x;
  a=x%1000;
  b=x%100/10;
  c=x%10/100;
  d=x/1000;
  if(a==b&&a==c)
    cout<<"Yes"<<endl;
  else if(a==c&&a==d)
    cout<<"Yes"<<endl;
  else if(a==b&&a==d)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected '}' at end of input
   17 |     cout<<"No"<<endl;
      |                      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

#include<iostream>
using namespace std;
int main(){
  int a,b,c,d,x;
  cin>>x;
  a=x%1000;
  b=x%100/10;
  c=x%10/100;
  d=x/1000;
  if(a==b&&a==c)
    cout<<"Yes"<<endl;
  else if(a==c&&a==d)
    cout<<"Yes"<<endl;
  else if(a==b&&a==d)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;

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

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

int main() {
  int N;
  cin >> N ;
  int a, b, c, d;
  a == N.at(0);
  b == N.at(1);
  c == N.at(2);
  d == N.at(3);
    
  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:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |   a == N.at(0);
      |          ^~
a.cc:9:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   b == N.at(1);
      |          ^~
a.cc:10:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   10 |   c == N.at(2);
      |          ^~
a.cc:11:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   11 |   d == N.at(3);
      |          ^~
a.cc:13:18: error: lvalue required as left operand of assignment
   13 |   if ( a = b = c || b = c = d){
      |                ~~^~~~
Language: C++

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

int main() {
  int N;
  cin >> N ;
  int a, b, c, d;
  char a = N.at(0);
  char b = N.at(1);
  char c = N.at(2);
  char d = N.at(3);
    
  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:8: error: conflicting declaration 'char a'
    8 |   char a = N.at(0);
      |        ^
a.cc:7:7: note: previous declaration as 'int a'
    7 |   int a, b, c, d;
      |       ^
a.cc:8:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |   char a = N.at(0);
      |              ^~
a.cc:9:8: error: conflicting declaration 'char b'
    9 |   char b = N.at(1);
      |        ^
a.cc:7:10: note: previous declaration as 'int b'
    7 |   int a, b, c, d;
      |          ^
a.cc:9:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   char b = N.at(1);
      |              ^~
a.cc:10:8: error: conflicting declaration 'char c'
   10 |   char c = N.at(2);
      |        ^
a.cc:7:13: note: previous declaration as 'int c'
    7 |   int a, b, c, d;
      |             ^
a.cc:10:14: error: request for member 'at' in 'N', which is of non-class type 'int'
   10 |   char c = N.at(2);
      |              ^~
a.cc:11:8: error: conflicting declaration 'char d'
   11 |   char d = N.at(3);
      |        ^
a.cc:7:16: note: previous declaration as 'int d'
    7 |   int a, b, c, d;
      |                ^
a.cc:11:14: error: request for member 'at' in 'N', which is of non-class type 'int'
   11 |   char d = N.at(3);
      |              ^~
a.cc:13:18: error: lvalue required as left operand of assignment
   13 |   if ( a = b = c || b = c = d){
      |                ~~^~~~
Language: C++

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

int main() {
  int N;
  cin >> N ;
  char a = N.at(0);
  char b = N.at(1);
  char c = N.at(2);
  char d = N.at(3);
    
  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:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   char a = N.at(0);
      |              ^~
a.cc:8:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |   char b = N.at(1);
      |              ^~
a.cc:9:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   char c = N.at(2);
      |              ^~
a.cc:10:14: error: request for member 'at' in 'N', which is of non-class type 'int'
   10 |   char d = N.at(3);
      |              ^~
a.cc:12:18: error: lvalue required as left operand of assignment
   12 |   if ( a = b = c || b = c = d){
      |                ~~^~~~
Language: C++

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

int main() {
  int N;
  cin >> N ;
  char a = N.at(0)
  char b = N.at(1)
  char c = N.at(2)
  char d = N.at(3)
    
  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:14: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   char a = N.at(0)
      |              ^~
Language: C++

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

int main() {
  string s;
  cin >> s;
  
  int c = 0;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: expected ')' before '{' token
   11 |       || (s[1] == s[2] && s[2] == s[3]) {
      |                                        ^~
      |                                        )
a.cc:10:6: note: to match this '('
   10 |   if ((s[0] == s[1] && s[1] == s[2])
      |      ^
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
Language: C++

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

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

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

Compiler output:
a.cc:7:45: error: extended character 　 is not valid in an identifier
    7 |   if((s.at(0)==s.at(1) && s.at(1)==s.at(2) )　|| (s.at(1)==s.at(2)&&s.at(2)==s.at(3) )){
      |                                             ^
a.cc: In function 'int main()':
a.cc:7:45: error: expected ')' before '\U00003000'
    7 |   if((s.at(0)==s.at(1) && s.at(1)==s.at(2) )　|| (s.at(1)==s.at(2)&&s.at(2)==s.at(3) )){
      |     ~                                       ^~
      |                                             )
Language: C++

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

Compiler output:
a.cc:7:68: error: extended character 　 is not valid in an identifier
    7 |   if((s.at(0)==s.at(1) && s.at(1)==s.at(2) )|| (s.at(1)==s.at(2) &&　s.at(2)==s.at(3))){
      |                                                                    ^
a.cc: In function 'int main()':
a.cc:7:68: error: '\U00003000s' was not declared in this scope
    7 |   if((s.at(0)==s.at(1) && s.at(1)==s.at(2) )|| (s.at(1)==s.at(2) &&　s.at(2)==s.at(3))){
      |                                                                    ^~~
Language: C++

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

int main() {
  int N,X1,X2,X3,X4;
  cin>>N;
  X1=N/1000;
  X2=(N-X1*1000)/100
  X3=(N-X1*1000-X2*100)/10
  X4=(N-X1*1000-X2*100-X3*10)/1
  if(X2==X3){if(X2==X1||X2==X4){cout<<"Yes"<<endl;} else{cout<<"No"<<endl;}}
  else{cout<<"No"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before 'X3'
    8 |   X2=(N-X1*1000)/100
      |                     ^
      |                     ;
    9 |   X3=(N-X1*1000-X2*100)/10
      |   ~~                 
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else{cout<<"No"<<endl;}
      |   ^~~~
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'strings' was not declared in this scope; did you mean 'stdin'?
    5 |   strings N;
      |   ^~~~~~~
      |   stdin
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N;
      |          ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main() {
    string N;
    cin >> N;
    bool flag=false;
    if(N.at(0)==N.at(1)&&N.at(1)==N.at(2))flag=true;
    else (N.at(1)==N.at(2)&&N.at(2)==N.at(3))flag=true;
    if(flag) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:46: error: expected ';' before 'flag'
   13 |     else (N.at(1)==N.at(2)&&N.at(2)==N.at(3))flag=true;
      |                                              ^~~~
      |                                              ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,x1,x2,x3,x4;
 

  cin >> N;
 
  x1 = N - N / 10 * 10;
  x2 = N / 10 - N / 100 * 10;
  x3 = N / 100 - N / 1000 * 10;
  x4 = N / 1000
    
    if(x1 == x2 && x2 == x3){
      cout << "Yes";
    }
  else if(x1 == x2 && x2 == x4){
    cout << "Yes";
  }
  else if(x1 == x3 && x3 == x4){
    cout << "Yes";
  }
  else if(x2 == x3 && x3 == x4){
    cout << "Yes";
  }
  else{
    cout << "No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before 'if'
   13 |   x4 = N / 1000
      |                ^
      |                ;
   14 | 
   15 |     if(x1 == x2 && x2 == x3){
      |     ~~          
a.cc:18:3: error: 'else' without a previous 'if'
   18 |   else if(x1 == x2 && x2 == x4){
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:51: error: expected ')' before '{' token
   12 |   else if(S.at(3) == S.at(1) && S.at(1) == S.at(2){
      |          ~                                        ^
      |                                                   )
a.cc:18:1: error: expected primary-expression before '}' token
   18 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:51: error: expected ')' before '{' token
   12 |   else if(S.at(3) == S.at(1) && S.at(1) == S.at(2){
      |          ~                                        ^
      |                                                   )
a.cc:18:11: error: expected primary-expression before '}' token
   18 |           }
      |           ^
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      int n, i = 0,cnt = 0;
      int sum[4];
      cin >> n;
      while(n > 0){
        sum[i] = n % 10;
        n = n / 10;
        i++;
      }1122
      for (i = 0; i<=2; i++){
        if(sum[1] != sum[2]){
          cout << "No" << endl;
        }
        else if (sum[i] == sum[i+1]){
          cnt++;
        }
      }
      if (cnt >= 2){
        cout << "Yes" << endl;
      } 
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before 'for'
   12 |       }1122
      |            ^
      |            ;
   13 |       for (i = 0; i<=2; i++){
      |       ~~~   
a.cc:13:28: error: expected ';' before ')' token
   13 |       for (i = 0; i<=2; i++){
      |                            ^
      |                            ;
Language: C++

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

Compiler output:
a.cc:23:6: error: expected unqualified-id before numeric constant
   23 |     }0111
      |      ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ';' before 'n'
    9 |         sum[i] = n % 10
      |                        ^
      |                        ;
   10 |         n = n / 10
      |         ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: incompatible types in assignment of 'int' to 'int [4]'
    9 |         sum = n % 10
      |         ~~~~^~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: incompatible types in assignment of 'int' to 'int [3]'
    9 |         sum = n % 10
      |         ~~~~^~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: storage size of 'sum' isn't known
    6 |       int sum[];
      |           ^~~
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ']' before ')' token
    9 |     if (num[1] == num[2) {
      |                        ^
      |                        ]
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ']' before ')' token
    9 |     if (num[1] == num[2) { cout << "Yes" << endl; }
      |                        ^
      |                        ]
a.cc:14:33: error: expected '}' at end of input
   14 | } else { cout << "Np" << endl; }
      |                                 ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int N
    cin >> N;
  
  if(N%1111){
    cout<< "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> N;
      |   ^~~
a.cc:8:6: error: 'N' was not declared in this scope
    8 |   if(N == 1111%){
      |      ^
a.cc:8:16: error: expected primary-expression before ')' token
    8 |   if(N == 1111%){
      |                ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstdio>

using namespace std;

int main(){

    string s;
    cin>>s;

    char temp=s[0];
    int ans=1;

    for (int i=1; i<=s.size();i++){
        if(s[i]==temp)
            ans++;
        else{
            temp=s[i];
            ans=1;
        }
    }

    if ans>=3
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:8: error: expected '(' before 'ans'
   25 |     if ans>=3
      |        ^~~
      |        (
a.cc:27:5: error: 'else' without a previous 'if'
   27 |     else
      |     ^~~~
Language: C++

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

  cin >> N;

  th = N/1000; // 1000の位
  hn = (N - th * 1000) / 100; // 100の位
  tn = (N - (th * 1000 + hn * 100)) / 10;　//10の位
  one = N - (th * 1000 + hn * 100 + tn * 10); //1の位
    
  if (th == hn) {
    if (hn == tn) {
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
  }
  else if (hn == tn){
  	if(tn == one){
    cout << "Yes" << endl;
    }
    else{
    cout << "No" << endl;
    }
  }
  else{
  cout << "No" << endl;
  }

}


Compiler output:
a.cc:16:42: error: extended character 　 is not valid in an identifier
   16 |   tn = (N - (th * 1000 + hn * 100)) / 10;　//10の位
      |                                          ^
a.cc: In function 'int main()':
a.cc:16:42: error: '\U00003000' was not declared in this scope
   16 |   tn = (N - (th * 1000 + hn * 100)) / 10;　//10の位
      |                                          ^~
Language: C++

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

  cin >> N;

  th = N/1000; // 1000の位
  hn = (N - th * 1000) / 100; // 100の位
  tn = (N - (th * 1000 + hn * 100)) / 10;　//10の位
  one = N - (th * 1000 + hn * 100 + tn * 10); //1の位
    
  if (th == hn) {
    if (hn == tn) {
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
  }
  else if (hn == tn){
  	if(tn == one){
    cout << "Yes" << endl;
    }
    else{
    cout << "No" << endl;
    }
  }
  else{
  cout << "No" << endl;
  }

}

Compiler output:
a.cc:16:42: error: extended character 　 is not valid in an identifier
   16 |   tn = (N - (th * 1000 + hn * 100)) / 10;　//10の位
      |                                          ^
a.cc: In function 'int main()':
a.cc:16:42: error: '\U00003000' was not declared in this scope
   16 |   tn = (N - (th * 1000 + hn * 100)) / 10;　//10の位
      |                                          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N(0);
  cin >> N;
 
  const int n1 = static_cast<int>(N / 1000.0);
  const int n2 = static_cast<int>( (N % 1000) / 100.0 );
  const int n3 = static_cast<int>( (N % 100) / 10.0 );
  const int n4 = N % 10;
  
  bool isGood(false);
  if( n1 == n2)
  {
    isGood = (n1 == n3) || (n1 == n4);
  }
  else
  {
   	isGood = (n3 == n4) && (n1 == n3 || n2 == n3);
  }
 
  cout << isGood ? "Yes" : "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:33: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   23 |   cout << isGood ? "Yes" : "No" << endl;
      |                            ~~~~~^~~~~~~
Language: C++

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

  const int n1 = static_cast<int>(N / 1000.0);
  const int n2 = static_cast<int>( (N % 1000) / 100.0 );
  const int n3 = static_cast<int>( (N % 100) / 10.0 );
  const int n4 = N % 10;
  
  bool isGood(false);
  if( n1 == n2)
  {
    isGood = (n1 == n3) || (n1 = n4);
  }
  else
  {
   	isGood = (n3 == n4) && (n1 == n3 || n2 = n3);
  }

  cout << isGood ? "Yes" : "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:32: error: assignment of read-only variable 'n1'
   16 |     isGood = (n1 == n3) || (n1 = n4);
      |                             ~~~^~~~
a.cc:20:42: error: lvalue required as left operand of assignment
   20 |         isGood = (n3 == n4) && (n1 == n3 || n2 = n3);
      |                                 ~~~~~~~~~^~~~~
a.cc:23:33: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   23 |   cout << isGood ? "Yes" : "No" << endl;
      |                            ~~~~~^~~~~~~
Language: C++

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

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


Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include bits/stdc++.h
      |          ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string N;
      |         ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #include bits/stdc++.h
a.cc:7:14: error: invalid types 'int[int]' for array subscript
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])cout << "Yes" << endl;
      |              ^
a.cc:7:22: error: invalid types 'int[int]' for array subscript
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])cout << "Yes" << endl;
      |                      ^
a.cc:7:30: error: invalid types 'int[int]' for array subscript
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])cout << "Yes" << endl;
      |                              ^
a.cc:7:38: error: invalid types 'int[int]' for array subscript
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])cout << "Yes" << endl;
      |                                      ^
a.cc:7:46: error: invalid types 'int[int]' for array subscript
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])cout << "Yes" << endl;
      |                                              ^
a.cc:7:54: error: invalid types 'int[int]' for array subscript
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])cout << "Yes" << endl;
      |                                                      ^
a.cc:7:58: error: 'cout' was not declared in this scope
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])cout << "Yes" << endl;
      |                                                          ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include bits/stdc++.h
a.cc:7:75: error: 'endl' was not declared in this scope
    7 |         if (N[1] == N[2] == N[3] || N[2] == N[3] == N[4])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 | #include bits/stdc++.h
a.cc:8:14: error: 'cout' was not declared in this scope
    8 |         else cout << "No" << endl;
      |              ^~~~
a.cc:8:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:30: error: 'endl' was not declared in this scope
    8 |         else cout << "No" << endl;
      |                              ^~~~
a.cc:8:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C

#include<stdio.h>
int main(){
  int N;
scanf("%d",N);
  int a,b,c,d;
  int count = 0;
  d = N % 10;
  c = N % 100 - d;
  b = N % 1000 - (10 * c + d);
  a = N % 10000 - (100 * b + 10 * c + d);
  if(a == b && b == c)
    count = 1;
  if(b == c && c == d)
    count = 1;
  if(count == 1){
    printf("Yes");
  }
  else{
    printf("No");
}

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2])
      |        ^
a.cc:8:16: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2])
      |                ^
a.cc:8:24: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2])
      |                        ^
a.cc:8:32: error: invalid types 'int[int]' for array subscript
    8 |   if (N[0] == N[1] && N[1] == N[2])
      |                                ^
a.cc:12:12: error: invalid types 'int[int]' for array subscript
   12 |   else if(N[0] == N[1] && N[1] == N[2] && N[2] == N[3])
      |            ^
a.cc:12:20: error: invalid types 'int[int]' for array subscript
   12 |   else if(N[0] == N[1] && N[1] == N[2] && N[2] == N[3])
      |                    ^
a.cc:12:28: error: invalid types 'int[int]' for array subscript
   12 |   else if(N[0] == N[1] && N[1] == N[2] && N[2] == N[3])
      |                            ^
a.cc:12:36: error: invalid types 'int[int]' for array subscript
   12 |   else if(N[0] == N[1] && N[1] == N[2] && N[2] == N[3])
      |                                    ^
a.cc:12:44: error: invalid types 'int[int]' for array subscript
   12 |   else if(N[0] == N[1] && N[1] == N[2] && N[2] == N[3])
      |                                            ^
a.cc:12:52: error: invalid types 'int[int]' for array subscript
   12 |   else if(N[0] == N[1] && N[1] == N[2] && N[2] == N[3])
      |                                                    ^
Language: C++

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

int main() {
  int N,a,b,c,d;
  cin >> N;
  a = N/1000;
  b = N % 1000;
  c = N % 100;
  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:11:10: error: 'B' was not declared in this scope
   11 |   if((a==B && b==c)|| (b==c && c==d)) cout << "Yes" << endl;
      |          ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: declaration does not declare anything [-fpermissive]
    4 |   string ;
      |   ^~~~~~
a.cc:5:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin>>n;
      |        ^
      |        yn
Language: C++

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

int main() {
  string A;
  cin >> A;
  char B = A[2]
  if (count(A.begin(),A.end(),A[2]) == 3  && A[1] == A[2]) {
   	 cout << "yes" << endl;
  } else {
   	cout << "no" << endl; 
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if (count(A.begin(),A.end(),A[2]) == 3  && A[1] == A[2]) {
      |   ^~
a.cc:10:5: error: 'else' without a previous 'if'
   10 |   } else {
      |     ^~~~
Language: C++

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

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


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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: expected ';' before 'if'
    6 |   int (0 <= a <= 9)
      |                    ^
      |                    ;
    7 |   if(N * a % 1111 == 0)
      |   ~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before numeric constant
    6 |   int 1 <= a <= 9
      |       ^
a.cc:9:12: error: lvalue required as left operand of assignment
    9 |   if(N * a % 1111 = 0)
      |      ~~~~~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before numeric constant
    6 |   int 0 <= a <= 9
      |       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before numeric constant
    6 |   int 0 <= a <= 9
      |       ^
a.cc:9:19: error: lvalue required as left operand of assignment
    9 |   if(N * (10 * a) % 1111 = 0)
      |      ~~~~~~~~~~~~~^~~~~~
a.cc:11:20: error: lvalue required as left operand of assignment
   11 |   if(N * (100 * a) % 1111 = 0)
      |      ~~~~~~~~~~~~~~^~~~~~
a.cc:13:23: error: lvalue required as left operand of assignment
   13 |     if(N * (1000 * a) % 1111 = 0)
      |        ~~~~~~~~~~~~~~~^~~~~~
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:
main.c: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() {
  string a;
  int n = 0;
  
  cin >> a;
  
  for (i = 0; i+1 < a.length(); i++){
    if (a[i] = a[i+1]){
      n++;
    }else n = 1;
    
    if (n >=2){
      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+1 < a.length(); i++){
      |        ^
Language: C++

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

int main() {
  string a;
  int n;
  
  cin >> a;
  
  for (i = 0; i < a.length(); i++){
    n = 0;
    
    for ( j = i; j < a.length(); 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.length(); i++){
      |        ^
a.cc:13:11: error: 'j' was not declared in this scope
   13 |     for ( j = i; j < a.length(); j++) {
      |           ^