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

#include<stdio.h>
#include<stdlib.h>
#define datatype char
#define max 100001

struct queue{
	int head;
	int tail;
	datatype item[max];
};

struct queue* initQueue(struct queue *p){
	p = (struct queue *)malloc(sizeof(struct queue));
	p->head = p->tail = 0;
	return p;
}

int emptyQueue(struct queue *p){
	return p->head == p->tail;
}

void resetQueue(struct queue *p){
	p->head = 0;
	p->tail = 0;
}

void enqueue(struct queue *p, datatype a){
	if(p->tail >= max){
		printf("overflow\n");
		exit(1);
	}else{
		p->item[p->tail] = a;
		p->tail++;
	}
}

datatype dequeue(struct queue *p){
	datatype a;
	if(emptyQueue(p)){
		printf("underflow\n");
		exit(1);
	}
	a = p->item[p->head];
	p->head++;
	return a;
}

void printQueue(struct queue *p){
	while(emptyQueue(p) == 0){
		printf("%c\n", dequeue(p));
	}
}

int main(){
	char s[3];
	long long int N, A, B, C;
	scanf("%lld %lld %lld %lld", &N, &A, &B, &C);
	if(A+B+C != 0){
		struct queue *q;
		q = initQueue(q);
		long long int i = 0;
		int j = 0;
	
		for(i = 0; i < N; i++){
			scanf("%s", s);
			//printf("now, s = %s\n", s);
			if(s[0] == 'A' && s[1] == 'C'){
				if(A > 0 && C > 0){
					A++;
					C--;
					enqueue(q, 'A');
				}else if(A > 0){
					A--;
					C++;
					enqueue(q, 'C');
				}else if(C > 0){
					A++;
					C--;
					enqueue(q, 'A');
				}else{
					j = 1;
					break;
				}
			}else if(s[0] == 'B' && s[1] == 'C'){
				if(B > 0 && C > 0){
					B++;
					C--;
					enqueue(q, 'B');
				}else if(C > 0){
					C--;
					B++;
					enqueue(q, 'B');
				}else if(B > 0){
					B--;
					C++;
					enqueue(q, 'C');
				}else{
					j = 1;
					break;
				}
			}else if(s[0] == 'A' && s[1] == 'B'){
				if(A > 0 && B > 0){
					A++;
					B--;
					enqueue(q, 'A');
				}else if(B > 0){
					B--;
					A++;
					enqueue(q, 'A');
				}else if(A > 0){
					A--;
					B++;
					enqueue(q, 'B');
				}else{
					j = 1;
					break;
				}
			}else{
				
			}
		}
	}else{
		j = 1;
	}
	
	if(j == 1){
		printf("No\n");
	}else{
		printf("Yes\n");
		printQueue(q);
	}
}

Compiler output:
main.c: In function 'main':
main.c:123:17: error: 'j' undeclared (first use in this function)
  123 |                 j = 1;
      |                 ^
main.c:123:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:130:28: error: 'q' undeclared (first use in this function)
  130 |                 printQueue(q);
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define forinc(i,a,b) for(int i=a;i<=b;++i)
#define fordec(i,a,b) for(int i=a;i>=b;--i)
#define fi first
#define se second
#define pii pair<int,int>

const int maxn=1e5+5;
int n,a,b,c,ok=0;
string s[maxn];
int f[5][maxn];
vector<char> ret;
int main()
{
    cin>>n>>a>>b>>c;
    forinc(i,1,n) cin>>s[i];
    cout<<"NO";
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, m) for (int i = 0; i < (int)(m); i++)
const int inf = 1000000000; // 10^9 Ten to the power of nine.



