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

import java.util.*;

public class Main{
  public static void main(String[] args) {
    Scanner = new Scanner(System.in);
    String a = sc.next();
    String b = sc.next();
    String c = sc.next();
    final int al = a.length();
    final int bl = b.length();
    final int cl = c.length();
    int aa = al;
    int bb = bl;
    int cc = cl;
    Char judge = a.charAt(al - aa);
    aa = aa - 1;
    while(true){
      if(judge = 'a'){
        if(aa == 0){break;}else{
        judge = a.charAt(al - aa);
        aa = aa -1;
        }
      }else if (judge = 'b') {
        if(bb == 0){break;}else{
        judge = b.charAt(bl - bb);
        bb = bb -1;
        }
      }else if(judge = 'c'){
        if(cc == 0){break;}else{
        judge = c.charAt(cl - cc);
        cc = cc -1;
        }
      }
    }
    if(judge == 'a'){Sytem.out.println("A");}else if(judge == 'b'){System.out.println("B");}else{System.out.println("C");}
  }
}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner = new Scanner(System.in);
    ^
  symbol:   variable Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    String a = sc.next();
               ^
  symbol:   variable sc
  location: class Main
Main.java:7: error: cannot find symbol
    String b = sc.next();
               ^
  symbol:   variable sc
  location: class Main
Main.java:8: error: cannot find symbol
    String c = sc.next();
               ^
  symbol:   variable sc
  location: class Main
Main.java:15: error: cannot find symbol
    Char judge = a.charAt(al - aa);
    ^
  symbol:   class Char
  location: class Main
Main.java:35: error: package Sytem does not exist
    if(judge == 'a'){Sytem.out.println("A");}else if(judge == 'b'){System.out.println("B");}else{System.out.println("C");}
                          ^
6 errors
Language: C++


#include <iostream>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <math.h>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#define ll long long
#define vi vector<ll>
#define vs vector<string>
#define fr(i, k, n) for (ll i = k; i < n; i++)
#define rep(i, n) fr(i, 0, n)
#define alll(v) v.begin(), v.end()
#define mp(a, b) make_pair(a, b)
#define rdd(a) ll a; cin >> a
#define rrd rdd(a); rep(i, a)
//min({a,b,c,d})などの記法
using namespace std;
template <class X> void pr(X x) { cout << x << endl; }
template <class X> void prr(X x) { for (auto it : x) { cout << it << endl; } }
 
int func(int x){
    return x*x+30;
}
int main() {
    float a,b,h,area;
    cin >>a>>b>>c;
area=(a+b)×h/2;
cout<<area;
    return 0;
}

Compiler output:
a.cc:34:11: error: extended character × is not valid in an identifier
   34 | area=(a+b)×h/2;
      |           ^
a.cc: In function 'int main()':
a.cc:33:17: error: 'c' was not declared in this scope
   33 |     cin >>a>>b>>c;
      |                 ^
a.cc:34:11: error: expected ';' before '\U000000d7h'
   34 | area=(a+b)×h/2;
      |           ^~
      |           ;
Language: C++


#include <iostream>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <math.h>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#define ll long long
#define vi vector<ll>
#define vs vector<string>
#define fr(i, k, n) for (ll i = k; i < n; i++)
#define rep(i, n) fr(i, 0, n)
#define alll(v) v.begin(), v.end()
#define mp(a, b) make_pair(a, b)
#define rdd(a) ll a; cin >> a
#define rrd rdd(a); rep(i, a)
//min({a,b,c,d})などの記法
using namespace std;
template <class X> void pr(X x) { cout << x << endl; }
template <class X> void prr(X x) { for (auto it : x) { cout << it << endl; } }
 
int func(int x){
    return x*x+30;
}
int main() {
    int a,b,h;
    cin >>a>>b>>h;
    cout<<(a+b)×h/2;
    return 0;
}

Compiler output:
a.cc:34:16: error: extended character × is not valid in an identifier
   34 |     cout<<(a+b)×h/2;
      |                ^
a.cc: In function 'int main()':
a.cc:34:16: error: expected ';' before '\U000000d7h'
   34 |     cout<<(a+b)×h/2;
      |                ^~
      |                ;
Language: Java

import java.util.*;
public class Main{
 
     public static void main(String[] arg){
           Scanner sc = new Scanner(Systen.in);
           int a =  sc.nextInt();
           int b =  sc.nextInt();
           int h =  sc.nextInt();
           System.out.println((a+b)*h*0.5);
     }
 
}

Compiler output:
Main.java:5: error: cannot find symbol
           Scanner sc = new Scanner(Systen.in);
                                    ^
  symbol:   variable Systen
  location: class Main
1 error
Language: Java

public class Main{
 
