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

import java.util.Scanner;
import java.util.StringJoiner;
public class Anumbr {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int price1 = 0;
		int price2 = 0;
		if (X > Y) {
			price1 = (C * 2 * Y) + (A * (X - Y));
			price2 = C * 2 * X;
		} else {
			price1 = (C * 2 * X) + (B * (Y - X));
			price2 = C * 2 * Y;
		}
		int price3 = A * X + B * Y;
		int ans = Math.min(price1, price2);
		ans = Math.min(ans, price3);
		System.out.println(ans);
	}
    
}

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

#include <bits/stdc++.h>
 
#define REP(i,n) for(int i=0;i<n;i++)
 
using namespace std;
 
 
int main()
{
	int a,b,c,x,y,ans;
	cin>>A>>B>>C>>X>>Y;
	if(a+b>=c*2){
		int cost=min(x,y);
		x-=cost,y-=cost;
		ans+=c*2*cost;
		if(a*x+b*y>c*2*max(x,y)){
			ans+=c*2*max(x,y);
		}
		else{
			ans+=a*x+b*y;
		}
	}
	else{
		ans+=a*x+b*y;
	}
	cout<<ans<<endl;
	}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'A' was not declared in this scope
   11 |         cin>>A>>B>>C>>X>>Y;
      |              ^
a.cc:11:17: error: 'B' was not declared in this scope
   11 |         cin>>A>>B>>C>>X>>Y;
      |                 ^
a.cc:11:20: error: 'C' was not declared in this scope
   11 |         cin>>A>>B>>C>>X>>Y;
      |                    ^
a.cc:11:23: error: 'X' was not declared in this scope
   11 |         cin>>A>>B>>C>>X>>Y;
      |                       ^
a.cc:11:26: error: 'Y' was not declared in this scope
   11 |         cin>>A>>B>>C>>X>>Y;
      |                          ^
Language: C++

#include <bits/stdc++.h>
 
#define REP(i,n) for(int i=0;i<n;i++)
 
