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

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char a[1000];
    scanf("%s",&a);
    for(int i=0;i<strlen(a);i++){
        if((a[i]==a[i+1] && a[i]!=a[i+2])||(a[i]==a[i+2] && a[i]!=a[i+1])){
        printf("Yes");
        break;}
        else if(a[i]==a[i+1] && a[i]==a[i+2]){
            printf("No");
            break;}}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'strlen' was not declared in this scope
    8 |     for(int i=0;i<strlen(a);i++){
      |                   ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char a[10000];
    scanf("%s",&a);
    for(int i=0;i<strlen(a);i++){
        if((a[i]==a[i+1] && a[i]!=a[i+2])||(a[i]==a[i+2] && a[i]!=a[i+1])){
        printf("Yes");
        break;}
        else if(a[i]==a[i+1] && a[i]==a[i+2]){
            printf("No");
            break;}}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'strlen' was not declared in this scope
    8 |     for(int i=0;i<strlen(a);i++){
      |                   ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 |
Language: Java

import java.util.*;
class Main{
	public static void main(String[]args){
      Scanner in = new Scanner(System.in);
      String n = in.nextLine();
      int c =0, d=0;
      for(int i = 0 ; i < n.length() ; i++){
      	if(n.charAt(i)=='A')
          c++;
        else if(n.charAt(i)=='B')
          d++;
      }
      if(c==2)
        System.out.println("Yes");
      else if(d==2)
         System.out.println("Yes");
      else
         System.out.println("No");
    }

Compiler output:
Main.java:19: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

import java.util.*;
class Main{
	public static void main(String[]args){
      Scanner in = new Scanner(System.in);
      String n = in.nextLine();
      int c =0, d=0;
      for(int i = 0 ; i < n.length() ; i++){
      	if(n.charAt(i)=='A')
          c++;
        else if(n.charAt(i)=='B')
          d++
      }
      if(c==2)
        System.out.println("Yes");
      else if(d==2)
         System.out.println("Yes");
      else
         System.out.println("No");
    }

Compiler output:
Main.java:11: error: ';' expected
          d++
             ^
Main.java:19: error: reached end of file while parsing
    }
     ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if(a==b & b==c){
          System.out.println("No");
		else
          System.out.println("Yes");
	}
}

Compiler output:
Main.java:10: error: 'else' without 'if'
		else
		^
Main.java:13: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String station = sc.next();
    String word = "No";
    for (int i = 1; i < 3; i++) {
      if (station.charAt(i-1) != station.charAt(i))
        word = "Yes";
    }
    System.out.println(word);
  }

}

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main(){
  char x,y,z;
  cin>>x>>y>>z;
  bool A=false,B=false;
 
  if(x='A')
    A=true;
  else
    B=true;
  if(y='A')
    A=true;
  else
    B=true;
  if(z='A')
    A=true;
  else
    B=true;
  
  if(A&&B)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
  

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class A {
	public static void main(String[] args) throws IOException {
		
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		
		String line = br.readLine();
		
		if((line.lastIndexOf("A") != -1)
				&& (line.lastIndexOf("B") != -1)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
	}

}


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

import java.io.BufferedReader;a
import java.io.IOException;
import java.io.InputStreamReader;

public class A {
	public static void main(String[] args) throws IOException {
		
		InputStreamReader in = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(in);
		
		String line = br.readLine();
		
		if((line.lastIndexOf("A") != -1)
				&& (line.lastIndexOf("B") != -1)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		
	}

}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
import java.io.BufferedReader;a
                              ^
Main.java:3: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
2 errors
Language: Java

import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
char c1= sc.nextChar();
char c2= sc.nextChar();
char c3= sc.nextChar();
  
if(c1==c2&&c2==c3){
System.out.println("Yes");
}else{
System.out.println("No");
}
  
}
} 

Compiler output:
Main.java:5: error: cannot find symbol
char c1= sc.nextChar();
           ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
Main.java:6: error: cannot find symbol
char c2= sc.nextChar();
           ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
Main.java:7: error: cannot find symbol
char c3= sc.nextChar();
           ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
3 errors
Language: C++

#include "bits/stdc++.h"
using namespace std;
 
string s; cin >> s;
char a = s.at(0);
char b = s.at(1);
char c = s.at(2);
if (a==b && b ==c) {
	cout << "No\n";
}
else {
	cout << "Yes\n";
}

Compiler output:
a.cc:4:11: error: 'cin' does not name a type
    4 | string s; cin >> s;
      |           ^~~
a.cc:8:1: error: expected unqualified-id before 'if'
    8 | if (a==b && b ==c) {
      | ^~
a.cc:11:1: error: expected unqualified-id before 'else'
   11 | else {
      | ^~~~
Language: C++

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

string s; cin >> s;
vector<char> c(3);
bool bo = false;
char a = s.at(0);
char b = s.at(1);
char c = s.at(2);
if (a==b && b ==c) {
	cout << "No\n";
}
else {
	cout << "Yes\n";
}

Compiler output:
a.cc:4:11: error: 'cin' does not name a type
    4 | string s; cin >> s;
      |           ^~~
a.cc:9:6: error: conflicting declaration 'char c'
    9 | char c = s.at(2);
      |      ^
a.cc:5:14: note: previous declaration as 'std::vector<char> c'
    5 | vector<char> c(3);
      |              ^
a.cc:10:1: error: expected unqualified-id before 'if'
   10 | if (a==b && b ==c) {
      | ^~
a.cc:13:1: error: expected unqualified-id before 'else'
   13 | else {
      | ^~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
    char x,y,z;
    cin >> x >> y>> z;
    if(x=='A' && y=='A' z=='A'){
        cout<<"No";
    }
    else{
        
    
    if(x=='B' && y=='B' z=='B'){
        cout<<"No";
    }
    else {
        cout<<"Yes";
    
             }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ')' before 'z'
    8 |     if(x=='A' && y=='A' z=='A'){
      |       ~                ^~
      |                        )
a.cc:14:24: error: expected ')' before 'z'
   14 |     if(x=='B' && y=='B' z=='B'){
      |       ~                ^~
      |                        )
Language: C++

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

int main(){
	string s;
  cin>>s;
  int a[2]={0);
  for(int i=0;i<s.length();i++){
  	a[s[i]-'A']++;
  }
  if(a[0] && a[1])
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected '}' before ')' token
    8 |   int a[2]={0);
      |            ~ ^
a.cc:8:14: error: expected ',' or ';' before ')' token
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  
  	string x[9];
  	int a=0,b=0;
  
  for (i=0;i<=2;i++){
  	cin >> x[i];
  	if (x[i] == "a")
      	a++;
    	else
          b++;
  }
    
    if(a>=1 && b>=1)
      cout << "Yes" << endl;
    	else
          cout << "No" << endl;
 }


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

#include<iostream>
using namespace std;

int main(){
  
  	string x[9];
  	int a=0,b=0;
  
  for (i=0;i<=2;i++){
  	cin >> x[i];
  	if (x[i] == "a")
      	a++;
    	else
          b++;
    
    if(a>=1 && b>=1)
      cout << "Yes" << endl;
    	else
          cout << "No" << endl;
 }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |   for (i=0;i<=2;i++){
      |        ^
a.cc:20:3: error: expected '}' at end of input
   20 |  }
      |   ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

//Created by rect0r
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define F first
#define S second
#define all(x) (x).begin(),(x).end()

using namespace std;

typedef vector<int> vi;
typedef long long ll;
typedef vector<char> vc;
typedef pair<int, int> pii;

void solve() {
	string s;
	cin >> s;
	int a[2]={0};
	for(int i=0; i<s.length(); i++)
		a[s[i]-'A']++;
	if(a[0]!=0 && a[1]!=0)
		cout << "Yes";
	else 
		cout << "No';
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll T;
	//cin >> T;
	T = 1;
	while(T--) {
		solve();
		cout << '\n';
	}
	return 0;
}


Compiler output:
a.cc:27:25: warning: missing terminating " character
   27 |                 cout << "No';
      |                         ^
a.cc:27:25: error: missing terminating " character
   27 |                 cout << "No';
      |                         ^~~~~
a.cc: In function 'void solve()':
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
Language: Java

import java.util.Scanner;

public class StationAndBus {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		 Scanner sc = new Scanner(System.in);
		 String name=sc.next();
		 int k=0;
		 for(int i=0;i<3;i++){
			 for(int j=i;j<3;j++){
				 if(!(String.valueOf(name.charAt(i)).equals(String.valueOf(name.charAt(j))))){
					 k++;
				 }
			 }
		 }
		 if(k==0){
			 System.out.print("No");
		 }else{
			 System.out.print("Yes");
		 }
	}

}


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

import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        int name = sc.nextline();
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        int name = sc.nextline();
                     ^
  symbol:   method nextline()
  location: variable sc of type Scanner
1 error
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>



void main()
{
	char s[4];
	scanf("%s",s);
	if (s[0] == s[1] && s[1] == s[2]) {
		printf("No");
	}
	else {

		printf("Yes");
	}
}


Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main()
      | ^~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>



void main()
{
	char s[4];
	scanf("%s",s);
	if (s[0] == s[1] && s[1] == s[2]) {
		printf("No");
	}
	else {

		printf("Yes");
	}
}

Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main()
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main( ) {
  int S;
  cin>> S;
  if(S == BBB || S == AAA){
    cout << No >>;
  }
  else{cout<<Yes>>;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'BBB' was not declared in this scope
    7 |   if(S == BBB || S == AAA){
      |           ^~~
a.cc:7:23: error: 'AAA' was not declared in this scope
    7 |   if(S == BBB || S == AAA){
      |                       ^~~
a.cc:8:13: error: 'No' was not declared in this scope
    8 |     cout << No >>;
      |             ^~
a.cc:8:18: error: expected primary-expression before ';' token
    8 |     cout << No >>;
      |                  ^
a.cc:10:14: error: 'Yes' was not declared in this scope
   10 |   else{cout<<Yes>>;
      |              ^~~
a.cc:10:19: error: expected primary-expression before ';' token
   10 |   else{cout<<Yes>>;
      |                   ^
Language: C++

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

int main( ) {
  int g;
  cin>> g;
  if(g == BBB || g == AAA){
    cout << No >>;
  }
  else{cout<<Yes>>;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'BBB' was not declared in this scope
    7 |   if(g == BBB || g == AAA){
      |           ^~~
a.cc:7:23: error: 'AAA' was not declared in this scope
    7 |   if(g == BBB || g == AAA){
      |                       ^~~
a.cc:8:13: error: 'No' was not declared in this scope
    8 |     cout << No >>;
      |             ^~
a.cc:8:18: error: expected primary-expression before ';' token
    8 |     cout << No >>;
      |                  ^
a.cc:10:14: error: 'Yes' was not declared in this scope
   10 |   else{cout<<Yes>>;
      |              ^~~
a.cc:10:19: error: expected primary-expression before ';' token
   10 |   else{cout<<Yes>>;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  string str;
  cin>>str;
  
  int cnt1=0,cnt2=0;
  
  for(int i=0;i<str.size();i++)
  {
    
    if(str[i]=='A')
      cnt1++;
    else
      cnt2++;
  }
  
  if(cnt1==3 || cnt2==3)
    cout<<"No"<<endl;
  else
    cout<<"Yes"<<endl;

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'c' was not declared in this scope; did you mean 'cc'?
    7 |         if(c[0]==c[1]&&c[1]==c[2]){
      |            ^
      |            cc
a.cc:13:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   13 |         return ;
      |         ^~~~~~
Language: C++

#include <stdio.h>

int main(){
  	int i=0;
  	char cc[4];
  	scanf("%s",cc);
  	if(c[0]==c[1]&&c[1]==c[2]){
    	printf("No");
    }else{
    	printf("Yes");    
    }
	
	return ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'c' was not declared in this scope; did you mean 'cc'?
    7 |         if(c[0]==c[1]&&c[1]==c[2]){
      |            ^
      |            cc
a.cc:13:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   13 |         return ;
      |         ^~~~~~
Language: Java

import java.util.Scanner;
public class test{
  public static void main(String[] args){
    Scanner inp = new Scanner(System.in);
    String s = inp.next();
    char c = s.charAt(0);
    int f=0;
    for(int i=1;i<s.length();i++){
      if(c!=s.charAt(i)){
        f = 1;
      }
    }

    if(f==1){
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

  }
}

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

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define ll  long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define vi vector<int>
#define br cout <<"\n";
#define all(x)  (x).begin(),(x).end()
#define rall(x)  (x).rbegin(),(x).rend()
#define tr(c,i) for(auto i : c)
#define pii pair< int,int >
#define fast_io() ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define pq priority_queue< pair<ll,pii> ,vector<pair<ll,pii>>,greater <pair<ll,pii>> >p;//container adapter makes ascending q
#define er(x) cout << x << " "
#define err(x,y) cout << x << " "<<y
using namespace std;
const int dx[] = { 1, -1 , 0 , 0  };
const int dy [] = { 0 ,0 , 1 , -1  };
const int MOD = 1000 * 1000 * 1000 + 7 ;
const int N = 1000+5 ;
const int INF = INT_MAX ;
const int M = 200005;
char a[N][N]; 
int main ( ){
fast_io();
strring s ;
cin >> s ;
map<int , int >mp ; 
for(char &x : s )
mp[x]++ ;
cout << ( mp.size() == 1 ? "NO":"YES") ,br 	
 
return 0 ;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:1: error: 'strring' was not declared in this scope
   28 | strring s ;
      | ^~~~~~~
a.cc:29:8: error: 's' was not declared in this scope
   29 | cin >> s ;
      |        ^
Language: C++

//organize and stay in moment - Abhinav IIIT-A
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define f(i,x,n) for(int i=x;i<n;++i)
#define ar array
#define MAXN (int)2e5+5
#define pb push_back
int mod= 998244353;
int arr[MAXN];
int as;
void input(){
  cin>>as;
  f(i,0,as) cin>>arr[i];
}
void q1(){
  string s; cin>>s;
  int a=0,b=0;
  f(i,0,3)
  s[i]=='A'  ? ++a : ++b;
  if(a&&b)
    cout<<"Yes";
  else cout<<"No";
}
void q2(){
  int n,a,b;
  cin>>n>>a>>b;
  int t=a+b;
  int q=n/t;
  int ans=q*a;
  int r=n%t;
  ans+=min(r,a);
  cout<<ans;
}
void q3(){
  int a,b; cin>>a>>b;
  for(int i=1;i<=100000;++i){
    int x=i*8; x/=100;
    int y=i*10; y/=100;
    if(x==a && y==b){
      cout<<i;
      return ;
    }
  }
  cout<<-1;
}
void q4(){
  string s; cin>>s;
  deque<int> q;
  f(i,0,s.size())
  q.push_back(s[i]);
  int Q; cin>>>Q;
  int curr=0;
  while(Q--){
    int t;
    cin>>t;
    if(t==1){
      curr=1-curr;
    }else{
      // 0 0 begin
      //0 1 end
      //1 0 end
      //1 1 begin
      int f;char c; cin>>f>>c;
      if((f+curr)%2==0)
        q.push_front(c);
      else q.push_back(c);
    }
  }
  string ret="";
  while(!q.empty()){
    ret+=q.front();
    q.pop_front();
  }
  if(curr)
     reverse(ret.begin(),ret.end());
   cout<<ret;
   return ;
}
void q5(){
  int n,p; cin>>n>>p;
  string s; cin>>s;
  int ans=0;
  if(p==2){
    f(i,0,n)
    if((s[i]-'0')%2==0)
      ans+=i+1;
  }else if(p==5){
    f(i,0,n)
    if((s[i]-'0')%5==0)
      ans+=i+1;
  }else {
    int tt=1;
    int curr=0;
     map<int,int> mp;
     mp[0]++;
     for(int i=n-1;i>=0;--i){
        curr+=(s[i]-'0')*tt;
        tt*=10;
        tt%=p; curr%=p;
        ans+=mp[curr];
        ++mp[curr];
     }
  }
  cout<<ans;
}
int mod2=998244353;
void solve(){
 
}
int32_t main()
{
  int t; t=1; //cin>>t;
  while(t--) q1();
  return 0;
}


Compiler output:
a.cc: In function 'void q4()':
a.cc:52:15: error: expected primary-expression before '>' token
   52 |   int Q; cin>>>Q;
      |               ^
Language: C++

//organize and stay in moment - Abhinav IIIT-A
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define f(i,x,n) for(int i=x;i<n;++i)
#define ar array
#define MAXN (int)2e5+5
#define pb push_back
int mod= 998244353;
int arr[MAXN];
int as;
void input(){
  cin>>as;
  f(i,0,as) cin>>arr[i];
}
void q1(){
  string s; cin>>s;
  int a=0,b=0;
  f(i,0,3)
  s[i]=='A'  ? ++a : ++b;
  if(a&&b)
    cout<<"Yes";
  else cout<<"No";
}
void q2(){
  int n,a,b;
  cin>>n>>a>>b;
  int t=a+b;
  int q=n/t;
  int ans=q*a;
  int r=n%t;
  ans+=min(r,a);
  cout<<ans;
}
void q3(){
  int a,b; cin>>a>>b;
  for(int i=1;i<=100000;++i){
    int x=i*8; x/=100;
    int y=i*10; y/=100;
    if(x==a && y==b){
      cout<<i;
      return ;
    }
  }
  cout<<-1;
}
void q4(){
  string s; cin>>s;
  dequeue<int> q;
  f(i,0,s.size())
  q.push_back(s[i]);
  int Q; cin>>>Q;
  int curr=0;
  while(Q--){
    int t;
    cin>>t;
    if(t==1){
      curr=1-curr;
    }else{
      // 0 0 begin
      //0 1 end
      //1 0 end
      //1 1 begin
      int f;char c; cin>>f>>c;
      if((f+curr)%2==0)
        q.push_front(c);
      else q.push_back(c);
    }
  }
  string ret="";
  while(!q.empty()){
    ret+=q.front();
    q.pop_front();
  }
  if(curr)
     reverse(ret.begin(),ret.end());
   cout<<ret;
   return ;
}
void q5(){
  int n,p; cin>>n>>p;
  string s; cin>>s;
  int ans=0;
  if(p==2){
    f(i,0,n)
    if((s[i]-'0')%2==0)
      ans+=i+1;
  }else if(p==5){
    f(i,0,n)
    if((s[i]-'0')%5==0)
      ans+=i+1;
  }else {
    int tt=1;
    int curr=0;
     map<int,int> mp;
     mp[0]++;
     for(int i=n-1;i>=0;--i){
        curr+=(s[i]-'0')*tt;
        tt*=10;
        tt%=p; curr%=p;
        ans+=mp[curr];
        ++mp[curr];
     }
  }
  cout<<ans;
}
int mod2=998244353;
void solve(){
 
}
int32_t main()
{
  int t; t=1; //cin>>t;
  while(t--) q1();
  return 0;
}


Compiler output:
a.cc: In function 'void q4()':
a.cc:49:3: error: 'dequeue' was not declared in this scope
   49 |   dequeue<int> q;
      |   ^~~~~~~
a.cc:4:13: error: expected primary-expression before 'long'
    4 | #define int long long
      |             ^~~~
a.cc:49:11: note: in expansion of macro 'int'
   49 |   dequeue<int> q;
      |           ^~~
a.cc:51:3: error: 'q' was not declared in this scope
   51 |   q.push_back(s[i]);
      |   ^
a.cc:52:15: error: expected primary-expression before '>' token
   52 |   int Q; cin>>>Q;
      |               ^
a.cc:66:9: error: 'q' was not declared in this scope
   66 |         q.push_front(c);
      |         ^
a.cc:67:12: error: 'q' was not declared in this scope
   67 |       else q.push_back(c);
      |            ^
a.cc:71:10: error: 'q' was not declared in this scope
   71 |   while(!q.empty()){
      |          ^
Language: C++

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

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

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

#include <iostream>

using namespace std;

string s;
int nA, nB;

int main() {
	cin>>s;
	for (int i=0; i<3; i++) {
		if (s[i]=='A') nA++;
		if (s[i]=='B') nB++;
	}
	if (nA>=1 && nB>=1) {
		cout<<"Yes";
	else {
		cout<<"No";
	}
	cout<<'\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: expected '}' before 'else'
   16 |         else {
      |         ^~~~
a.cc:14:29: note: to match this '{'
   14 |         if (nA>=1 && nB>=1) {
      |                             ^
Language: C++

// driver code
int main() {
  string s;
  cin>>s;
  size_t found_A = s.find("A");
  size_t found_B = s.find("B");
  if (found_A != string::npos && found_B != string::npos)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>s;
      |   ^~~
a.cc:4:8: error: 's' was not declared in this scope
    4 |   cin>>s;
      |        ^
a.cc:5:3: error: 'size_t' was not declared in this scope
    5 |   size_t found_A = s.find("A");
      |   ^~~~~~
a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | // driver code
a.cc:6:9: error: expected ';' before 'found_B'
    6 |   size_t found_B = s.find("B");
      |         ^~~~~~~~
      |         ;
a.cc:7:7: error: 'found_A' was not declared in this scope
    7 |   if (found_A != string::npos && found_B != string::npos)
      |       ^~~~~~~
a.cc:7:18: error: 'string' is not a class, namespace, or enumeration
    7 |   if (found_A != string::npos && found_B != string::npos)
      |                  ^~~~~~
a.cc:7:34: error: 'found_B' was not declared in this scope
    7 |   if (found_A != string::npos && found_B != string::npos)
      |                                  ^~~~~~~
a.cc:7:45: error: 'string' is not a class, namespace, or enumeration
    7 |   if (found_A != string::npos && found_B != string::npos)
      |                                             ^~~~~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope
    8 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << "No" << endl;
      |     ^~~~
a.cc:10:21: error: 'endl' was not declared in this scope
   10 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

#include <bits/stdc++.h>
usin gnamespace std;

int main(){
  string s;
  cin >> s;
  if(s=="AAA"||s=="BBB") cout << "No" << endl;
  else cout << "Yes" << endl;
}


Compiler output:
a.cc:2:1: error: 'usin' does not name a type
    2 | usin gnamespace std;
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:7:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(s=="AAA"||s=="BBB") 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:7:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   if(s=="AAA"||s=="BBB") cout << "No" << 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:8:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   else cout << "Yes" << endl;
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   else cout << "Yes" << 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>
usingnamespace std;

int main(){
  string s;
  cin >> s;
  if(s=="AAA"||s=="BBB") cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc:2:1: error: 'usingnamespace' does not name a type
    2 | usingnamespace std;
      | ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:7:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(s=="AAA"||s=="BBB") 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:7:43: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   if(s=="AAA"||s=="BBB") 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:8:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   else 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:8:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   else 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<iostream>
#include<string>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int a=0;
  int b=0;
  for(int i=0;i<3;i++)if(s[i]=='A')a++;
  
  if(a==0 || a==3)cout<<"No"<<endl;
  else cout<"Yes"<<endl;
  
}

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

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define int long long
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;



signed main()
{
     ios_base::sync_with_stdio(false);
     cin.tie(NULL);  
   
 #ifndef ONLINE_JUDGE
    if(fopen("INPUT.txt","r"))
    {
    freopen ("INPUT.txt" , "r" , stdin);
    freopen ("OUTPUT.txt" , "w" , stdout);
    }
 #endif

// -------------------------------------Code starts here---------------------------------------------------------------------     

   string s;
   cin>>s;
   int n=s.length();
   int cnt=0;
   for(int i=0;i<n;i++)
   {
      if(s[i]=='A')
         cnt++;
   }
   if(n==cnt||n==0)
   {
      cout<<"No";
   }
   else
   {
      cout<<"Yes";
   }
   

// -------------------------------------Code ends here------------------------------------------------------------------
     clock_t clk;
 	clk = clock();
 
    clk = clock() - clk;
 	cerr << fixed << setprecision(6) << "Time: " << ((double)clk)/CLOCKS_PER_SEC << "\n";
 	return 0;
 }
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define int long long
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;



signed main()
{
     ios_base::sync_with_stdio(false);
     cin.tie(NULL);  
   
 #ifndef ONLINE_JUDGE
    if(fopen("INPUT.txt","r"))
    {
    freopen ("INPUT.txt" , "r" , stdin);
    freopen ("OUTPUT.txt" , "w" , stdout);
    }
 #endif

// -------------------------------------Code starts here---------------------------------------------------------------------     

   string s;
   cin>>s;
   int n=s.length();
   int cnt=0;
   for(int i=0;i<n;i++)
   {
      if(s[i]=='A')
         cnt++;
   }
   if(n==cnt||n==0)
   {
      cout<<"No";
   }
   else
   {
      cout<<"Yes";
   }
   

// -------------------------------------Code ends here------------------------------------------------------------------
     clock_t clk;
 	clk = clock();
 
    clk = clock() - clk;
 	cerr << fixed << setprecision(6) << "Time: " << ((double)clk)/CLOCKS_PER_SEC << "\n";
 	return 0;
 }


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

#include<bits/stdc++.h>
#define ll long long int
#define mod 1000000007
using namespace std;
ll power(ll x,ll n)
{
	ll res =1;
	while(n>0)
	{
		if(n%2==1)
	res=res*x;
	x=x*x;
	n=n/2;
	}
	return res;
	
}

int main(){

ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s,k;
    cin>>s;
    int q,flag=0;
    cin>>q;
    while(q--)
    {
    	int t;
    	cin>>t;
    	if(t==1)
    	{
    		if(flag==0)
    		flag=1;
    		else
    		flag=0;
		}
		else
		{
			int x;
			char c;
			cin>>x>>c;
			
			
			if(x==1)
			{
				if(flag==0)
				{
					k.push_back(c);
				}
				else
				{
					s.push_back(c);
				}
			}
			else
			{
				if(flag==0)
				{
					s.push_back(c);
				}
				else
				{
					k.push_back(c);
				}
			}
		}
	}
	for(i=0;i<k.length()/2;i++)
	{
		swap(k[i],k[k.length()-1-i]);
	}
	s=k+s;
	if(flag==0)
	cout<<s;
	else
	{
		for(int i=s.length()-1;i>=0;i--)
		cout<<s[i];
	}
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:13: error: 'i' was not declared in this scope
   70 |         for(i=0;i<k.length()/2;i++)
      |             ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
         
        String input = sc.nextLine();
		
      	if (input.eqauls("AAA") || input.equals("BBB")) {
          System.out.println("No");
        } else {  
          System.out.println("Yes");
        }
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
      	if (input.eqauls("AAA") || input.equals("BBB")) {
      	         ^
  symbol:   method eqauls(String)
  location: variable input of type String
1 error
Language: C++

#include <iostream>

using namespace std;

int main()
{
  string str;
  cin>>str;
  
  if(str=="AAA"||str=="BBB")
    cout<<"No"<<endl;
  else
    cout<<Yes<<endl;
}

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

//##MohK
//08/03/2020.... 6,35.
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
int main(){
    ll counter=0,counterr=0;
    string s;
    cin>>s;
    for(ll i=0;i<a;i++){
        if(s[i]=='A')counter++;
        else counterr++;
    }
    if(counter==3||counterr==3)cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'a' was not declared in this scope
   11 |     for(ll i=0;i<a;i++){
      |                  ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	string s cin>>s;
  	if(s[0] == s[1] && s[1] == s[2]) cout<<"No"<<endl;
  	else cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:18: error: expected initializer before 'cin'
    4 |         string s cin>>s;
      |                  ^~~
a.cc:5:12: error: 's' was not declared in this scope
    5 |         if(s[0] == s[1] && s[1] == s[2]) cout<<"No"<<endl;
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	string sl cin>>s;
  	if(s[0] == s[1] && s[1] == s[2]) cout<<"No"<<endl;
  	else cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: expected initializer before 'cin'
    4 |         string sl cin>>s;
      |                   ^~~
a.cc:5:12: error: 's' was not declared in this scope
    5 |         if(s[0] == s[1] && s[1] == s[2]) cout<<"No"<<endl;
      |            ^
Language: C++

using System;

namespace A___Station_and_Bus
{
    class Program
    {
        static void Main (string[] args)
        {
            var s = Console.ReadLine ();
            if (s == "AAA" || s == "BBB")
                Console.WriteLine ("No");

            else
                Console.WriteLine ("Yes");
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:27: error: 'string' has not been declared
    7 |         static void Main (string[] args)
      |                           ^~~~~~
a.cc:7:36: error: expected ',' or '...' before 'args'
    7 |         static void Main (string[] args)
      |                                    ^~~~
a.cc:16:6: error: expected ';' after class definition
   16 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void A___Station_and_Bus::Program::Main(int*)':
a.cc:9:13: error: 'var' was not declared in this scope
    9 |             var s = Console.ReadLine ();
      |             ^~~
a.cc:10:17: error: 's' was not declared in this scope
   10 |             if (s == "AAA" || s == "BBB")
      |                 ^
a.cc:11:17: error: 'Console' was not declared in this scope
   11 |                 Console.WriteLine ("No");
      |                 ^~~~~~~
a.cc:14:17: error: 'Console' was not declared in this scope
   14 |                 Console.WriteLine ("Yes");
      |                 ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <ctime>
#include <sstream>
#define weewoo ios::sync_with_stdio(false);cin.tie(0)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ld long double
#define ll long long
#define se second
#define fi first
#define ctoi(x) (x-'0')
#define pi (acos(-1))
#define llputin(a,n) for(int i=0;i<n;i++){ll x;cin >> x;a.push_back(x);}
#define iputin(a,n) for(int i=0;i<n;i++){int x;cin >> x;a.push_back(x);}

#define MOD ((ll) 1e9 + (ll) 7)
using namespace std;

ll pw(ll x,ll a){
    if(a==0)
        return 1;
    ll t = pw(x,a/2);
    if(a%2==0)
        return (t*t);
    else
        return (t*t*x);
}

bool prime(int x)
{
    if(x < 2) return false;
        for(int i=2; i<= sqrt(x); i++) {
            if ((x%i) == 0) return false;
        }
    return true;
}

bool cmp(const pair<int , int> &a , const pair<int , int> &b){
    return (a.first < b.first);
}



int main()
{
    weewoo;
    string x;
    cin >> x;
    char c = x[0];
    for(int i=0;i<n;i++){
        if(c!=x[i])
            return cout << "Yes" << endl,0;
    }
    cout << "No"<< endl;
    return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:19: error: 'n' was not declared in this scope
   50 |     for(int i=0;i<n;i++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  	string s;cin>>s;
  	sort(s.begin(), s.end()):
  	if(s[0]==s[2]){
    	cout<<"No\n";
    } else{
      	cout<<"Yes\n";
    }

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: expected ';' before ':' token
   10 |         sort(s.begin(), s.end()):
      |                                 ^
      |                                 ;
a.cc:13:7: error: 'else' without a previous 'if'
   13 |     } else{
      |       ^~~~
Language: C++

// Problem01.cpp : アプリケーションのエントリ ポイントを定義します。
//

//#include <bits/stdc++.h>
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

int main()
{
	//cin.tie(0);
	string s;
	cin >> s;
	if (s == "AAA" || s == "BBB")
		cout << "No" << endl;
	else
		cout << "Yes" << endl;

}



Compiler output:
a.cc:5:10: fatal error: stdafx.h: No such file or directory
    5 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int a=0,b=0;
  for(int i=0;i<s.size();i++)
  {
    if(s[i]=='A')
      a+=1;
    else
      b+=1;
  }
  if(a==3||b==3)
    cout<<"No"
  else
    cout<<"Yes"
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before 'else'
   17 |     cout<<"No"
      |               ^
      |               ;
   18 |   else
      |   ~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int a=0,b=0;
  for(int i=0;i<s.size();i++)
  {
    if(s[i]=='A')
      a+=1;
    else
      b+=1;
  }
  if(a==3||b==3)
    cout<<"No"
  else
    cout<<"Yes"
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before 'else'
   17 |     cout<<"No"
      |               ^
      |               ;
   18 |   else
      |   ~~~~
Language: C++

#include<iostream>
#include<string>
uisng namespace std;
int main()
{
  string s;
  cin>>s;
  int a=0,b=0;
  for(int i=0;i<s.size();i++)
  {
    if(s[i]=='A')
      a+=1;
    else
      b+=1;
  }
  if(a==3||b==3)
    cout<<"No"
  else
    cout<<"Yes"
return 0;
}

Compiler output:
a.cc:3:1: error: 'uisng' does not name a type
    3 | uisng namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>s;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout<<"No"
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	string s;
	int count=0;
	cin>>s;
	for(int i=0;i<n;i++)
	{
	    if(s[i]=='A')
	    count++;
	}
	if(count<=2 && count>0)
	cout<<"Yes";
	else
	cout<<"No";
	return 0;
}

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