     public static void main(String[] arg){
           Scanner sc = new Scanner(Systen.in);
           int a =  sc.nextInt();
           int b =  sc.nextInt();
           int h =  sc.nextInt();
           System.out.println((a+b)*h*0.5);
     }
 
}

Compiler output:
Main.java:4: error: cannot find symbol
           Scanner sc = new Scanner(Systen.in);
           ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
           Scanner sc = new Scanner(Systen.in);
                            ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
           Scanner sc = new Scanner(Systen.in);
                                    ^
  symbol:   variable Systen
  location: class Main
3 errors
Language: Java

public class Main{

     public static void main(String arg[]){
           Scanner sc = new Scanner();
           int a =  sc.nextInt();
           int b =  sc.nextInt();
           int h =  sc.nextInt();
           System.out.println((a+b)*h*0.5);
     }

}

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

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,b) FOR(i,0,b)
#define INF 1e9

using ll = long long;
const ll mod = LLONG_MAX;

int main(){
  int ia=0,ib=0,ic=0;
  char a,b,c,x=a;
  string Sa,Sb,Sc;
  cin>>Sa>>Sb>>Sc;

while(1){

  if (x==a){
    x = Sa[ia];
    ia++;
  }

  if (ia<Sa.size()){
    cout<<A<<endl;
    return 0;
  }

  if (x==b){
    x = Sb[ib];
    ib++;
  }

  if (ib<Sb.size()){
    cout<<B<<endl;
    return 0;
  }

  if (x==c){
    x = Sc[ic];
    ic++;
  }

  if (ic<Sc.size()){
    cout<<C<<endl;
    return 0;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: 'A' was not declared in this scope
   24 |     cout<<A<<endl;
      |           ^
a.cc:34:11: error: 'B' was not declared in this scope
   34 |     cout<<B<<endl;
      |           ^
a.cc:44:11: error: 'C' was not declared in this scope
   44 |     cout<<C<<endl;
      |           ^
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:10:11: note: to match this '{'
   10 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,b) FOR(i,0,b)
#define INF 1e9

using ll = long long;
const ll mod = LLONG_MAX;

int main(){
  int ia=0,ib=0,ic=0;
  char a,b,c,x=a;
  string Sa,Sb,Sc;
  cin>>sa>>sb>>sc;

while(1){

  if (x==a){
    x = Sa[ia];
    ia++;
  }

  if (ia<Sa.size()){
    cout<<A<<endl;
    return 0;
  }

  if (x==b){
    x = Sb[ib];
    ib++;
  }

  if (ib<Sb.size()){
    cout<<B<<endl;
    return 0;
  }

  if (x==c){
    x = Sc[ic];
    ic++;
  }

  if (ic<S.size()){
    cout<<C<<endl;
    return 0;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'sa' was not declared in this scope; did you mean 'Sa'?
   14 |   cin>>sa>>sb>>sc;
      |        ^~
      |        Sa
a.cc:14:12: error: 'sb' was not declared in this scope; did you mean 'Sb'?
   14 |   cin>>sa>>sb>>sc;
      |            ^~
      |            Sb
a.cc:14:16: error: 'sc' was not declared in this scope; did you mean 'Sc'?
   14 |   cin>>sa>>sb>>sc;
      |                ^~
      |                Sc
a.cc:24:11: error: 'A' was not declared in this scope
   24 |     cout<<A<<endl;
      |           ^
a.cc:34:11: error: 'B' was not declared in this scope
   34 |     cout<<B<<endl;
      |           ^
a.cc:43:10: error: 'S' was not declared in this scope; did you mean 'Sc'?
   43 |   if (ic<S.size()){
      |          ^
      |          Sc
a.cc:44:11: error: 'C' was not declared in this scope
   44 |     cout<<C<<endl;
      |           ^
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:10:11: note: to match this '{'
   10 | int main(){
      |           ^
Language: Java

import java.util.Scanner;

public class Trapezoids {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();

		System.out.println((a+b)*h/2);
	}

}


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

package icpc;

import java.util.Scanner;

public class Trapezoids {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();

		System.out.println((a+b)*h/2);
	}

}


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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int a = sc.nextInt();
    int b = sc.nextInt();
    int h = sc.nextInt();

    System.out.println((a+b)*h/2);
  }
}

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++

package main

import (
    "bufio"
    "fmt"
    "os"
    "strconv"
)



var sc = bufio.NewScanner(os.Stdin)

func nextLine() string {
    sc.Scan()
    return sc.Text()
}

func main() {
    line := nextLine()
    a, _ := strconv.Atoi(line)
    line = nextLine()
    b, _ := strconv.Atoi(line)
    line = nextLine()
    h, _ := strconv.Atoi(line)

    area := float64 ((a + b) * h) / 2
    fmt.Print(area)
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:19:1: error: 'func' does not name a type
   19 | func main() {
      | ^~~~
Language: C

#include <stdio.h>
#include <string.h>

int main(){
    int a,b,c;
    scanf("%d",&a);
    scanf("%d",&b);
    scsnf("%d",&c);
    int result=(a+b)*c/2;
    printf("%d",result);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'scsnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |     scsnf("%d",&c);
      |     ^~~~~
      |     scanf
Language: Java

import java.util.*;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// get a integer
		int a = sc.nextInt();
		// get two integers separated with half-width break
		int b = sc.nextInt();
		int c = sc.nextInt();
		// get a string
		//String s = sc.next();
		// output
		double res = (a+b)*c;
		res = res / 2;
		System.out.println(res);
	}
	

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

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// get a integer
		int a = sc.nextInt();
		// get two integers separated with half-width break
		int b = sc.nextInt();
		int c = sc.nextInt();
		// get a string
		//String s = sc.next();
		// output
		double res = (a+b)*c;
		res = res / 2;
		System.out.println(res);
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args){
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

#include<stdio.h>

int main(void)
{
int a,b,h,s;

scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);

s == (a+b)*h/2 ;

printf("%d"\n , s );

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:12: error: stray '\' in program
   13 | printf("%d"\n , s );
      |            ^
main.c:13:12: error: expected ')' before 'n'
   13 | printf("%d"\n , s );
      |       ~    ^~
      |            )
Language: C

#include<stdio.h>

int main(void)
{
int a,b,h,s

scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&h);

s == (a+b)*h/2 ;

printf("%d"\n , s );

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    7 | scanf("%d",&a);
      | ^~~~~
main.c:11:1: error: 's' undeclared (first use in this function)
   11 | s == (a+b)*h/2 ;
      | ^
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:12: error: stray '\' in program
   13 | printf("%d"\n , s );
      |            ^
main.c:13:12: error: expected ')' before 'n'
   13 | printf("%d"\n , s );
      |       ~    ^~
      |            )
Language: C++

#include<stdio.h>

int main(){
int a,b,h;
scanf("%d %d %d",&a,&b,&h);
printf("%d\n",(a+b)*h/2);
return 0;
]

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before ']' token
    8 | ]
      | ^
a.cc:8:2: error: expected '}' at end of input
    8 | ]
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<stdio.h>
int main(){
	int a,b,h;
	scanf("%d %d %d",&a,&b,&h);
	printf("%d\n",(a+b)*h\2);
}

Compiler output:
a.cc:5:30: error: stray '\' in program
    5 |         printf("%d\n",(a+b)*h\2);
      |                              ^
a.cc: In function 'int main()':
a.cc:5:30: error: expected ')' before numeric constant
    5 |         printf("%d\n",(a+b)*h\2);
      |               ~              ^~
      |                              )