using namespace std;
 
 
int main()
{
	int A,B,C,X,Y,ans;
	cin>>A>>B>>C>>X>>Y;
	if(a+b>=c*2){
		int cost=min(x,y);
		x-=cost,y-=cost;
		ans+=c*2*cost;
		if(a*x+b*y>c*2*max(x,y)){
			ans+=c*2*max(x,y);
		}
		else{
			ans+=a*x+b*y;
		}
	}
	else{
		ans+=a*x+b*y;
	}
	cout<<ans<<endl;
	}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'a' was not declared in this scope
   12 |         if(a+b>=c*2){
      |            ^
a.cc:12:14: error: 'b' was not declared in this scope
   12 |         if(a+b>=c*2){
      |              ^
a.cc:12:17: error: 'c' was not declared in this scope
   12 |         if(a+b>=c*2){
      |                 ^
a.cc:13:30: error: 'x' was not declared in this scope
   13 |                 int cost=min(x,y);
      |                              ^
a.cc:13:32: error: 'y' was not declared in this scope
   13 |                 int cost=min(x,y);
      |                                ^
a.cc:24:24: error: 'x' was not declared in this scope
   24 |                 ans+=a*x+b*y;
      |                        ^
a.cc:24:28: error: 'y' was not declared in this scope
   24 |                 ans+=a*x+b*y;
      |                            ^
Language: C++

#include<stdio.h>
int subf();
int a,b,c,x,y;
int sum = 0;

int main(){
  scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
  if (x < y){
    subf(a,b,c,x,y);
  }else{
    subf(a,b,c,y,x);
  }
  printf("%d",sum);
  return 0;
}

int subf(){
  if (a+b < 2*c){
    sum += (a+b)*x;
    if (b < 2*c){
      sum += b*(y-x);
    }else{
      sum += 2*c*(y-x);
    }
  }else{
    sum += 2*c*x;
    if (b < 2*c){
      sum += b*(y-x);
    }else{
      sum += 2*c*(y-x);
    }
  }
  return sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: too many arguments to function 'int subf()'
    9 |     subf(a,b,c,x,y);
      |     ~~~~^~~~~~~~~~~
a.cc:2:5: note: declared here
    2 | int subf();
      |     ^~~~
a.cc:11:9: error: too many arguments to function 'int subf()'
   11 |     subf(a,b,c,y,x);
      |     ~~~~^~~~~~~~~~~
a.cc:2:5: note: declared here
    2 | int subf();
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
 
#define REP(i,n) for(int i=0;i<n;i++)
 
using namespace std;
 
 
int main()
{
	int A,B,C,X,Y;
	cin>>A>>B>>C>>X>>Y;
	if(a+b>=c*2){
		int cost=min(x,y);
		x-=dim,y-=dim;
		ans+=c*2*dim;
		if(a*x+b*y>c*2*max(x,y)){
			ans+=c*2*max(x,y);
		}
		else{
			ans+=a*x+b*y;
		}
	}
	else{
		ans+=a*x+b*y;
	}
	cout<<ans<<endl;
	}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'a' was not declared in this scope
   12 |         if(a+b>=c*2){
      |            ^
a.cc:12:14: error: 'b' was not declared in this scope
   12 |         if(a+b>=c*2){
      |              ^
a.cc:12:17: error: 'c' was not declared in this scope
   12 |         if(a+b>=c*2){
      |                 ^
a.cc:13:30: error: 'x' was not declared in this scope
   13 |                 int cost=min(x,y);
      |                              ^
a.cc:13:32: error: 'y' was not declared in this scope
   13 |                 int cost=min(x,y);
      |                                ^
a.cc:14:20: error: 'dim' was not declared in this scope; did you mean 'fdim'?
   14 |                 x-=dim,y-=dim;
      |                    ^~~
      |                    fdim
a.cc:15:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |                 ans+=c*2*dim;
      |                 ^~~
      |                 abs
a.cc:24:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |                 ans+=a*x+b*y;
      |                 ^~~
      |                 abs
a.cc:24:24: error: 'x' was not declared in this scope
   24 |                 ans+=a*x+b*y;
      |                        ^
a.cc:24:28: error: 'y' was not declared in this scope
   24 |                 ans+=a*x+b*y;
      |                            ^
a.cc:26:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |         cout<<ans<<endl;
      |               ^~~
      |               abs
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
    std::ios::sync_with_stdio(false);
    int A,B,C,X,Y,n,k=99999999;
    cin>>A>>B>>C>>X>>Y;
    n=min(min(A,B),C);
    int t=max(max(A,B),C);
    for(int i=0; i<=100000;i++)
    {
       k=min(k,(i*2*C + max(0,X- i) *A + max(0, Y- i)*B));
    }
    cout<<k<<endl;
    return 0;
}



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

#include <stdio.h>
int main()
{
int A,B,C,X,Y;
scanf("%d %d %d %d %d",&A,&B,&C,&X,&Y);
 
if(2*C<A+B)
{
if(2*C<A && 2*C<B)
{
//すべてハーフ
printf("%d",(X+Y)*2C);
return 0;
}

//最低限ハーフ残りは単体

if(X>Y && A>C)
{printf("%d",Y*2*C+(X-Y)*C);
return 0;}
if(X>Y && A<=C)
{printf("%d",Y*2*C+(X-Y)*A);
return 0;}

if(Y>=X && B>C)
{printf("%d",X*2*C+(Y-X)*C);
return 0;}

if(Y>=X && B<=C)
{printf("%d",X*2*C+(Y-X)*B);
return 0;}
}

printf("%d",A*X+B*Y);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:12:19: error: invalid suffix "C" on integer constant
   12 | printf("%d",(X+Y)*2C);
      |                   ^~
Language: C

#include<stdio.h>

int main()
{

	int a,b,c,A,B,C,X,Y;
	int min,price;
	scanf("%d %d %d %d %d",&A,&B,&C,&X,&Y);
	
	min = 1e9;
	for(c=0;c<X+1 || c<Y+1;c += 2){
		if(X-c/2 > =0) a = X-c/2; else a = 0;
	    if(Y-c/2 > =0) b = Y-c/2; else b = 0;

		price = a*A+b*B+c*C;
		if(min > price) min = price;
		}
	
	
	printf("%d\n",min);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:28: error: expected expression before '=' token
   12 |                 if(X-c/2 > =0) a = X-c/2; else a = 0;
      |                            ^
main.c:13:24: error: expected expression before '=' token
   13 |             if(Y-c/2 > =0) b = Y-c/2; else b = 0;
      |                        ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int A,B,C,X,Y;
	int sum=0,tmp=0,tmp2=0;
	cin>>A>>B>>C>>X>>Y;
	if((A+B)<2*C){
		sum = A*X+B*Y;
		cout<<sum<<endl;
	}
	else if((A+B)>=2*C){
		if(X > Y){
			tmp = 2*Y*C + (X-Y)*A;
			tmp2 = 2*X*C;
			sum = min(tmp, tmp2);
			cout<<sum<<endl;
		}
		else if(X < Y){
			tmp = 2*X*C + (Y-X)*B;
			tmp2 = 2*Y*C;
			sum = min(tmp, tmp2);
			cout<<sum<<endl;
		}
		return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c,x,y,s=0;
	scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);
	if(c<a+b)
	{
		s=(x+y-abs(x-y))/2*c+(x>y?a*(x-y):b*(y-x);
		printf("1");
	}
	else
	{
		s=a*x+b*y;
	}
	printf("%d",s);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:58: error: expected ')' before ';' token
    9 |                 s=(x+y-abs(x-y))/2*c+(x>y?a*(x-y):b*(y-x);
      |                                      ~                   ^
      |                                                          )
Language: C++

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

int main(){
    long a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    long ah;
    long long ak;
    if(d>e){
        ah=d;
        ak=((2*e)*c)+((d-e)*a);
    }
    else{
        ah=e;
        ak=((2*d)*c)+((e-d)*b);
    }
    long val=(c)*(2*ah);
    long long val1=(d*a)+(b*e);
    cout<<min(min(val,val1),ak)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: no matching function for call to 'min(long int&, long long int&)'
   19 |     cout<<min(min(val,val1),ak)<<endl;
      |               ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:19:18: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   19 |     cout<<min(min(val,val1),ak)<<endl;
      |               ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:19:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   19 |     cout<<min(min(val,val1),ak)<<endl;
      |               ~~~^~~~~~~~~~
Language: C

#include <stdio.h>


int main(int argc, char **argv)
{
  int a,b,c,x,y,i;
  int xxx[3];
  scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);
  if(x > y){
    xxx[0] = a * (x - y) + 2 * c * y;
    xxx[1] = a * x + b * y;
    xxx[2] = 2 * c * x;
  }
  else if(x == y){
    xxx[0] = 2 * c * x;
    xxx[1] = (a + b) * x;
    xxx[2] = 2147483647;
  }
  else{
    xxx[0] = b * (y - x) + 2 * c * x;
    xxx[1] = a * x + b * y;
    xxx[2] = 2 * c * y;
  }
  for(i = 0 ; i < 2 ; i++){
    if(xxx[i] < xxx[i + 1])
      xxx[i + 1] = xxx[i]
  }
  printf("%d\n",xxx[2]);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:26:26: error: expected ';' before '}' token
   26 |       xxx[i + 1] = xxx[i]
      |                          ^
      |                          ;
   27 |   }
      |   ~
Language: C++

#include <iostream>
 int main() {
 	int A, B, C, X, Y;
 	std::cin >> A >> B >> C >> X >> Y;
 	int x = X;
 	int y = Y;
 	int Z = A + B;
 	if (Z / 2 => C) {
 		
 			x /= 2;
 			y /= 2;
 			 if (x == y) {
 			 	std::cout << 4 * x * C <<std::endl;
 			 } else if (X > Y) {
 			 	std::cout << (4 * y * C) + A * (X - Y) <<std::endl;
 			 } else {
 			 	std::cout << (4 * x * C) + B * (Y - X) <<std::endl;
 			 }

 	} else if (Z / 2 < C) {
 		std::cout << A * X + B * Y <<std::endl;
 	}

 































 	return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected primary-expression before '>' token
    8 |         if (Z / 2 => C) {
      |                    ^
Language: C++

#include <iostream>
 int main() {
 	int A, B, C, X, Y;
 	std::cin >> A >> B >> C >> X >> Y;
 	int x = X;
 	int y = Y;
 	int Z = A + B;
 	if (Z / 2 => C) {
 		
 			x /= 2;
 			y /= 2;
 			 if (x == y) {
 			 	std::cout << 4 * x * C <<std::endl;
 			 	exit (0);
 			 } else if (X > Y) {
 			 	std::cout << (4 * y * C) + A * (X - Y) <<std::endl;
				exit(0);
 			 } else {
 			 	std::cout << (4 * x * C) + B * (Y - X) <<std::endl;
 			 	exit(0);
 			 }

 	} else if (Z / 2 < C) {
 		std::cout << A * X + B * Y <<std::endl;
 		exit(0); 
 	}

 































 	return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected primary-expression before '>' token
    8 |         if (Z / 2 => C) {
      |                    ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    long long A,B,C,X,Y;
    cin >> A>>B>>C>>X>>Y; //入力
    C += C;
    long long result = min(X,Y) * C; //Cでやすいやつ
    long long nokori,Z,W;
    if (X>Y){
        nokori = X - Y;
        if (X > C){
            result = result + nokori * C;
        } else {
            result = result + nokori * A;
        }
    } else {
        nokori = Y - X;
        if (Y > C) {
            result = result + nokori * C;
        } else {
            result = result + nokori * B;
        }
    }

    Z = A*X + B*Y;
    W = max(X,Y) * C;
    long long P = min(Z,result);
    long long Q = min (Z,W);
    long long R = X*min(A,C) + Y*min(B,C);
    cout << min(P,Q,R) << endl;//全部ABで買える時


}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:31:16:   required from here
   31 |     cout << min(P,Q,R) << endl;//全部ABで買える時
      |             ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
 int main() {
 	int A, B, C, X, Y;
 	std::cin >> A >> B >> C >> X >> Y;
 	int x = X;
 	int y = Y;
 	if ((A + B) / 2 => C) {
 		
 			x /= 2;
 			y /= 2;
 			 if (x == y) {
 			 	std::cout << 4 * x * C <<std::endl;
 			 	exit (0);
 			 } else if (X > Y) {
 			 	std::cout << (4 * y * C) + A * (X - Y) <<std::endl;
				exit(0);
 			 } else {
 			 	std::cout << (4 * x * C) + B * (Y - X) <<std::endl;
 			 	exit(0);
 			 }

 	} else if ((A + B) / 2 < C) {
 		std::cout << A * X + B * Y <<std::endl;
 		exit(0); 
 	}

 































 	return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before '>' token
    7 |         if ((A + B) / 2 => C) {
      |                          ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int A, B, C, X, Y;
int main() {
	int amount = 0, amount1 = 0, amount2 = 0, amount3 = 0, amount4 = 0;
	cin >> A >> B >> C >> X >> Y;

if (X > Y)
　cout << min(A + B, C * 2)*Y + min(A, C * 2)*(X - Y) << endl;
else
　cout << min(A + B, C * 2)*X + min(B, C * 2)*(Y - X) << endl;

	return 0;
}

Compiler output:
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　cout << min(A + B, C * 2)*Y + min(A, C * 2)*(X - Y) << endl;
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　cout << min(A + B, C * 2)*X + min(B, C * 2)*(Y - X) << endl;
      | ^
a.cc: In function 'int main()':
a.cc:12:1: error: '\U00003000cout' was not declared in this scope
   12 | 　cout << min(A + B, C * 2)*Y + min(A, C * 2)*(X - Y) << endl;
      | ^~~~~~
a.cc:14:1: error: '\U00003000cout' was not declared in this scope
   14 | 　cout << min(A + B, C * 2)*X + min(B, C * 2)*(Y - X) << endl;
      | ^~~~~~
Language: C++

#include <iostream>
 int main() {
 	int A, B, C, X, Y;
 	std::cin >> A >> B >> C >> X >> Y;
 	int x = X;
 	int y = Y;
 	if ((A + B) / 2 => C) {
 		
 			x /= 2;
 			y /= 2;
 			 if (x == y) {
 			 	std::cout << 4 * x * C <<std::endl;
 			 	exit (0);
 			 } else if (X > Y) {
 			 	std::cout << (4 * y * C) + A * (X - Y) <<std::endl;]
				exit(0);
 			 } else {
 			 	std::cout << (4 * x * C) + B * (Y - X) <<std::endl;
 			 	exit(0);
 			 }

 	} else if ((A + B) / 2 < C) {
 		std::cout << A * X + B * Y <<std::endl;
 		exit(0); 
 	}

 































 	return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before '>' token
    7 |         if ((A + B) / 2 => C) {
      |                          ^
a.cc:15:84: error: expected primary-expression before ']' token
   15 |                                 std::cout << (4 * y * C) + A * (X - Y) <<std::endl;]
      |                                                                                    ^
Language: C++

if (X > Y)
　cout << min(A + B, C * 2)*Y + min(A, C * 2)*(X - Y) << endl;
else
　cout << min(A + B, C * 2)*X + min(B, C * 2)*(Y - X) << endl;

Compiler output:
a.cc:2:1: error: extended character 　 is not valid in an identifier
    2 | 　cout << min(A + B, C * 2)*Y + min(A, C * 2)*(X - Y) << endl;
      | ^
a.cc:4:1: error: extended character 　 is not valid in an identifier
    4 | 　cout << min(A + B, C * 2)*X + min(B, C * 2)*(Y - X) << endl;
      | ^
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if (X > Y)
      | ^~
a.cc:3:1: error: expected unqualified-id before 'else'
    3 | else
      | ^~~~
Language: C++

int main(){
  scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
  if (x < y){
    subf(a,b,c,x,y);
  }else{
    subf(a,b,c,y,x);
  }
  printf("%d",sum);
  return 0;
}

int subf(){
  if (a+b < 2*c){
    sum += (a+b)*x;
    if (b < 2*c){
      sum += b*(y-x);
    }else{
      sum += 2*c*(y-x);
    }
  }else{
    sum += 2*c*x;
    if (b < 2*c){
      sum += b*(y-x);
    }else{
      sum += 2*c*(y-x);
    }
  }
  return sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:23: error: 'a' was not declared in this scope
    2 |   scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |                       ^
a.cc:2:26: error: 'b' was not declared in this scope
    2 |   scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |                          ^
a.cc:2:29: error: 'c' was not declared in this scope
    2 |   scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |                             ^
a.cc:2:32: error: 'x' was not declared in this scope
    2 |   scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |                                ^
a.cc:2:35: error: 'y' was not declared in this scope
    2 |   scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |                                   ^
a.cc:2:3: error: 'scanf' was not declared in this scope
    2 |   scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |   ^~~~~
a.cc:4:5: error: 'subf' was not declared in this scope
    4 |     subf(a,b,c,x,y);
      |     ^~~~
a.cc:6:5: error: 'subf' was not declared in this scope
    6 |     subf(a,b,c,y,x);
      |     ^~~~
a.cc:8:15: error: 'sum' was not declared in this scope
    8 |   printf("%d",sum);
      |               ^~~
a.cc:8:3: error: 'printf' was not declared in this scope
    8 |   printf("%d",sum);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc: In function 'int subf()':
a.cc:13:7: error: 'a' was not declared in this scope
   13 |   if (a+b < 2*c){
      |       ^
a.cc:13:9: error: 'b' was not declared in this scope
   13 |   if (a+b < 2*c){
      |         ^
a.cc:13:15: error: 'c' was not declared in this scope
   13 |   if (a+b < 2*c){
      |               ^
a.cc:14:5: error: 'sum' was not declared in this scope
   14 |     sum += (a+b)*x;
      |     ^~~
a.cc:14:18: error: 'x' was not declared in this scope
   14 |     sum += (a+b)*x;
      |                  ^
a.cc:16:17: error: 'y' was not declared in this scope
   16 |       sum += b*(y-x);
      |                 ^
a.cc:18:19: error: 'y' was not declared in this scope
   18 |       sum += 2*c*(y-x);
      |                   ^
a.cc:21:5: error: 'sum' was not declared in this scope
   21 |     sum += 2*c*x;
      |     ^~~
a.cc:21:16: error: 'x' was not declared in this scope
   21 |     sum += 2*c*x;
      |                ^
a.cc:23:17: error: 'y' was not declared in this scope
   23 |       sum += b*(y-x);
      |                 ^
a.cc:25:19: error: 'y' was not declared in this scope
   25 |       sum += 2*c*(y-x);
      |                   ^
a.cc:28:10: error: 'sum' was not declared in this scope
   28 |   return sum;
      |          ^~~
Language: Java

import java.util.Scanner;
public class ABC095C {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		if((A+B)/2<=C){
			System.out.println(A*X+B*Y);
			return;
		}
		if(X>=Y){
			int volume = 0;
			X -= Y;
			volume += C*Y*2;
			if(A<C*2){
				volume += X*A;
				System.out.println(volume);
			}else{
				volume += C*2*X;
				System.out.println(volume);
			}
		}else{
			int volume = 0;
			Y -= X;
			volume += C*X*2;
			if(B<C*2){
				volume += Y*B;
				System.out.println(volume);
			}else{
				volume += C*2*Y;
				System.out.println(volume);
			}
		}

	}

}


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

#include<string>
using namespace std;
#include <stdio.h>
#include <limits.h>
#include "bits/stdc++.h"
int a, b, c, x, y, z, n, m;
int main() 
{
	if (c * 2 >= a + b) {
		ans1 = a*x + b*y;
}
	if (x >= y) {
		z = x;
		n = a;
		m = y;
	}
	if (x < y) {
		z = y;
		n = b;
		m = x;
	}
	if (c * 2 < a + b) {
		if (c < n / 2) {
			ans1 = z*c * 2;
		}
		else {
			ans1 = m*c * 2 + n*(z - m);
		}
	}
	cout << ans1;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'ans1' was not declared in this scope
   10 |                 ans1 = a*x + b*y;
      |                 ^~~~
a.cc:24:25: error: 'ans1' was not declared in this scope
   24 |                         ans1 = z*c * 2;
      |                         ^~~~
a.cc:27:25: error: 'ans1' was not declared in this scope
   27 |                         ans1 = m*c * 2 + n*(z - m);
      |                         ^~~~
a.cc:30:17: error: 'ans1' was not declared in this scope
   30 |         cout << ans1;
      |                 ^~~~
Language: C++


#include <iostream>
using namespace std;

int main(){
    int A,B,C,X,Y;
    cin >> A>>B>>C>>X>>Y; //入力
    C += C;
    long result = min(X,Y) * C; //Cでやすいやつ
    int nokori,Z,W;
    if (X>Y){
        nokori = X - Y;
        if (X > C){
            result = result + nokori * C;
        } else {
            result = result + nokori * A;
        }
    } else {
        nokori = Y - X;
        if (Y > C) {
            result = result + nokori * C;
        } else {
            result = result + nokori * B;
        }
    }

    Z = A*X + B*Y;
    W = max(X,Y) * C;
    long P = min(Z,result);
    long Q = min (Z,W);

    cout << min(P,Q) << endl;//全部ABで買える時


}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: no matching function for call to 'min(int&, long int&)'
   29 |     long P = min(Z,result);
      |              ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:29:17: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   29 |     long P = min(Z,result);
      |              ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <stdio.h>
#include <stdlib.h>
int a,b,c,x,y,sum=0;
    scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
    if(a+b<2*c)
    {
        printf("%d\n",a*x+b*y);
    }
    else
    {
        if(x<=y)
        {
            sum=2*x*c;
            if(2*c<b)
                sum=sum+2*abs(y-x)*c;
            else
                sum=sum+(y-x)*b;
        }
        else
        {
            sum=2*y*c;
            if(2*abs(y-x)*c<(x-y)*a)
                sum=sum+2*abs(x-y)*c;
            else
                sum=sum+(x-y)*a;
        }
 
     printf("%d",sum);
    }
    return 0;

Compiler output:
a.cc:4:10: error: expected constructor, destructor, or type conversion before '(' token
    4 |     scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |          ^
a.cc:5:5: error: expected unqualified-id before 'if'
    5 |     if(a+b<2*c)
      |     ^~
a.cc:9:5: error: expected unqualified-id before 'else'
    9 |     else
      |     ^~~~
a.cc:30:5: error: expected unqualified-id before 'return'
   30 |     return 0;
      |     ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A, B, C;
  int X, Y;

  cin >> A >> B >> C >> X >> Y;

  int cost;

  if(2*C >= A+B){
    cost = A*X + B*Y;
  }

  else if (2*C <= A && 2*C <= B ){
    if (X<Y) cost = 2*C*Y;
    else cost = 2*C*X;
  }

  else{
    if(A>B) {
      if(Y=>X) cost = 2*C*Y;
      else cost = 2*C*Y + A*(X-Y);
    }
    else {
      if (X=>Y) cost = 2*C*X;
      else cost = 2*C*X + B*(Y-X);
    }  
  }


  cout << cost;


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: expected primary-expression before '>' token
   23 |       if(Y=>X) cost = 2*C*Y;
      |            ^
a.cc:27:13: error: expected primary-expression before '>' token
   27 |       if (X=>Y) cost = 2*C*X;
      |             ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c,n,m;
    cin>>a>>b>>c>>n>>m;
    if(a+b<2*c){
        cout<<a*n+b*m;
    }
    else{
        long kq;
        if(m>=n){
            kq=min(m*2*c,n*2*c+(m-n)*b);
            cout<<kq;
        }
        else{
            kq=min(n*2*c,m*2*c+(n-m)*a);
            cout<<kq;
        }
    }
}

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

#include <stdio.h>
#include <stdlib.h>
int a,b,c,x,y,sum=0;
    scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
    if(a+b<2*c)
    {
        printf("%d\n",a*x+b*y);
    }
    else
    {
        if(x<=y)
        {
            sum=2*x*c;
            if(2*c<b)
                sum=sum+2*(y-x)*c;
            else
                sum=sum+(y-x)*b;
        }
        else
        {
            sum=2*y*c;
            if(2*abs(y-x)*c<(x-y)*a)
                sum=sum+2*(x-y)*c;
            else
                sum=sum+(x-y)*a;
        }
 
     printf("%d",sum);
    }

Compiler output:
a.cc:4:10: error: expected constructor, destructor, or type conversion before '(' token
    4 |     scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
      |          ^
a.cc:5:5: error: expected unqualified-id before 'if'
    5 |     if(a+b<2*c)
      |     ^~
a.cc:9:5: error: expected unqualified-id before 'else'
    9 |     else
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <algorithm>
using namespace std;


int main()
{
	long a, b, c, x, y;
	cin >> a >> b >> c >> x >> y;

	long long result = 0;

	if ((a + b) >= (c * 4)) {
		result = (std::max({ x, y }) * c) * 2;
		cout << result << endl;
		return 0;
	}

	long avarage = std::ceil((float)(a + b) / 2.0f);
	long same = x < y ? x : y;

	if (c <= avarage) {
		result += c * same * 2;
		if (same == x) {
			result += b * (y - x);
		}
		else {
			result += a * (x - y);
		}
	}
	else {
		result += a * x;
		result += b * y;
	}

	cout << result << endl;
	
	int quit; cin >> quit;
	return 0;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: 'ceil' is not a member of 'std'
   22 |         long avarage = std::ceil((float)(a + b) / 2.0f);
      |                             ^~~~
Language: C++

#include <iostream> 
#include <cstdio> 
#include <fstream> 
#include <algorithm> 
#include <cmath> 
#include <deque> 
#include <vector> 
#include <queue> 
#include <string> 
#include <cstring> 
#include <map> 
#include <stack> 
#include <set> 
using namespace std;
int main(){
int a,b,c,x,y,d;
long long ans=10000000000000001;
cin>>a>>b>>c>>x>>y;
 for(int i=0;i<=min(x,y)*2;i+=2)
  if(ans>=(i*c+(x-i/2)*a+(y-i/2)*b))
    ans=(i*c+(x-i/2)*a+(y-i/2)*b);
 for(int i=min(x,y)*2;i<=max(x,y)*2;i+=2)
  if(ans>=(i*c+(max(x,y)-i/2)*b))
    ans=(i*c+(max(x,y)-i/2)*b);
if(x==0)
ans=min(y*b,c*y);
if(y==0)
ans=min(x*a,x*c);  
cout<<ans;
system("pause");
return 0;
}
}

Compiler output:
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int A,B,C,X,Y;
  cin>>A>>B>>C>>X>>Y;
  int ans=A*X+B*Y;
  int N=2*max(X,Y);
  for (int i=2; X && Y; i+=2) {
    ans=min(ans,C*i+(X-1)*A+(Y-1)*B);
    X--; Y--;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:8: error: 'std::ios' has not been declared
    2 |   std::ios::sync_with_stdio(false);
      |        ^~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin.tie(0);
      |   ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
    4 |   cout.tie(0);
      |   ^~~~
a.cc:8:11: error: 'max' was not declared in this scope
    8 |   int N=2*max(X,Y);
      |           ^~~
a.cc:10:9: error: 'min' was not declared in this scope; did you mean 'main'?
   10 |     ans=min(ans,C*i+(X-1)*A+(Y-1)*B);
      |         ^~~
      |         main
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |   cout<<ans<<endl;
      |              ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
int x,y;
int ans=0;
cin >> a >> b >> c >> x >> y;
if(a+b >= c*2){
if(x > y){
ans = (x-y)*c*2;
cout << ans + y*b << endl;
}else if(x == y){
ans = x*c*2;
cout << ans << endl;
}else{
ans = (y-x)*c*2;
cout << ans + x*a << endl;
}
}
}else{
cout << a*x+y*b << endl;
}
return 0;
}

Compiler output:
a.cc:20:2: error: expected unqualified-id before 'else'
   20 | }else{
      |  ^~~~
a.cc:23:1: error: expected unqualified-id before 'return'
   23 | return 0;
      | ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: Java

public class Main {
	public static void main(String args[]){

		Scanner scan=new Scanner(System.in);

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

		int count[]=new int[3];

		if(c*2>(a+b)) {
			count[0]=x;
			count[1]=y;
			count[2]=0;
		}else if(Math.min(a, b)>c*2){
			count[0]=0;
			count[1]=0;
			count[2]=Math.max(x, y)*2;
		}else if(x>y){
			count[0]=x-y;
			count[1]=0;
			count[2]=y*2;
		}else {
			count[0]=0;
			count[1]=y-x;
			count[2]=x*2;
		}

		System.out.println((a*count[0])+(b*count[1])+(c*count[2]));
	}
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
int x,y;
int ans=0;
cin >> a >> b >> c >> x >> y;
if(a+b >= c*2){
if(x > y){
ans = (x-y)*c*2;
cout << ans + y*b << endl;
}else if(x == y){
ans = x*c*2;
cout << ans << endl;
}else{
ans = (y-x)*c*2;
cout << ans + x*a << endl;
}
}
cout << << endl;
}else{
cout << a*x+y*b << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: expected primary-expression before '<<' token
   20 | cout << << endl;
      |         ^~
a.cc: At global scope:
a.cc:21:2: error: expected unqualified-id before 'else'
   21 | }else{
      |  ^~~~
a.cc:24:1: error: expected unqualified-id before 'return'
   24 | return 0;
      | ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	int a ,b ,c, x, y;
	cin >> a >> b >> c >> x >> y;
	int ans1, ans2 , ans3;
	bool c_is_optimal = false;
	ans1 = min(x,y) * c * 2;
	t = min(x,y);
	ans1 += (x - t)*a + (y - t)*b;
	ans2 = a * x + b * y;
	ans3 = max(x,y) *c * 2;
	cout << min(min(ans1,ans2),ans3);
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 't' was not declared in this scope
   11 |         t = min(x,y);
      |         ^
Language: C++

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

int main(){
  int a,b,c,x,y;
  cin>>a>>b>>c>>x>>y;
  int j;
  if((a+b)<c*2)j=0;
  else if(a>c&&b>c)j=2;
  else j=1;

  if(j===0){
    cout<<x*a+y*b<<endl;
  }
  else if(j==1){
    if(x>y)cout<<c*y*2+a*(x-y)<<endl;
    else if(x<y)cout<<c*x*2+b*(y-x)<<endl;
    else cout<<c*x*2<<endl;
  }
  else {
    if(x>y)cout<<c*x*2<<endl;
    else cout<<c*y*2<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected primary-expression before '=' token
   12 |   if(j===0){
      |         ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <algorithm>
using namespace std;


int main()
{
	long a, b, c, x, y;
	cin >> a >> b >> c >> x >> y;

	long result = 0;

	if ((a + b) >= (c * 4)) {
		result += std::max({ x, y }) * c * 2;
		cout << result << endl;
		return 0;
	}

	float avarage = round((float)(a + b) / 2.0f);
	long same = x < y ? x : y;

	if (c <= avarage) {
		result += c * same * 2;
		if (same == x) {
			result += b * (y - x);
		}
		else {
			result += a * (x - y);
		}
	}
	else {
		result += a * x;
		result += b * y;
	}

	cout << result << endl;
	
	int quit; cin >> quit;
	return 0;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'round' was not declared in this scope
   22 |         float avarage = round((float)(a + b) / 2.0f);
      |                         ^~~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <queue>
#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>        //do setprecision
#include <ctime>
#include <complex>
using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double

const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int mod=1000000007;

int main(){
    LL int a,b,c,x,y;

    cin >> a >> b >> c >> x >> y;

    if     ((a+b)/2 > c && x = y)c*2*x;
    else if((a+b)/2 <= c && x = y)a*2*x;
    else if(a > c && b > c && x > y)cout << c*2*x;
    else if(a > c && b > c && x <= y)cout << c*2*y;
    else if((a+b)/2 > c && x > y)cout << y*2*c + abs(x-y)*a;
    else if((a+b)/2 > c && x <= y)cout << x*2*c + abs(x-y)*b;
    else cout << a*x + b*y;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:25: error: lvalue required as left operand of assignment
   43 |     if     ((a+b)/2 > c && x = y)c*2*x;
      |             ~~~~~~~~~~~~^~~~
a.cc:44:26: error: lvalue required as left operand of assignment
   44 |     else if((a+b)/2 <= c && x = y)a*2*x;
      |             ~~~~~~~~~~~~~^~~~
Language: C++

#include <math.h>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <iomanip>
#include <iterator>
#include <algorithm>
#include <functional>
#include <typeinfo>
#include <utility>
#include <tuple>
#include <queue>
#include <deque>

using namespace std;

#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define reprrev(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); i--)
#define reprev(i, n) reprrev(i, 0, n)
#define mp(a, b) make_pair(a, b)
#define all(vec) (vec).begin(), (vec).end()
#define yn(formula) (formula) ? (cout << "Yes" << endl) : (cout << "No" << endl)
#define YN(formula) (formula) ? (cout << "YES" << endl) : (cout << "NO" << endl)
#define MIN(a, b) ((a) < (b)) ? (a) : (b)

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pii> vp;
typedef vector<pll> vpl;
typedef vector<vi> vvi;
typedef vector<vll> vvl;
typedef vector<vb> vvb;
typedef vector<vc> vvc;
typedef vector<vs> vvs;
typedef vector<vp> vvp;
typedef vector<vpl> vvpl;

constexpr double PI = 3.14159265358979323846;
constexpr ll INF = 1 << 29;
constexpr ll MOD = (ll)1e9 + 7;
constexpr double EPS = 1e-7;
constexpr int dy[4] = { 0, 1, 0, -1 };
constexpr int dx[4] = { 1, 0, -1, 0 };

struct edge { ll to; ll cost; };

/*<ここから>***********************************************************/


int main()
{
	ll A, B, C, X, Y;
	cin >> A >> B >> C >> X >> Y;

	ll ans = LLONG_MAX;
	for (ll ab = 0; ab <= max(X, Y) * 2; ab += 2) {

		ll x = X - ab / 2, y = Y - ab / 2;
		ll cost = ll(ab * C);
		if (x > 0) cost += ll(x * A);
		if (y > 0) cost += ll(y * B);
		if (cost < ans)	ans = cost;
	}

	cout << ans << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:18: error: 'LLONG_MAX' was not declared in this scope
   63 |         ll ans = LLONG_MAX;
      |                  ^~~~~~~~~
a.cc:14:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   13 | #include <queue>
  +++ |+#include <climits>
   14 | #include <deque>
Language: C++

#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>

using namespace std;

int main(){
	int A,B,C,X,Y;
	cin>>A>>B>>C>>X>>Y;
	int ans=0;
	if((A+B)>=2*C){
		if(A<=C){
			ans+=2*C*Y;
			if(Y<X){
				ans+=A*(X-Y);
			}
		}else{
			ans+=2*C*X;
			if(X<Y){
				ans+=B*(Y-X;
			}
		}
	}else{
		ans+=A*X+B*Y;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:44: error: expected ')' before ';' token
   29 |                                 ans+=B*(Y-X;
      |                                        ~   ^
      |                                            )
Language: C++

#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>

using namespace std;

int main(){
	int A,B,C,X,Y;
	cin>>A>>B>>C>>X>>Y;
	int ans=0;
	if((A+B)>=2*C){
		if(A<=C){
			ans+=2*C*Y;
			if(Y<X){
				ans+=A*(X-Y);
			}
		}else{
			ans+=2*C*X;
			if(X<Y){
				ans+=B*(Y-X;
			}
		}
	}els{
		ans+=A*X+B*Y;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:44: error: expected ')' before ';' token
   29 |                                 ans+=B*(Y-X;
      |                                        ~   ^
      |                                            )
a.cc:32:10: error: 'els' was not declared in this scope
   32 |         }els{
      |          ^~~
Language: C++

int main(){
    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;

    int now_price;
    if (2*c - a - b <= 0){
        if (x > y and a < 2*c) now_price = 2*c*y + (x-y)*a;
        else if (x > y) now_price = 2*c*x;
        else if (x <= y and b < 2*c) now_price = 2*c*x + (y-x)*b;
        else now_price = 2*c*y;
    }else{
        now_price = a*x + b*y;
    }
    cout << now_price << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a >> b >> c >> x >> y;
      |     ^~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << now_price << endl;
      |     ^~~~
a.cc:14:26: error: 'endl' was not declared in this scope
   14 |     cout << now_price << endl;
      |                          ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

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

int main()
{
	int a, b, c, x, y;

	cin >> a >> b >> c >> x >> y;

	int ans = INT_MAX;

	int totalA = 0;
	int totalB = 0;
	int totalC = 0;
	if (a + b > c * 2)
	{
		int cnum = min(x, y);
		totalC = cnum * 2 * c;
		x -= cnum;
		y -= cnum;
	}

	if (a > c * 2)
	{
		totalC += x * 2 * c;
		x -= x;
		y -= x;
	}
	else
	{
		totalA = x * a;
		x -= x;
	}

	if (b > c * 2)
	{
		totalC += y * 2 * c;
		x -= y;
		y -= y;
	}
	else
	{
		totalB = y * b;
		y -= y;
	}
	cout << (totalA + totalB + totalC) << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: 'INT_MAX' was not declared in this scope
   17 |         int ans = INT_MAX;
      |                   ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    5 | #include <cmath>
  +++ |+#include <climits>
    6 | using namespace std;
Language: C++

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

int main(){
  int a, b, c, x, y;

  cin >> a >> b >> c >> x >> y;

  int total1, total2, total3;

  // if(((a+b)/2 > c) && (min(a,b) < c)){                                                                       
  //   if(x < y){                                                                                               
  //     total = x*2*c + (y-x)*b;                                                                               
  //    }                                                                                                       
  //   else{                                                                                                    
  //     total = y*2*c + (x-y)*a;                                                                               
  //    }                                                                                                       
  // }                                                                                                          
  // else if(((a+b)/2 <= c) && (min(a,b) < c)){                                                                 
  //   total = a*x + b*y;                                                                                       
  //  }                                                                                                         
  // else{                                                                                                      
  //   total = max(x,y)*2*c;                                                                                    
  // }                                                                                                          

  // if(max(x,y)*2*c < total){                                                                                  
  //   total = max(x,y)*2*c;                                                                                    
  // }                                                                                                          

  if(x < y){
    total1 = x*2*c + (y-x)*b;
  }
  else{
    total1 = y*2*c + (x-y)*a;
  }
  total2 = a*x + b*y;
  total3 = max(x,y)*2*c;


  cout << min(total1,total2,total3) << endl;

  return 0;
}



Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:43:14:   required from here
   43 |   cout << min(total1,total2,total3) << endl;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

nclude <stdio.h>
int main(void){
    int a,b,c,x,y,s[3],i,min;
	scanf("%d%d%d%d%d",&a,&b,&c,&x,&y);
	s[0]=(a*x)+(b*y);
	if(x>y){ 
	    s[1]=(x*2)*c;
	    s[2]=(y*2*c)+(x-y)*a;
	}
	else{
	    s[1]=(y*2)*c;
	    s[2]=(x*c*2)+(y-x)*b;
	}
	min=s[0];
	for(i=0;i<3;i++){
	    if(min>s[i]) min=s[i];

	}
	printf("%d\n",min);
	return 0;
}


Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude <stdio.h>
      | ^~~~~~
Language: C++

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

int main(){
  int a, b, c, x, y;

  cin >> a >> b >> c >> x >> y;

  int total;

  if(((a+b)/2 > c) && (min(a,b) < c)){
    if(x < y){
      total = x*2*c + (y-x)*b;
     }
    else{
      total = y*2*c + (x-y)*a;
     }
  }
  else if(((a+b)/2 <= c) && (min(a,b) < c)){
    total = a*x + b*y;
   }
  else{
    total = max(x,y)*2*c;
  }

  if(max(x,y)*2*c < total){
    total = max(x,y)*2*c
      }

  cout << total << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:25: error: expected ';' before '}' token
   30 |     total = max(x,y)*2*c
      |                         ^
      |                         ;
   31 |       }
      |       ~