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

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

int main(){
    string A, B, C;
  cin >> A >> B >> C;
  int ca = 1, cb = 1, cc = 1;
  char ans = a;
  while(ca < A.size() && cb < B.size() && cc < C.size()){
    if(ans == a){
      ans = A[ca];
      ca++;
  }else if(ans == b){
      ans = B[cb];
      cb++;
    }else{
      ans = C[cc];
      cc++;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'a' was not declared in this scope
    9 |   char ans = a;
      |              ^
a.cc:14:19: error: 'b' was not declared in this scope
   14 |   }else if(ans == b){
      |                   ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
  string a, b, c;
  cin >> a >> b >> c;
  string X=a;
  for(int i=0; i<a.length()+b.length()+c.length();i++){
    if (X.at(0)=='a'){
      if(X.length()==0){
        cout << X << endl;
        return;
      }
      else{
        X.substr(0);
        X=a;
      }
    }
    else if(X.at(0)=='b'){
      if(X.length()==0){
        cout << X << endl;
      }
      else {
        X.substr(0);
        X=b;
      }
    }
    else if (X.at(0)=='c'){
      if(X.length()==0){
        cout << X << endl;
      }
      else {
        X.substr(0);
        X=c;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |         return;
      |         ^~~~~~
a.cc:15:17: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   15 |         X.substr(0);
      |         ~~~~~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3208:7: note: declared here
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |       ^~~~~~
a.cc:24:17: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   24 |         X.substr(0);
      |         ~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:3208:7: note: declared here
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |       ^~~~~~
a.cc:33:17: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   33 |         X.substr(0);
      |         ~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:3208:7: note: declared here
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |       ^~~~~~
Language: C++

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

int main(){
  string a, b, c;
  cin >> a >> b >> c;
  string X=a;
  for(int i=0; i<a.length()+b.length()+c.length();i++){
    if (X.at(0)=='a'){
      if(X.length()==0){
        cout << X << endl;
        return;
      }
      else{
        substr(0);
        X=a;
      }
    }
    else if(X.at(0)=='b'){
      if(X.length()==0){
        cout << X << endl;
      }
      else {
        substr(0);
        X=b;
      }
    }
    else if (X.at(0)=='c'){
      if(X.length()==0){
        cout << X << endl;
      }
      else {
        substr(0);
        X=c;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |         return;
      |         ^~~~~~
a.cc:15:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   15 |         substr(0);
      |         ^~~~~~
      |         strstr
a.cc:24:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   24 |         substr(0);
      |         ^~~~~~
      |         strstr
a.cc:33:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   33 |         substr(0);
      |         ^~~~~~
      |         strstr
Language: C++

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

int main(){
  string a, b, c;
  cin >> a >> b >> c;
  string X=a;
  for(int i=0; i<a.length()+b.length()+c.length();i++){
    if (X.at(0)=='a'){
      if(X.length()==0){
        cout << X << endl;
        return;
      }
      else{
        substr(1,X.length()-1);
        X=a;
      }
    }
    else if(X.at(0)=='b'){
      if(X.length()==0){
        cout << X << endl;
      }
      else {
        substr(1,X.length()-1);
        X=b;
      }
    }
    else if (X.at(0)=='c'){
      if(X.length()==0){
        cout << X << endl;
      }
      else {
        substr(1, X.length()-1);
        X=c;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |         return;
      |         ^~~~~~
a.cc:15:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   15 |         substr(1,X.length()-1);
      |         ^~~~~~
      |         strstr
a.cc:24:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   24 |         substr(1,X.length()-1);
      |         ^~~~~~
      |         strstr
a.cc:33:9: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   33 |         substr(1, X.length()-1);
      |         ^~~~~~
      |         strstr
Language: C++

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

int main(){
  string a, b, c;
  cin >> a >> b >> c;
  string X=a;
  for(int i=0; i<a.length()+b.length()+c.length();i++){
    if (X.at(0)=='a'){
      substr(1,X.length()-1);
      X=a;
    }
    else if(X.at(0)=='b'){
      substr(1,X.length()-1);
      X=b;
    }
    else if (X.at(0)=='c'){
      substr(1, X.length()-1);
      X=c;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   10 |       substr(1,X.length()-1);
      |       ^~~~~~
      |       strstr
a.cc:14:7: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   14 |       substr(1,X.length()-1);
      |       ^~~~~~
      |       strstr
a.cc:18:7: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   18 |       substr(1, X.length()-1);
      |       ^~~~~~
      |       strstr
Language: C++

//#pragma GCC optimize(\"Ofast,no-stack-protector\")
//#pragma GCC target(\"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx\")
//#pragma GCC target(\"avx,tune=native\")
// Neil

#include<bits/stdc++.h>

using namespace std;

typedef complex<double> base;
typedef long double ld;
typedef long long ll;

#define endl "\n"
#define pb push_back
#define pii pair<int,int>
#define pll pair< ll , ll >
#define vi vector<int>
#define vvi vector< vi >
const int MAXN=(int)(2e5+5);
const ll MOD=(ll)(1e9+7);
int t;
int func(string s, int pos){
	if(s[pos] == 'a')
      return 1;
  	else if(s[pos]=='b')
      	return 2;
 	else if(s[pos]=='c)
      return 3;
     return 0;
}
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);
    string s1,s2, s3;
  	cin>>s1>>s2>>s3;
  	int i=0,j=0,k=0;
  	int turn = 1;
  	while(true){
    	if(turn == 1){
        	turn = func(s1, i++);
        }
      else if(turn ==2){
      	turn = func(s2, j++);
      }
      else if(turn == 3){
      	turn = func(s3, k++);
      }
      else
        break;
    }
  	if(i==s1.size())
      	cout<<"A"<<endl;
  	else if(j==s2.size())
      	cout<<"B"<<endl;
 	else
      cout<<"C"<<endl;
    return 0;
}

Compiler output:
a.cc:28:25: warning: missing terminating ' character
   28 |         else if(s[pos]=='c)
      |                         ^
a.cc:28:25: error: missing terminating ' character
   28 |         else if(s[pos]=='c)
      |                         ^~~
a.cc: In function 'int func(std::string, int)':
a.cc:29:7: error: expected primary-expression before 'return'
   29 |       return 3;
      |       ^~~~~~
a.cc:30:6: error: expected primary-expression before 'return'
   30 |      return 0;
      |      ^~~~~~
a.cc:29:16: error: expected ')' before 'return'
   29 |       return 3;
      |                ^
      |                )
   30 |      return 0;
      |      ~~~~~~     
a.cc:28:16: note: to match this '('
   28 |         else if(s[pos]=='c)
      |                ^
a.cc:31:1: warning: control reaches end of non-void function [-Wreturn-type]
   31 | }
      | ^
Language: C++

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

int main(){
  string A,B,C;
  cin >> A >> B >> C;
  
  bool run = true;
  string turn = "A";
  while(run){
  	if (turn == "A"){
      if (A.size() == 0){
      	run = false;
      }
      else{
        turn = A[0];
        A.erase(A.begin());
      }
    }
    else if(turn == "B"){
      if(B.size() ==0){
      	run = false;
      }
      else{
        turn = B[0];
        B.erase(B.begin());
      }  
    }
    else{
      if(C.size() == 0){
        run = false;
      }
      else{
        turn = C[0];
        C.erase(C.begin());
      }
    }
  }
  if(turn == "a"){
  	turn = "A";
  }else if(turn == "b"){
  	turn = "B";
  }else{
  	turn = "C"
  }
  cout << turn << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:19: error: expected ';' before '}' token
   44 |         turn = "C"
      |                   ^
      |                   ;
   45 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
using namespace std;
typedef long long ll;
#define MODSIZE 1000000007

int main(){
  int na;
  int nb;
  int nc;
  int sp[3];

  sp[0] = sp[1] = sp[2] = 0;

  char s[3][105];

  scanf("%s %s %s", s[0], s[1], s[2]);

  na = strlen(s[0]);
  nb = strlen(s[1]);
  nc = strlen(s[2]);

  char t;
  t = 'a';
  while(1){
    sp[t - 'a']++;
    t = s[t - 'a'][sp[t - 'a']];

    if(sp[t - 'a'] == na - 1 || sp[t - 'a'] == nb - 1 || sp[t - 'a'] == nc - 1) break;
  }

  if(sp[2] == nc - 1) printf("C\n");

  else if(sp[1] == nb - 1) printf("B\n");

  else printf("A\n");

  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:38:12: error: expected '}' at end of input
   38 |   return 0;
      |            ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

from sys import exit

sa = input()
sb = input()
sc = input()

turn = 'a'
while True:
  if turn == 'a':
    if len(sa) == 0:
      print('A')
      exit()
    else:
      turn = sa[0]
      sa = sa[1:]
  if turn == 'b':
    if len(sb) == 0:
      print('B')
      exit()
    else:
      turn = sb[0]
      sb = sb[1:]
  if turn == 'c':
    if len(sc) == 0:
      print('C')
      exit()
    else:
      turn = sc[0]
      sc = sc[1:]

Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from sys import exit
      | ^~~~
Language: Java

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    String c = sc.next();
    StringBuilder aa = new StringBuilder(a);
    StringBuilder bb = new StringBuilder(b);
    StringBuilder cc = new StringBuilder(c);
    char x = aa.charAt(0);
    String ans = "";
    while (true) {
      if (x == 'a') {
        if (aa.length() == 0) {
          ans = "A";
          break;
        } else {
        x = aa.charAt(0);   
        aa.delete(0,1);
        }
      }
      if(x == 'b') {
        if (bb.length() == 0) {
          ans = "B";
          break;
        } else {
        x = bb.charAt(0); 
        bb.delete(0,1);
        }
      }
      if(x == 'c') {
        if (cc.length() == 0) {
          ans = "C";
          break;
        } else {
        x = cc.charAt(0); 
        cc.delete(0,1);
        }
      }
    }

    System.out.println(ans);
    
  }
}

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

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

int main() {
  string a, b, c;
  bool flag;
  int a_length, b_length, c_length = 0;
  int turn = 0;

  cin >> a >> b >> c;

  flag = false;
  while (flag)
  {
    if (turn == 0)
    {
      a_length++;

      if (a_length == a.length()) flag = true;

      if (a[a_length - 1] == "a") turn = 0;
      else if (a[a_length - 1] == "b") turn = 1;
      else turn = 2;
    }
    else if (turn == 1)
    {
      b_length++;

      if (b_length == b.length()) flag = true;

      if (b[b_length - 1] == "a") turn = 0;
      else if (b[b_length - 1] == "b") turn = 1;
      else turn = 2;
    }
    else if (turn == 2)
    {
      c_length++;

      if (c_length == c.length()) flag = true;

      if (c[c_length - 1] == "a") turn = 0;
      else if (c[c_length - 1] == "b") turn = 1;
      else turn = 2;
    }
  }

  if (a_length == a.length()) cout << 'A' << endl;
  else if (b_length == b.length()) cout << 'B' << endl;
  eles cout << 'C' << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |       if (a[a_length - 1] == "a") turn = 0;
a.cc:23:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |       else if (a[a_length - 1] == "b") turn = 1;
a.cc:32:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |       if (b[b_length - 1] == "a") turn = 0;
a.cc:33:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |       else if (b[b_length - 1] == "b") turn = 1;
a.cc:42:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   42 |       if (c[c_length - 1] == "a") turn = 0;
a.cc:43:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   43 |       else if (c[c_length - 1] == "b") turn = 1;
a.cc:50:3: error: 'eles' was not declared in this scope
   50 |   eles cout << 'C' << endl;
      |   ^~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;
char select(char a){
  if(a=='a'){
    return 'A';
  }
  else if(a=='b'){
    return 'B';
  }
  else if(a=='c'){
    return 'C';
  }
}
int main(){
  string a,b,c;
  getline(cin,a);
  getline(cin,b);
  getline(cin,c);
  char flag='A',turn='A';
  
  while(true){
    if(flag=='A'){
      if(a.empty()){
        turn='A'
        break;
      }
      flag=a.front();
      a.erase(a.begin());
      flag=select(flag);
    }
    if(flag=='B'){
      if(b.empty()){
        turn='B'
        break;
      }
      flag=b.front();
      b.erase(b.begin());
      flag=select(flag);
    }
    if(flag=='C'){
      if(c.empty()){
        turn='C'
        break;
      }
      flag=c.front();
      c.erase(c.begin());
      flag=select(flag);
    }
    
  }
  cout<<turn<<endl;
  
}






Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: expected ';' before 'break'
   26 |         turn='A'
      |                 ^
      |                 ;
   27 |         break;
      |         ~~~~~    
a.cc:35:17: error: expected ';' before 'break'
   35 |         turn='B'
      |                 ^
      |                 ;
   36 |         break;
      |         ~~~~~    
a.cc:44:17: error: expected ';' before 'break'
   44 |         turn='C'
      |                 ^
      |                 ;
   45 |         break;
      |         ~~~~~    
a.cc: In function 'char select(char)':
a.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
Language: C++

#include <iostream>
#include <string>

using namespace std;
char select(char a){
  if(a=='a'){
    return 'A';
  }
  else if(a=='b'){
    return 'B';
  }
  else if(a=='c'){
    return 'C';
  }
}
int main(){
  string a,b,c;
  getline(cin,a);
  getline(cin,b);
  getline(cin,c);
  char flag='A',turn='A';
  
  while(!a.empty() and !b.empty() and !c.empty()){
    turn=flag
    if(flag=='A'){
      flag=a.front();
      a.erase(a.begin());
      flag=select(flag);
    }
    if(flag=='B'){
      flag=b.front();
      b.erase(b.begin());
      flag=select(flag);
    }
    if(flag=='C'){
      flag=c.front();
      c.erase(c.begin());
      flag=select(flag);
    }
    
  }
  cout<<turn<<endl;
  
}






Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: expected ';' before 'if'
   24 |     turn=flag
      |              ^
      |              ;
   25 |     if(flag=='A'){
      |     ~~        
a.cc: In function 'char select(char)':
a.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
Language: C++

#include <iostream>
#include <string>

using namespace std;
char select(char a){
  if(a=='a'){
    return 'A'
  }
  else if(a=='b'){
    return 'B'
  }
  else if(a=='c'){
    return 'C'
  }
}
int main(){
  string a,b,c;
  getline(cin,a);
  getline(cin,b);
  getline(cin,c);
  char flag='A';
  while(true){
    if(flag=='A'){
      flag=a.front();
      a.erase(a.begin(),a.begin());
      flag=select(flag);
    }
    if(flag=='B'){
      flag=b.front();
      b.erase(b.begin(),b.begin());
      flag=select(flag);
    }
    if(flag=='C'){
      flag=c.front();
      c.erase(c.begin(),c.begin());
      flag=select(flag);
    }
    if(a.empty() or b.empty() or c.empty()){
      break;
    }
  }
  cout<<flag<<endl;
  
}


Compiler output:
a.cc: In function 'char select(char)':
a.cc:7:15: error: expected ';' before '}' token
    7 |     return 'A'
      |               ^
      |               ;
    8 |   }
      |   ~            
a.cc:10:15: error: expected ';' before '}' token
   10 |     return 'B'
      |               ^
      |               ;
   11 |   }
      |   ~            
a.cc:13:15: error: expected ';' before '}' token
   13 |     return 'C'
      |               ^
      |               ;
   14 |   }
      |   ~            
a.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
Language: C++

#include <iostream>
#include <string>

using namespace std;
char select(char a){
  if(a=='a'){
    return 'A'
  }
  else if(a=='b'){
    return 'B'
  }
  else if(a=='c'){
    return 'C'
  }
}
int main(){
  string a,b,c;
  getline(cin,a);
  getline(cin,b);
  getline(cin,c);
  char flag='A';
  while(true){
    if(flag=='A'){
      flag=a.front();
      a.erase(a.begin(),a.begin());
      flag=select(s);
    }
    if(flag=='B'){
      flag=b.front();
      b.erase(b.begin(),b.begin());
      flag=select(s);
    }
    if(flag=='C'){
      flag=c.front();
      c.erase(c.begin(),c.begin());
      flag=select(s);
    }
    if(a.empty() or b.empty() or c.empty()){
      break;
    }
  }
  cout<<flag<<endl;
  
}


Compiler output:
a.cc: In function 'char select(char)':
a.cc:7:15: error: expected ';' before '}' token
    7 |     return 'A'
      |               ^
      |               ;
    8 |   }
      |   ~            
a.cc:10:15: error: expected ';' before '}' token
   10 |     return 'B'
      |               ^
      |               ;
   11 |   }
      |   ~            
a.cc:13:15: error: expected ';' before '}' token
   13 |     return 'C'
      |               ^
      |               ;
   14 |   }
      |   ~            
a.cc: In function 'int main()':
a.cc:26:19: error: 's' was not declared in this scope
   26 |       flag=select(s);
      |                   ^
a.cc:31:19: error: 's' was not declared in this scope
   31 |       flag=select(s);
      |                   ^
a.cc:36:19: error: 's' was not declared in this scope
   36 |       flag=select(s);
      |                   ^
a.cc: In function 'char select(char)':
a.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
void ABC40(void);
void ABC41(void);
void ABC42(void);
void ABC43(void);
void ABC44(void);
void ABC45(void);
void ABC46(void);
void ABC47(void);
void ABC48(void);
void ABC49(void);

int main(void){
    ABC45();
}

void ABC45(){
    int a,b,c;
    char ch='a',ans;
    string sa,sb,sc;
    cin>>sa>>sb>>sc;
    a=sa.length();
    asize=sa.length();
    b=sb.length();
    bsize=sb.length();
    c=sc.length();
    csize=sc.length();
    while(1){
        if(ch=='a'){
            ch=sa[asize-a];
            a--;
            if(a==0){
                ans='A';
                break;
            }
        }
        if(ch=='b'){
            ch=sb[bsize-b];
            b--;
            if(b==0){
                ans='B';
                break;
            }
        }
        if(ch=='c'){
            ch=sc[csize-c];
            c--;
            if(c==0){
                ans='C';
                break;
            }
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'void ABC45()':
a.cc:25:5: error: 'asize' was not declared in this scope; did you mean 'dysize'?
   25 |     asize=sa.length();
      |     ^~~~~
      |     dysize
a.cc:27:5: error: 'bsize' was not declared in this scope; did you mean 'dysize'?
   27 |     bsize=sb.length();
      |     ^~~~~
      |     dysize
a.cc:29:5: error: 'csize' was not declared in this scope; did you mean 'dysize'?
   29 |     csize=sc.length();
      |     ^~~~~
      |     dysize
Language: C++

/***
*  author  :_shamim
*  created : 06.05.2020
*
***/

#include <iostream>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <list>
#include <set>
#include <queue>
#include <iterator>
#include <bitset>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#define ll             long long
#define _              ios_base::sync_with_stdio(0);cin.tie(0);
#define loop           for(i=0;i<n;i++)
#define pb             push_back
#define tc()           int t;cin>>t;while(t--)          

using namespace std;

ll i,j,temp;

int main()
{_

	char sa[101],sb[101],sc[101],current,winner;
	int cnta=1,cntb=0,cntc=0,lena=0,lenb=0,lenc=0
	cin>>sa>>sb>>sc;
	while(sa[lena]!='\0')
		lena++;
	while(sb[lenb]!='\0')
		lenb++;
	while(sc[lenc]!='\0')
		lenc++;

	current = sa[0];
	for(i=0;;i++){
		if(current == 'a'){
			current = sa[cnta];
			cnta++;
			if(current == '\0'){
				winner = 'a';
				break;
			}
		}
		else if(current == 'b'){
			current = sb[cntb];
			cntb++;
			if(current == '\0'){
				winner = 'a';
				break;
			}
			
		}
		else if(current == 'c'){
			current = sc[cntc];
			cntc++;
			if(current== '\0'){
				winner = 'c';
				break;
			}
		}
	}
	if(winner=='a'){
		cout<<"A"<<endl;
	}
	else if(winner == 'b'){
		cout<<"B"<<endl;
	}
	else{
		cout<<"C"<<endl;
	}



	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:9: error: expected ',' or ';' before 'cin'
   34 |         cin>>sa>>sb>>sc;
      |         ^~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
  int unused __attribute__((unused));
  int i, turn, next, cnt[3];
  char S[3][100];

  unused = scanf("%s", S[0]);
  unused = scanf("%s", S[1]);
  unused = scanf("%s", S[2]);
  cnt[0] = strlen(S[0]); cnt[1] = strlen(S[1]); cnt[2] = strlen(S[2]);

  turn = 0;
  while(1){
    if(cnt[turn]==0) break;
    next = S[turn][0] - 97;
    for(i=0; i<cnt[turn]; i++) S[turn][i] = S[turn][i+1];
    cnt[turn]--;
    turn = next;
  }

  if(turn==0) printf("A");
  else if(turn==1) printf("B");
  else if(turn==2) printf("C");
  return 0;

Compiler output:
main.c: In function 'main':
main.c:26:3: error: expected declaration or statement at end of input
   26 |   return 0;
      |   ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    string a,b,c;
    cin>>a>>b>>c;
    reverse(a.begin(),a.end());
    reverse(b.begin(),b.end());
    reverse(c.begin(),c.end());
    char cur = 'a';
    while (true) {
        switch (cur){
            case 'a': if(a.empty()){puts("A");return 0;} cur=a.back();a.pop_back();break;
            case 'b': if(b.empty()){puts("B");return 0;} cur=b.back();b.pop_back();break;
            case 'c': if(c.empty()){puts("C");return 0;} cur=c.back();c.pop_back();break;
            default:;
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'reverse' was not declared in this scope
    7 |     reverse(a.begin(),a.end());
      |     ^~~~~~~
Language: C++

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

  string a,b,c;
  cin >> a >> b >> c;
  char t = 'a';

  while (1) {


    if (t == 'a'&&a.empty()) {
      cout << "A" << endl;
      break;
    } else if (t == 'b'&&b.empty()) {
      cout << "B" << endl;
      break;
    } else if (c.emty()&&t == 'c') {
      cout << "C" << endl;
      break;
    }

    if (t == 'a') {//a
      t=a[0];
      a.erase(a.begin());
    } else if (t == 'b') {//b
      t=b[0];
      b.erase(b.begin());
    } else if (t == 'c'){//c
      t=c[0];
      c.erase(c.begin());
    }
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'emty'; did you mean 'empty'?
   18 |     } else if (c.emty()&&t == 'c') {
      |                  ^~~~
      |                  empty
Language: C++

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


int main(){
  string A, B, C;
  cin >> A >> B >> C;
  int top_A = 0;
  int top_B = 0;
  int top_C = 0;
  char turn = 'a';
  while(top_A++ != A.size()-1 && top_B++ != B.size()-1 && top_C++ == C.size()-1){
    if(turn == 'a'){
      if(top_A++ == A.size()-1){
        cout << 'A' << endl;
        return 0;
      }
      turn = A[top_A];
      top_A++
    }
    if(turn == 'b'){
       if(top_B++ == B.size()-1){
        cout << 'B' << endl;
        return 0;
       }
      turn = B[top_B];
      top_B++
    }
    if(turn == 'c'){
       if(top_C++ == C.size()-1){
        cout << 'C' << endl;
        return 0;
       }
      turn = C[top_C];
      top_C++
    }
  }
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: expected ';' before '}' token
   19 |       top_A++
      |              ^
      |              ;
   20 |     }
      |     ~         
a.cc:27:14: error: expected ';' before '}' token
   27 |       top_B++
      |              ^
      |              ;
   28 |     }
      |     ~         
a.cc:35:14: error: expected ';' before '}' token
   35 |       top_C++
      |              ^
      |              ;
   36 |     }
      |     ~
Language: C++

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


int main(){
  string A, B, C;
  cin >> A >> B >> C;
  int top_A = 0;
  int top_B = 0;
  int top_C = 0;
  char turn = 'a'
  while(top_A++ != A.size()-1 && top_B++ != B.size()-1 && top_C++ == C.size()-1){
    if(turn == 'a'){
      if(top_A++ == A.size()-1){
        cout << 'A' << endl;
        return 0;
      }
      turn = A[top_A];
      top_A++
    }
    if(turn == 'b'){
       if(top_B++ == B.size()-1){
        cout << 'B' << endl;
        return 0;
       }
      turn = B[top_B];
      top_B++
    }
    if(turn == 'c'){
       if(top_C++ == C.size()-1){
        cout << 'C' << endl;
        return 0;
       }
      turn = C[top_C];
      top_C++
    }
  }
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'while'
   12 |   while(top_A++ != A.size()-1 && top_B++ != B.size()-1 && top_C++ == C.size()-1){
      |   ^~~~~
Language: C++

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


int main(){
  string A, B, C;
  cin >> A >> B >> C;
  int top_A = 0;
  int top_B = 0;
  int top_C = 0;
  char turn = 'a'
  while(){
    if(turn == 'a'){
      if(top_A++ == A.size()-1){
        cout << 'A' << endl;
        return 0;
      }
      turn = A[top_A];
      top_A++
    }
    if(turn == 'b'){
       if(top_B++ == B.size()-1){
        cout << 'B' << endl;
        return 0;
       }
      turn = B[top_B];
      top_B++
    }
    if(turn == 'c'){
       if(top_C++ == C.size()-1){
        cout << 'C' << endl;
        return 0;
       }
      turn = C[top_C];
      top_C++
    }
  }
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'while'
   12 |   while(){
      |   ^~~~~
Language: C++

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

void game(string S, string A, string B, string C){
  char card = S[1];
  S.erase(1,1);
  
  if(S.empty()) return;
  
  if(card == 'a') game(A, A, B, C);
  if(card == 'b') game(B, A, B, C);
  if(card == 'c') game(C, A, B, C);
}


int main(){
  string A, B, C;
  cin >> A >> B >> C;
  game(A);
  
  if(A.empty()) cout << 'A' << endl;
  if(B.empty()) cout << 'B' << endl;
  if(C.empty()) cout << 'C' << endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: too few arguments to function 'void game(std::string, std::string, std::string, std::string)'
   19 |   game(A);
      |   ~~~~^~~
a.cc:4:6: note: declared here
    4 | void game(string S, string A, string B, string C){
      |      ^~~~
Language: C++

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

void game(string S){
  char card = S[1];
  S.erase(1,1);
  
  if(S.empty()) return;
  
  if(card == 'a') game(A);
  if(card == 'b') game(B);
  if(card == 'c') game(C);
}


int main(){
  string A, B, C;
  cin >> A >> B >> C;
  game(A);
  
  if(A.empty()) cout << 'A' << endl;
  if(B.empty()) cout << 'B' << endl;
  if(C.empty()) cout << 'C' << endl;
}
  
  

Compiler output:
a.cc: In function 'void game(std::string)':
a.cc:10:24: error: 'A' was not declared in this scope
   10 |   if(card == 'a') game(A);
      |                        ^
a.cc:11:24: error: 'B' was not declared in this scope
   11 |   if(card == 'b') game(B);
      |                        ^
a.cc:12:24: error: 'C' was not declared in this scope
   12 |   if(card == 'c') game(C);
      |                        ^
Language: C++

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

void game(string S){
  char card = S[1];
  S.erase(1,1);
  
  if(S.empty()) return;
  
  if(S[n] == 'a') game(A);
  if(S[n] == 'b') game(B);
  if(S[n] == 'c') game(C);
}


int main(){
  string A, B, C;
  cin >> A >> B >> C;
  game(A);
  
  if(A.empty()) cout << 'A' << endl;
  if(B.empty()) cout << 'B' << endl;
  if(C.empty()) cout << 'C' << endl;
}
  
  

Compiler output:
a.cc: In function 'void game(std::string)':
a.cc:10:8: error: 'n' was not declared in this scope
   10 |   if(S[n] == 'a') game(A);
      |        ^
a.cc:10:24: error: 'A' was not declared in this scope
   10 |   if(S[n] == 'a') game(A);
      |                        ^
a.cc:11:8: error: 'n' was not declared in this scope
   11 |   if(S[n] == 'b') game(B);
      |        ^
a.cc:11:24: error: 'B' was not declared in this scope
   11 |   if(S[n] == 'b') game(B);
      |                        ^
a.cc:12:8: error: 'n' was not declared in this scope
   12 |   if(S[n] == 'c') game(C);
      |        ^
a.cc:12:24: error: 'C' was not declared in this scope
   12 |   if(S[n] == 'c') game(C);
      |                        ^
Language: C++

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

string game(string S){
  char card = S[1];
  S.erase(1,1);
  
  if(S.empty()) return;
  
  if(S[n] == 'a') game(A);
  if(S[n] == 'b') game(B);
  if(S[n] == 'c') game(C);
}


int main(){
  string A, B, C;
  cin >> A >> B >> C;
  game(A);
  
  if(A.empty()) cout << 'A' << endl;
  if(B.empty()) cout << 'B' << endl;
  if(C.empty()) cout << 'C' << endl;
}
  
  

Compiler output:
a.cc: In function 'std::string game(std::string)':
a.cc:8:17: error: return-statement with no value, in function returning 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-fpermissive]
    8 |   if(S.empty()) return;
      |                 ^~~~~~
a.cc:10:8: error: 'n' was not declared in this scope
   10 |   if(S[n] == 'a') game(A);
      |        ^
a.cc:10:24: error: 'A' was not declared in this scope
   10 |   if(S[n] == 'a') game(A);
      |                        ^
a.cc:11:8: error: 'n' was not declared in this scope
   11 |   if(S[n] == 'b') game(B);
      |        ^
a.cc:11:24: error: 'B' was not declared in this scope
   11 |   if(S[n] == 'b') game(B);
      |                        ^
a.cc:12:8: error: 'n' was not declared in this scope
   12 |   if(S[n] == 'c') game(C);
      |        ^
a.cc:12:24: error: 'C' was not declared in this scope
   12 |   if(S[n] == 'c') game(C);
      |                        ^
a.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }
      | ^
Language: C++

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

void game(if(card == 'a') game(queue<char> &X, queue<char> &A, queue<char> &B, queue<char> &C){
  char card = X[0]//場に出すカード
  X.pop();
  if(X.empty()) return;
  
  if(card == 'a') game(queue<char> &A, queue<char> &A, queue<char> &B, queue<char> &C);
  if(card == 'b') game(queue<char> &B, queue<char> &A, queue<char> &B, queue<char> &C);
  if(card == 'c') game(queue<char> &C, queue<char> &A, queue<char> &B, queue<char> &C);
}
          
int main(){
  string a, b, c;
  cin >> a >> b >> c;
  queue<char> A, B, C, A2;
  
  for(int i = 0;  i < a.size();  i++){
    A.push(a[i]);
  }
  for(int i = 0;  i < a.size();  i++){
    B.push(b[i]);
  }
  for(int i = 0;  i < a.size();  i++){
    C.push(c[i]);
  }
  
  &A2 = A;
  game(A2, A, B, C);
  
  if(A.empty) cout << 'A' << endl;
  if(B.empty) cout << 'B' << endl;
  if(C.empty) cout << 'C' << endl;
}
  
  
  

Compiler output:
a.cc:4:6: error: variable or field 'game' declared void
    4 | void game(if(card == 'a') game(queue<char> &X, queue<char> &A, queue<char> &B, queue<char> &C){
      |      ^~~~
a.cc:4:11: error: expected primary-expression before 'if'
    4 | void game(if(card == 'a') game(queue<char> &X, queue<char> &A, queue<char> &B, queue<char> &C){
      |           ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string sA,sB,sC;
  cin>>sA>>sB>>sC;
  sA+='A'; sB+='B'; sC+='C';
  int i=0;
  int j=-1;
  int k=-1;
  char ans=sA.at(0);
  for(l=0; ;l++){
  if(ans=='a'){
  i++; ans=sA.at(i);
  }else if(ans=='b'){
    j++; ans=sB.at(j);
  
  }else{
   k++; ans=sC.at(k);
  }if(ans=='A'|| ans=='B' || ans=='C'){
     break;
  }
    
    }cout<<ans<<endl;
  
   return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
string sA,sB,sC;
  cin>>sA>>sB>>sC;
  sA+='A'; sB+='B'; sC+='C';
  int i=0;
  int j=-1;
  int k=-1;
  char ans=sA.at(0);
  for(l=0; ;l++){
  if(ans=='a'){
  i++; ans=sA.at(i)
  }else if(ans=='b'){
    j++; ans=sB.at(j);
  j
  }else{
   k++; ans=sC.at(k);
  }if(ans=='A'|| ans=='B' || ans=='C'){
     break;
  }
    
    }cout<<ans<<endl;
  
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'l' was not declared in this scope
   11 |   for(l=0; ;l++){
      |       ^
a.cc:13:20: error: expected ';' before '}' token
   13 |   i++; ans=sA.at(i)
      |                    ^
      |                    ;
   14 |   }else if(ans=='b'){
      |   ~                 
a.cc:16:4: error: expected ';' before '}' token
   16 |   j
      |    ^
      |    ;
   17 |   }else{
      |   ~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String sa = sc.next();
    String sb = sc.next();
    String sc = sc.next();
    int la = sa.length();
    int lb = sb.length();
    int lc = sc.length();
    int pa = 0;
    int pb = 0;
    int pc = 0;
    int h = 0;
    String ans = "A";
    for(int i = 0; i < (la + lb + lc); i++) {
      if(h == 0) {
        if(pa < la) {
          if(sa.charAt(pa) == 'a') {
            h = 0;
          } else if(sa.charAt(pa) == 'b') {
            h = 1;
          } else {
            h = 2;
          }
          pa++;
        } else {
          break;
        }
      } else if(h == 1) {
        if(pb < lb) {
          if(sb.charAt(pb) == 'a') {
            h = 0;
          } else if(sb.charAt(pb) == 'b') {
            h = 1;
          } else {
            h = 2;
          }
          pb++;
        } else {
          ans = "B";
          break;
        }
      } else {
        if(pc < lc) {
          if(sc.charAt(pc) == 'a') {
            h = 0;
          } else if(sc.charAt(pc) == 'b') {
            h = 1;
          } else {
            h = 2;
          }
          pc++;
        } else {
          ans = "C";
          break;
        }
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:8: error: variable sc is already defined in method main(String[])
    String sc = sc.next();
           ^
Main.java:8: error: cannot find symbol
    String sc = sc.next();
                  ^
  symbol:   method next()
  location: variable sc of type String
2 errors
Language: C++

int main() {
	string a, b, c;
	cin>>a>>b>>c;
	int an=0, bn=0, cn=0;
	char x = 'a';
	while (an<a.length() and bn<b.length() and cn<c.length()){
		if (x=='a'){
			x = a[an];
			an++;
			if (an==a.length()){
				cout << "A\n";
			}
		}
		if (x=='b'){
			x = b[bn];
			bn++;
			if (bn==b.length()){
				cout << "B\n";
			}
		}
		if (x=='c'){
			x=c[cn];
			cn++;
			if (cn==c.length()){
				cout << "C\n";
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
    2 |         string a, b, c;
      |         ^~~~~~
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin>>a>>b>>c;
      |         ^~~
a.cc:3:14: error: 'a' was not declared in this scope
    3 |         cin>>a>>b>>c;
      |              ^
a.cc:3:17: error: 'b' was not declared in this scope
    3 |         cin>>a>>b>>c;
      |                 ^
a.cc:3:20: error: 'c' was not declared in this scope
    3 |         cin>>a>>b>>c;
      |                    ^
a.cc:11:33: error: 'cout' was not declared in this scope
   11 |                                 cout << "A\n";
      |                                 ^~~~
a.cc:18:33: error: 'cout' was not declared in this scope
   18 |                                 cout << "B\n";
      |                                 ^~~~
a.cc:25:33: error: 'cout' was not declared in this scope
   25 |                                 cout << "C\n";
      |                                 ^~~~
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
using namespace std;

int main() {
	ios::sync_with_stdio(false);
	string A,B,C,a,b,c;
	cin >> A >> B >> C;
	char x='a';
	a=A;
	b=B;
	c=C;
	reverse(a.begin(),a.end());
	reverse(b.begin(),b.end());
	reverse(c.begin(),c.end());
	while (A.length()>=0 && B.length()>=0 && C.length()>=0) {
		if (x=='a') {
			if (a.length()!=0) {
				x=a[a.length()-1];
				a.pop_back();
			}
			else {
				cout << "A";
				break;
			}
		}
		if (x=='b') {
			if (b.length()!=0) {
				x=b[b.length()-1];
				b.pop_back();
			}
			else {
				cout << "B";
				break;
			}
		}
		if (x=='c') {
			if (c.length()!=0) {
				x=c[c.length()-1];
				c.pop_back();
			}
			else {
				cout << "C";
				break;
			}
		}
	}
}


C

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

def get_i() #空白区切の入力を数値(整数)の配列で返す
  return gets.chomp.split(" ").map(&:to_i)
end
def get_f() #空白区切の入力を数値(実数)の配列で返す
  return gets.chomp.split(" ").map(&:to_f)
end
def get() #空白区切の入力を文字列の配列で返す
  return gets.chomp.split(" ")
end
def get_nsp() #入力されたものを一文字ずつに区切った文字列の配列で返す
  return gets.chomp.split("")
end
def yn_judge(bool,y="Yes",n="No") #boolに真偽を投げることで、trueならy、falseならnの値を出力する
  return bool ? y : n 
end
def array(size1,init=nil,size2=-1) #size2に二次元配列時の最初の要素数、size1に次の配列の大きさ、initに初期値を投げることでその配列を返す
  if size2==-1
    return Array.new(size1){init}
  else
    return Array.new(size2){Array.new(size1){init}}
  end
end

def change(x)
  case x
  when "a" then
      return 0
  when "b" then
      return 1
  when "c" then
      return 2
  end
end
Sa=get_nsp
Sb=get_nsp
Sc=get_nsp
Na=Sa.size
Nb=Sb.size
Nc=Sc.size
turn=0
a=0
b=0
c=0

loop do
  case turn
  when 0 then
    break if a==Na
    turn=change(Sa[a])   
    a+=1
  when 1 then
    break if b==Nb
    turn=change(Sb[b])
    b+=1
  when 2 then
    break if c==Nc
    turn=change(Sc[c])
    c+=1
  end 
  #puts "a:#{a} b:#{b} c:#{c}"
end
case turn
when 0 then
    puts "A"
when 1 then
    puts "B"
when 2 then
    puts "C"
end

Compiler output:
a.cc:1:13: error: stray '#' in program
    1 | def get_i() #空白区切の入力を数値(整数)の配列で返す
      |             ^
a.cc:4:13: error: stray '#' in program
    4 | def get_f() #空白区切の入力を数値(実数)の配列で返す
      |             ^
a.cc:7:11: error: stray '#' in program
    7 | def get() #空白区切の入力を文字列の配列で返す
      |           ^
a.cc:10:15: error: stray '#' in program
   10 | def get_nsp() #入力されたものを一文字ずつに区切った文字列の配列で返す
      |               ^
a.cc:13:35: error: stray '#' in program
   13 | def yn_judge(bool,y="Yes",n="No") #boolに真偽を投げることで、trueならy、falseならnの値を出力する
      |                                   ^
a.cc:13:36: error: extended character 、 is not valid in an identifier
   13 | def yn_judge(bool,y="Yes",n="No") #boolに真偽を投げることで、trueならy、falseならnの値を出力する
      |                                    ^
a.cc:13:36: error: extended character 、 is not valid in an identifier
a.cc:16:36: error: stray '#' in program
   16 | def array(size1,init=nil,size2=-1) #size2に二次元配列時の最初の要素数、size1に次の配列の大きさ、initに初期値を投げることでその配列を返す
      |                                    ^
a.cc:16:37: error: extended character 、 is not valid in an identifier
   16 | def array(size1,init=nil,size2=-1) #size2に二次元配列時の最初の要素数、size1に次の配列の大きさ、initに初期値を投げることでその配列を返す
      |                                     ^
a.cc:16:37: error: extended character 、 is not valid in an identifier
a.cc:60:4: error: invalid preprocessing directive #puts
   60 |   #puts "a:#{a} b:#{b} c:#{c}"
      |    ^~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def get_i() #空白区切の入力を数値(整数)の配列で返す
      | ^~~
a.cc:19:3: error: expected unqualified-id before 'else'
   19 |   else
      |   ^~~~
a.cc:21:3: error: 'end' does not name a type
   21 |   end
      |   ^~~
Language: C++

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

	
int main() {
	// your code goes here
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL); 
	
	string A,B,C; cin>>A>>B>>C;
	int l1=A.length(), l2=B.length(), l3=C.length();
	int id1=0,id2=0,id3=0;
	int st=0;
	while(id<l1 && id2<l2 && id3<l3)
	{
	    if(st==0)
	    {
	        char c=A[id1] id1++;
	        if(c=='a') st=0;
	        else if(c=='b') st=1;
	        else st=2;
	    }
	    else if(st==1)
	    {
	        char c=B[id2] id2++;
	        if(c=='a') st=0;
	        else if(c=='b') st=1;
	        else st=2;
	    }
	    else
	    {
	        char c1=C[id3] id3++;
	        if(c1=='a') st=0;
	        else if(c1=='b') st=1;
	        else st=2;
	    }
	    
	}
	if(id1==l1) cout<<'A';
	else if(id2==l2) cout<<'B';
	else cout<<'C';
	
	
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'id' was not declared in this scope; did you mean 'id3'?
   21 |         while(id<l1 && id2<l2 && id3<l3)
      |               ^~
      |               id3
a.cc:25:31: error: expected ',' or ';' before 'id1'
   25 |                 char c=A[id1] id1++;
      |                               ^~~
a.cc:32:31: error: expected ',' or ';' before 'id2'
   32 |                 char c=B[id2] id2++;
      |                               ^~~
a.cc:39:32: error: expected ',' or ';' before 'id3'
   39 |                 char c1=C[id3] id3++;
      |                                ^~~
Language: C++

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

	
int main() {
	// your code goes here
	//ifstream cin("input.txt");
	//ofstream cout("output.txt");
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL); 
	
	string A,B,C; cin>>A>>B>>C;
	int l1=A.length(), l2=B.length(), l3=C.length();
	int id1=0,id2=0,id3=0;
	int st=0;
	while(id<l1 && id2<l2 && id3<l3)
	{
	    if(st==0)
	    {
	        char c=a[id1] id1++;
	        if(c=='a') st=0;
	        else if(c=='b') st=1;
	        else st=2;
	    }
	    else if(st==1)
	    {
	        char c=b[id2] id2++;
	        if(c=='a') st=0;
	        else if(c=='b') st=1;
	        else st=2;
	    }
	    else
	    {
	        char c1=c[id3] id3++;
	        if(c1=='a') st=0;
	        else if(c1=='b') st=1;
	        else st=2;
	    }
	    
	}
	if(id1==l1) cout<<'A';
	else if(id2==l2) cout<<'B';
	else cout<<'C';
	
	
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'id' was not declared in this scope; did you mean 'id3'?
   21 |         while(id<l1 && id2<l2 && id3<l3)
      |               ^~
      |               id3
a.cc:25:24: error: 'a' was not declared in this scope
   25 |                 char c=a[id1] id1++;
      |                        ^
a.cc:32:24: error: 'b' was not declared in this scope
   32 |                 char c=b[id2] id2++;
      |                        ^
a.cc:39:25: error: 'c' was not declared in this scope
   39 |                 char c1=c[id3] id3++;
      |                         ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int bingo[3][3];
int cnt[2][105];
int h, w;
bool flag[110][110];

int main() {
	string s, t, u;
	cin >> s >> t >> u;
	string s1 = s.substr(1, n - 1);
	int l = s.length();
	int m = t.length();
	int n = u.length();
	char target = s[0];
	int i = 0;
	l++;
	while (1) {
		if (target == 'a') {
			l--;
			target = s1[i];
		}
		else if (target == 'b') {
			m--;
			target = t[i];
		}
		else {
			n--;
			target = u[i];
		}
		i++;
		if (l < 0) {
			puts("A");
			break;
		}
		else if (m < 0) {
			puts("B");
			break;
		}
		else if (n < 0) {
			puts("C");
			break;
		}
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:33: error: 'n' was not declared in this scope
   61 |         string s1 = s.substr(1, n - 1);
      |                                 ^