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

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
using namespace std;

int main(){
  ll n,a,b,c;
  cin>>n>>a>>b>>c;
  string s[n];
  int f=1;
  char d[n];
  rep(i,n){
    cin>>s[i];
  }
  rep(i,n){
    if(s[i]=="AB"){
      if(a<b){
        a++; b--; d[i]='A';
      }else if(a>b){
        a--; b++; d[i]='B';
      }else{
        if(i<n-1 && s[i+1]="AC"){
          a++;b--;d[i]='A';
        }else{
          a--;b++;d[i]='B';
        }
      }
    }else if(s[i]=="AC"){
      if(a<c){
        a++;c--;d[i]='A';
      }else if(a>c){
        a--; c++;d[i]='C';
      }else{
         if(i<n-1 && s[i+1]="AB"){
           a++;c--;d[i]='A';
         }else{
           a--;c++;d[i]='C';
         }
      }
    }else{
      if(b<c){
        b++;c--;d[i]='B';
      }else if(b>c){
        b--;c++;d[i]='C';
      }else{
        if(i<n-1 && s[i+1]="AB"){
          b++;c--;d[i]='B';
        }else{
          b--;c++;d[i]='C';
        }
      }
    }
    if(a==-1 || b==-1 || c==-1){
      f=0;
      break;
    }
  }
  if(f==1){
    cout<<"Yes"<<"\n";
    rep(i,n){
      cout<<d[i]<<"\n";
    }
  }else{
    cout<<"No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   31 |         if(i<n-1 && s[i+1]="AC"){
      |            ~~~~~ ^~ ~~~~~~
      |             |            |
      |             bool         std::string {aka std::__cxx11::basic_string<char>}
a.cc:31:18: note: candidate: 'operator&&(bool, bool)' (built-in)
   31 |         if(i<n-1 && s[i+1]="AC"){
      |            ~~~~~~^~~~~~~~~
a.cc:31:18: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:43:19: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   43 |          if(i<n-1 && s[i+1]="AB"){
      |             ~~~~~ ^~ ~~~~~~
      |              |            |
      |              bool         std::string {aka std::__cxx11::basic_string<char>}
a.cc:43:19: note: candidate: 'operator&&(bool, bool)' (built-in)
   43 |          if(i<n-1 && s[i+1]="AB"){
      |             ~~~~~~^~~~~~~~~
a.cc:43:19: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:55:18: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   55 |         if(i<n-1 && s[i+1]="AB"){
      |            ~~~~~ ^~ ~~~~~~
      |             |            |
      |             bool         std::string {aka std::__cxx11::basic_string<char>}
a.cc:55:18: note: candidate: 'operator&&(bool, bool)' (built-in)
   55 |         if(i<n-1 && s[i+1]="AB"){
      |            ~~~~~~^~~~~~~~~
a.cc:55:18: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
Language: C

#include <bits/stdc++.h>
using namespace std;
static auto faster_iostream = []() { ios::sync_with_stdio(0); cin.tie(0); return 0; }();void print(){cout<<'\n';}template<class T,class ...U>void print(T x, U ...y){cout<<x<<' ';print(y...);}
typedef long long ll; typedef long double db;
const int N = 1e5 + 5, M = 1e9 + 7;
ll qpow(ll x, ll n) { ll res = 1; for (; n; n >>= 1, x = x * x % M) if (n & 1) res = res * x % M; return res; }

int main() {
  int n, a[3];
  cin >> n >> a[0] >> a[1] >> a[2];
  vector<string> q(n);
  for (auto &s : q) cin >> s;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    int u = q[i][0] - 'A', v = q[i][1] - 'A';
    if (a[u] == 0 && a[v] == 0) {
      cout << "No\n";
      exit(0);
    }
    if (!a[u]) a[u]++, a[v]--, ans.push_back(u);
    else if (!a[v]) a[u]--, a[v]++, ans.push_back(v);
    else if (a[u] == 1 && a[v] == 1 && i + 1 < n) {
      int w = 0, x = q[i+1][0] - 'A', y = q[i+1][1] - 'A';
      while (w == u || w == v) w++;
      if (a[w] || w != x && w != y) {
        a[u]++, a[v]--;
        ans.push_back(u);
        continue;
      }
      if (w == x && u == y || w == y && u == x) {
        a[u]++, a[v]--, ans.push_back(u);
      } else {
        a[v]++, a[u]--, ans.push_back(v);
      }
    } else if (a[u] >= a[v]) {
      a[v]++, a[u]--, ans.push_back(v);
    } else {
      a[u]++, a[v]--, ans.push_back(u);
    }
  }
  cout << "Yes" << '\n';
  for (int i = 0; i < n; i++) {
    cout << (char)(ans[i] + 'A') << '\n';
  }
}


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>
using namespace std;

int n, a, b, c, cnt[3];
string str[100001];
vector<char> ans;

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

    cin >> n >> a >> b >> c;
    for(int i = 0; i < n; i++) {
        cin >> str[i];
        if(str[i] == "AB") cnt[0]++, cnt[1]++;
        if(str[i] == "AC") cnt[0]++, cnt[2]++;
        if(str[i] == "BC") cnt[1]++, cnt[2]++;
    }

    for(int i = 0; i < n; i++) {
        if(str[i] == "AB") {
            if(a > b) a--, b++, ans.push_back('B');
            else if(a == b) {
                if(a == 0 && b == 0) {
                    cout << "No" << '\n';
                    return 0;
                }
                if(cnt[0] > cnt[1]) a--, b++, ans.push_back('B');
                else a++, b--, ans.push_back('A');
            }
            else a++, b--, ans.push_back('A');
            cnt[0]--, cnt[1]--;
        }
        if(str[i] == "AC") {
            if(a > c) a--, c++, ans.push_back('C');
            else if(a == c) {
                if(a == 0 && c == 0) {
                    cout << "No" << '\n';
                    return 0;
                }
                if(cnt[0] > cnt[2]) a--, c++, ans.push_back('C');
                else a++, c--, ans.push_back('A');
            }
            else a++, c--, ans.push_back('A');
            cnt[0]--, cnt[2]--;
        }
        if(str[i] == "BC") {
            if(b > c) b--, c++, ans.push_back('C');
            else if(b == c) {
                if(b == 0 && c == 0) {
                    cout << "No" << '\n';
                    return 0;
                }
                if(cnt[1] > cnt[2]) b--, c++, ans.push_back('C');
                else b++, c--, ans.push_back('B');
            }
            else b++, c--, ans.push_back('B');
            cnt[1]--, cnt[2]--;
        }
    }

    if(ok) {
        cout << "Yes" << '\n';
        for(int i = 0; i < n; i++)
            cout << ans[i] << '\n';
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:62:8: error: 'ok' was not declared in this scope
   62 |     if(ok) {
      |        ^~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
using namespace std;

int main(){
  ll n,a,b,c;
  cin>>n>>a>>b>>c;
  string s[n];
  int f=1;
  char d[n];
  rep(i,n){
    cin>>s[i];
  }
  rep(i,n){
    if(s[i]=="AB"){
      if(a<=b){
        a++; b--; d[i]='A';
      }else{
        a--; b++; d[i]='B';
      }
    }else if(s[i]=="AC"){
      if(a<=c){
        a++;c--;d[i]='A';
      }else{
        a--; c++;d[i]='C';
      }
    }else{
      if(b<=c){
        b++;c--;d[i]='B';
      }else{
        b--;c++;d[i]='C';
      }
    }
    if(a==-1 || b==-1 || c==-1){
      f=0;
      break;
    }
  }
  if(f==1){
    cout<<"Yes"<<"\n";
    rep(i,n){
      cout<<c[i]<<"\n";
    }
  }else{
    cout<<"No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:14: error: invalid types 'long long int[int]' for array subscript
   52 |       cout<<c[i]<<"\n";
      |              ^
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
using namespace std;

int main(){
  ll n,a,b,c;
  cin>>n>>a>>b>>c;
  string s[n];
  int f=1;
  char c[n];
  rep(i,n){
    cin>>s[i];
  }
  rep(i,n){
    if(s[i]=="AB"){
      if(a<=b){
        a++; b--; c[i]='A';
      }else{
        a--; b++; c[i]='B';
      }
    }else if(s[i]=="AC"){
      if(a<=c){
        a++;c--;c[i]='A';
      }else{
        a--; c++;c[i]='C';
      }
    }else{
      if(b<=c){
        b++;c--;c[i]='B';
      }else{
        b--;c++;c[i]='C';
      }
    }
    if(a==-1 || b==-1 || c==-1){
      f=0;
      break;
    }
  }
  if(f=1){
    cout<<"Yes"<<"\n";
    rep(i,n){
      cout<<c[i]<<"\n";
    }
  }else{
    cout<<"No";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: conflicting declaration 'char c [n]'
   20 |   char c[n];
      |        ^
a.cc:16:12: note: previous declaration as 'long long int c'
   16 |   ll n,a,b,c;
      |            ^
a.cc:27:20: error: invalid types 'long long int[int]' for array subscript
   27 |         a++; b--; c[i]='A';
      |                    ^
a.cc:29:20: error: invalid types 'long long int[int]' for array subscript
   29 |         a--; b++; c[i]='B';
      |                    ^
a.cc:33:18: error: invalid types 'long long int[int]' for array subscript
   33 |         a++;c--;c[i]='A';
      |                  ^
a.cc:35:19: error: invalid types 'long long int[int]' for array subscript
   35 |         a--; c++;c[i]='C';
      |                   ^
a.cc:39:18: error: invalid types 'long long int[int]' for array subscript
   39 |         b++;c--;c[i]='B';
      |                  ^
a.cc:41:18: error: invalid types 'long long int[int]' for array subscript
   41 |         b--;c++;c[i]='C';
      |                  ^
a.cc:52:14: error: invalid types 'long long int[int]' for array subscript
   52 |       cout<<c[i]<<"\n";
      |              ^
Language: C++

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

int main() {
  int N,A,B,C;
  cin >> N >> A >> B >> C;
  vector<string> choice(N);
  int NO = 0;
  for (int n = 0; n < N; n++) {
	cin >> choice[n];
    if( (choice[n] == "AB" && A == 0 && B == 0) || (choice[n] == "BC" && B == 0 && C == 0) || (choice[n] == "AC" && C == 0 && A == 0) ){
      NO++;
    }
  }
  char AB,BC,AC;
  if(NO > 0){
    cout << "No" << endl;
  }else {
    cout << "Yes" << endl;
    if(choice[n] == "AB" && A != 0){
       AB = 'A';
    }else if(choice[n] == "AB" && B != 0){
       AB = 'B';
    }
    if(choice[n] == "BC" && B != 0){
       BC = 'B';
    }else if(choice[n] == "BC" && C != 0){
       BC = 'C';
    }
    if(choice[n] == "AC" && A != 0){
        AC ='A';
    }else if(choice[n] == "AC" && C != 0){
        AC = 'C';
      }
    for (int n = 0; n < N; n++) {
		if(choice[n] == "AB"){
          cout << (char)AB << endl;
        } else if (choice[n] == "BC"){
          cout << (char)BC << endl;
        } else if (choice[n] == "AC"){
          cout << (char)AC << ebdl;
        }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: 'n' was not declared in this scope
   20 |     if(choice[n] == "AB" && A != 0){
      |               ^
a.cc:25:15: error: 'n' was not declared in this scope
   25 |     if(choice[n] == "BC" && B != 0){
      |               ^
a.cc:30:15: error: 'n' was not declared in this scope
   30 |     if(choice[n] == "AC" && A != 0){
      |               ^
a.cc:41:31: error: 'ebdl' was not declared in this scope
   41 |           cout << (char)AC << ebdl;
      |                               ^~~~
Language: C++

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

const string vars = "ABC";
int cv[256];

const int mN = 100100;
int steps[mN], u[mN], v[mN];
vector<int> doubts;

int main() 
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	for (int c='A'; c<='C'; c++) cv[c] = c-'A';
	string s;
	int n, a[3];
    cin >> n >> a[0] >> a[1] >> a[2];
    int fisrt = 2*n;
    for (int i=1; i<=n; i++) {
		cin >> s;
		u[i] = cv[s[0]];
		v[i] = cv[s[1]];
		if (a[u[i]] > a[v[i]]) {
			a[u[i]]--;
			a[v[i]]++;
			steps[i] = 1;
		}
		else if (a[u[i]] > a[v[i]]) {
			a[u[i]]++;
			a[v[i]]--;
			steps[i] = 0;
		}		 
		else {
			steps[i] = -1;
			doubts.push_back(i);
			first = min(first,i);
		}
	}
	if (a[0]<0 or a[1]<0 or a[2]<0) {
		cout << "No";
		return 0;
	}
	for (int i=1; i<=n; i++) {
		if (steps[i] >= 0) continue;
		if (a[u[i]] > a[v[i]]) {
			a[u[i]]--;
			a[v[i]]++;
			steps[i] = 1;
		}
		else {
			a[u[i]]++;
			a[v[i]]--;
			steps[i] = 0;
		}	
		if (a[u[i]] < 0 or a[v[i]] < 0) {
			cout << "No";
			return 0;
		}
	}
	if (a[0]<0 or a[1]<0 or a[2]<0) cout << "No";
	else {
		cout << "Yes\n";
		for (int i=1; i<=n; i++) 
			cout << vars[steps[i] ? v[i] : u[i]] << "\n";
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: 'first' was not declared in this scope; did you mean 'fisrt'?
   37 |                         first = min(first,i);
      |                         ^~~~~
      |                         fisrt
Language: C++

#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
#define lli long long int
#define uli unsigned long long int
#define INF 999999999999999999
#define rep(i,m,n) for(lli i = m;i < n;i++)
#define rrep(i,m,n) for(lli i=m-1;i>=n;i--)
#define pb(n) push_back(n)
#define UE(N) N.erase(unique(N.begin(),N.end()),N.end());
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define NeOut(S) cout << S
#define HpOut(S) cout << setprecision(25) << S << endl
#define Vec(K,L,N,S) vector<L> K(N,S)
#define DV(K,L,N,M,S) vector<vector<L>> K(N,vector<L>(M,S))
#define TV(K,L,N,M,R,S) vector<vector<vector<L>>> K(N,vector<vector<L>>(M,vector<L>(R,S)))
#define pint pair<lli,lli>
#define paf(L,R) pair<L,R>
#define mod 998244353
#define MAX 10000000
#define ALL(a)  a.begin(),a.end()
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  lli A,B,C,D,E,F,L,N,M,K,X,Y,Z,H,W,sum=0,num=0,flag=0;string S,T;
  cin >> N >> A >> B >> C;
  Vec(P,string,N,"");
  rep(i,0,N)cin >> P[i];
  Vec(Q,string,0,"");
    rep(i,0,N){
      if(P[i]=="AB"){
        if(A>B){
          A--;B++;
          Q.pb("B");
        }
        else if(A==B&&i!=N-1){
          if(P[i+1]=="BC"){
            A--;B++;
            Q.pb("B");
          }
          else{
            A++;B--;
            Q.pb("A");
          }
        }
        else{
          A++;B--;
          Q.pb("A");
        }
      }
      else if(P[i]=="AC"){
        if(A>C){
          A--;C++;
          Q.pb("C");
        }
        else if(A==C&&i!=N-1){
          if(P[i+1]=="BC"){
            A--;C++;
            Q.pb("C");
          }
          else{
            A++;C--;
            Q.pb("A");
          }
        }
        else{
          A++;C--;
          Q.pb("C");
        }
      }
      else{
        if(C>B){
          C--;B++;
          Q.pb("B");
        }
        else if(C==B&&i!=N-1){
          if(P[i+1]=="AB"){
            C--;B++;
            Q.pb("B");
          }
          else{
            C++;B--;
            Q.pb("C");
          }
        }
        else{
          C++;B--;
          Q.pb("C");
        }
      }
      if(A<0||B<0||C<0)flag=1;
    }
    //if(flag)Out("No");
    else{
      Out("Yes");
      for(auto v:Q)Out(v);
    }
}

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

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

int main() {
  int N,A,B,C;
  cin >> N >> A >> B >> C;
  vector<string> choice(N);
  int NO = 0;
  for (int n = 0; n < N; n++) {
	cin >> choice[n];
    if( (choice[n] == "AB" && A == 0 && B == 0) || (choice[n] == "BC" && B == 0 && C == 0) || (choice[n] == "AC" && C == 0 && A == 0) ){
      NO++;
    }
  }
  if(NO > 0){
    cout << "No" << endl;
  }else {
    cout << "Yes" << endl;
    if(choice[n] == "AB" && A != 0){
        char AB = 'A';
    }else if(choice[n] == "AB" && B != 0){
        char AB = 'B';
    }
    if(choice[n] == "BC" && B != 0){
        char BC = 'B';
    }else if(choice[n] == "BC" && C != 0){
        char BC = 'C';
    }
    if(choice[n] == "AC" && A != 0){
        char AC ='A';
    }else if(choice[n] == "AC" && C != 0){
        char AC = 'C';
      }
    for (int n = 0; n < N; n++) {
		if(choice[n] == "AB"){
          cout << (char)AB << endl;
        } else if (choice[n] == "BC"){
          cout << (char)BC << endl;
        } else if (choice[n] == "AC"){
          cout << (char)AC << ebdl;
        }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: 'n' was not declared in this scope
   19 |     if(choice[n] == "AB" && A != 0){
      |               ^
a.cc:24:15: error: 'n' was not declared in this scope
   24 |     if(choice[n] == "BC" && B != 0){
      |               ^
a.cc:29:15: error: 'n' was not declared in this scope
   29 |     if(choice[n] == "AC" && A != 0){
      |               ^
a.cc:36:25: error: 'AB' was not declared in this scope; did you mean 'B'?
   36 |           cout << (char)AB << endl;
      |                         ^~
      |                         B
a.cc:38:25: error: 'BC' was not declared in this scope; did you mean 'C'?
   38 |           cout << (char)BC << endl;
      |                         ^~
      |                         C
a.cc:40:25: error: 'AC' was not declared in this scope; did you mean 'C'?
   40 |           cout << (char)AC << ebdl;
      |                         ^~
      |                         C
a.cc:40:31: error: 'ebdl' was not declared in this scope
   40 |           cout << (char)AC << ebdl;
      |                               ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
#include<cmath>
#include<cstdio>
#include<tuple>
#include<bitset>
#include<map>

using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
#define ALL(x) x.begin(),x.end()
#define ll long long
typedef pair<int,int> P;
const int inf=1000000007;
const int MOD=1000000007;
signed main(){
  int n,a,b,c;
  bool flag=true;
  cin>>n>>a>>b>>c;
  vector<string> s(n);
  rep(i,n){
    cin>>s[i];
  }
  vector<char> res(n);
  queue<int> que;
  for(int i=0;i<n;++i){
    //standby
    if(!que.empty()){
      if(s[que.front()]==s[i]){
        que.pop();
      }
      else if(s[i]=="AC"){
        if(a==0&&c==0){
          if(s[que.front()]=="BC"){
            res[qur.front()]='C';
            b-=2;
            c+=2;
            que.pop();
          }
        }
        else{
          que.pop();
        }
      }
      else if(s[i]=="BC"){
        if(b==0&&c==0){
          if(s[que.front()]=="AC"){
            res[que.front()]='C';
            a-=2;
            c+=2;
            que.pop();
          }
        }
        else{
          que.pop();
        }
      }
      else{
        que.pop();
      }
    }
    //main fase
    if(s[i]=="AB"){
      if(a>b){
        --a;++b;
        res[i]='B';
      }
      else if(a<b){
        ++a;--b;
        res[i]='A';
      }
      else{
        if(a==0){
          flag=false;
        }
        else{
          ++a;--b;
          res[i]='A';
          que.push(i);
        }
      }
    }
    else if(s[i]=="AC"){
      if(a>c){
        --a;++c;
        res[i]='C';
      }
      else if(a<c){
        ++a;--c;
        res[i]='A';
      }
      else{
        if(a==0){
          flag=false;
        }
        else{
          ++a;--c;
          res[i]='A';
          que.push(i);
        }
      }
    }
    else if(s[i]=="BC"){
      if(b>c){
        --b;++c;
        res[i]='C';
      }
      else if(b<c){
        ++b;--c;
        res[i]='B';
      }
      else{
        if(b==0){
          flag=false;
        }
        else{
          ++b;--c;
          res[i]='B';
          que.push(i);
        }
      }
    }
  }
	if(flag){
    cout<<"Yes"<<endl;
    rep(i,n){
      cout<<res[i]<<"\n";
    }
  }
  else{
    cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:17: error: 'qur' was not declared in this scope; did you mean 'que'?
   40 |             res[qur.front()]='C';
      |                 ^~~
      |                 que
Language: C++

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

const int mod=1000;
const int maxn=2e5+10;

ll h[maxn];
int n,m,val[maxn];
string s[maxn];
int vis[3];
int main()
{
    ll a,b,c;
    scanf("%d%lld%lld%lld",&n,&a,&b,&c);
    for( int i=1;i<=n;i++ )
    {
    	cin>>s[i];
    	if( s[i][0]=='A' )  vis[0]++;
    	if( s[i][0]=='B' ) vis[1]++;
    	if( s[i][0]=='C' ) vis[2]++;
    	if( s[i][1]=='A' )  vis[0]++;
    	if( s[i][1]=='B' ) vis[1]++;
    	if( s[i][1]=='C' ) vis[2]++;
    }
    string ans;
    int flag=1;
    for( int i=1;i<=n;i++ )
    {
    	if( s[i]=="AB" )
		{
			vis[0]--;
			vis[1]--;
			if( a>b || a==b && vis[0]>vis[1] )
			{
				a--;
				b++;
				ans+="B";
			}
			else 
			{
				b--;
				a++;
				ans+="A";
			}
			
		} 
		else if( s[i]=="BC" )
		{
			vis[1]--;
			vis[2]--;
			if( b>c || b==c && vis[1]>vis[2] )
			{
				b--;
				c++;
				ans+="C";
			}
			else
			{
				b++;
				c--;
				ans+="B";
			}
			
		}
		else if( s[i]=="AC" )
		{
			vis[0]--;
			vis[2]--;
			if( a>c || a==c && vis[0]>=vis[2] )
			{
				a--;
				c++;
				ans+="C";
			}
			else
			{
				a++;
				c--;
				ans+="A";
			}
			
		} 
		if( a<0 || b<0 || c<0 )
		{
			flag=0;
			break;
		}
    }
    if( flag==1 )
    {
    	puts("Yes");
    	 for( int i=0;i<ans.size();i++ ) cout<<ans[i]<<endl;
    }
	else puts("No"); 
}3



Compiler output:
a.cc:98:2: error: expected unqualified-id before numeric constant
   98 | }3
      |  ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(n); ++i)
#define repr(i, a, b) for (int i=a; i<(b); ++i)
#define reprev(i, n) for (int i=n-1; i>=0; --i)
#define reprrev(i, a, b) for (int i=b-1; i>=(a); --i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

char ss[3] = {'A', 'B', 'C'};

int main() {
    cout << fixed << setprecision(10);
    
    int N; cin >> N;// A, B, C; cin >> N >> A >> B >> C;
    vector<int> abc(3);
    rep(i, 3) cin >> abc[i];
    string ans;
    vector<int> sinp(N);
    rep(i, N) {
        cin >> sinp[i];
    }

    rep(i, N) {
        // string s; cin >> s;
        int l, r;
        rep(j, 3) {
            if (sinp[i][0] == ss[j]) {
                l = j;
            }
            if (sinp[i][1] == ss[j]) {
                r = j;
            }
        }
        if (abc[l] == 0 && abc[r] == 0) {
            cout << "No" << endl;
            return 0;
        }
        if (abc[l] == 1 && abc[r] == 1 && i < N-1) {
            int nl, nr;
            rep(j, 3) {
                if (sinp[i+1][0] == ss[j]) {
                    nl = j;
                }
                if (sinp[i+1][1] == ss[j]) {
                    nr = j;
                }
            }
            if (l == nl || l == nr) {
                abc[l] += 1;
                abc[r] -= 1;
                ans += ss[l];
            } else {
                abc[r] += 1;
                abc[l] -= 1;
                ans += ss[r];
            }
        } else if (abc[l] < abc[r]) {
            abc[l] += 1;
            abc[r] -= 1;
            ans += ss[l];
        } else {
            abc[l] -= 1;
            abc[r] += 1;
            ans += ss[r];
        }
    }
    cout << "Yes" << endl;
    rep(i, N) {
        cout << ans[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:24: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   28 |             if (sinp[i][0] == ss[j]) {
      |                        ^
a.cc:31:24: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   31 |             if (sinp[i][1] == ss[j]) {
      |                        ^
a.cc:42:30: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   42 |                 if (sinp[i+1][0] == ss[j]) {
      |                              ^
a.cc:45:30: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   45 |                 if (sinp[i+1][1] == ss[j]) {
      |                              ^
Language: C++

#include <bits/stdc++.h>
#define inf 0x3f3f3f3f
#define m_k make_pair
using namespace std;
const int N=1e5+100;
int n,a,b,c,sh[N];
string f,s;
signed main()
{
	scanf("%d%d%d%d",&n,&a,&b,&c);
	for (int i=1;i<=n;i++)
	{
		cin>>s;
		if (s[0]=='A' && s[1]=='B') sh[i]=1;
		if (s[0]=='B' && s[1]=='C') sh[i]=2;
		if (s[0]=='A' && s[1]=='C') sh[i]=3;
	}
	for (int i=1;i<=n;i++)
	{
		if (sh[i]==1)
		{
			if (a==0 && b==0)
			{
				printf("No\n");
				return 0;
			}
			if (a==b && a==1 && c==0)
			{
				if (sh[i+1]==1 || i==n) f.push_back('A');
				else if (sh[i+1]==2) f.push_back('B');
				else if (sh[i+1]==3) f.push_back('A');
			}
			else
			if (a>b) f.push_back('B');
			else f.push_back('A');
			if (f[(int)f.size()-1]=='A') a++,b--;
			else a--,b++;
		}
		if (sh[i]==2)
		{
			if (b==0 && c==0)
			{
				printf("No\n");
				return 0;
			}
			if (b==c && b==1 && a==0)
			{
				if (sh[i+1]==1) f.push_back('B');
				else if (sh[i+1]==2 || i==n) f.push_back('B');
				else if (sh[i+1]==3) f.push_back('C');
			}
			else
			if (b>c) f.push_back('C');
			else f.push_back('B');
			if (f[(int)f.size()-1]=='B') b++,c--;
			else b--,c++;
		}
		if (sh[i]==3)
		{
			if (a==0 && c==0)
			{
				printf("No\n");
				return 0;
			}
			if (a==c && a==1 && b==0)
			{
				if (sh[i+1]==1) f.push_back('A');
				else if (sh[i+1]==2) f.push_back('C');
				else if (sh[i+1]==3 || i==n) f.push_back('A');2
			}
			else
			if (a>c) f.push_back('C');
			else f.push_back('A');
			if (f[(int)f.size()-1]=='A') a++,c--;
			else a--,c++;
		}
	}
	printf("Yes\n");
	for (int i=0;i<(int)f.size();i++) printf("%c\n",f[i]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:80: error: expected ';' before '}' token
   69 |                                 else if (sh[i+1]==3 || i==n) f.push_back('A');2
      |                                                                                ^
      |                                                                                ;
   70 |                         }
      |                         ~
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <utility>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <cmath>
#include <functional>
#include <chrono>
#include <cstring>
#include <limits.h>

using namespace std;
typedef long long lint;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector<lint> vl;
typedef pair<lint,lint> pll;

#define mpr make_pair


int main()
{
    ios_base::sync_with_stdio(0);    cin.tie(NULL);    cout.tie(NULL);

    lint n; cin>>n;
    vl a(3);
    for (lint i=0; i<3; ++i){
        cin>>a[i];
    }

    vector<string> ops(n);
    for (auto &s:ops) cin>>s;


    vi ans;
    for (int i=0; i<n; ++i){
        int x = ops[i][0]-'A';
        int y = ops[i][1]-'A';
        if (a[x] >= a[y]){
            ans.push_back(y);
            a[x]--;
            a[y]++;
        }else{
            ans.push_back(x);
            a[x]++;
            a[y]--;
        }

        if (a[x]<0 || a[y]<0){
            cout<<"No";-
            return 0;
        }
    }
    cout<<"Yes\n";
    for (int i=0; i<n; ++i){
        cout<<(char)(ans[i] + 'A')<<"\n";
    }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:13: error: expected primary-expression before 'return'
   58 |             return 0;
      |             ^~~~~~
Language: C++

#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
typedef long long int ll;
using namespace std;

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

int main(){
  cin >> n >> a >> b >> c;
  s = vector<string>(n);
  for(ll i=0;i<n;i++) cin >> s[i];
   
  for(ll i=0;i<n;i++){
    switch (s[i]){
      case "AB":
        if (a < b) {a++; b--; ans.pb("A");} else {a--; b++; ans.pb("B");}
        break;
      case "BC":
        if (b < c) {b++; c--; ans.pb("B");} else {b--; c++; ans.pb("C");}
        break;
      case "AC":
        if (a < c) {a++; c--; ans.pb("A");} else {a--; c++; ans.pb("C");}
        break;
    }
    if (a<0 || b<0 || c<0){
      cout << "No" << endl; return 0;
    }
  }
  cout << "Yes" << endl;
  for(ll i=0;i<n;i++){
    cout << ans[i] << endl;
  }
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: switch quantity not an integer
   16 |     switch (s[i]){
      |                 ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <limits.h>
#include <cmath>
#include <map>
using namespace std;
using ll=long long;
int main(){
    int n,a,b,c;
    cin>>n>>a>>b>>c;
    int cnt=0;
    if(a==0)cnt++;
    if(b==0)cnt++;
    if(c==0)cnt++;
    vector<string> s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    if(cnt==3){
        cout<<"No"<<endl;
    }else{
        vector<char> ret;
        for(int i=0;i<n;i++){
            if(s[i]=="AB"){
                if(a==0&&b==0){
                    cout<<"No"<<endl;
                    return 0;
                }
                if(a<b||(a<=b&&i<n-1&&s[i+1]=="AC"){
                    ret.push_back('A');
                    a++;
                    b--;
                }
                else {
                    ret.push_back('B');
                    b++;
                    a--;
                }
            }
            if(s[i]=="BC"){
                if(b==0&&c==0){
                    cout<<"No"<<endl;
                    return 0;
                }
                if(b<c||(b<=c&&i<n-1&&s[i+1]=="AB")){
                    ret.push_back('B');
                    b++;
                    c--;
                }
                else {
                    ret.push_back('C');
                    c++;
                    b--;
                }
            }
            if(s[i]=="AC"){
                if(a==0&&c==0){
                    cout<<"No"<<endl;
                    return 0;
                }
                if(a<c||(a<=c&&i<n-1&&s[i+1]=="AB")){
                    ret.push_back('A');
                    a++;
                    c--;
                }
                else {
                    ret.push_back('C');
                    c++;
                    a--;
                }
            }
        }
        cout<<"Yes"<<endl;
        for(int i=0;i<n;i++){
            cout<<ret[i]<<endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:52: error: expected ')' before '{' token
   30 |                 if(a<b||(a<=b&&i<n-1&&s[i+1]=="AC"){
      |                   ~                                ^
      |                                                    )
a.cc:40:13: error: expected primary-expression before '}' token
   40 |             }
      |             ^
Language: C++

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

int main(){
  int A,B,K;
  bool ans=false;
  cin>>K>>A>>B;
  
  for(int i=A, i<=B, i++){
    if(i%K==0) {
      ans=true;
      break;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before '<=' token
    9 |   for(int i=A, i<=B, i++){
      |                 ^~
      |                 ;
a.cc:9:17: error: expected primary-expression before '<=' token
    9 |   for(int i=A, i<=B, i++){
      |                 ^~
a.cc:9:25: error: expected ';' before ')' token
    9 |   for(int i=A, i<=B, i++){
      |                         ^
      |                         ;
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int k,a,b;
  cin>>k>>a>>b;
  int flag=0;
  for(int i=a,i<=b;i++)
  {
    if(i%k==0)
    {
      flag=1;
      break;
    }
  }
  if(flag==1)
  {
    cout<<"OK"<<endl;
  }
    else
    {
      cout<<"NG"<<endl;
    }
  return 0;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '<=' token
    8 |   for(int i=a,i<=b;i++)
      |                ^~
      |                ;
a.cc:8:16: error: expected primary-expression before '<=' token
    8 |   for(int i=a,i<=b;i++)
      |                ^~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int k,a,b;
  cin>>k>>a>>b;
  int flag=0;
  for(int i=a,i<=b;i++)
  {
    if(i%k==0)
    {
      flag=1;
      break;
    }
  }
  if(flag==1)
  {
    cout<<"OK"<<endl;
    else
    {
      cout<<"NG"<<endl;
    }
  return 0;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '<=' token
    8 |   for(int i=a,i<=b;i++)
      |                ^~
      |                ;
a.cc:8:16: error: expected primary-expression before '<=' token
    8 |   for(int i=a,i<=b;i++)
      |                ^~
a.cc:19:5: error: expected '}' before 'else'
   19 |     else
      |     ^~~~
a.cc:17:3: note: to match this '{'
   17 |   {
      |   ^
Language: C++

#include<iostream>
using namespace std;
int maon()
{
  int k,a,b;
  cin>>k>>a>>b;
  int flag=0;
  for(int i=a,i<=b;i++)
  {
    if(i%k==0)
    {
      flag=1;
      break;
    }
  }
  if(flag==1)
  {
    cout<<"OK"<<endl;
    else
    {
      cout<<"NG"<<endl;
    }
  return 0;
  }

Compiler output:
a.cc: In function 'int maon()':
a.cc:8:16: error: expected ';' before '<=' token
    8 |   for(int i=a,i<=b;i++)
      |                ^~
      |                ;
a.cc:8:16: error: expected primary-expression before '<=' token
    8 |   for(int i=a,i<=b;i++)
      |                ^~
a.cc:19:5: error: expected '}' before 'else'
   19 |     else
      |     ^~~~
a.cc:17:3: note: to match this '{'
   17 |   {
      |   ^
Language: C++

#include <iostream>
using namespace std;
 
int main(){
    //入力を受け取る
    int K,A,B;
    cin >> S >> A >> B;
  
   bool a = false;
  for (int i = 0; A <= i <= B;i++) {
    if (i % K == 0) {
      a = true;
      break;
    }
  }
  if (a == true) {
    cout << "Yes" << endl;
  }
  else if (a == false) {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'S' was not declared in this scope
    7 |     cin >> S >> A >> B;
      |            ^
Language: C++

#include <iostream>
using namespace std;
 
int main(){
    //入力を受け取る
    int K,A,B;
    cin >> S >> A >> B;
  
   bool a = false;
  for (int i = 0, A <= i <= B,i++) {
    if (i % K == 0) {
      a = true;
      break;
    }
  }
  if (a = true) {
    cout << "Yes" << endl;
  }
  else if (a = false) {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'S' was not declared in this scope
    7 |     cin >> S >> A >> B;
      |            ^
a.cc:10:20: error: expected ';' before '<=' token
   10 |   for (int i = 0, A <= i <= B,i++) {
      |                    ^~~
      |                    ;
a.cc:10:21: error: expected primary-expression before '<=' token
   10 |   for (int i = 0, A <= i <= B,i++) {
      |                     ^~
a.cc:10:34: error: expected ';' before ')' token
   10 |   for (int i = 0, A <= i <= B,i++) {
      |                                  ^
      |                                  ;
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define PI 3.14159265358979323846
using namespace std;
int main()
{
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
   /// https://ideone.com/Fd5s8n

  int a,b,k;
  
  cin>>k>> a>>b;
  for(int i=a;i<=b;i++){
    if(i%k)
        return cout << "OK" << endl,0;
  }
  cout <<< "NG" << endl;
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:10: error: expected primary-expression before '<' token
   17 |   cout <<< "NG" << endl;
      |          ^
a.cc:17:17: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   17 |   cout <<< "NG" << endl;
      |            ~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std; 
 
#define int long long
#define M 1000000007
 
signed main(){
	
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
	
	int k
	cin >> k;
	int a,b;
	cin >> a >> b;
	if(a%k==0||b%k==0){
		cout << "OK" << endl;
		
	}
	else if(a/k<b/k){
		cout << "OK" << endl;
	}
	else{
		cout << "NG" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected initializer before 'cin'
   14 |         cin >> k;
      |         ^~~
a.cc:17:14: error: 'k' was not declared in this scope
   17 |         if(a%k==0||b%k==0){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int K,A,B;
  cin>>K>>A>>B;
  if(K<=A=B+1)cout<<"OK"<<endl;
  else cout<<"NG"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: lvalue required as left operand of assignment
    6 |   if(K<=A=B+1)cout<<"OK"<<endl;
      |      ~^~~
Language: C

#include <unordered_map>

#include <unordered_set>

#include <algorithm>

#include <iostream>

#include <iostream>

#include <fstream>

#include <numeric>

#include <cstring>

#include <cassert>

#include <string>

#include <vector>

#include <queue>

#include <deque>

#include <cmath>

#include <set>

#include <map>

#include <functional>

#include <bitset>

#include <iomanip>

#include <stack>

#include <list>

#include <cstdint>

#include <chrono>

using namespace std;

#define     loop(n,i,a)     for(ll i=a;i<n;i++)

#define     loopR(n,i,a)    for(ll i=a-1;i>=n;i--)

#define     all(arr,n)      arr,arr+n

#define     allv(v)         (v).begin(),(v).end()

#define     rallv(v)        (v).rbegin(),(v).rend()

#define     m_p             make_pair

#define     ll              long long

#define     pii             pair<ll,ll>

#define     vi              vector<int>

#define     vll             vector<ll>

#define     vii             vector<pii>

#define     sz(x)           (int)x.size()

#define     pb              push_back

#define     endl            "\n"

#define     Endl            "\n"

#define     f               first

#define     s               second

#define     mem(dp,n)       memset(dp,n,sizeof dp)

template<typename T>void max_self(T &a,T b){a=max(a,b);}

template<typename T>void min_self(T &a,T b){a=min(a,b);}

int dx[] = { 1 , 0 ,-1 , 0 ,-1 ,-1 , 1 , 1 };

int dy[] = { 0 , 1 , 0 ,-1 ,-1 , 1 ,-1 , 1 };

int KnightI[] = { 2, 1, -1, -2, -2, -1, 1, 2 };

int KnightJ[] = { 1, 2, 2, 1, -1, -2, -2, -1 };

void fast(){

    std::ios_base::sync_with_stdio(0);

    cin.tie(NULL);

    cout.tie(NULL);

}

vector<string> vec_splitter(string s) {

    s += ',';

    vector<string> res;

    while(!s.empty()) {

        res.push_back(s.substr(0, s.find(',')));

        s = s.substr(s.find(',') + 1);

    }

    return res;

}

void debug_out(

        vector<string> __attribute__ ((unused)) args,

        __attribute__ ((unused)) int idx,

        __attribute__ ((unused)) int LINE_NUM) { cerr << endl; }

template <typename Head, typename... Tail>

void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {

    if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") ";

    stringstream ss; ss << H;

    cerr << args[idx] << " = " << ss.str();

    debug_out(args, idx + 1, LINE_NUM, T...);

}

#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__)

const ll mxN=4e5+10,oo=0x3f3f3f3f,MOD=1e9+7;

const long double PI = acos(-1),eps=1.0e-14;

void solve(){
	

int k, a, b;
  cin>>k>>a>>b;
  if((a+k-1) /k*k<=b) 
    cout<<"OK"<<endl;
  else
    cout<<"NG"<<endl;
    





}

int main() {

#ifndef ONLINE_JUDGE

    freopen("input.txt", "r", stdin);

    freopen("output.txt", "w", stdout);

#endif

    fast();

    solve();

}



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

#include<iostream>
using namespace std;

int main(){
  int K, A, B;
  cin >> K >> A >> B;
  bool flag = false;
  
  for(int i=A;i<=B;i++){
    if(i%K == 0){
      flag = True;
    }
  }
  
  if(flag) cout << "OK" << endl;
  else cout << "NG" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'True' was not declared in this scope
   11 |       flag = True;
      |              ^~~~
Language: C++

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

int main(){
  int k, a, b, c;
  bool ans = "NG";
  cin >> k >> a >> b;
  c = b - a;
  for(i = a; i <= b; ++i){
    if(c%k==0)ans = "OK";
  }
  cout << ans << endl;
  return 0;
}


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

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

int main(){
  int K, A, B;
  cin >> K;
  cin >> A >> B;
  int a;
  a = B - A;
  
  if( a >= K)
    cout << 'OK' << endl;
  }else{
    cout << 'NG' << endl; 
  }
  
  return 0;
}

Compiler output:
a.cc:12:13: warning: multi-character character constant [-Wmultichar]
   12 |     cout << 'OK' << endl;
      |             ^~~~
a.cc:14:13: warning: multi-character character constant [-Wmultichar]
   14 |     cout << 'NG' << endl;
      |             ^~~~
a.cc:13:4: error: expected unqualified-id before 'else'
   13 |   }else{
      |    ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C

#include <stdio.h>

int main(){
    int K;
    int A, B;
    scanf("%d", &K);
    scanf("%d %d", &A, &B);
    
    for(int i = 1 ; i < 1000 ; i++){
    	int temp = K;
    	temp *= i; // 7*3 = 21 -> kelipatan k
    	// printf("Temp number: "%d\n", temp);
    	if(temp => A && temp <= B){ //statement && -> salah 1 false tidak jalan
    		printf("OK\n");
    		// printf("%d\n", i);
    		break;
		}
		else if(temp > B){
			printf("NG\n");
			//printf("%d\n", i);
			break;
		}
    	//balik ke atas
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:18: error: expected expression before '>' token
   13 |         if(temp => A && temp <= B){ //statement && -> salah 1 false tidak jalan
      |                  ^
Language: C

#include <stdio.h>

int main(){
    int K;
    int A, B;
    scanf("%d", &K);
    scanf("%d %d", &A, &B);
    
    for(int i = 1 ; i < 1000 ; i++){
    	int temp = K;
    	temp* = i; // 7*3 = 21 -> kelipatan k
    	// printf("Temp number: "%d\n", temp);
    	if(temp => A && temp <= B){ //statement && -> salah 1 false tidak jalan
    		printf("OK\n");
    		// printf("%d\n", i);
    		break;
		}
		else if(temp > B){
			printf("NG\n");
			//printf("%d\n", i);
			break;
		}
    	//balik ke atas
	}
    

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: expected expression before '=' token
   11 |         temp* = i; // 7*3 = 21 -> kelipatan k
      |               ^
main.c:13:18: error: expected expression before '>' token
   13 |         if(temp => A && temp <= B){ //statement && -> salah 1 false tidak jalan
      |                  ^
Language: C

#include <stdio.h>

int main(){
    int K;
    int A, B;
    scanf("%d", &K);
    scanf("%d %d", &A, &B);
    
    for(int i = 1 ; i < 1000 ; i++){
    	int temp = K;
    	temp* = i; // 7*3 = 21 -> kelipatan k
    	// printf("Temp number: "%d\n", temp);
    	if(temp => a && temp <= b){ //statement && -> salah 1 false tidak jalan
    		printf("OK\n");
    		// printf("%d\n", i);
    		break;
		}
		else if(temp > b){
			printf("NG\n");
			//printf("%d\n", i);
			break;
		}
    	//balik ke atas
	}
    

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: expected expression before '=' token
   11 |         temp* = i; // 7*3 = 21 -> kelipatan k
      |               ^
main.c:13:18: error: expected expression before '>' token
   13 |         if(temp => a && temp <= b){ //statement && -> salah 1 false tidak jalan
      |                  ^
main.c:18:32: error: 'b' undeclared (first use in this function)
   18 |                 else if(temp > b){
      |                                ^
main.c:18:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
    int K;
    int A, B;
    scanf("%d", &K);
    scanf("%d %d", &A, &B);
    
    for(int i = 1 ; i < 1000 ; i++){
    	int temp = k;
    	temp* = i; // 7*3 = 21 -> kelipatan k
    	// printf("Temp number: "%d\n", temp);
    	if(temp => a && temp <= b){ //statement && -> salah 1 false tidak jalan
    		printf("OK\n");
    		// printf("%d\n", i);
    		break;
		}
		else if(temp > b){
			printf("NG\n");
			//printf("%d\n", i);
			break;
		}
    	//balik ke atas
	}
    

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:20: error: 'k' undeclared (first use in this function)
   10 |         int temp = k;
      |                    ^
main.c:10:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:15: error: expected expression before '=' token
   11 |         temp* = i; // 7*3 = 21 -> kelipatan k
      |               ^
main.c:13:18: error: expected expression before '>' token
   13 |         if(temp => a && temp <= b){ //statement && -> salah 1 false tidak jalan
      |                  ^
main.c:18:32: error: 'b' undeclared (first use in this function)
   18 |                 else if(temp > b){
      |                                ^
Language: C++

#include <stdio.h>
int main() {

    int K, A, B;
    int sum=0;
    
    scanf("%d", &K);
    scanf("%d %d", &A, &B);

    sum = A / K;
    sum *= K;
    sum += K;

    if(sum < B; B % K == 0; A % K == 0) {
        printf("OK");
    } else {
        printf("NG");
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected ')' before ';' token
   14 |     if(sum < B; B % K == 0; A % K == 0) {
      |       ~                   ^
      |                           )
a.cc:14:39: error: expected ';' before ')' token
   14 |     if(sum < B; B % K == 0; A % K == 0) {
      |                                       ^
      |                                       ;
a.cc:16:7: error: 'else' without a previous 'if'
   16 |     } else {
      |       ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int k, a, b; cin >> k >> a >> b;
  int x = n/k;
  if(a <= x*b and x*b <= b)
    cout << "OK" << endl;
  else cout << "NG" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |   int x = n/k;
      |           ^
Language: C++

#include <stdio.h>

int main(){
int k,a,b;
int ctr = 0;
scanf("%d %d %d",&k,&a,&b);
for (int i=a;i<=b;i++);{
	if (i%k==0){
		ctr == 1; 
}
	if(ctr==0){
		printf("OK\n");
	}
	else{
		printf("NG\n");
	}
	
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         if (i%k==0){
      |             ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <stdio.h>

int main(){
int k,a,b,i;
int ctr = 0;
scanf("%d %d %d",&k,&a,&b);
for (i=a;i<=b;i++);{
	if (i%k==0){
		ctr == 1; 
}
	if(ctr==0){
		printf("OK\n");
	}
	else{
		printf("NG\n");
	}
	
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^