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

#define _USE_NATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
#include <random>
#include <tuple>


using namespace std;
#define REP (i,m,n) for(int i=( int)m ; i < (int ) n ; ++i )
#define rep (i,n) REP(i,0,n)
using ll = long long;
#define EPS 1e-9
const int INF = 1050000000;
const long long LINF = 1LL << 60;
const ll MOD = 1e9 + 7;
const int MINF = -1050000000;

template<class T> inline bool chmax(T & a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T & a, T b) { if (a > b) { a = b; return true; } return false; }

int main() {
                 int n, a, b;
                cin >> n >> a >> b;
                 string s;
                cin >> s;
                 int now = 0, kaigai = 0;

                 for(int i =0; i<s.size();i++;) {
                                 if(s[ i] == 'a') {
                                                 if (now < a + b) {
                                                                now++;
                                                                cout << "Yes" << endl;
                                                                 continue;
                                                }
                                }
                                 else if (s[i] == 'b'){
                                                 if (now < a + b && kaigai < b) {
                                                                now++;
                                                                kaigai++;
                                                                cout << "Yes" << endl;
                                                                 continue;
                                                }
                                }
                                cout << "No" << endl;
                }
                 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:46: error: expected ')' before ';' token
   48 |                  for(int i =0; i<s.size();i++;) {
      |                     ~                        ^
      |                                              )
a.cc:48:47: error: expected primary-expression before ')' token
   48 |                  for(int i =0; i<s.size();i++;) {
      |                                               ^
Language: C++

#define _USE_NATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
#include <random>
#include <tuple>


using namespace std;
#define REP (i,m,n) for(int i=( int)m ; i < (int ) n ; ++i )
#define rep (i,n) REP(i,0,n)
using ll = long long;
#define EPS 1e-9
const int INF = 1050000000;
const long long LINF = 1LL << 60;
const ll MOD = 1e9 + 7;
const int MINF = -1050000000;

template<class T> inline bool chmax(T & a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T & a, T b) { if (a > b) { a = b; return true; } return false; }

int main() {
                 int n, a, b;
                cin >> n >> a >> b;
                 string s;
                cin >> s;
                 int now = 0, kaigai = 0;

                 rep(i, s.size()) {
                                 if(s[ i] == 'a') {
                                                 if (now < a + b) {
                                                                now++;
                                                                cout << "Yes" << endl;
                                                                 continue;
                                                }
                                }
                                 else if (s[i] == 'b'){
                                                 if (now < a + b && kaigai < b) {
                                                                now++;
                                                                kaigai++;
                                                                cout << "Yes" << endl;
                                                                 continue;
                                                }
                                }
                                cout << "No" << endl;
                }
                 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:14: error: 'i' was not declared in this scope
   30 | #define rep (i,n) REP(i,0,n)
      |              ^
a.cc:48:18: note: in expansion of macro 'rep'
   48 |                  rep(i, s.size()) {
      |                  ^~~
a.cc:29:16: error: 'm' was not declared in this scope
   29 | #define REP (i,m,n) for(int i=( int)m ; i < (int ) n ; ++i )
      |                ^
a.cc:30:19: note: in expansion of macro 'REP'
   30 | #define rep (i,n) REP(i,0,n)
      |                   ^~~
a.cc:48:18: note: in expansion of macro 'rep'
   48 |                  rep(i, s.size()) {
      |                  ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define REP(i, d, n) for(int i=(d); i<(n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
using P = pair<int, int>;

int main() {
	
  int n, a, b;
  string s;
  cin >> >> n >> a >> b >> s;
  
  int cnt = 0;
  rep(i, n){
    if(s[i] == 'a'){
      if(cnt < a+b){
		cnt++;
        cout << "Yes" << endl;
      }
      else{
		cout << "Yes" << endl;
      }
    }
    else if(s[i] == 'b'){
      if(i+1 <= b && cnt < a+b){
		cnt++;
        cout << "Yes" << endl;
      }
      else{
		cout << "Yes" << endl;
      }
    }
    else{
	  cout << "Yes" << endl;
    }
  }
	
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: expected primary-expression before '>>' token
   13 |   cin >> >> n >> a >> b >> s;
      |          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,A,B;
  cin >> N >> A >> B;
  int pp = 0; fp = 0;
  char c;
  for (int i = 0; i < N; i++){
    cin >> c;
    if (c = 'a'){
      if (pp < A + B){
        cout << "Yes" << endl;
        pp++;
      } else {
        cout << "No" << endl;
      }
    }
    if (c = 'b'){
      if (pp < A + B && fp < B){
        cout << "Yes" << endl;
        pp++;
        fp++;
      } else {
        cout << "No" << endl;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'fp' was not declared in this scope; did you mean 'pp'?
    6 |   int pp = 0; fp = 0;
      |               ^~
      |               pp
Language: C++

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

int main() {
  int n, a, b;
  string str;
  cin >> n >> a >> b >> str;
  int tmp = 0;
  int foreign = 0;
  for (int i = 0; i < n; i++) {
    string ans;
    if (str.at(i) == 'a') {
      if (tmp < a+b) {
        tmp++;
        ans = "Yes";
      } else {
        ans = "No";
      }
    } else if (str.at(i) == 'b') {
      foreing++;
      if (tmp < a+b) {
        if (foreing <= b) {
          tmp++;
          ans = "Yes";
        } else {
          ans = "No";
        }
      } else {
        ans = "No";
      }
    } else {
      ans = "No";
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: 'foreing' was not declared in this scope; did you mean 'foreign'?
   20 |       foreing++;
      |       ^~~~~~~
      |       foreign
Language: C++

#include<bits/stdc++.h>
using namespace std;
signed main(){
  int a,b,n=0,d;
  string c;
  cin>>a>>b>>d
  cin>>c;
  for(int i=0;i<c.size();i++){
    if(c[i]=='c') cout<<"No";
    else{
      if(c[i]=='b'&&i<=d){
        if(n<=b+d){
          n++;
          cout<<"Yes";
        }
        else cout<<"No";
      }
      else{
        if(n<=b+d){
          n++;
          cout<<"Yes";
        }
        else cout<<"No";
      }
    }
  }
  cout<<"\n";}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'cin'
    6 |   cin>>a>>b>>d
      |               ^
      |               ;
    7 |   cin>>c;
      |   ~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define INF 1e9
#define rep(i, n) for(int i = 0; i < n; i++)
#define ALL(x) (x).begin(), (x).end()  //昇順
#define RALL(x) (x).rbegin(), (x).rend() // 降順
const long long mod = 1e9+7;
typedef priority_queue<int> PQ;
typedef vector<long long> VL;
typedef vector<bool> VB;
typedef vector<int> VI;  // VI a(n);
typedef vector<string> VS;  
typedef vector<char> VC; 
typedef vector<VS> VSS;
typedef vector<VC> VCC;    
typedef vector<VI> VII;   // VII a(n,vector<int>(m)) n * m 
typedef vector<VL> VLL;
typedef pair<int, int> PII;
typedef map<int, int> MP;   //MP a;
typedef vector<pair<int, int> > PS;
typedef long long ll;  //ll とdoubleは違う
template <class T>  // chmax(max, a);
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T> //chmin(min,a)
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
template<typename T>   // operator << (cout,a);
ostream& operator << (ostream& os, vector<T>& v) {
    os << "{";
    rep(i, (int)v.size()) { os << v[i] << (i < v.size() - 1 ? ", " : ""); }
    os << "}";
    return os;
}
template<typename T>
bool all_same(vector<T> v1,vector<T> v2)
{
    sort(ALL(v1));
    sort(ALL(v2),greater<T>());
    return v1 == v2;
}
   
// g++ -std=c++11 prac.cpp
ll Max=-1e9,Min=1e9+1;

int main(){
    ll a,b,d,x=0,y=0,z,n,m,k,lank=1,w,sum=0,sum2=0,ans=0;
    string s,t;
    bool ok=true;
    cin >> s;   
    t = ""
    rep(i,s.size()){
        if(s[i]=='a'){
            if(a+b>sum){
                sum++;
                cout << "Yes" << endl;
            }
            else{
                cout << "No" << endl;
            }
        }
        else if(s[i] == 'b'){
            if((a+b > sum) && lank <= b){
                lank++;
                sum++;
                cout << "Yes" << endl;
            }
            else{
                cout << "No" << endl;
            }

        }
        else{
            cout << "No" << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:11: error: expected ';' before 'for'
   65 |     t = ""
      |           ^
      |           ;
a.cc:66:9: error: 'i' was not declared in this scope
   66 |     rep(i,s.size()){
      |         ^
a.cc:4:34: note: in definition of macro 'rep'
    4 | #define rep(i, n) for(int i = 0; i < n; i++)
      |                                  ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
  int n = 0, a = 0, b = 0;
  cin >> n >> a >> b;
  string s = "";
  cin >> s;
  int ab = 0, bb = 0;
  for (int i=0; i<n; i++) {
    if (s.at(i) == 'a') {
      if (aa < a + b) {
        cout << "Yes" << endl;
        aa++;
      } else {
        cout << "No" << endl;
      }
    } else if (s.at(i) == 'b') {
      if (aa < a + b && bb < b) {
        cout << "Yes" << endl;
        aa++; bb++;
      } else {
        cout << "No" << endl;
      }
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'aa' was not declared in this scope; did you mean 'ab'?
   14 |       if (aa < a + b) {
      |           ^~
      |           ab
a.cc:21:11: error: 'aa' was not declared in this scope; did you mean 'ab'?
   21 |       if (aa < a + b && bb < b) {
      |           ^~
      |           ab
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
  int n = 0, a = 0, b = 0;
  cin >> n >> a >> b;
  string s = "";
  cin >> s;
  int ab = 0; bb = 0;
  for (int i=0; i<n; i++) {
    if (s.at(i) == 'a') {
      if (aa < a + b) {
        cout << "Yes" << endl;
        aa++;
      } else {
        cout << "No" << endl;
      }
    } else if (s.at(i) == 'b') {
      if (aa < a + b && bb < b) {
        cout << "Yes" << endl;
        aa++; bb++;
      } else {
        cout << "No" << endl;
      }
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'bb' was not declared in this scope; did you mean 'ab'?
   11 |   int ab = 0; bb = 0;
      |               ^~
      |               ab
a.cc:14:11: error: 'aa' was not declared in this scope; did you mean 'ab'?
   14 |       if (aa < a + b) {
      |           ^~
      |           ab
a.cc:21:11: error: 'aa' was not declared in this scope; did you mean 'ab'?
   21 |       if (aa < a + b && bb < b) {
      |           ^~
      |           ab
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl; 
#define INF 1000000000
#define mod 1000000007
typedef long long ll;
const ll LINF = 1001002003004005006ll;
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    int n,a,b;cin>>n>>a>>;
    string s;cin>>s;
    int A=0,B=0;
    for(auto x:s){
        if(x=='c'){
            cout<<"No"<<endl;
        }
        else if(x=='a'){
            if(A+B<a+b) cout<<"Yes"<<endl;
            else cout<<"No"<<endl;
            A++;
        }
        else{
            if(A+B<a+b&&b<B) cout<<"Yes"<<endl;
            else cout<<"No"<<endl;
            B++;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: expected primary-expression before ';' token
   20 |     int n,a,b;cin>>n>>a>>;
      |                          ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int A = sc.nextInt();
    int B = sc.nextInt();
    String S = sc.next();
    
    int pass = 0;
    int bRank = 0;
    for (int i = 0; i < N; i++) {
      char c = S.charAt(i);
      boolean ans = false;
      if (c == a && pass < A+B) {
        pass++;
        ans = true;
      } else if (c == b) {
        bRank++;
        if (pass < A+B && bRank <= B) {
          pass++;
          ans = true;
        }
      }
      System.out.println(ans ? "Yes" : "No");
    }
  }
}

Compiler output:
Main.java:16: error: cannot find symbol
      if (c == a && pass < A+B) {
               ^
  symbol:   variable a
  location: class Main
Main.java:19: error: cannot find symbol
      } else if (c == b) {
                      ^
  symbol:   variable b
  location: class Main
2 errors
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
      int a = sc.nextInt();
      int b = sc.nextInt();
      char c = sc.next().toCharArray();
      int cntA = 0;
      int cntB = 0;
      for(int i = 0;i < n;i++){
      	if(c[i]=='a'&&cntA+cntB<a+b){
        	System.out.println("Yes");
            cntA++;
        }else if(c[i]=='b'&&cntA+cntB<a+b&&cntB<=b){
        	System.out.println("Yes");
            cntB++;
        }else System.out.println("No");
      }
    }
}

Compiler output:
Main.java:8: error: incompatible types: char[] cannot be converted to char
      char c = sc.next().toCharArray();
                                    ^
Main.java:12: error: array required, but char found
      	if(c[i]=='a'&&cntA+cntB<a+b){
      	    ^
Main.java:15: error: array required, but char found
        }else if(c[i]=='b'&&cntA+cntB<a+b&&cntB<=b){
                  ^
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  int x=0,y=0;
  for(int i=0;i<s.size();i++){
    if(s[i]=='c'){
      cout << "No" << endl;
    }
    else if(s[i]=='b'){
      if(x<a+b&&y<b){
        x++;
        y++;
        cout << "Yes" << endl;
      }
      else{
        cout << "No" << enld;
      }
    }
    else{
      if(x<a+b){
        cout << "Yes" << endl;
      }
      else{
        cout << "No" << endl;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'enld' was not declared in this scope
   20 |         cout << "No" << enld;
      |                         ^~~~
Language: C++

package main

import(
  "fmt"
)

func main(){
  var n,a,b int
  fmt.Scan(&n,&a,&b)
  var s string
  fmt.Scan(&s)

  pass := 0
  brank := 0
  for i := 0; i < len(s); i++ {
    if s[i] == 'a' && pass < a+b {
      pass++
      fmt.Println("Yes")
    } else if s[i] == 'b' && pass<a+b && brank < b {
      pass++
      brank++
      fmt.Println("Yes")
    } else {
      fmt.Println("No")
    }
  }
}


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

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
//typedef pair<long long,long long> P;
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
 
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};

int main(){
  int n,a,b;
  cin>>n>>a>>b;
  string s;
  cin>>s;
  int map<char,int> mp;
  int p=0;
  REP(i,n){
    map[s[i]]++;
    if(s[i]=='a'){
      if(p<a+b){
        p++;
        cout<<"Yes"<<endl;
      }else{
        cout<<"No"<<endl;
      }
    }else if(s[i]=='b'){
      if(p<a+b && mp['b']<=b){
        p++;
        cout<<"Yes"<<endl;
      }else{
        cout<<"No"<<endl;
      }
    }else{
      cout<<"No"<<endl;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:95:21: error: invalid declarator before 'mp'
   95 |   int map<char,int> mp;
      |                     ^~
a.cc:98:10: error: expected ']' before '[' token
   98 |     map[s[i]]++;
      |          ^
      |          ]
a.cc:98:14: error: expected initializer before '++' token
   98 |     map[s[i]]++;
      |              ^~
a.cc:98:14: error: expected ';' before '++' token
a.cc:107:19: error: 'mp' was not declared in this scope; did you mean 'p'?
  107 |       if(p<a+b && mp['b']<=b){
      |                   ^~
      |                   p
Language: C

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include <math.h>

#define N_MAX (100)
#define P_MAX (100)
#define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1)

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(a) ((a) < 0 ? -(a) : (a))
#define ABSS(a, b) ((a) > (b) ? (a) - (b) : (b) - (a))

int compare_sz_desc(const void* a, const void* b) {
    return *((size_t*)a) > * ((size_t*)b) ? -1 : 1;
}

int compare_i64_asc(const void* a, const void* b) {
    return *((int64_t*)a) < *((int64_t*)b) ? -1 : 1;
}

int compare_c_asc(const void* a, const void* b) {
    return *((char*)a) < *((char*)b) ? -1 : 1;
}

int compare_c_desc(const void* a, const void* b) {
    return *((char*)a) > * ((char*)b) ? -1 : 1;
}

int compare_f(const void* a, const void* b) {
    return *((int64_t*)a) < *((int64_t*)b) ? -1 : 1;
}

int compare_f2(const void* a, const void* b) {
    return *((uint64_t*)a) > * ((uint64_t*)b) ? -1 : 1;
}

static size_t comb(const size_t n, const size_t r) {
    size_t result = 1;

    for (size_t i = 0; i < r; i++) {
        result *= n - i;
        result /= i + 1;
    }

    return result;
}

static uint64_t combU64(const uint64_t n, const uint64_t r) {
    uint64_t result = 1;

    for (uint64_t i = 0; i < r; i++) {
        result *= n - i;
        result /= i + 1;
    }

    return result;
}

static uint64_t gcdU64(uint64_t m, uint64_t n)
{
    uint64_t temp;

    while (m % n != 0) {
        temp = n;
        n = m % n;
        m = temp;
    }

    return n;
}

static size_t gcdZu(size_t m, size_t n) {
    size_t temp;

    while (m % n != 0) {
        temp = n;
        n = m % n;
        m = temp;
    }

    return n;
}

static char S[100001];

int main(void) {
    size_t N, A, B;

    scanf("%zu %zu %zu\n%s", &N, &A, &B, S);

    size_t aCount = 0;
    size_t bCount = 0;
    for (size_t i = 0; i < N; i++) {
        if (S[i] == 'a') {
            if (aCount + bCount < A + B) {
                puts("Yes");

                aCount++;
            }
            else {
                puts("No");
            }
        }
        else if (S[i] == 'b') {
            if (aCount + bCount < A + B && bCount < B) {
                puts("Yes");

                bCount++;
            }
            else {
                puts("No");
            }
        }
        else {
            puts("No");
        }
    }

    if (2 * N < M) {
        printf("%"PRIu64, N + (M - 2 * N) / 4);
    }
    else {
        printf("%"PRIu64, M / 2);
    }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:126:17: error: 'M' undeclared (first use in this function)
  126 |     if (2 * N < M) {
      |                 ^
main.c:126:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <bits/stdc++.h>
#include <cstdio>
#include <vector>

using namespace std;


int main(void){
	int n,a,b;
	scanf("%d%d%d",&n,&a,&b);
	string s;
	cin >> s ;
	int d=0,ab=0;
	for(int i=0;i<n;i++){
		if(s[i]=='c')cout<< "No" << endl;
		else if(s[i]=='a'){
			if(d+ab<a+b){
				d++;
				cout<<"Yes"<<endl;
			}else{
				cout<<"No"<<endl;
			}
		}else{
			if(d+ab<a+b && ab<b){
				ab++;
				cout<<"Yes"<<endl;
			}else cout<<"No"<<endl;
		}
	}
	return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#include<vector>
#include<string>
#include<set>
#include<iomanip>
#include<algorithm>
using namespace std;

//int main() {
  int n,a,b,coub,cnt;cin >> n >> a >> b;
  cnt = 0;
  string s,scoub;cin >> s;
  int c = a+b;
  for(int i=0;i<n;i++){
    if(s[i]=='a'){
      if(cnt<=c){
        cout << "Yes" << endl;
        cnt++;
      }else{
        cout << "No" << endl;
      }
    }else if(s[i]=='b'){
      if(cnt>c){
        cout << "No" << endl;
        break;
      }
      scoub = s.substr(0,i);
      coub = count(scoub.begin(),scoub.end(),'b');
      if(coub<=b){
        cout << "Yes" << endl;
        cnt++;
      }else{
        cout << "No" << endl;
      }
    }else{
      cout << "No" << endl;
    }  
  }
}

Compiler output:
a.cc:10:22: error: 'cin' does not name a type
   10 |   int n,a,b,coub,cnt;cin >> n >> a >> b;
      |                      ^~~
a.cc:11:3: error: 'cnt' does not name a type; did you mean 'int'?
   11 |   cnt = 0;
      |   ^~~
      |   int
a.cc:12:18: error: 'cin' does not name a type
   12 |   string s,scoub;cin >> s;
      |                  ^~~
a.cc:14:3: error: expected unqualified-id before 'for'
   14 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:14:15: error: 'i' does not name a type
   14 |   for(int i=0;i<n;i++){
      |               ^
a.cc:14:19: error: 'i' does not name a type
   14 |   for(int i=0;i<n;i++){
      |                   ^
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n, a, b;
	cin >> n >> a >> b;
	
	char x;
	int in = 1, out = 1;
	for(int i = 0; i < n; i++){
		cin >> x;
		if(x == 'a' && in+out <= a+b){
			cout << "Yes" << endl;
			in++;
		}else if(x == 'b' && in+out <= a+b && out <= b){
			cout << "Yes" << endl;
			out++;
		}else{
			cout << "No" << endl;
		}
		
		return 0;
	}

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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <stdio.h>
using namespace std;
using ll =long long;

int main (void) {
  int N,A,B;
  cin >> N >> A >>B;
  string S;
  cin >> S;
  int pass=0;
  int kpass=0;
  for(int i=0;i<N;i++){
    if(S[i]=='c'){
      cout << "No"<< endl;
      continue;
    }
    else if(pass<A+B && S[i]=='a'){
      cout << "Yes" <<endl;
      pass++;
    }
    else if(pass<A+B && S[i]=='b' && kpass<B){
      cout << "Yes" << endl;
      pass++
      kpass++
    }
    else {
      cout << "No"<< endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:13: error: expected ';' before 'kpass'
   31 |       pass++
      |             ^
      |             ;
   32 |       kpass++
      |       ~~~~~
Language: C++

#include <cstdio>
 
const int N = 100500;
 
char buf[N];
 
int main() {
    int n, a, b;
    scanf("%d %d %d", &n, &a, &b);
    scanf("%s", buf);
    int ab = a + b, sum = 0, cb = 0;
    for (int i = 0; i < n; i++) {
        if (buf[i] == 'a') {
            if (ca + cb < ab) {
                sum++;
                puts("Yes");
            } else {
                puts("No");
            }
        } else if (buf[i] == 'b') {
            if (ca + cb < ab && cb < b) {
                sum++;
                cb++;
                puts("Yes");
            } else {
                puts("No");
            }
        } else{
        	puts("No");
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'ca' was not declared in this scope; did you mean 'cb'?
   14 |             if (ca + cb < ab) {
      |                 ^~
      |                 cb
a.cc:21:17: error: 'ca' was not declared in this scope; did you mean 'cb'?
   21 |             if (ca + cb < ab && cb < b) {
      |                 ^~
      |                 cb
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int A = s.nextInt();
        int B = s.nextInt();
        String S = s.next();

        int count = 0;
        for(int i = 0; i < N; i++) {
            if(S.charAt(i) == 'a' && count < A + B) {
                count++;
                System.out.println("Yes");
            } else if(S.charAt(i) == 'b' && count < A + B && count <= B) {
                count++;
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}


Compiler output:
Main.java:3: error: cannot find symbol
        Scanner s = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner s = new Scanner(System.in);
                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
 
/**
 * Created by apple on 10/21/16.
 */
public class Main {
    public static void main(String[] args) {
        Scanner s1 = new Scanner(System.in);
        int N = s1.nextInt();
        int A = s2.nextInt();
        int B = s3.nextInt();
        String S = s4.nextLine();
 
        int count = 0;
        for(int i = 0; i < N; i++) {
            if(S.charAt(i) == 'a' && count < A + B) {
                count++;
                System.out.println("Yes");
            } else if(S.charAt(i) == 'b' && count < A + B && count <= B) {
                count++;
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        int A = s2.nextInt();
                ^
  symbol:   variable s2
  location: class Main
Main.java:11: error: cannot find symbol
        int B = s3.nextInt();
                ^
  symbol:   variable s3
  location: class Main
Main.java:12: error: cannot find symbol
        String S = s4.nextLine();
                   ^
  symbol:   variable s4
  location: class Main
3 errors
Language: C++

#include <iostream>
#include <string.h>
 
using namespace std;
 
int main(){
   int num, a, b;
    
    scanf("%d %d %d", &num, &a, &b);
    char str[num+1];
    scanf("%s", str);
    
    for(int i = 0; i < std::strlen(str); i++){
        if(str[i] == 'a'){
            if(a > 0)
                a--;
            else if( b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
            
        }
        else if(str[i] == 'b'){
            if(b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
        }
        else
            printf("No\n");
    }
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'?
   13 |     for(int i = 0; i < std::strlen(str); i++){
      |                             ^~~~~~
      |                             mbrlen
Language: C++

#include <string>
#include <iostream>

int main(){
   int num, a, b;
    
    scanf("%d %d %d", &num, &a, &b);
    char str[num+1];
    scanf("%s", str);
    
    for(int i = 0; i < strlen(str); i++){
        if(str[i] == 'a'){
            if(a > 0)
                a--;
            else if( b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
            
        }
        else if(str[i] == 'b'){
            if(b > 0)
                b--;
            else{
                printf("No\n");
                continue;
            }
            printf("Yes\n");
        }
        else
            printf("No\n");
    }

    return 0;
}

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

#include <iostream>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
#define rep(i,n) FOR(i,0,n)

int n,a,b;
string s;

int main() {
    cin>>n>>a>>b;
    cin>>s;
    int c = a+b;

    int p=0, q=0;
    rep(i,n) {
        bool f = false;
        if(s[i]=='a'){
            if(p < c) {
                f = true;
            }
            p++;
        }else if(s[i]=='b'){
            q++;
            if(p<c and q<=b) {
                f = true;
                p++;
            }
        }
        cout << (f ? "Yes" : "No") << endl
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:43: error: expected ';' before '}' token
   30 |         cout << (f ? "Yes" : "No") << endl
      |                                           ^
      |                                           ;
   31 |     }
      |     ~
Language: Java

import java.util.*;
import java.io.*;
public class Main {
public static void main(String [] args)throws Exception{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st = new StringTokenizer(br.readLine());
	int n = Integer.parseInt(st.nextToken());
	int a = Integer.parseInt(st.nextToken());
	int b = Integer.parseInt(st.nextToken());
	StringBuilder sb = new StringBuilder();
	int cnt = 0;
	for(int i = 0;i < str.length();i++){
		if(str.charAt(i) == 'c')
			sb.append("NO");
		else if(cnt < a + b){
		    ++cnt;
			sb.append("YES");
		}
		else sb.append("NO");
		sb.append('\n');	
	}
	System.out.print(sb);
}
}

Compiler output:
Main.java:12: error: cannot find symbol
	for(int i = 0;i < str.length();i++){
	                  ^
  symbol:   variable str
  location: class Main
Main.java:13: error: cannot find symbol
		if(str.charAt(i) == 'c')
		   ^
  symbol:   variable str
  location: class Main
2 errors
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
    int n,a,b;
    vector<int> v(2,0);
    cin>>n>>a>>b;
    string s;
    cin>>s;
    int n = s.size();
    for(int j=0;j<n;++j)
    {
        if(s[j]=='a'){
                  if(v[0]+v[1]<a+b)cout<<"yes"<<endl;
                  v[0]++;
                   
        }
        else if(s[j]=='c'){
                  if((v[0]+v[1])<(a+b)&&v[1]<b) cout<<"yes"<<endl;
                   else cout<<"no"<<endl;
                  v[1]++;
         }
        else cout<<"no"<<endl;
    }
    return 0;
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: redeclaration of 'int n'
   12 |     int n = s.size();
      |         ^
a.cc:7:9: note: 'int n' previously declared here
    7 |     int n,a,b;
      |         ^
Language: C

 < 1 || total <1)
				{
					printf("NO\n");
				}
				else
				{
					printf("YES\n");
					B = B - 1;
					total = total - 1;
				}		
			}
			else
			{
				if(total < 1)
				{
					printf("NO\n");
				}
				else
				{
					printf("YES\n");
					total = total - 1;
					
				}
			}
		}
	
	}
	return 0;
}

Compiler output:
main.c:1:2: error: expected identifier or '(' before '<' token
    1 |  < 1 || total <1)
      |  ^
main.c:5:33: error: expected identifier or '(' before 'else'
    5 |                                 else
      |                                 ^~~~
main.c:11:25: error: expected identifier or '(' before '}' token
   11 |                         }
      |                         ^
main.c:12:25: error: expected identifier or '(' before 'else'
   12 |                         else
      |                         ^~~~
main.c:25:17: error: expected identifier or '(' before '}' token
   25 |                 }
      |                 ^
main.c:27:9: error: expected identifier or '(' before '}' token
   27 |         }
      |         ^
main.c:28:9: error: expected identifier or '(' before 'return'
   28 |         return 0;
      |         ^~~~~~
main.c:29:1: error: expected identifier or '(' before '}' token
   29 | }
      | ^
Language: C++

int main()
{
	unsigned int n, a, b;

	cin >> n >> a >> b;

	string str;

	cin >> str;

	int i;

	int overseas = 0;
	for(i = 0; i < n; ++i) {
		
		switch(str[i]) {
			
			case 'a' : 
			{
				if(a+b > 0) {
					cout << "Yes" << endl;
					a--;
					break;
				}
			}
			case 'b' : 
			{
				if(a+b > 0 && overseas < b) {
					cout << "Yes" << endl;
					overseas++;
					break;
				}
			}
			case 'c' :
			{
				;
			}

			default: cout << "No" << endl; 
		}
		
	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> n >> a >> b;
      |         ^~~
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string str;
      |         ^~~~~~
a.cc:9:16: error: 'str' was not declared in this scope; did you mean 'std'?
    9 |         cin >> str;
      |                ^~~
      |                std
a.cc:21:41: error: 'cout' was not declared in this scope
   21 |                                         cout << "Yes" << endl;
      |                                         ^~~~
a.cc:21:58: error: 'endl' was not declared in this scope
   21 |                                         cout << "Yes" << endl;
      |                                                          ^~~~
a.cc:29:41: error: 'cout' was not declared in this scope
   29 |                                         cout << "Yes" << endl;
      |                                         ^~~~
a.cc:29:58: error: 'endl' was not declared in this scope
   29 |                                         cout << "Yes" << endl;
      |                                                          ^~~~
a.cc:39:34: error: 'cout' was not declared in this scope
   39 |                         default: cout << "No" << endl;
      |                                  ^~~~
a.cc:39:50: error: 'endl' was not declared in this scope
   39 |                         default: cout << "No" << endl;
      |                                                  ^~~~
Language: C++

#include <iostream>	
using namespace std;

main() {
	int N, A, B;
	int a = 0; //countA
	int b = 0; //coutnB
	char s[100000];
	int i = 0;

	cin >> N >> A >> B;
	cin >> s;

	for (i, i < 100000; i++;) {

		switch (s[i])
		{

		case 'a':
			if (a <= A + B) {
				cout << "Yes";
				a++;
			}
			else {
				cout << "No";
			}
			break;

		case 'b':
			if (b <= A + B || b <= B) {
				cout << "Yes"; 
				a++;
				b++;
			}
			else {
				cout << "No";
			}
			break;

		case 'c':
			cout << "No";

		default:
			break;
		}
		}
	}
	return 0;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main() {
      | ^~~~
a.cc:48:9: error: expected unqualified-id before 'return'
   48 |         return 0;
      |         ^~~~~~
a.cc:49:1: error: expected declaration before '}' token
   49 | }
      | ^
Language: C++

#include <iostream>	
using namespace std;

main() {
	int N, A, B;
	int a = 0; //countA
	int b = 0; //coutnB
	char s[100000];
	int i = 0;

	cin >> N >> A >> B;
	cin >> s;

	for (i, i < 100000; i++;) {

		switch (s[i])
		{

		case 'a':
			if (a < A + B) {
				cout << "Yes";
				a++;
			}
			else {
				cout << "No";
			}
			break;

		case 'b':
			if (b < A + B || b < B) {
				cout << "Yes"; 
				b++;
			}
			else {
				cout << "No";
			}
			break;

		case 'c':
			cout << "No";

		default:
			break;
		}

		if (s[i] == NULL) {
			break;
		}
	}
	return 0;
}

	return 0;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:46:29: warning: NULL used in arithmetic [-Wpointer-arith]
   46 |                 if (s[i] == NULL) {
      |                             ^~~~
a.cc: At global scope:
a.cc:53:9: error: expected unqualified-id before 'return'
   53 |         return 0;
      |         ^~~~~~
a.cc:54:1: error: expected declaration before '}' token
   54 | }
      | ^
Language: C++

#include <iostream>	
using namespace std;

main() {
	int N, A, B;
	int a = 0; //countA
	int b = 0; //coutnB
	char s[100000];
	int i = 0;

	cin >> N >> A >> B;
	cin >> s;

	for (i, i < 100000; i++;) {

		switch (s[i])
		{
		case 'a':
			if (a < A + B) {
				cout << "Yes";
				a++;
			}
			else {
				cout << "No";
			}
			break;
		case 'b':
			if (b < A + B || b < B) {
				cout << "Yes";
				b++;
			}
			else {
				cout << "No";
			}
			break;
		case 'c':
			cout << "No";


		default:
			break;
		}

		return 0;
	}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:45:10: error: expected '}' at end of input
   45 |         }
      |          ^
a.cc:4:8: note: to match this '{'
    4 | main() {
      |        ^
Language: C++

#define REP(I,A,B) for(int I = (A); I < (B); ++I)
#define REPN(I,A,B) for(int I = (A); I > (B); --I)
#define MAX(A,B) ((A) > (B) ? (A) : (B));

int dirx[8] = {-1,0,0,1,-1,-1,1,1};
int diry[8] = {0,1,-1,0,-1,1,-1,1};

int rb[200000];
int lb[200000];

int main() {
	int n,a,b;
	cin >> n >> a>> b;
	REP(i, 0, n) {
		char ch;
		cin >> ch;
		if (ch == 'a' && (a + b) > 0) {
			cout << "Yes" << endl;
			if (a == 0)
				b--;
			else
				a--;
			continue;
		}
		if (ch == 'b' && b > 0) {
			cout << "Yes" << endl;
			b--;
			continue;
		}

		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope
   13 |         cin >> n >> a>> b;
      |         ^~~
a.cc:18:25: error: 'cout' was not declared in this scope
   18 |                         cout << "Yes" << endl;
      |                         ^~~~
a.cc:18:42: error: 'endl' was not declared in this scope
   18 |                         cout << "Yes" << endl;
      |                                          ^~~~
a.cc:26:25: error: 'cout' was not declared in this scope
   26 |                         cout << "Yes" << endl;
      |                         ^~~~
a.cc:26:42: error: 'endl' was not declared in this scope
   26 |                         cout << "Yes" << endl;
      |                                          ^~~~
a.cc:31:17: error: 'cout' was not declared in this scope
   31 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:31:33: error: 'endl' was not declared in this scope
   31 |                 cout << "No" << endl;
      |                                 ^~~~
Language: Java

import java.util.Scanner;;
public class Qualification_simulator {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();
		@SuppressWarnings("resource")
		Scanner sc1 = new Scanner(System.in);
		String S = sc1.nextLine();
		findyes(S,N,A,B);
	}
	public static void findyes(String S,int N,int A,int B)
	{
		int suma = 0;
		int sumb = 0;
		for(int i=0;i<S.length();i++)
		{
			if(S.charAt(i) == 'a')
			{
				suma++;	
				if((suma+sumb) <= (A+B))
				{
					System.out.println("Yes");	
				}
				else
				{
					System.out.println("No");	
				}
			}
			if(S.charAt(i) == 'b')
			{
				sumb++;
				if((suma+sumb) <= (A+B) && sumb <=B)
				{
					System.out.println("Yes");
				}
				else
				{
					sumb--;
					System.out.println("No");	
				}
			}
			if(S.charAt(i) == 'c')
			{
				System.out.println("No");
			}
		}
	}
}


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

#include <iostream>
#include <string>

using namespace std;

int rank(string s,int point){
    int count = 0;
    for(int i=0;i<point;i++){
        if(s[i] == 'b'){
            count++;
        }
    }
    return count;
}

int main(){
    int n,a,b;
    cin >> n >> a >> b;
    string s;
    cin >> s;

    int count = 0;
    for(int i=0;i<s.size();i++){
        if(s[i] == 'c'){
            cout << "No" << endl;
        }else if(s[i] == 'a' && a+b > count){
            count++;
            cout << "Yes" << endl;
        }else if(s[i] == 'b' && rank(s,i) <= b && a+b > count){
            count++;
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:33: error: reference to 'rank' is ambiguous
   29 |         }else if(s[i] == 'b' && rank(s,i) <= b && a+b > count){
      |                                 ^~~~
In file included from /usr/include/c++/14/bits/move.h:37,
                 from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
 1437 |     struct rank
      |            ^~~~
a.cc:6:5: note:                 'int rank(std::string, int)'
    6 | int rank(string s,int point){
      |     ^~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int n = sc.nextInt();
		int a = sc.nextInt();
		// スペース区切りの整数の入力
		int b = sc.nextInt();
		// 文字列の入力
		String s = sc.next();
        String sa[];
        sa = new String[s.length()];
        int countA = 0;
        int countB = 0;
        int countY = 0;
        for(int i=0; i<s.length(); i++){
            if(i < c.length() -1){
            sa[i] = s.substring(i, i+1);
            }
            else{
            sa[i] = s.substring(i);
            }
            switch (sa[i]){
                case "a":
                    countA = countA + 1;
                    if(countY < a + b){
                        countY = countY + 1;
                        		System.out.println("Yes" + "\n");
                    }
                    else{
                                System.out.println("No" + "\n");
                    }
                    break;
                case "b":
                    countB = countB + 1;
                    
                    if(countY < a + b && countB <= b){
                        countY = countY + 1;
                                System.out.println("Yes" + "\n");
                    }
                    else{
                                System.out.println("No" + "\n");
                    }
                    break;
                case "c":
                                System.out.println("No" + "\n");
                    break;
            }
        }
		// 出力
	}
}

Compiler output:
Main.java:18: error: cannot find symbol
            if(i < c.length() -1){
                   ^
  symbol:   variable c
  location: class Main
1 error
Language: C++

#include <iostream>
#include <string>

using namespace std;

int rank(string s,int point){
    int count = 0;
    for(int i=0;i<point;i++){
        if(s[i] == 'b'){
            count++;
        }
    }
    return count;
}

int main(){
    int n,a,b;
    cin >> n >> a >> b;
    string s;
    cin >> s;

    int count = 0;
    for(int i=0;i<s.size();i++){
        if(s[i] == 'c') cout << "No" << endl;
        else if(s[i] == 'a' && a+b > count){
            count++;
            cout << "Yes" << endl;
        }else if(s[i] == 'b' && rank(s,i) <= b && a+b > count){
            count++;
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:33: error: reference to 'rank' is ambiguous
   28 |         }else if(s[i] == 'b' && rank(s,i) <= b && a+b > count){
      |                                 ^~~~
In file included from /usr/include/c++/14/bits/move.h:37,
                 from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/type_traits:1437:12: note: candidates are: 'template<class> struct std::rank'
 1437 |     struct rank
      |            ^~~~
a.cc:6:5: note:                 'int rank(std::string, int)'
    6 | int rank(string s,int point){
      |     ^~~~