int main()
{
    string s[10000000]; char ans[10000000];
	int n,a,b,c;cin>>n>>a>>b>>c;
	for(int i=1;i<=n;i++)
	cin>>s[i];
	for(int i=1;i<=n;i++)
	{
		if(s[i]=="AB"){
			if(a==0&&b==0){
				cout<<No;
				return 0;
			}
			if(a>b)a--,b++,ans[i]='B';
			else if(a<b)a++,b--,ans[i]='A';
			else{
				if(s[i+1]=="BC")a--,b++,ans[i]='B';
				else a++,b--,ans[i]='A';
			}
		}
		if(s[i]=="BC"){
			if(c==0&&b==0){
				cout<<No;
				return 0;
			}
			if(c>b)c--,b++,ans[i]='B';
			else if(c<b)c++,b--,ans[i]='C';
			else{
				if(s[i+1]=="AB")c--,b++,ans[i]='B';
				else c++,b--,ans[i]='C';
			}
		}
		if(s[i]=="AC"){
			if(a==0&&c==0){
				cout<<No;
				return 0;
			}
			if(a>c)a--,c++,ans[i]='C';
			else if(a<c)a++,c--,ans[i]='A';
			else{
				if(s[i+1]=="BC")a--,c++,ans[i]='C';
				else a++,c--,ans[i]='A';
			}
		}
	}
	cout<<Yes;
	for(int i=1;i<=n;i++)
	printf("%c\n",ans[i]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:39: error: 'No' was not declared in this scope
   19 |                                 cout<<No;
      |                                       ^~
a.cc:31:39: error: 'No' was not declared in this scope
   31 |                                 cout<<No;
      |                                       ^~
a.cc:43:39: error: 'No' was not declared in this scope
   43 |                                 cout<<No;
      |                                       ^~
a.cc:54:15: error: 'Yes' was not declared in this scope
   54 |         cout<<Yes;
      |               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define mod 1000000007  
#define fi first
#define se second
int main()
{  
	int n,d,e,f;
	cin>>n>>d>>e>>f;
	int a=d,b=e,c=f;
	int i,j;
	string s;
	vector<char> ans1,ans2,ans3;
	int f1 = 0,f2 = 0,f3 = 0;
	vector<string> v(n);
	for(i=0;i<n;i++)
		cin>>v[i];
	if(v[0][0]=='A' && v[0][1]=='B')
	{
		if(a==0 && b==0)
			cout<<"No";
		return 0;
	}
	if(v[0][0]=='A' && v[0][1]=='C')
	{
		if(a==0 && c==0)
			cout<<"No";
		return 0;
	}
	if(v[0][0]=='B' && v[0][1]=='C')
	{
		if(c==0 && b==0)
			cout<<"No";
		return 0;
	}
	if(a+b+c==0)
	{
		cout<<"No";
		return;
	}
	for(i=0;i<n;i++)
	{
		if(v[i][0]=='A' && v[i][1]=='B')
		{
			if(a!=0){
				a--;
				b++;
				ans1.pb('B');
			}
			else
			{
				a++;
				b--;
				ans1.pb('A');
			}
		}
		if(v[i][0]=='A' && v[i][1]=='C')
		{
			if(a!=0){
				a--;
				c++;
				ans1.pb('C');
			}
			else
			{
				a++;
				c--;
				ans1.pb('A');
			}
		}
		if(v[i][0]=='B' && v[i][1]=='C')
		{
			if(b==max(b,c))
			{
				b--;
				c++;
				ans1.pb('C');
			}
			else
			{
				b++;
				c--;
				ans1.pb('B');
			}
		}
		if(a<0 || b<0 || c<0)
			f1=1;
	}
	a=d;
	b=e;
	c=f;
	for(i=0;i<n;i++)
	{
		if(v[i][0]=='A' && v[i][1]=='B')
		{
			if(b!=0){
				b--;
				a++;
				ans2.pb('A');
			}
			else
			{
				a--;
				b++;
				ans2.pb('B');
			}
		}
		if(v[i][0]=='B' && v[i][1]=='C')
		{
			if(b!=0){
				b--;
				c++;
				ans2.pb('C');
			}
			else
			{
				b++;
				c--;
				ans2.pb('B');
			}
		}
		if(v[i][0]=='A' && v[i][1]=='C')
		{
			if(a==max(a,c))
			{
				a--;
				c++;
				ans2.pb('C');
			}
			else
			{
				a++;
				c--;
				ans2.pb('A');
			}
		}
		if(a<0 || b<0 || c<0)
			f2=1;
	}
	a=d;
	b=e;
	c=f;
	for(i=0;i<n;i++)
	{
		if(v[i][0]=='B' && v[i][1]=='C')
		{
			if(c!=0){
				c--;
				b++;
				ans3.pb('B');
			}
			else
			{
				c++;
				b--;
				ans3.pb('C');
			}
		}
		if(v[i][0]=='A' && v[i][1]=='C')
		{
			if(c!=0){
				c--;
				a++;
				ans3.pb('A');
			}
			else
			{
				c++;
				a--;
				ans3.pb('C');
			}
		}
		if(v[i][0]=='A' && v[i][1]=='B')
		{
			if(a==max(b,a))
			{
				a--;
				b++;
				ans3.pb('B');
			}
			else
			{
				a++;
				b--;
				ans3.pb('A');
			}
		}
		if(a<0 || b<0 || c<0)
			f3=1;
	}
	if(f1==0)
	{
		cout<<"Yes\n";
		for(i=0;i<ans1.size();i++)
			cout<<ans1[i]<<"\n";
		return 0;
	}
	else if(f2==0)
	{
		cout<<"Yes\n";
		for(i=0;i<ans2.size();i++)
			cout<<ans2[i]<<"\n";
		return 0;	
	}
	else if(f3==0)
	{
		cout<<"Yes\n";
		for(i=0;i<ans3.size();i++)
			cout<<ans3[i]<<"\n";
		return 0;
	}
	else
		cout<<"No";
}


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

import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

import atCoder.abc166.f.Main2.State;

public class Main {

	public static class State {
		int a;
		int b;
		int c;

		public State(int a, int b, int c) {
			super();
			this.a = a;
			this.b = b;
			this.c = c;
		}

	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();

		State init = new State(a, b, c);
		
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}
		
		List<String> result = new ArrayList<>();  
		dfs( result, s, 0,n, init );
		
		if( result.size()== n ) {
			System.out.println("Yes");
			for (int i = result.size() -1; i >=0; i--) {
				System.out.println(result.get(i));
			}
		}else {
			System.out.println("No");
			
		}

	}

	private static boolean dfs(List<String> result, String[] s, int i, int n, State init) {
		if( i==n )return true;
		
		boolean noob = false;;
		switch (s[i]) {
		case "AB":
			noob = tryQueue(result,s, i, n, init,1,-1,0 , "A") ||
			tryQueue(result,s, i, n, init,-1,1,0 , "B");
			break;
		case "AC":
			noob = 
			tryQueue(result,s, i, n, init,1,0,-1 , "A") ||  
			tryQueue(result,s, i, n, init,-1,0,1 , "C");
			break;
		case "BC":
			noob = 
			tryQueue(result,s, i, n, init,0,1,-1 , "B") ||
			tryQueue(result,s, i, n, init,0,-1,1 , "C");
			break;
		default:
			break;
		}	
		return noob;
	}

	private static boolean tryQueue(List<String> result, String[] s, int level, int n,  State init, int i, int j, int k, String dir) {
		int a = init.a + i;
		int b = init.b + j;
		int c = init.c + k;

		if (a < 0 || b < 0 || c < 0)
			return false;
		State e = new State( a, b, c);
		if( dfs(result, s, level+1, n, e) ) {
			result.add(dir);
			return true;
		};
		
		return false;
	}

}

Compiler output:
Main.java:7: error: package atCoder.abc166.f.Main2 does not exist
import atCoder.abc166.f.Main2.State;
                             ^
1 error
Language: C++


#include <bits/stdc++.h>
 
using namespace std;
#define int long long
#define pb(x) push_back(x)
#define fi first
#define se second
#define mp(x,y) make_pair(x,y)

/*struct comp
{
    bool operator()()
    {
        
    }
};*/
struct node
{
    int idx,a,b,c;
    node(int i,int A,int B,int C)
    {
        idx=i;a=A;b=B;c=C;
    }
};
int N,A,B,C;
vector<string> S;
vector<int>ANS;
bool flag=false;
//et<pair<int,pair<int,pair<int,int> > > >MAP;
void call(int idx,int a,int b,int c)
{
    //cout<<idx<<" "<<a<<" "<<b<<" "<<c<<endl; MAP;
    if(idx==N) {flag=true;return;}
   // pair<int,pair<int,pair<int,int> > > temp=mp(idx,mp(a,mp(b,c)));
    
    /*if(MAP.find(temp)!=MAP.end())
    {
        return;
    }*/
    if(S[idx]=="AB")
    {
        if(b>0)
        {
            ANS.pb(1);
            call(idx+1,a+1,b-1,c);
            if(flag) return;
            ANS.pop_back();
        }
        if(a>0)
        {
            ANS.pb(2);
            call(idx+1,a-1,b+1,c);
            if(flag) return;
            ANS.pop_back();
        }
    }
    
    else if(S[idx]=="BC")
    {
        if(c>0)
        {
            ANS.pb(1);
            call(idx+1,a,b+1,c-1);
            if(flag) return;
            ANS.pop_back();
        }
        if(b>0)
        {
            ANS.pb(2);
            call(idx+1,a,b-1,c+1);
            if(flag) return;
            ANS.pop_back();
        }
    }
    
    else if(S[idx]=="AC")
    {
        if(c>0)
        {
            ANS.pb(1);
            call(idx+1,a+1,b,c-1);
            if(flag) return;
            ANS.pop_back();
        }
        if(a>0)
        {
            ANS.pb(2);
            call(idx+1,a-1,b,c+1);
            if(flag) return;
            ANS.pop_back();
        }
    }
    //.insert(temp);
    return;
}
int32_t main() {
    int t=1;
    //cin>>t;
    while(t--)
    {
    
     cin>>N>>A>>B>>C;
     for(int i=0;i<N;i++)
     {
         string s;
         cin>>s;
         S.pb(s);
     }
     flag=false;
     call(0,A,B,C);
     if(flag==false) 
        {
            cout<<"No";return 0;
        }
    cout<<"Yes\n";
    for(int i=0;i<ANS.size();i++)
    {
        if(ANS[i]==1)
        {
            cout<<S[i][0]<<endl;
        }
        else
        {
            cout<<S[i][1]<<endl;
        }
    }
    

    }
    return 0;
}
ghn

Compiler output:
a.cc:133:1: error: 'ghn' does not name a type
  133 | ghn
      | ^~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
typedef long long li;
#define chmin(a,b) (a>(b)?a=(b),1:0)
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }

void printa(int a){
  printf("%c\n",a+'A');
}

void hand(vector<int>& v,const vector<int>& q,int& i){
  int n=q.size();
  int k=q[i],a1=(k+1)%3,a2=(k+2)%3;
  if(v[a1] < v[a2])swap(a1,a2);  // v[a1] >= v[a2]
  if(i==n-1) v[k]++;
  if(v[k]>0){
    printa(a2);
    v[a1]--; v[a2]++;
    return;
  }
  // v[k]==0, i!=n-1
  if(q[i]==q[i+1]){
    printa(a1);
    printa(a2);
    i++;
    return;
  }
  int a=3-k-q[i+1];
  printa(a);
  v[a]++;
  v[a1+a2-a]--;
  return;
}

int main(){
  vector<int> v(3);
  li n; cin >>n;
  rep(i,3){
    cin >>v[i]; chmin(v[i],2);
  }
  vector<int>  q(n);
  rep(i,n){
    string s; cin >>s;
    q[i]=3-(s[0]-'A')-(s[1]-'A');
  }

  int f=(!v[0])+(!v[1])+(!v[2]);  // 0の数
  if(f==3){  // all 0
    print("No");
    return 0;
  }
  if(f==1 and v[k]>0){
    print("No");
    return 0;
  }
  if(f<2 or v[0]+v[1]+v[2]>=2){
    print("Yes");
    rep(i,n){
      hand(v,q,i);
    }
    return 0;
  }
  
  // 0が1つ
  vector<int> ans;
  rep(i,n){
    int k=q[i],a1=(k+1)%3,a2=(k+2)%3;    
    if(v[a1] < v[a2])swap(a1,a2);  // v[a1] >= v[a2]
    if(v[a1]==0){
      print("No");
      return 0;
    } 
    ans.push_back(a2);
    v[a1]--; v[a2]++;
  }
  print("Yes");
  rep(i,n) printa(ans[i]);
    

}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:17: error: 'k' was not declared in this scope
   56 |   if(f==1 and v[k]>0){
      |                 ^
Language: C++

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

int n,a,b,c;
string s,ans;
vector <string> v;

// AB, AC, BC

string f(char choice)
{
	bool ok=true;
	int ta=a,tb=b,tc=c;
	string ans="";
	for(auto s:v)
	{
		if(choice=='C')
		{
			if(s[0]=='C')
			{
				if(c>0)
				{
					c--;
					if(s[1]=='A') a++,ans+="A";
					else b++,ans+="B";
				}
				else
				{
					c++;
					ans+="C";
					if(s[1]=='A') a--;
					else b--;
				}
			}
			else if(s[1]=='C')
			{	
				if(c>0)
				{
					c--;
					if(s[0]=='A') a++,ans+="A";
					else b++,ans+="B";
				}
				else
				{
					c++;
					ans+="C";
					if(s[0]=='A') a--;
					else b--;
				}
			}
			else
			{
				if(a>b) a--,b++,ans+="B";
				else a++,b--,ans+="A";
			}
		}
		else if(choice=='B')
		{
			if(s[0]=='B')
			{
				if(b>0)
				{
					b--;
					if(s[1]=='A') a++,ans+="A";
					else c++,ans+="C";
				}
				else
				{
					b++;
					ans+="B";
					if(s[1]=='A') a--;
					else c--;
				}
			}
			else if(s[1]=='B')
			{	
				if(b>0)
				{
					b--;
					if(s[0]=='A') a++,ans+="A";
					else c++,ans+="C";
				}
				else
				{
					b++;
					ans+="B";
					if(s[0]=='A') a--;
					else c--;
				}
			}
			else
			{
				if(a>c) a--,c++,ans+="B";
				else a++,c--,ans+="C";
			}
		}
		else if(choice=='A')
		{
			if(s[0]=='A')
			{
				if(a>0)
				{
					a--;
					if(s[1]=='B') b++,ans+="B";
					else c++,ans+="C";
				}
				else
				{
					a++;
					ans+="A";
					if(s[1]=='B') b--;
					else c--;
				}
			}
			else if(s[1]=='A')
			{	
				if(a>0)
				{
					a--;
					if(s[0]=='B') b++,ans+="B";
					else c++,ans+="C";
				}
				else
				{
					a++;
					ans+="A";
					if(s[0]=='B') b--;
					else c--;
				}
			}
			else
			{
				if(b>c) b--,c++,ans+="C";
				else b++,c--,ans+="B";
			}
		}
		if(min({a,b,c})<0) ok=false;
	}`
	a=ta,b=tb,c=tc;
	return ok?ans:"#";
}

int main()
{
	cin>>n>>a>>b>>c;
	while(n--)
	{
		cin>>s;
		v.push_back(s);
	}

	string ansa=f('A');
	string ansb=f('B');
	string ansc=f('C');
	if(ansa!="#") cout<<"Yes\n"<<ansa;
	else if(ansb!="#") cout<<"Yes\n"<<ansb;
	else if(ansc!="#") cout<<"Yes\n"<<ansc;
	else printf("No");
}

Compiler output:
a.cc:138:10: error: stray '`' in program
  138 |         }`
      |          ^
Language: C++

#include<iostream>
#include<queue>
#include<string>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<set>
#include<map>
#include<utility>
#include<vector>
#include<stack>
#include<sstream>
#include<algorithm>
using namespace std;
/****************************/
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
#define vpii vector<pair<int,int> >
#define qi queue<int>
#define mii map<int,int>
#define msi map<string,int>
#define vs vector<string>
#define vc vector<char>
/****************************/
#define rep(i,n) for(ll i=0;i<(n);i++)
#define rep2(i,n) for(ll i=(n)-1;i>=0;i--)
#define rep3(i,a,n) for(ll i=(a);i<(n);i++)
#define rep4(i,a,n) for(ll i=(a)-1;i>=n;i--)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define pi 3.1415926535897932384626433832795
#define zero(n) memset(n,0,sizeof(n));
#define SZ(n) n.size()
#define sn st.nd 
ll dx[4]={0,-1,0,1};
ll dy[4]={1,0,-1,0};
/****************************/
ll n,a,b,c;
string s[100010];
ll num[3];
ll cnt[3][2];
int d[3];
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>a>>b>>c;
	if(a+b+c<0)
	{
		cout<<"No";
		return 0;
	}
	d[0]=a;
	d[1]=b;
	d[2]=c;
	sort(d,d+3);
	c=d[0];
	b=d[1];
	a=d[2];
	zero(num);
	zero(cnt);
	rep(i,n)
	{
		cin>>s[i];
		if(s[i]=="AB") num[0]++;
		if(s[i]=="AC") num[1]++;
		if(s[i]=="BC") num[2]++;
	}
	ll t=num[0]+num[1];
	t=min(t,a);
	bool can=false;
	rep(i,t+1)
	{
		ll b2=b,c2=c;
		b2+=i,c2+=t-i;
		cnt[0][0]+=i;
		cnt[1][0]+=t-i;
		cnt[0][1]=num[0]-cnt[0][0];
		cnt[1][1]=num[1]-cnt[1][1];
		if(b2+num[2]<0||c2+num[2]<0||b2+c2<0) continue;
		else
		{
			can=true;
			cnt[2][0]=b2;
			cnt[2][1]=num[2]-cnt[2][0];
			break;
		}
	}
	if(!can)
	{
		cout<<"No";
		return 0;
	}
	else
	{
		cout<<"Yes";
	}
	rep(i,n)
	{
		if(s[i]=="AB")
		{
			if(cnt[0][0])
			{
				cout<<"B"<<endl;
				cnt[0][0]--;
				continue;
			}
			else
			{
				cout<<"A"<<endl;
				cnt[0][1]--;
				continue;
			}
		}
		else
		{
			if(s[i]=="AC")
			{
				if(cnt[1][0])
			{
				cout<<"C"<<endl;
				cnt[1][0]--;
				continue;
			}
			else
			{
				cout<<"A"<<endl;
				cnt[1][1]--;
				continue;
			}
			}
		}
		else
		{
			if(cnt[2][0])
			{
				cout<<"B"<<endl;
				cnt[2][0]--;
				continue;
			}
			else
			{
				cout<<"C"<<endl;
				cnt[2][1]--;
				continue;
			}
		}
	}
	return 0;
}

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

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repo(i,n) for(int i = 1; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
#define np next_permutation
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
//#define num 1000000007
#define pi acos(-1.0)
//cout << fixed << setprecision (20);   小数点以下2０桁まで
//intの最大値2147483647 ≒ 2×10^9
//long longの最大値9223372036854775807 ≒ 9×10^18
//'0'+=16;        で大文字に
//'大文字'+=32;    で小文字に
//s[i]-'0'でchar文字→int数に;
//string s = to_string(int数);
//int n = stoi(string文字列)
//実行時間制約2秒では２×10^8回くらいまで計算できる


int main() {
  int n,a,b,c;
  cin >> n>>a>>b>>c;
  
  vector<string> p(n);
  rep(i,n) {
  cin >>p(n);
  }
  
  if((a==0 && b==0 && p[0]=="AB")||(b==0 && c==0 && p[0]=="BC")||
    (b==0 && c==0 && p[0]=="BC")) { 
  cout << "No" << endl;    
  return 0;
  }
  
  
  cout << "Yes" << endl;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:33:10: error: no match for call to '(std::__debug::vector<std::__cxx11::basic_string<char> >) (int&)'
   33 |   cin >>p(n);
      |         ~^~~
Language: C

#include<stdio.h>

int main(void)
{
	unsigned long long int a, b, c, k, tab;
	int sum;
	char s[100000][2];
	char N[10000];
	char X, Y;
	int i;
	int check;

	scanf("%lld%lld%lld%lld", &k, &a, &b, &c);

	if ((a > 0) && (b > 0) && (c > 0)) {
		check = 1;
	}

	if ((a == 0) && (b == 0) && (c == 0)) {
		printf("No");
		return 0;
	}

	if (1 == a + b + c) {
		for (i + 0; i < k; i++) {
			scanf("%s", s[i]);
			if (s[i] == "AB") {
				if (a == b) {
					printf("No");
					return 0;
				}
				tab = a;
				a = b;
				b = tab;
			}
			if (s[i] == "BC") {
				if (c == b) {
					printf("No");
					return 0;
				}
				tab = b;
				b = c;
				c = tab;
			}
			if (s[i] == "AC") {
				if (a == c) {
					printf("No");
					return 0;
				}
				tab = a;
				a = c;
				c = tab;
			}
		}
	}

	printf("Yes\n");

	for (i = 0; i < k i++) {
		scanf("%s", s[i]);
		if (s[i] == "AB") {
			if (a > b) {
				printf("A\n");
				a--;
				b++;
			}
			else {
				printf("B\n");
				a++;
				b--;
			}
		}
		if (s[i] == "AC") {
			if (a > c) {
				printf("A\n");
				a--;
				c++;
			}
			else {
				printf("C\n");
				a++;
				c--;
			}
		}
		if (s[i] == "BC") {
			if (c > b) {
				printf("C\n");
				c--;
				b++;
			}
			else {
				printf("B\n");
				c++;
				b--;
			}
		}
	}
	

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:59:26: error: expected ';' before 'i'
   59 |         for (i = 0; i < k i++) {
      |                          ^~
      |                          ;
Language: C++

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

int main() {
  int N,A,B,C,l=0;
  cin >> N >> A >> B >> C;
  bool h = true;
  vector<int>ha(N);
  while(h){
    int ll=l;
    for(int i=0;i<N;i++){
      ha.at(i)=ll%2;
      ll/=2;
    }//２進数
    l++;
    for(int i=0;i++;i<N){
      string S;
      cin >> S;
      if(S=="AB"){
        if(ha.at(0))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:1: error: expected primary-expression before '}' token
   21 | }
      | ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:16:25: note: to match this '{'
   16 |     for(int i=0;i++;i<N){
      |                         ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:9:11: note: to match this '{'
    9 |   while(h){
      |           ^
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
typedef pair<int,int> pii;
typedef pair<long long, int> pli;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()

ll mod = 998244353;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n,a,b,c;
  cin >> n >> a >> b >> c;
  vector<string> q(n);
  vi AB,BC,AC;
  rep(i,n){
    cin >> q[i];
    if(q[i] == "AB")AB.push_back(i);
    if(q[i] == "BC")BC.push_back(i);
    if(q[i] == "AC")AC.push_back(i);
  }

  string ret = "Yes";
  string op = "";

  int pAB = 0,pBC = 0,pAC = 0;

  rep(i,n){
    if(q[i] == "AB"){
      if(a == 1 && b == 1){
        if(AC.size() >  pAC && AC[pAC] < BC[pBC]) || BC.size() == pBC){
          a++;b--;
          op += "A";
        }else{
          a--;b++;
          op += "B";
        }
      }else if(a == 0 && b == 0){
        ret = "No";
        break;
      }else if(a < b){
        a++;b--;
        op += "A";
      }else{
        a--;b++;
        op += "B";
      }
      pAB++;
    }else if(q[i] == "BC"){
      if(b == 1 && c == 1){
        if((AB.size() == pAB && AB[pAB] < AC[pAC]) || AC.size() == pAC){
          b++;c--;
          op += "B";
        }else{
          b--;c++;
          op += "C";
        }
      }else if(b == 0 && c == 0){
        ret = "No";
        break;
      }else if(b < c){
        b++;c--;
        op += "B";
      }else{
        b--;c++;
        op += "C";
      }
      pBC++;
    }else{
      if(a == 1 && c == 1){
        if((AB.size() > pAB && AB[pAB] < BC[pBC]) || BC.size() == pBC){
          a++;c--;
          op += "A";
        }else{
          a--;c++;
          op += "C";
        }
      }else if(a == 0 && c == 0){
        ret = "No";
        break;
      }else if(a < c){
        a++;c--;
        op += "A";
      }else{
        a--;c++;
        op += "C";
      }
      pAC++;
    }
  }

  cout << ret << endl;

  if(ret == "Yes")rep(i,n)cout << op[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:51: error: expected primary-expression before '||' token
   40 |         if(AC.size() >  pAC && AC[pAC] < BC[pBC]) || BC.size() == pBC){
      |                                                   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;

#define rep(i, n) for(int i=0;i<(int)n;i++)
#define rep2(i, s, n) for(int i=(s);i<(int)n;i++)
int INF=1e9+7;

int main() {
  int N,A,B,C;
  cin >> N >> A >> B >> C;
  string s[N];
  rep(i,N) cin >> s[i];
  int Ac=0,Bc=0,Cc=0,ABc=0,BCc=0,ACc=0;
  bool flag=true;
  vector<int> ABt,BCt,CAt,At,Bt,Ct;
  vector<char> c(N);
  rep(i,N) {
    if(s[i]=="AB") {
      ABt.push_back(i);
      ABc++;
      A--;B--;
      if(A<0) {
        if(ABc-Bc>0||ACc-Cc>0) {
          A+=2;
          if(ABc-Bc>0) c[ABt[Ac]]='A';
          else c[ACt[Ac]]='A';
          Ac++;
          At.push_back(i);
        } else {
          flag=false;
          break;
        }
      }
      if(B<0) {
        if(BCc-Cc>0||ABc-Ac>0) {
          B+=2;
          if(BCc-Cc>0) c[BCt[Bc]]='B';
          else c[ABt[Bc]]='B';
          Bc++;
          Bt.push_back(i);
        } else {
          flag=false;
          break;
        }
      }
    }
    if(s[i]=="BC") {
      BCt.push_back(i);
      BCc++;
      B--;C--;
      if(B<0) {
        if(BCc-Cc>0||ABc-Ac>0) {
          B+=2;
          if(BCc-Cc>0) c[BCt[Bc]]='B';
          else c[ABt[Bc]]='B';
          Bc++;
          Bt.push_back(i);
        } else {
          flag=false;
          break;
        }
      }
      if(C<0) {
        if(ACc-Ac>0||BCc-Bc>0) {
          C+=2;
          if(ACc-Ac>0) c[ACt[Cc]]='C';
          else c[BCt[Cc]]='C';
          Cc++;
          Ct.push_back(i);
        } else {
          flag=false;
          break;
        }
      }
    }
    if(s[i]=="AC") {
      ACt.push_back(i);
      ACc++;
      A--;C--;
      if(A<0) {
        if(ABc-Bc>0||ACc-Cc>0) {
          At.push_back(i);
          A+=2;
          if(ABc-Bc>0) c[ABt[Ac]]='A';
          else c[ACt[Ac]]='A';
          Ac++;
        } else {
          flag=false;
          break;
        }
      }
      if(C<0) {
        if(ACc-Ac>0||BCc-Bc>0) {
          Ct.push_back(i);
          C+=2;
          if(ACc-Ac>0) c[ACt[Cc]]='C';
          else c[BCt[Cc]]='C';
          Cc++;
        } else {
          flag=false;
          break;
        }
      }
    }
  }
  if(!flag) cout << "No" << endl;
  else {
    cout << "Yes" << endl;
    rep(i,N) cout << c[i] << endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:28:18: error: 'ACt' was not declared in this scope; did you mean 'Ct'?
   28 |           else c[ACt[Ac]]='A';
      |                  ^~~
      |                  Ct
a.cc:68:26: error: 'ACt' was not declared in this scope; did you mean 'Ct'?
   68 |           if(ACc-Ac>0) c[ACt[Cc]]='C';
      |                          ^~~
      |                          Ct
a.cc:79:7: error: 'ACt' was not declared in this scope; did you mean 'Ct'?
   79 |       ACt.push_back(i);
      |       ^~~
      |       Ct
Language: C++

#include <iostream>
#include <string>
using namespace std; 
int main() {
  string op; 
  long long n, a, b, c, g = 0; 
  cin >> n >> a >> b >> c; 
  char tableau[100000]; 
  for (long  i= 0; i < n; i ++) {
    cin >> op; 
    if (op == "AB") {
    	if (a > b) {
          b ++; 
          a--; 
          tableau[g] = 'B';  
        }
        else {
          a ++; 
          b --; 
          tableau[g] = 'A'; 
        }
    }
    else if (op == "BC") {
    	if (b > c) {
          c ++; 
          b --; 
          tableau[g] = 'C';  
        }
        else {
          b ++; 
          c --; 
          tableau[g] = 'B';  
        }
    }
    else {
    	if (a > c) {
          c ++; 
          a--; 
          tableau[g] = 'C'; 
        }
        else {
          a ++; 
          c --; 
          tableau[g] = 'A'; 
        }
    }
    if ((a < 0) || (b < 0) || (c < 0)) {
    	cout << "No" << endl; 
        return; 
  	}
    g ++; 
  }
  cout << "Yes" << endl; 
  for (long  i = 0; i < g; i ++) {
    cout << tableau[i] << endl; 
  }
  return 0; 
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int n,a,b,c;
  cin >> n >> a >> b >> c;
  vector<string> s(n);
  rep(i,n){
    cin >> s.at(i);
  }
  string s="No";
  vector<char> ans(n);
  rep(i,n){
    if(s.at(i)=="AB"){
      if(a>=b){
        a--;
        b++;
        ans.at(i)='B';
        if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
    }else{
        b--;
        a++;
        ans.at(i)='A';
        if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
      }
    }
     if(s.at(i)=="AC"){
        if(a>=c){
        a--;
        c++;
         ans.at(i)='C';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
    }else{
        c--;
        a++;
         ans.at(i)='A';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
        }
     }
      
     if(s.at(i)=="BC"){
        if(a>=b){
        a--;
        b++;
        ans.at(i)='B';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
    }else{
        b--;
        a++;
         ans.at(i)='C';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
        }
     }
  }
  cout << "Yes"<<endl;
  rep(i,n){
    cout << ans.at(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: conflicting declaration 'std::string s'
   11 |   string s="No";
      |          ^
a.cc:7:18: note: previous declaration as 'std::vector<std::__cxx11::basic_string<char> > s'
    7 |   vector<string> s(n);
      |                  ^
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define rando mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define fi first
#define se second
#define debug(x) cerr << " - " << #x << ": " << x << endl;
#define debugs(x, y) cerr << " - " << #x << ": " << x << " " << #y << ": " << y << endl;
#define debugii(x) cerr << " - " << #x << ": " << x.fi<<","<<x.se << endl;
#define sep() cerr << "--------------------" << endl;
#define all(x) (x).begin(),(x).end()
#define sz(x) (ll)x.size()
#define ld long double
#define ll long long
//#define int ll
#define ii pair<int,int>
#define v vector<int>
#define vii vector<ii>
#define vv vector<vector<int> >
#define mp make_pair
#define INF 1000000000
#define pb push_back
#define EPS 1e-9
const int MOD = 1000000007; // 998244353
string tab[100005];
bool ans[2][100005];
int32_t main(){
	boost;
	rando;
	clock_t tt = clock();
	//freopen(".in","r",stdin);
	int n,a,b,c;
	cin>>n>>a>>b>>c;
	for (int i = 0; i < n; ++i)
		cin>>tab[i];
	while (1) {
		int A=a,B=b,C=c;
		bool f=1;
		for (int i = 0; i < n; ++i)
		{
			ans[0][i]=ans[1][i]=0;
			if(tab[i]=="AB"){
				if(!B&&!A){
					f=0;break;
				}
				if(!B)B++,A--,ans[1][i]=1;
				else if(!A)A++,B--,ans[0][i]=1;
				else{
					if(rng()&1)B++,A--,ans[1][i]=1;
					else A++,B--,ans[0][i]=1;
				}
			}
			else if(tab[i]=="AC"){
				if(!C&&!A){
					f=0;break;
				}
				if(!C)C++,A--,ans[1][i]=1;
				else if(!A)A++,C--,ans[0][i]=1;
				else{
					if(rng()&1)C++,A--,ans[1][i]=1;
					else A++,C--,ans[0][i]=1;
				}
			}
			else{
				if(!C&&!B){
					f=0;break;
				}
				if(!C)C++,B--,ans[1][i]=1;
				else if(!B)B++,C--,ans[0][i]=1;
				else{
					if(rng()&1)C++,B--,ans[1][i]=1;
					else B++,C--,ans[0][i]=1;
				}
			}
		}
		if(f){
			cout<<"Yes\n";
			for (int i = 0; i < n; ++i)
			{
				if(ans[0][i])cout<<tab[i][0]<<"\n";
				else cout<<tab[i][1]<<"\n";
			}
			return 0;
		}
		clock_t z = clock() - tt;
		if ((double)z / CLOCKS_PER_SEC > 1.95)break;
	}
	cout<<"No\n";
	return 0;
}
//long long
//array bounds
//special cases
//binary search

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C++

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

int main() {
	int N,a,b,c;
	cin >> N >> a>> b >>c;
	vector<string>S(N);
	vector<char>L;
	int flag = 0;
	for(int i=0;i<N;i++){
		cin >> S.at(i);
	}
	if(a+b+c==0){
		cout << "No" << endl;
	}
	if(a+b+c>=1){
		for(int i=0;i<N;i++){
			if(S.at(i) == "AB"){
				if(a==0 && b == 0){
					cout << "No" << endl;
					flag = 1;
					break;
				}
				else if(a==1 && b==1){
					if(S.at(i+1)=="AC"){
						a++;
						b--;
						L.push_back('A');
					}
					else if(S.at(i+1)=="BC"){
						a--;
						b++;
						L.push_back('B');
					}
					else{
						a++;
						b--;
						L.push_back('A');
					}

				}
				else{
					if(a>b){
						a--;
						b++;
						L.push_back('B');
					}
					else{
						a++:
						b--;
						L.push_back('A');
					}

				}
			}
			if(S.at(i) == "BC"){
				if(b==0 && c == 0){
					cout << "No" << endl;
					flag =1;
					break;
				}
				else if(b==1 && c==1){
					if(S.at(i+1)=="AC"){
						c++;
						b--;
						L.push_back('C');
					}
					else if(S.at(i+1)=="AB"){
						c--;
						b++;
						L.push_back('B');
					}
					else{
						c++;
						b--;
						L.push_back('C');
					}

				}
				else{
					if(c>b){
						c--;
						b++;
						L.push_back('B');
					}
					else{
						c++:
						b--;
						L.push_back('C');
					}

				}
			}
			if(S.at(i) == "AC"){
				if(a==0 && c == 0){
					cout << "No" << endl;
					flag = 1;
					break;
				}
				else if(a==1 && c==1){
					if(S.at(i+1)=="AB"){
						a++;
						c--;
						L.push_back('A');
					}
					else if(S.at(i+1)=="BC"){
						a--;
						c++;
						L.push_back('C');
					}
					else{
						a++;
						c--;
						L.push_back('A');
					}

				}
				else{
					if(a>c){
						a--;
						c++;
						L.push_back('C');
					}
					else{
						a++:
						c--;
						L.push_back('A');
						
					}

				}
			}
		}
		if(flag == 1){
			break;
		}
		cout << "Yes" << endl;
	}
	for(int i=0;i<L.size();i++){
		cout << L.at(i) << endl;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:52: error: expected ';' before ':' token
   49 |                                                 a++:
      |                                                    ^
      |                                                    ;
a.cc:87:52: error: expected ';' before ':' token
   87 |                                                 c++:
      |                                                    ^
      |                                                    ;
a.cc:125:52: error: expected ';' before ':' token
  125 |                                                 a++:
      |                                                    ^
      |                                                    ;
a.cc:135:25: error: break statement not within loop or switch
  135 |                         break;
      |                         ^~~~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repo(i,n) for(int i = 1; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
#define np next_permutation
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
//#define num 1000000007
#define pi acos(-1.0)
//cout << fixed << setprecision (20);   小数点以下2０桁まで
//intの最大値2147483647 ≒ 2×10^9
//long longの最大値9223372036854775807 ≒ 9×10^18
//'0'+=16;        で大文字に
//'大文字'+=32;    で小文字に
//s[i]-'0'でchar文字→int数に;
//string s = to_string(int数);
//int n = stoi(string文字列)
//実行時間制約2秒では２×10^8回くらいまで計算できる


int main() {
  int n,a,b,c;
  cin >> n>>a>>b>>c;
  
  vector<string> p(n):
  rep(i,n) {
  cin >>p(n);
  }
  
  if((a==0 && b==0 && p[0]=="AB")||(b==0 && c==0 && p[0]=="BC")||
    (b==0 && c==0 && p[0]=="BC")) { 
  cout << "No" << endl;    
  return 0;
  }
  
  
  cout << "Yes" << endl;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:31:22: error: expected ',' or ';' before ':' token
   31 |   vector<string> p(n):
      |                      ^
a.cc:32:7: error: 'i' was not declared in this scope
   32 |   rep(i,n) {
      |       ^
a.cc:6:33: note: in definition of macro 'rep'
    6 | #define rep(i,n) for(int i = 0; i < (int)(n); i++)
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int n,a,b,c;
  cin >> n >> a >> b >> c;
  vector<string> s(n);
  rep(i,n){
    cin >> s.at(i);
  }
  string s="No";
  vector<char> ans(n);
  rep(i,n){
    if(s.at(i)="AB"){
      if(a>=b){
        a--;
        b++;
        ans.at(i)='B';
        if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
    }else{
        b--;
        a++;
        ans.at(i)='A';
        if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
      }
    }
     if(s.at(i)="AC"){
        if(a>=c){
        a--;
        c++;
         ans.at(i)='C';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
    }else{
        c--;
        a++;
         ans.at(i)='A';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
        }
     }
      
     if(s.at(i)="BC"){
        if(a>=b){
        a--;
        b++;
        ans.at(i)='B';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
    }else{
        b--;
        a++;
         ans.at(i)='C';
          if(a<0 || b<0 || c <0){ 
    cout << "No";
    return 0;
  }
        }
     }
  }
  cout << "Yes"<<endl;
  rep(i,n){
    cout << ans.at(i) << endl;
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: conflicting declaration 'std::string s'
   11 |   string s="No";
      |          ^
a.cc:7:18: note: previous declaration as 'std::vector<std::__cxx11::basic_string<char> > s'
    7 |   vector<string> s(n);
      |                  ^
a.cc:14:15: error: could not convert '(& s.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"AB"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |     if(s.at(i)="AB"){
      |        ~~~~~~~^~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:33:16: error: could not convert '(& s.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"AC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   33 |      if(s.at(i)="AC"){
      |         ~~~~~~~^~~~~
      |                |
      |                std::__cxx11::basic_string<char>
a.cc:53:16: error: could not convert '(& s.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=(((const char*)"BC"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   53 |      if(s.at(i)="BC"){
      |         ~~~~~~~^~~~~
      |                |
      |                std::__cxx11::basic_string<char>
Language: C++

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

#define pb push_back
#define mp make_pair

const int MOD = 1e9+7;
const int MAX_N=1e5+10;

int N;
ll A,B,C;
string s[MAX_N];

void solve()
{
	vector<char> ans;
	for(int i=0;i<N;++i){
		if(s[i]=="AC"){
			if(A<=C){
				A++, C--;
				if(A>=0 && C>=0) ans.pb('A');
				else{
					A-=2,C+=2;
					if(A>=0 && C>=0) ans.pb('C');
					else{
						cout << "No\n";
						return;
					}
				}
			}else{
				A--, C++;
				if(A>=0 && C>=0) ans.pb('C');
				else{
				}
					A+=2,C-=2;
					if(A>=0&&C>=0) ans.pb('A');
					else{
						cout << "No\n";
						return;
					}
				}
			}
		}else if(s[i]=="AB"){
			if(A<=B){
				A++, B--;
				if(A>=0 && B>=0) ans.pb('A');
				else{
					A-=2,B+=2;
					if(A>=0 && B>=0) ans.pb('B');
					else{
						cout << "No\n";
						return;
					}
				}
			}else{
				A--, B++;
				if(A>=0 && B>=0) ans.pb('B');
				else{
				}
					A+=2,B-=2;
					if(A>=0&&B>=0) ans.pb('A');
					else{
						cout << "No\n";
						return;
					}
				}
			}
		}else{
			if(B<=C){
				B++, C--;
				if(B>=0 && C>=0) ans.pb('B');
				else{
					B-=2,C+=2;
					if(B>=0 && C>=0) ans.pb('C');
					else{
						cout << "No\n";
						return;
					}
				}
			}else{
				B--, C++;
				if(B>=0 && C>=0) ans.pb('C');
				else{
				}
					B+=2,C-=2;
					if(B>=0&&C>=0) ans.pb('B');
					else{
						cout << "No\n";
						return;
					}
				}
			}		
		}
	}
	cout << "Yes\n";
	for(char c : ans) cout << c << '\n';
}

int main()
{
	ios::sync_with_stdio(false);
	cin >> N >> A >> B >> C;
	for(int i=0;i<N;++i) cin >> s[i];
	solve();
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:44:18: error: 'else' without a previous 'if'
   44 |                 }else if(s[i]=="AB"){
      |                  ^~~~
a.cc:44:28: error: 'i' was not declared in this scope
   44 |                 }else if(s[i]=="AB"){
      |                            ^
a.cc: At global scope:
a.cc:69:18: error: expected unqualified-id before 'else'
   69 |                 }else{
      |                  ^~~~
a.cc:94:17: error: expected declaration before '}' token
   94 |                 }
      |                 ^
a.cc:95:9: error: expected declaration before '}' token
   95 |         }
      |         ^
a.cc:96:9: error: 'cout' does not name a type
   96 |         cout << "Yes\n";
      |         ^~~~
a.cc:97:9: error: expected unqualified-id before 'for'
   97 |         for(char c : ans) cout << c << '\n';
      |         ^~~
a.cc:98:1: error: expected declaration before '}' token
   98 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std; 
int main() {
  string op; 
  long n, a, b, c, g = 0; 
  cin >> n >> a >> b >> c; 
  char tableau[200000]; 
  for (long i= 0; i < n; i ++) {
    cin >> op; 
    if (op == "AB") {
    	if (a > b) {
          b ++; 
          a--; 
          tableau[g] = 'B';  
        }
        else {
          a ++; 
          b --; 
          tableau[g] = 'A'; 
        }
    }
    else if (op == "BC") {
    	if (b > c) {
          c ++; 
          b --; 
          tableau[g] = 'C';  
        }
        else {
          b ++; 
          c --; 
          tableau[g] = 'B';  
        }
    }
    else {
    	if (a > c) {
          c ++; 
          a--; 
          tableau[g] = 'C'; 
        }
        else {
          a ++; 
          c --; 
          tableau[g] = 'A'; 
        }
    }
    if ((a < 0) || (b < 0) || (c < 0)) {
    	cout << "No" << endl; 
        return; 
  	}
    g ++; 
  }
  cout << "Yes" << endl; 
  for (long i = 0; i < g; i ++) {
    cout << tableau[i] << endl; 
  }
  return 0; 
}

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

#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long MOD = 1e9 + 7, MAX = 1e18, larg = 1e5, INF = -1e9;
long long A, B, C, D, E, F, G, H, I, J, K, L, N, M, O, P, Q, R, S, T, U, V, W;
typedef long long ll;
typedef pair<ll, ll> Pa;

map<char, int> state;
int main()
{
	cin >> N >> A >> B >> C;
	vector<char> ans;
	if (A < 2) state['A'] = A;
	else state['A'] = 2;	
	if (B < 2) state['B'] = B;
	else state['B'] = 2;	
	if (C < 2) state['C'] = C;
	else state['C'] = 2;
	rep(i, N) {
		string s;
		cin >> s;
		if (s == "AB") {
			if (state['A'] < state['B']) {
				state['A']++;
				state['B']--;
				ans.push_back('A');
			}
			else {
				state['B']++;
				state['A']--;
				ans.push_back('B');
			}
		}else if (s == "AC") {
			if (state['A'] < state['C']) {
				state['A']++;
				state['C']--;
				ans.push_back('A');
			}
			else {
				state['C']++;
				state['A']--;
				ans.push_back('C');
			}
		}else if (s == "BC") {
			if (state['B'] < state['C']) {
				state['B']++;
				state['C']--;
				ans.push_back('B');
			}
			else {
				state['C']++;
				state['B']--;
				ans.push_back('C');
			}
		}
	}
	cout < < "Yes" << endl;
	rep(i, N) {
		cout << ans[i];
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:16: error: expected primary-expression before '<' token
   58 |         cout < < "Yes" << endl;
      |                ^
a.cc:58:24: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   58 |         cout < < "Yes" << endl;
      |                  ~~~~~~^~~~~~~
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long a = sc.nextLong();
		long b = sc.nextLong();
        long c = sc.nextLong();
        long d = a+b;
        long e = b+c;
        long f = c+a;
        String jud = "Yes";
        String [] que = new String [n];
        String [] ans = new String [n];
        for(int i=0;i<n;i++){que[i] = sc.next();
                             if(que[i].equals("AB")){d--;}
                             if(que[i].equals("BC")){e--;}
                             if(que[i].equals("AC")){f--;}
        } 
         for(int i=0;i<n;i++){
                             if(que[i].equals("AB")){if(a+b<=1){jud = "No";break;}
                                                    if(f>e){a--;f--;b++;e++;ans[i]="B";}
                                                    else{if(f<e){b--;e--;a++;f++;ans[i]="A";}
                                                        else{if(a>b){a--;f--;b++;e++;ans[i]="B";}
                                                            else{b--;e--;a++;f++;ans[i]="A";}}}
                                                    }
                             if(que[i].equals("BC")){if(b+c<=1){jud = "No";break;}
                                                     if(f>d){c--;f--;b++;d++;ans[i]="B";}
                                                    else{if(f<d){b--;d--;c++;f++;ans[i]="C";}
                                                        else{if(b>c){c++;f++;b--;d--;ans[i]="C";}
                                                            else{b++;e++;c--;f--;ans[i]="B";}}}
                                                    }
                             if(que[i].equals("AC")){if(c+a<=1){jud = "No";break;}
                                                     if(d>e){a--;d--;c++;e++;ans[i]="C";}
                                                    else{if(d<e){c--;e--;a++;d++;ans[i]="A";}
                                                        else{if(c>a){a++;d++;c--;e--;ans[i]="A";}
                                                            else{a--;d--;c++;e++;ans[i]="C";}}}
                                                    }
                             }
		System.out.println(jud);
           if(jud.equals("Yes"){for(int i=0;i<n;i++){System.out.println(ans[i]);}
                               }
	}
}

Compiler output:
Main.java:41: error: ')' expected
           if(jud.equals("Yes"){for(int i=0;i<n;i++){System.out.println(ans[i]);}
                               ^
1 error