Language: C++

#include<stdio.h>

int main(){
	int a,b,h;
	scanf("%d %d %d,&a,&b,&h);
	printf("%d\n",(a+b)*h/2);
	return 0;
}

Compiler output:
a.cc:5:15: warning: missing terminating " character
    5 |         scanf("%d %d %d,&a,&b,&h);
      |               ^
a.cc:5:15: error: missing terminating " character
    5 |         scanf("%d %d %d,&a,&b,&h);
      |               ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:33: error: expected ')' before ';' token
    6 |         printf("%d\n",(a+b)*h/2);
      |                                 ^
      |                                 )
a.cc:5:14: note: to match this '('
    5 |         scanf("%d %d %d,&a,&b,&h);
      |              ^
Language: C++

#include<stdio.h>
int main()
{
int a,b,h;
scanf("%d %d %d", &a, &b, &h);
printf("%d\n", (a+b)*h/2);	
	return 0:

}

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

#include <stdio.h>
int main(){
   int a,b,h;
   scanf("%d %d %d",%a,%b,%c);
printf("%d",(a+b)*h/2);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                     ^
a.cc:4:24: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                        ^
a.cc:4:27: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                           ^
a.cc:4:28: error: 'c' was not declared in this scope
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                            ^
Language: C++

#include <stdio.h>
int main(){
   int a,b,h;
   scanf("%d %d %d",%a,%b,%c);
printf("%d",(a+b)*h/2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                     ^
a.cc:4:24: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                        ^
a.cc:4:27: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                           ^
a.cc:4:28: error: 'c' was not declared in this scope
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                            ^
Language: C++

#include <stdio.h>
int main(){
   int a,b,h;
   scanf("%d %d %d",%a,%b,%c);
printf("%d",(a+b)8h/2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                     ^
a.cc:4:24: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                        ^
a.cc:4:27: error: expected primary-expression before '%' token
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                           ^
a.cc:4:28: error: 'c' was not declared in this scope
    4 |    scanf("%d %d %d",%a,%b,%c);
      |                            ^
a.cc:5:18: error: expected ')' before numeric constant
    5 | printf("%d",(a+b)8h/2);
      |       ~          ^~
      |                  )
Language: Java

import java.util.*;
 
public class Main{
    public static void main(String[] args){
Scanner x = new Scanner(System.in);
 
int a = x.nextInt();
int b = x.nextInt();
int c = x.nextInt();
 
System.out.println( (a+b)*c/2);
return 0;
}
}

Compiler output:
Main.java:12: error: incompatible types: unexpected return value
return 0;
       ^
1 error
Language: Java

import java.util.*;
 
public class Main{
    public static void main(String[] args){
Scanner x = new Scanner(System.in);
 
int a = x.nextInt();
int b = x.nextInt();
int c = x.nextInt();
 
return (a+b)*c/2;
}
}

Compiler output:
Main.java:11: error: incompatible types: unexpected return value
return (a+b)*c/2;
              ^
1 error
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args){
Scanner x = new Scanner(System.in);

a = x.nextInt();
b = x.nextInt();
c = x.nextInt();

return (a+b)*c/2;
}
}

Compiler output:
Main.java:7: error: cannot find symbol
a = x.nextInt();
^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
b = x.nextInt();
^
  symbol:   variable b
  location: class Main
Main.java:9: error: cannot find symbol
c = x.nextInt();
^
  symbol:   variable c
  location: class Main
Main.java:11: error: incompatible types: unexpected return value
return (a+b)*c/2;
              ^
Main.java:11: error: cannot find symbol
return (a+b)*c/2;
        ^
  symbol:   variable a
  location: class Main
Main.java:11: error: cannot find symbol
return (a+b)*c/2;
          ^
  symbol:   variable b
  location: class Main
Main.java:11: error: cannot find symbol
return (a+b)*c/2;
             ^
  symbol:   variable c
  location: class Main
7 errors
Language: C

#include<stdio.h>
int main(){
int a,b,c;
scanf("%d",a);
scanf("%d",b);
scanf("%d",c);
printf("%d",(a+b)*h*(1/2));
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: 'h' undeclared (first use in this function)
    7 | printf("%d",(a+b)*h*(1/2));
      |                   ^
main.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.Scanner;

/**
 * archeryue
 * 9/19/16
 */
public class A {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int h = scanner.nextInt();
        System.out.println((a + b) * h / 2);
    }
}

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

#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <complex>
#include <string>
#include <sstream>
#include <fstream> 
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <math.h>
#include <cmath>
using namespace std;
int main(){	
   int a,b,c;
   cin >> a >> b >> c;
   cout << (a+b)*h/2; 	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: 'h' was not declared in this scope
   27 |    cout << (a+b)*h/2;
      |                  ^
Language: C

#include <bits/stdc++.h> // {{{
// clang-format off
#define ARG4(_1, _2, _3, _4, ...) _4
#define rep(...) ARG4(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define REP(i, a) FOR(i, 0, a)
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define rrep(...) ARG4(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
#define RREP(i, a) RFOR(i, 0, a)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (int)(a); --i)
#define ALL(c) (c).begin(), (c).end()
#define TEN(n) ((ll)(1e##n))
#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define USE1(T) template <typename T> inline
#define USE2(T, U) template <typename T, typename U> inline
#define mygc(c) (c) = getchar_unlocked()
#define mypc(c) putchar_unlocked(c)

template <typename T> using duo = std::pair<T, T>;
template <typename T> using vec = std::vector<T>;
using ll = long long;
using pii = duo<int>;
USE2(T,U)bool chmax(T&x,U a){return x<a&&(x=a,1);}
USE2(T,U)bool chmin(T&x,U a){return a<x&&(x=a,1);}
USE1(T=int)T in(){T x;std::cin>>x;return x;}
USE1(T=int)vec<T>in(int n){vec<T>v;v.reserve(n);rep(i,n)v.pb(in<T>());return v;}
USE1(T)vec<std::pair<T,int>>zipi(const vec<T>&x,int s=0){int N=x.size();vec<std::pair<T,int>>v;v.reserve(N);rep(i,N)v.pb(x[i],s+i);return v;}
USE1(T)vec<T>ndvec(T v,int n){return vec<T>(n,v);}
USE2(T,...Ts)auto ndvec(T v,int n,Ts...ns)->vec<decltype(ndvec(v,ns...))>{return ndvec(ndvec(v,ns...),n);}
USE1(T)void pr(T x){std::cout<<x<<'\n';}
USE2(T,...Ts)void pr(T x,Ts...xs){std::cout<<x<<' ';pr(xs...);}
USE1(T=int)T rd(){T x=0,m=0,k;for(;;){mygc(k);if(k=='-'){m=1;break;}if('0'<=k&&k<='9'){x=k-'0';break;}}for(;;){mygc(k);if(k<'0'||'9'<k)break;x=x*10+k-'0';}return x;}
USE1(T=int)void wr(T x,char c='\n'){int s=0,m=0;char b[32];if(x<0)m=1,x=-x;for(;x;x/=10)b[s++]=x%10;if(!s)b[s++]=0;if(m)mypc('-');for(;s--;)mypc(b[s]+'0');mypc(c);}
// clang-format on
// }}}
struct IoSetup { // {{{
  IoSetup() {
    std::ios::sync_with_stdio(0);
    std::cin.tie(0);
    std::cout.precision(10);
    std::cerr.precision(10);
  }
} iosetup; //}}}
using namespace std;
const int inf = 1001001001;
const ll infl = 1001001001001001001ll;
const int dd[] = {0, 1, 0, -1, 0};

signed main() {
  int a = in(), b = in(), h = in();
  pr((a + b) * h / 2);
  return 0;
}


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

#include <stdio.h>
#include <string.h>
#define TRUE 1
#define FALSE 0
using namespace std;

int main()
{
    char a[100], b[100], c[100];
    int i = 0, j = 0, k = 0;
    int inda = 0, indb = 0, indc = 0;

    gets(a);
    gets(b);
    gets(c);

    int lena = strlen(a), lenb = strlen(b), lenc = strlen(c);

    int current = 1, flag = TRUE;

    while (flag) {
        while (current == 1) {
            if (a[i] == 'b') {
                current = 2;
            }
            else if (a[i] == 'c') {
                current = 3;
            }
            ++i;
            if (i == lena) {
                ++inda;
                flag = FALSE;
                break;
            }
        }
        //if (inda) break;
        while (current == 2) {
            //printf("\nHi there");           ///debugger#1

            if (b[j] == 'a') {
                current = 1;
            }
            else if (b[j] == 'c') {
                current = 3;
            }
            ++j;
            if (j == lenb) {
                ++indb;
                flag = FALSE;
                break;
            }
        }
       // if (indb) break;
        while (current == 3) {
            if (c[k] == 'b') {
                current = 2;
            }
            else if (c[k] == 'a') {
                current = 1;
            }
            ++k;
            if (k == lenc) {
                ++indc;
                flag = FALSE;
                break;
            }
        }
       // if (indc) break;
    }
    //printf("%d %d %d\n %d %d %d", inda, indb, indc, i, j, k);
    if (inda) printf("A");
    else if (indb) printf("B");
    else if (indc) printf("C");


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   13 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

include <iostream>

using namespace std;

int main(){
        int a,b,h;
        cin >> a >> b >> h;
        cout << ((a + b) * h)/2 << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> a >> b >> h;
      |         ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << ((a + b) * h)/2 << endl;
      |         ^~~~
a.cc:8:36: error: 'endl' was not declared in this scope
    8 |         cout << ((a + b) * h)/2 << endl;
      |                                    ^~~~
Language: Java

import java.util.Scanner;


public class atc {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
	    
	    System.out.println((sc.nextInt()+sc.nextInt())*sc.nextInt()/2);
		
	}

}

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

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
	    
	    System.out.println(sc.nextInt()*sc.nextInt()/sc.nextInt()/2);
		
	}

}

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

#include<stdio.h>
	
int main(void)
	{
		int a,b,h,s;
		scanf("%d",&a);
		scanf("%d",&b);
		scanf("%d",&h);
		s=(a+b)*h/2;
		printf("%d",s);
		getchar();
		return0;
	}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: 'return0' undeclared (first use in this function)
   12 |                 return0;
      |                 ^~~~~~~
main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
string ss[3];
cin >> ss[0] >> ss[1] >> ss[2];
char cur;
cur = 'a';
while (ss[cur - 'a'].length()) {
char tmp = ss[cur][0];
ss[cur] = ss[cur].substr(1, npos);
cur = tmp;
}
cout << toUpper(cur) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: 'npos' was not declared in this scope
   10 | ss[cur] = ss[cur].substr(1, npos);
      |                             ^~~~
a.cc:13:9: error: 'toUpper' was not declared in this scope; did you mean 'toupper'?
   13 | cout << toUpper(cur) << endl;
      |         ^~~~~~~
      |         toupper
Language: C++

#include <cstdio>

using namespace std;

int main(){
  int a,b,h;
  scanf("%d %d %d",&a,&b,&h);
  printf("%d\n",((a+b)*(h/2));

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ')' before ';' token
    8 |   printf("%d\n",((a+b)*(h/2));
      |         ~                    ^
      |                              )
Language: C++

#include <cstdio>

using namespace std;

int main(){
  int a,b,h;
  scanf("%d %d %d",&a,&b,&h);

  printf("%d\n",((a+b)*(h/2));

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected ')' before ';' token
    9 |   printf("%d\n",((a+b)*(h/2));
      |         ~                    ^
      |                              )
Language: Java

package tstFlickr3;

import java.util.Scanner;

public class Atcoder {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a= sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();

		System.out.println((a+b)*h/2);

	}

}


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

include <iostream>
using namespace std;
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int a, b, h;
  cin >> a >> b >> h;
  cout << (a + b) * h / 2 << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin.tie(0);
      |   ^~~
a.cc:5:3: error: 'ios' has not been declared
    5 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout << (a + b) * h / 2 << endl;
      |   ^~~~
a.cc:9:30: error: 'endl' was not declared in this scope
    9 |   cout << (a + b) * h / 2 << endl;
      |                              ^~~~
Language: C++

#include <stdio.h>

int main()
{
	int a, b, h, s;
	
	scanf_s("%d\n%d\n%d", &a, &b, &h);
	s = ((a + b)*h) / 2;

	printf("%d", s);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         scanf_s("%d\n%d\n%d", &a, &b, &h);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
using namespace std;

int main()
{
 int a,b,h;
 cin>>a>>b>>c;
 cout<<(a+b)*c/2<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'c' was not declared in this scope
    7 |  cin>>a>>b>>c;
      |             ^
Language: C

#incloud <stdio.h>
main()
{
  int a,b,h;
  scanf("%d %d %d",&a,&b,&h);
  printf("%d\n",(a+b)*h/2);
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #incloud; did you mean #include?
    1 | #incloud <stdio.h>
      |  ^~~~~~~
      |  include
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |   scanf("%d %d %d",&a,&b,&h);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #incloud <stdio.h>
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |   scanf("%d %d %d",&a,&b,&h);
      |   ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |   printf("%d\n",(a+b)*h/2);
      |   ^~~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

        int a;
        int b;
        int h
        int sum1;


	// 個数のの入力
        sum1 = 0;
        scanf("%d %d %d",&a,&b,&h);

        sum1 = ((a + b) * h) / 2; 


	printf("%d\n",sum1);

        
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ';' before 'int'
    9 |         int h
      |              ^
      |              ;
   10 |         int sum1;
      |         ~~~   
main.c:15:33: error: 'h' undeclared (first use in this function)
   15 |         scanf("%d %d %d",&a,&b,&h);
      |                                 ^
main.c:15:33: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
 		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();
	
		System.out.println((a+b)*h/2);
	}

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

import java.util.Scanner;

Class FirstJava {
	public static void main(String[] args){
		Scanner scan = new Scanner( System.in );
		int a = Integer.parseInt( scan.nextLine() );
		int b = Integer.parseInt( scan.nextLine() );
		int h = Integer.parseInt( scan.nextLine() );
		
		System.out.println( (a+b)*h/2 );
	}
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Class FirstJava {
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args){
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:12: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<stdio .h>
int main(void){
 Int a,b,h;
 scanf("%d%d%d",&a,&b,&h);
 printf("%d¥n",(a+b)*h/2);
 return 0;
}

Compiler output:
a.cc:1:9: fatal error: stdio .h: No such file or directory
    1 | #include<stdio .h>
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class FirstJava {
	public static void main(String[] args){
		Scanner scan = new Scanner( System.in );
		int a = Integer.parseInt( scan.nextLine() );
		int b = Integer.parseInt( scan.nextLine() );
		int h = Integer.parseInt( scan.nextLine() );
		
		System.out.println( (a+b)*h/2 );
	}
}

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

import java.util.Scanner;

public class Main1 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();

		int total = 0;

		if( a <100 && b<100 && c<100){
			total = (a+b)*c/2;
		}else {
			System.out.println("1～100の数字を指定してください。");
		}

		System.out.println(total);


	}

}

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scan = new Scanner(System.in);

		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();

		int total = 0;

		if( a <100 && b<100 && c<100){
			total = (a+b)*c/2;
		}else {
			System.out.println("");
		}

		System.out.println(total);


	}


Compiler output:
Main.java:25: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include "stdafx.h"
#include <iostream>
using namespace std;

int main()
{
	int a, h, b;
	cin >> a >> b >> h;
	cout << (a + b) * h / 2 << endl;
	
	return 0;
}


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

 import java.util.*;

public class A{
	public static void main(String[] args){
 		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();
	
		System.out.println((a+b)*h/2);
	}
}

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

import java.util.*;
public class Main{
	public static void main(String args[]){
		Scanner gio = new Scanner(System.in);
		a = gio.nextInt();
		b = gio.nextInt();
		h = gio.nextInt();
		System.out.println((double)((a + b) * h)/(double)2);
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		a = gio.nextInt();
		^
  symbol:   variable a
  location: class Main
Main.java:6: error: cannot find symbol
		b = gio.nextInt();
		^
  symbol:   variable b
  location: class Main
Main.java:7: error: cannot find symbol
		h = gio.nextInt();
		^
  symbol:   variable h
  location: class Main
Main.java:8: error: cannot find symbol
		System.out.println((double)((a + b) * h)/(double)2);
		                             ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
		System.out.println((double)((a + b) * h)/(double)2);
		                                 ^
  symbol:   variable b
  location: class Main
Main.java:8: error: cannot find symbol
		System.out.println((double)((a + b) * h)/(double)2);
		                                      ^
  symbol:   variable h
  location: class Main
6 errors
Language: C++

#inlcude<iostream>
using namespace std;

int main()
{
int a,b,c;
cin>>a>>b>>c;
cout<<((a+b)*c)/2<<endl;

return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin>>a>>b>>c;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlcude<iostream>
a.cc:8:1: error: 'cout' was not declared in this scope
    8 | cout<<((a+b)*c)/2<<endl;
      | ^~~~
a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:20: error: 'endl' was not declared in this scope
    8 | cout<<((a+b)*c)/2<<endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlcude<iostream>
Language: C++

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

int main() {
int a,b,h;
cin >> a >> b >> h;
cout << (a+b)*h/2 <<endl;
return 0;
}

Compiler output:
a.cc:1:9: error: stray '#' in program
    1 | include<#bits/stdc++.h>
      |         ^
a.cc:1:1: error: 'include' does not name a type
    1 | include<#bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin >> a >> b >> h;
      | ^~~
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout << (a+b)*h/2 <<endl;
      | ^~~~
a.cc:7:21: error: 'endl' was not declared in this scope
    7 | cout << (a+b)*h/2 <<endl;
      |                     ^~~~
Language: C++

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

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define pi 3.14159265359
#define shosu(X) fixed << setprecision(X)
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	int a,b,c;
	cin >> a >> b >> c;
	cout << (a+b)*h/2 << endl;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: 'h' was not declared in this scope
   21 |         cout << (a+b)*h/2 << endl;
      |                       ^
Language: Java

import java.util.*;
import java.io.*;

public class HelloWorld{
    
    

     public static void main(String []args){
       Scanner scanner = new Scanner(System.in);
       String a = scanner.next();
       String b = scanner.next();
       String c = scanner.next();
       List<Character> list1 = new ArrayList<>();
       List<Character> list2= new ArrayList<>();
       List<Character> list3 = new ArrayList<>();
       
       int current =1;
       
       for(int i=0;i<a.length();i++)
       list1.add(a.charAt(i));
       
       for(int i=0;i<b.length();i++)
       list2.add(b.charAt(i));
       
       for(int i=0;i<c.length();i++)
       list3.add(c.charAt(i));
      
       outerloop:
       while(list1.size()!=0 || list2.size()!=0 || list3.size()!=0 )
       {
           
        
         
          if(current==1)
          {
              
              while(list1.size()!=0 &&list1.get(0)=='a' )
              {
                
                  list1.remove(0);
              }
              if(list1.size()!=0 && list1.get(0)=='b' )
              current =2;
               if( list1.size()!=0 && list1.get(0)=='c')
               current =3;
               
               if(list1.size()!=0)
              list1.remove(0);
              else break outerloop;
              
          }
          
          else if(current==2)
          {
              while(list2.size()!=0 && list2.get(0)=='b')
              {
                  list2.remove(0);
              }
              if(list2.size()!=0 && list2.get(0)=='a' )
              current =1;
               if(list2.size()!=0 && list2.get(0)=='c')
               current =3;
               
                if(list2.size()!=0)
                  list2.remove(0);
                else break outerloop;
              
          }
          
          else if(current==3)
          {
              while(list3.size()!=0 && list3.get(0)=='c' )
              {
                  list3.remove(0);
              }
              if(list3.size()!=0 &&list3.get(0)=='a')
              current =1;
               if(list3.size()!=0 && list3.get(0)=='b' )
               current =2;
               
                if(list3.size()!=0)
                  list3.remove(0);
                else break outerloop;
              
          }
       }
       
       if(list1.size()==0)
       System.out.println("A");
       else if(list2.size()==0)
       System.out.println("B");
       else if(list3.size()==0)
       System.out.println("C");
       
       
     }
}

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

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

int main(){
  string X,Y,Z;cin>>X>>Y>>Z;
  int lx=X.size();
  int ly=Y.size();
  int lz=Z.size();
  int p=1,q=0,r=0;
  char S=X.at(0);
  while(true){
    if(S=='a'){
      S=X.at(p);
      p++;
    }
    else if(S=='b'){
      S=Y.at(q);
      q++;
    }
    else{
      S=Z.at(r);
      r++;
    }
    char ans;
    if(S=='a'&&p==lx){
      ans='A';
      break;
    }
    else if(S=='b' && q==ly){
      ans='B';
      break;
    }
    else if(S=='c' && r==lz){
      ans='C';
      break;
    }
  }
  cout<<ans<<endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   38 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

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

int main(){
  string X,Y,Z;cin>>X>>Y>>Z;
  int lx=X.size();
  int ly=Y.size();
  int lz=Z.size();
  int p=1,q=0;r=0;
  char S=X.at(0);
  while(true){
    if(S=='a'){
      S=X.at(p);
      p++;
    }
    else if(S=='b'){
      S=Y.at(q);
      q++;
    }
    else{
      S=Z.at(r);
      r++;
    }
    char ans;
    if(S=='a'&&p==lx){
      ans='A';
      break;
    }
    else if(S=='b' && q==ly){
      ans='B';
      break;
    }
    else if(S=='c' && r==lz){
      ans='C';
      break;
    }
  }
  cout<<ans<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'r' was not declared in this scope
    9 |   int p=1,q=0;r=0;
      |               ^
a.cc:38:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   38 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include <iostream>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <iomanip>
#include <cstdio>
#include <new>
#include <vector>
#include <cstdlib>
#include <string>
#include <set>
#include <tuple>
#include<map>

using namespace std;
int main() {
	string sa, sb, sc;
	cin >> sa >> sb >> sc;

	char turn = 'a';
	char ans;


	while (true) {
		if (turn == 'a') {
			if (sa.size == 0) {
				ans = 'A';
				break;
			}
			turn = sa[sa.size()-1];
			sa.pop_back();
		}
		else if (turn == 'b') {
			if (sb.size()==0) {
				ans = 'B';
				break;
			}
			turn = sb[sb.size() - 1];
			sb.pop_back();
		}
		else if (turn == 'c') {
			if (sc.size()==0) {
				ans = 'C';
				break;
			}
			turn = sc[sc.size() - 1];
			sc.pop_back();
		}

	}

	cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:32: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |                         if (sa.size == 0) {
      |                             ~~~^~~~
      |                                    ()
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
  string A, B, C;
  cin >> A >> B >> C;
  int Al = A.size();
  int Bl = B.size();
  int Cl = C.size();
  int Ac, Bc, Cc;
  Ac = Bc = Cc = 0;
  int a = b = c = 0;
  a++;
  rep(i, Al + Bl + Cl - 3) {
    if(a == 1) {
      if(A.at(Ac) == 'a') {
        Ac++;
      }
      if(A.at(Ac) == 'b') {
        Bc++;
        a--;
        b++;
      }
      if(A.at(Ac) == 'c') {
        Cc++;
        a--;
        c++;
      }
    }
    if(b == 1) {
      if(A.at(Bc) == 'a') {
        Bc++;
        b--;
        a++;
      }
      if(A.at(Bc) == 'b') {
        Bc++;
      }
      if(A.at(Bc) == 'c') {
        Bc++;
        b--;
        c++;
      }
    }
    if(c == 1) {
      if(A.at(Cc) == 'a') {
        Cc++;
        c--;
        b++;
      }
      if(A.at(Cc) == 'b') {
        Cc++;
        c--;
        b++;
      }
      if(A.at(Cc) == 'c') {
        Cc++;
      }
    }
    if(Ac == Al - 1 || Bc == Bl - 1 || Cc == Cl - 1) {
      break;
    }
  }
  if(a == 1) {
    cout << "A" << endl;
  }
  if(b == 1) {
    cout << "B" << endl;
  }
  if(c == 1) {
    cout << "C" << endl;
  }
}


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

#include<iostream>
#include<bits/stdc++.h>

using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; //処理早くするためのおまじない
int main(){

string Sa,Sb,Sc;
cin>>Sa>>Sb>>Sc;

string next;
next.push_back(Sa[0]);

	while(true)
	{
		if(next=="a")
		{
			if(Sa.empty())
			{
				cout<<"A"<<endl;
				break;
			}
			next=*Sa.begin();
			Sa.erase(Sa.begin());
	 	}
	 	if(next=="b")
	 	{
			if(Sb.empty())
			{
				cout<<"B"<<endl;
				break;
			}
		next=*Sb.begin();
		Sb.erase(Sb.begin());
	 	}
	 	if(next=="c")
	 	{
			if(Sa.empty())
			{
				cout<<"C"<<endl;
				break;
			}
		next=*Sc.begin();
		Sc.erase(Sc.begin());
	 	}
	}
	return 0;
}


++;
        }
    }
    return 0;
}



Compiler output:
a.cc:51:1: error: expected unqualified-id before '++' token
   51 | ++;
      | ^~
a.cc:52:9: error: expected declaration before '}' token
   52 |         }
      |         ^
a.cc:53:5: error: expected declaration before '}' token
   53 |     }
      |     ^
a.cc:54:5: error: expected unqualified-id before 'return'
   54 |     return 0;
      |     ^~~~~~
a.cc:55:1: error: expected declaration before '}' token
   55 | }
      | ^