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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
  string n;
  cin >> n;
  string ans = "No";
  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)) ans = "Yes";
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:49: error: expected primary-expression before '||' token
   11 |   if (n.at(0) == n.at(1) && n.at(1) == n.at(2)) ||
      |                                                 ^~
Language: C++

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

int main(){
  int N;
  int a[4];
  cin >> N;
  
  for(int = 0; i < 4; i++){
    a[0] = N % 10;
    N = N / 10;
  }
  
  cout << (a[1] != a[2] ? "No" : a[0] == a[1] || a[2] == a[3] ? "Yes" : "No");
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected unqualified-id before '=' token
    9 |   for(int = 0; i < 4; i++){
      |           ^
a.cc:9:10: error: expected ';' before '=' token
    9 |   for(int = 0; i < 4; i++){
      |          ^~
      |          ;
a.cc:9:11: error: expected primary-expression before '=' token
    9 |   for(int = 0; i < 4; i++){
      |           ^
a.cc:9:16: error: 'i' was not declared in this scope
    9 |   for(int = 0; i < 4; i++){
      |                ^
a.cc:9:21: error: expected ')' before ';' token
    9 |   for(int = 0; i < 4; i++){
      |      ~              ^
      |                     )
a.cc:9:23: error: 'i' was not declared in this scope
    9 |   for(int = 0; i < 4; i++){
      |                       ^
Language: C++

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

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

int main(){
  int N;
  int a[4];
  cin >> N;
  for(int i = 0; i < 4; i++){
    a[i] = N % 10;
    N = N / 10;
  }
  cout << (a[0] == a[1] || a[2] == a[3] ? "Yes" : "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:3: error: 'cout' was not declared in this scope
    9 |   cout << (a[0] == a[1] || a[2] == a[3] ? "Yes" : "No") << endl;
      |   ^~~~
a.cc:9:60: error: 'endl' was not declared in this scope
    9 |   cout << (a[0] == a[1] || a[2] == a[3] ? "Yes" : "No") << endl;
      |                                                            ^~~~
Language: C++

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

int main(){
  int N;
  int a[4]
  cin >> N;
  for(int i = 0; i < 4; i++){
    a[i] = N % 10;
    N = N / 10;
  }
  cout << (a[0] == a[1] || a[2] == a[3] ? "Yes" : "No") << endl;
}
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> N;
      |   ^~~
a.cc:9:5: error: 'a' was not declared in this scope
    9 |     a[i] = N % 10;
      |     ^
a.cc:12:12: error: 'a' was not declared in this scope
   12 |   cout << (a[0] == a[1] || a[2] == a[3] ? "Yes" : "No") << endl;
      |            ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int a=N%10;
  N=N/10;
  int b=N%10;
  N=N/10;
  int c=N%10;
  N=N/10;
  ind 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:14:3: error: 'ind' was not declared in this scope; did you mean 'int'?
   14 |   ind d=N%10;
      |   ^~~
      |   int
a.cc:18:35: error: 'd' was not declared in this scope
   18 |   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 a=N%10;
  N=N/10;
  int b=N%10;
  N=N/10;
  int c=N%10;
  N=N/10;
  ind d=N%10;
  
  

  if ((a==b && b==c)||(b==c && c==d )) {
    cout << "良い整数" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'ind' was not declared in this scope; did you mean 'int'?
   14 |   ind d=N%10;
      |   ^~~
      |   int
a.cc:18:35: error: 'd' was not declared in this scope
   18 |   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 a=N%10;
  N=N/10;
  int b=N%10;
  N=N/10;
  int c=N%10;
  N=N/10;
  ind d=N%10;
  
  

  if ((a==b && b==c)||(b==c && c==d ) {
    cout << "良い整数" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'ind' was not declared in this scope; did you mean 'int'?
   14 |   ind d=N%10;
      |   ^~~
      |   int
a.cc:18:35: error: 'd' was not declared in this scope
   18 |   if ((a==b && b==c)||(b==c && c==d ) {
      |                                   ^
a.cc:18:38: error: expected ')' before '{' token
   18 |   if ((a==b && b==c)||(b==c && c==d ) {
      |      ~                               ^~
      |                                      )
a.cc:21:1: error: expected primary-expression before '}' token
   21 | }
      | ^
Language: C++

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

int main() {
  
  string N;
  cin>>N;
  if((N[0]==N[1]&&N[1]==N[2]）||(N[1]==N[2]&&N[3]==N[2])){
    printf("Yes");
  }else if{printf("No");}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected ')' before '\U0000ff09'
    8 |   if((N[0]==N[1]&&N[1]==N[2]）||(N[1]==N[2]&&N[3]==N[2])){
      |      ~                      ^~
      |                             )
a.cc:10:4: error: expected ';' before 'else'
   10 |   }else if{printf("No");}
      |    ^~~~
      |    ;
a.cc:11:3: error: expected primary-expression before 'return'
   11 |   return 0;
      |   ^~~~~~
a.cc:10:26: error: expected ')' before 'return'
   10 |   }else if{printf("No");}
      |                          ^
      |                          )
   11 |   return 0;
      |   ~~~~~~                  
a.cc:8:5: note: to match this '('
    8 |   if((N[0]==N[1]&&N[1]==N[2]）||(N[1]==N[2]&&N[3]==N[2])){
      |     ^
Language: C++

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

int main() {
  
  string N;
  cin>>N;
  if((N[0]==N[1]==N[2])||(N[3]==N[1]==N[2]){
    printf("Yes");
  }else{printf("No");}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: expected ';' before '{' token
    8 |   if((N[0]==N[1]==N[2])||(N[3]==N[1]==N[2]){
      |                                            ^
      |                                            ;
a.cc:10:4: error: expected primary-expression before 'else'
   10 |   }else{printf("No");}
      |    ^~~~
a.cc:10:4: error: expected ')' before 'else'
   10 |   }else{printf("No");}
      |    ^~~~
      |    )
a.cc:8:5: note: to match this '('
    8 |   if((N[0]==N[1]==N[2])||(N[3]==N[1]==N[2]){
      |     ^
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+2)) {
      cout << "Yes" << endl;
    }
    break;
    else {
      cout << "No" << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'else' without a previous 'if'
   10 |     else {
      |     ^~~~
Language: C++

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

int main()
{
    char s;
    cin >> 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: In function 'int main()':
a.cc:9:12: error: invalid types 'char[int]' for array subscript
    9 |     if ( s [0]== s [1]&& s [1]== s [2]) puts (" Yes ");
      |            ^
a.cc:9:20: error: invalid types 'char[int]' for array subscript
    9 |     if ( s [0]== s [1]&& s [1]== s [2]) puts (" Yes ");
      |                    ^
a.cc:9:28: error: invalid types 'char[int]' for array subscript
    9 |     if ( s [0]== s [1]&& s [1]== s [2]) puts (" Yes ");
      |                            ^
a.cc:9:36: error: invalid types 'char[int]' for array subscript
    9 |     if ( s [0]== s [1]&& s [1]== s [2]) puts (" Yes ");
      |                                    ^
a.cc:10:17: error: invalid types 'char[int]' for array subscript
   10 |     else if ( s [1]== s [2]&& s [2]== s [3]) puts (" Yes ");
      |                 ^
a.cc:10:25: error: invalid types 'char[int]' for array subscript
   10 |     else if ( s [1]== s [2]&& s [2]== s [3]) puts (" Yes ");
      |                         ^
a.cc:10:33: error: invalid types 'char[int]' for array subscript
   10 |     else if ( s [1]== s [2]&& s [2]== s [3]) puts (" Yes ");
      |                                 ^
a.cc:10:41: error: invalid types 'char[int]' for array subscript
   10 |     else if ( s [1]== s [2]&& s [2]== s [3]) puts (" Yes ");
      |                                         ^
Language: C++

#include <string>
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:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:26: error: 'endl' was not declared in this scope
    9 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:26: error: 'endl' was not declared in this scope
   13 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:13:26: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << "No" << endl;
      |         ^~~~
a.cc:17:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:25: error: 'endl' was not declared in this scope
   17 |         cout << "No" << endl;
      |                         ^~~~
a.cc:17:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before 'if'
   10 |   d = N%10
      |           ^
      |           ;
   11 |   if((a == b && b ==c) || (b = c && c ==d))
      |   ~~       
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 && b ==c && c ==d) ||(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:31: error: expected primary-expression before '||' token
   11 |   if (a==b && b ==c && c ==d) ||(a == b && b ==c) || (b = c && c ==d)
      |                               ^~
Language: C++

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

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

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

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

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

int main () {
  int N;
  cin >> N:
  
  if ( N / 1000 == (N % 1000)/100 == ((N % 1000) % 100)/10 ||  (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:6:11: error: expected ';' before ':' token
    6 |   cin >> N:
      |           ^
      |           ;
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else {
      |   ^~~~
Language: C++

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

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

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

#include<stdio.h>
int main(){
  char s[4];
  scanf("%s",&s)
    if(s[0]==s[1]==s[2]){
      printf("Yes");
    }else if(s[1]==s[2]==s[3]){
      printf("Yes");
    }else printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:17: error: expected ';' before 'if'
    4 |   scanf("%s",&s)
      |                 ^
      |                 ;
    5 |     if(s[0]==s[1]==s[2]){
      |     ~~
Language: C

#include<stdio.h>
int main(){
  char s[4];
  scanf("%s",s)
    if(s[0]==s[1]==s[2]){
      printf("Yes");
    }else if(s[1]==s[2]==s[3]){
      printf("Yes");
    }else printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:16: error: expected ';' before 'if'
    4 |   scanf("%s",s)
      |                ^
      |                ;
    5 |     if(s[0]==s[1]==s[2]){
      |     ~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: expected ')' before '{' token
    6 |   if(s[1] == s[2] && (s{0] == s[1] || s[3] == s[1])){
      |                      ~ ^
      |                        )
a.cc:11:2: error: expected ')' at end of input
   11 | }
      |  ^
      |  )
a.cc:6:5: note: to match this '('
    6 |   if(s[1] == s[2] && (s{0] == s[1] || s[3] == s[1])){
      |     ^
a.cc:11:2: error: expected statement at end of input
   11 | }
      |  ^
a.cc:11:2: error: expected '}' at end of input
a.cc:4:11: 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;
  a = N / 1000;
  b = N / 100 % 10;
  c = N / 10 % 10;
  d = N % 10;
  if (a = b = c || b = c = d) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}


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

import java.util.*;

public  class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int N = scan.nextInt();
      	int a = N % 1000;
      	int b = N % 100 - 10 * a;
      	int c = N % 10 - 100 * a - * b;
      	int d = 1000 * a - 100 * b - 10 * c;
     	if(a == b && b == c){
        	System.out.print("Yes");
        }
      	else if(b == c && c == d) {
         	System.out.print("Yes"); 
        }
      	else if(a == b && b == c && c == d){
        	System.out.print("Yes");
        }
      	else {
        	System.out.print("No");
        }
    
    }

}

Compiler output:
Main.java:9: error: illegal start of expression
      	int c = N % 10 - 100 * a - * b;
      	                           ^
1 error
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#ifndef FAST_IO
 #define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr);
#endif
#define FILE_IO freopen("input.txt","r",stdin)
#define int long long
#define f first
#define s second
#define endl '\n'
#define all(c) c.begin(),c.end()
#define debug(x) cerr << #x << " = " << x << endl;
const int MO=1e9+7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<typename T>void print(T t){for(auto &it:t)cout<<it<<endl;}
inline int powerexp(int a,int b,int m){int res=1;while(b){if(b&1)res=res*a%m;a=a*a%m,b>>=1;}return res%m;}
void solve(){
	string s;
	cin>>s;
	bool ok=((s[0]==s[1] and s[1]==s[2]) or (s[1]==s[2] and s[2]==s[3]))
	cout<<(ok?"Yes":"No")<<endl;
}
//-----------------------------
//comment from here for TOPCODER 
int32_t main(){
    IOS;
    solve();
    #ifdef LOCAL_DEFINE
    cerr<<"time elapsed "<<(double)clock()/CLOCKS_PER_SEC<<endl;
    #endif
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:22:9: error: expected ',' or ';' before 'cout'
   22 |         cout<<(ok?"Yes":"No")<<endl;
      |         ^~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
#ifndef FAST_IO
 #define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr);
#endif
#define FILE_IO freopen("input.txt","r",stdin)
#define int long long
#define f first
#define s second
#define endl '\n'
#define all(c) c.begin(),c.end()
#define debug(x) cerr << #x << " = " << x << endl;
const int MO=1e9+7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<typename T>void print(T t){for(auto &it:t)cout<<it<<endl;}
inline int powerexp(int a,int b,int m){int res=1;while(b){if(b&1)res=res*a%m;a=a*a%m,b>>=1;}return res%m;}
void solve(){
	string s;
	cin>>s;
	bool ok=(s[0]==s[1]==s[2] or s[1]==s[2]==s[3])
	cout<<(ok?"Yes":"No")<<endl;
}
//-----------------------------
//comment from here for TOPCODER 
int32_t main(){
    IOS;
    solve();
    #ifdef LOCAL_DEFINE
    cerr<<"time elapsed "<<(double)clock()/CLOCKS_PER_SEC<<endl;
    #endif
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:22:9: error: expected ',' or ';' before 'cout'
   22 |         cout<<(ok?"Yes":"No")<<endl;
      |         ^~~~
Language: C++

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

int main() {
  int A = 0, a = 0, a2 = 0,b = 0;b2 = 0,c = 0,d = 0;;
  cin >> A;

  a = A / 1000:
  a2 = a * 1000;
  
  b = A - a2;
  b = b / 100;
  b2 = b * 100;
  
  c = A - a2 - b2;
  c = c / 10;
  
  d = A - a2 -b2 - c * 10;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:34: error: 'b2' was not declared in this scope; did you mean 'b'?
    5 |   int A = 0, a = 0, a2 = 0,b = 0;b2 = 0,c = 0,d = 0;;
      |                                  ^~
      |                                  b
a.cc:5:41: error: 'c' was not declared in this scope
    5 |   int A = 0, a = 0, a2 = 0,b = 0;b2 = 0,c = 0,d = 0;;
      |                                         ^
a.cc:5:47: error: 'd' was not declared in this scope
    5 |   int A = 0, a = 0, a2 = 0,b = 0;b2 = 0,c = 0,d = 0;;
      |                                               ^
a.cc:8:15: error: expected ';' before ':' token
    8 |   a = A / 1000:
      |               ^
      |               ;
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 % 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:39: error: expected ')' before '{' token
   10 |   if ((a==b && b==c) || (b==c && c==d) {
      |      ~                                ^~
      |                                       )
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
Language: C++

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

int main()
{
    char a,b,c,d;
    int a=0;
    cin>>a>>b>>c>>d;
    if(a==b&&b==c){
        a++;
    }
    if(b==c&&c==d){
        a++;
    }
    if(a>0){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: conflicting declaration 'int a'
    7 |     int a=0;
      |         ^
a.cc:6:10: note: previous declaration as 'char a'
    6 |     char a,b,c,d;
      |          ^
Language: C++

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <iomanip>
#include <map>
#include <set>
#include <list>
#include <limits>
#include <numeric>
#include <utility>
#include <deque>
#include <valarray>
#include <unordered_set>
#include <unordered_map>
#include <regex>
#include <array>
#include <bitset>
#include <complex>
#include <string>
#include <tuple>

using namespace std;
using ll = long long;
const int INF = 1e9;
const ll MOD = 1e9 + 7;

int main()
{
  string s;
  cin >> s;
  int num[10] = {};
  for (int i = 0; i < s.size(); ++i) num[s[i] - '0']++;
  for (int i = 0; i < 10; ++i)
    if (num[i] >= 3} 
    {
      cout << "Yes" << endl;
      return 0;
    }
  
  cout << "No" << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:20: error: expected ')' before '}' token
   44 |     if (num[i] >= 3}
      |        ~           ^
      |                    )
a.cc:44:20: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:45:5: error: expected unqualified-id before '{' token
   45 |     {
      |     ^
a.cc:50:3: error: 'cout' does not name a type
   50 |   cout << "No" << endl;
      |   ^~~~
a.cc:52:3: error: expected unqualified-id before 'return'
   52 |   return 0;
      |   ^~~~~~
a.cc:53:1: error: expected declaration before '}' token
   53 | }
      | ^
Language: C++

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

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

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

#include<string>
#include<iostream>
using namespace std;

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


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

#include<string>
using namespace std;

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


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

#include<string>
using namespace std;

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


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

#include<iostream>
using namespace std;
int main() {
  int n;cin >> n;
  int a[4];
  int i=0;
  while(i<4){
    a[3-i]=N%10;
    N/=10;
    i++;
  }
  if((a[0]==a[1]&&a[1]==a[2])||(a[1]==a[2]&&a[2]==a[3]))cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'N' was not declared in this scope
    8 |     a[3-i]=N%10;
      |            ^
Language: Java

import java.util.*;

public class test {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num[] = new int[10];
        char s[] = scan.next().toCharArray();
        for (int i = 0; i < 4; i++) num[Integer.parseInt(s[i] + "")]++;
        boolean ok = false;
        for (int i = 0; i < 10; i++) if (num[i] >= 3) ok = true;
        if (ok) System.out.println("Yes");
        else System.out.println("No");
    }
}


Compiler output:
Main.java:3: error: class test is public, should be declared in a file named test.java
public class test {
       ^
1 error
Language: Java

import java.util.*;

public class test {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num[] = new int[10];
        char s[] = scan.next().toCharArray();
        for (int i = 0; i < 4; i++) num[Integer.parseInt(s[0] + "")]++;
        boolean ok = false;
        for (int i = 0; i < 10; i++) if (num[i] >= 3) ok = true;
        if (ok) System.out.println("YES");
        else System.out.println("NO");
    }
}


Compiler output:
Main.java:3: error: class test is public, should be declared in a file named test.java
public class test {
       ^
1 error
Language: Java

import java.util.*;

public class test {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num[] = new int[10];
        char s[] = scan.next().toCharArray();
        for (int i = 0; i < 4; i++) num[Integer.parseInt(s[0] + "")]++;
        boolean ok = false;
        for (int i = 0; i < 10; i++) if (s[i] >= 3) ok = true;
        if (ok) System.out.println("YES");
        else System.out.println("NO");
    }
}


Compiler output:
Main.java:3: error: class test is public, should be declared in a file named test.java
public class test {
       ^
1 error
Language: C++

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

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


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

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

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

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

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

template <class T> using V = vector<T>;

using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;


#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(b);i>(ll)(a);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) __lcm(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;



int main() {
  ll n;
    ci(n);
  ll a,b;
  a=n/10;
  b=n%1000;
  if(a%111==0||b%111=0){
    co("Yes")
  }
  else{
    co("No")
  }
}

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

#include<string>
using namespace std;

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

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

#include<string>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>N;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
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:11: error: 'Yes' was not declared in this scope
   12 |     cout<<Yes<<endl;
      |           ^~~
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |     cout<<Yes<<endl;
      |                ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<Yes<<endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:11: error: 'Yes' was not declared in this scope
   15 |     cout<<Yes<<endl;
      |           ^~~
a.cc:15:16: error: 'endl' was not declared in this scope
   15 |     cout<<Yes<<endl;
      |                ^~~~
a.cc:15:16: 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:11: error: 'No' was not declared in this scope; did you mean 'N'?
   18 |     cout<<No<<endl;
      |           ^~
      |           N
a.cc:18:15: error: 'endl' was not declared in this scope
   18 |     cout<<No<<endl;
      |               ^~~~
a.cc:18:15: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<string>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>N;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
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:11: error: 'Yes' was not declared in this scope
   12 |     cout<<Yes<<endl;
      |           ^~~
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |     cout<<Yes<<endl;
      |                ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<Yes<<endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:11: error: 'Yes' was not declared in this scope
   15 |     cout<<Yes<<endl;
      |           ^~~
a.cc:15:16: error: 'endl' was not declared in this scope
   15 |     cout<<Yes<<endl;
      |                ^~~~
a.cc:15:16: 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:11: error: 'No' was not declared in this scope; did you mean 'N'?
   18 |     cout<<No<<endl;
      |           ^~
      |           N
a.cc:18:15: error: 'endl' was not declared in this scope
   18 |     cout<<No<<endl;
      |               ^~~~
a.cc:18:15: 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(){
  stginr s;
  cin>>s;
  if(s.at(0)==s.at(1)&&s.at(2)==s.at(1)){cout<<"Yes";}
  else if(s.at(2)==s.at(1)&&s.at(2)==s.at(3)){cout<<"Yes";}
  else{cout<<"No";}
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected '(' before '{' token
    9 |   }else if{n%1011 == 0){
      |           ^
      |           (
Language: C++


#include <iostream>
using namespace std;

int main() {
	int N, A , B;
	cin >> N;
	if (N == AAAA) {
		cout << "Yes" << endl;
	}
	else if (N == AAAB) {
		cout << "Yes" << endl;
	}
	else if (N == BAAA) {
		cout << "Yes" << endl;
	  }
	else {
		cout << "No" << endl;
	}
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'AAAA' was not declared in this scope
    8 |         if (N == AAAA) {
      |                  ^~~~
a.cc:11:23: error: 'AAAB' was not declared in this scope
   11 |         else if (N == AAAB) {
      |                       ^~~~
a.cc:14:23: error: 'BAAA' was not declared in this scope
   14 |         else if (N == BAAA) {
      |                       ^~~~
Language: C++

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

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

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

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

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

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

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


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

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

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

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


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

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

string N;
  cin>>N;
  int sum1=0;
  int sum2=0;
  for(int i=0;i<N.size();i++){
if(N.at(0)==N.at(i)){
  sum1++;
}
    else if(N.at(1)==N.at(i)){
      sum2++;
    }
  }
  
  
    if(sum1==3&&S.at(0)!=S.at(3)){
      cout<<"Yes"<<endl;
    }
    else if(sum1==4||sum2==4){
      cout<<"Yes"<<endl;
    }
    else if(sum2==3&&S.at(3)!=S.at(0)){
      cout<<"Yes "<<endl;
    }
    else{
      cout<<"No"<<endl;
    }
  }


  
    



Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'S' was not declared in this scope
   19 |     if(sum1==3&&S.at(0)!=S.at(3)){
      |                 ^
Language: C++

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

string N;
  cin>>N;
  int sum1=0;
  int sum2=0;
  for(int i=0;i<N.size();i++){
if(N.at(0)==N.at(i)){
  sum1++:
}
    else if(N.at(1)==N.at(i)){
      sum2++;
    }
  }
  
  
    if(sum1==3&&S.at(0)!=S.at(3)){
      cout<<"Yes"<<endl;
    }
    else if(sum1==4||sum2==4){
      cout<<"Yes"<<endl;
    }
    else if(sum2==3&&S.at(3)!=S.at(0)){
      cout<<"Yes "<<endl;
    }
    else{
      cout<<"No"<>endl;
    }
  }


  
    



Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ';' before ':' token
   11 |   sum1++:
      |         ^
      |         ;
a.cc:19:17: error: 'S' was not declared in this scope
   19 |     if(sum1==3&&S.at(0)!=S.at(3)){
      |                 ^
a.cc:29:18: error: expected primary-expression before '>' token
   29 |       cout<<"No"<>endl;
      |                  ^