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

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
const long long INF = 1LL << 60;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } //最大公約数
int lcm(int a, int b) {return a * b / gcd(a, b);}   //最小公倍数

int main(){
    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    int ans = INT_MAX;
    rep(i, 1000001)
    {
        ans = min(ans,i * 2 * c + max(0LL, x - i) * a + max(0, y - i) * b);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:38: error: no matching function for call to 'max(long long int, int)'
   18 |         ans = min(ans,i * 2 * c + max(0LL, x - i) * a + max(0, y - i) * b);
      |                                   ~~~^~~~~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:18:38: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 |         ans = min(ans,i * 2 * c + max(0LL, x - i) * a + max(0, y - i) * b);
      |                                   ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303: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:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:18:38: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 |         ans = min(ans,i * 2 * c + max(0LL, x - i) * a + max(0, y - i) * b);
      |                                   ~~~^~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <deque>
#include <cmath>
#include <stack>
#include <queue>
#include <string>
#include <locale>
#include <iomanip>

#define nl '\n'

using namespace std;

long long a, b, c, x, y, s, t;

long long main(){

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

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

    s = min(x, y);
    if(s == x){
        t = t + (x*2*c);
        if((y-x)*b < (y-x)*c){
            t = t + (y-x)*b;
        } else{
            t = t + (y-x)*c*2;
        }
    }else if(s == y){
        t = t + (y*2*c);
        if((x-y)*a < (x-y)*c){
            t = t + (x-y)*a;
        } else{
            t = t + (x-y)*c*2;
        }
    }

    cout << t;

    







}

//g++ -std=c++14 comp.cpp -o b; ./b.exe

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define eb emplace_back
#define pb push_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define chmin(x,y) if(x>y)x=y
#define chmax(x,y) if(x<y)x=y
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll,vector<ll>,greater<ll>> SPQ;
using vi=vector<ll>;
using vvi=vector<vector<ll>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
const ll inf=100100100100;
const int Inf=1001001001;
const int mod=1000000007;
const double pi=3.141592653589793;

int main(){
    ll a,b,c,x,y;cin>>a>>b>>c>>x>>y;
    c*=2;
    ll ans=inf;
    rep(i,(max(x,y)+4)/2){
        ll k=0;
        k+=c*i;
        d=x-min(i*2,x);
        e=y-min(i*2,y);
        k+=d*a+e*b;
        chmin(ans,k);
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: 'd' was not declared in this scope
   32 |         d=x-min(i*2,x);
      |         ^
a.cc:33:9: error: 'e' was not declared in this scope
   33 |         e=y-min(i*2,y);
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define eb emplace_back
#define pb push_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define chmin(x,y) if(x>y)x=y
#define chmax(x,y) if(x<y)x=y
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll,vector<ll>,greater<ll>> SPQ;
using vi=vector<ll>;
using vvi=vector<vector<ll>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
const ll inf=100100100100;
const int Inf=1001001001;
const int mod=1000000007;
const double pi=3.141592653589793;

void dfs (ll i,vi v,vi &k){
    k.pb(i);
    for(ll x: v[i]){
        dfs(x,v,k);
    }
}
int main(){
    ll a,b,c,x,y;cin>>a>>b>>c>>x>>y;
    c*=2;
    ll ans=inf;
    rep(i,(max(x,y)+4)/2){
        ll k=0;
        k+=c*i;
        d=x-min(i*2,x);
        e=y-min(i*2,y);
        k+=d*a+e*b;
        chmin(ans,k);
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'void dfs(ll, vi, vi&)':
a.cc:27:18: error: 'begin' was not declared in this scope
   27 |     for(ll x: v[i]){
      |                  ^
a.cc:27:18: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:27:18: error: 'end' was not declared in this scope
   27 |     for(ll x: v[i]){
      |                  ^
a.cc:27:18: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
a.cc: In function 'int main()':
a.cc:38:9: error: 'd' was not declared in this scope
   38 |         d=x-min(i*2,x);
      |         ^
a.cc:39:9: error: 'e' was not declared in this scope
   39 |         e=y-min(i*2,y);
      |         ^
Language: C++


#include<iostream>

using namespace std;


int main() {

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

	int mini = 1000000;

	if(X >= Y){

	for (int i = 0; i <= X; ++i) {
		int total = 0;
		total = 2 * C * i + (X - i) * A + abs((Y - i)) * B;
		cout << mini << endl;
		if (total < mini)	mini = total;

		}
	}

	cout << mini << endl;


}
#include<iostream>

using namespace std;


int main() {

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

	int mini = 1000000;

	if(X >= Y){

	for (int i = 0; i <= X; ++i) {
		int total = 0;
		total = 2 * C * i + (X - i) * A + abs((Y - i)) * B;
		//cout << mini << endl;
		if (total < mini)	mini = total;

		}
	}

	cout << mini << endl;


}

Compiler output:
a.cc:34:5: error: redefinition of 'int main()'
   34 | int main() {
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main() {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    int A,B,C,X,Y;
    cin >> A >> B >> C >> X >> Y;
    int a = min(X,Y),s = 0;
    c = 2*C;
    if(A+B >= c) s += c*a;
    else s += (A+B)*a;
    X -= a;Y -= a;
    if(A >= c)s += c*X;
    else s += A*X;
    if(B >= c)s += c*Y;
    else s += B*Y;
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'c' was not declared in this scope
    7 |     c = 2*C;
      |     ^
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define dbg1(x) cerr<<#x<<"="<<(x)<<" "
#define dbg2(x) cerr<<#x<<"="<<(x)<<"\n"
#define dbg3(x) cerr<<#x<<"\n"
using namespace std;
#define reg register
inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
    return x*f;
}
int64 ans,A,B,C,X,Y;
int64 val(ll i){return i*2ll*C+(X-i)*A+(Y-i)*B;}
int main()
{
	A=read(),B=read(),C=read(),
	X=read(),Y=read();
	reg int i;
	ans=val(0);
	for(i=1;i<=X&&i<=Y;++i)
		ans=min(ans,val(i));
	return 0*printf("%lld\n",ans);
}

Compiler output:
a.cc:15:1: error: 'int64' does not name a type; did you mean 'int64_t'?
   15 | int64 ans,A,B,C,X,Y;
      | ^~~~~
      | int64_t
a.cc:16:1: error: 'int64' does not name a type; did you mean 'int64_t'?
   16 | int64 val(ll i){return i*2ll*C+(X-i)*A+(Y-i)*B;}
      | ^~~~~
      | int64_t
a.cc: In function 'int main()':
a.cc:19:9: error: 'A' was not declared in this scope
   19 |         A=read(),B=read(),C=read(),
      |         ^
a.cc:19:18: error: 'B' was not declared in this scope
   19 |         A=read(),B=read(),C=read(),
      |                  ^
a.cc:19:27: error: 'C' was not declared in this scope
   19 |         A=read(),B=read(),C=read(),
      |                           ^
a.cc:20:9: error: 'X' was not declared in this scope
   20 |         X=read(),Y=read();
      |         ^
a.cc:20:18: error: 'Y' was not declared in this scope
   20 |         X=read(),Y=read();
      |                  ^
a.cc:21:17: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   21 |         reg int i;
      |                 ^
a.cc:22:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |         ans=val(0);
      |         ^~~
      |         abs
a.cc:22:13: error: 'val' was not declared in this scope
   22 |         ans=val(0);
      |             ^~~
Language: C++

#include<iostream>
#include<string>
#include <vector>
#include<map>
#include<algorithm>
#include<iomanip>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using vs = vector<string>;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define vsort(v) sort(v.begin(), v.end())
#define rv(v) reverse(v.begin(), v.end())
#define ll long long
const ll MOD = 1e9 + 7;



int main() {
	int a, b, c, x, y;
	cin >> a >> b >> c >> x >> y;
	ll ans = 1e9 + 7;
	rep(i, x + 1) {
		rep(j, y + 1) {
			int s, t;
			s = 2 * (x - i);
			t = 2 * (y - j);
			s = max(s, t);
			ans = min(ans, a * i + b * j + c * s);
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:34: error: no matching function for call to 'min(long long int&, int)'
   30 |                         ans = min(ans, a * i + b * j + c * s);
      |                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: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:30:34: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   30 |                         ans = min(ans, a * i + b * j + c * s);
      |                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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,
                 from a.cc:5:
/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:30:34: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   30 |                         ans = min(ans, a * i + b * j + c * s);
      |                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include <vector>
#include<map>
#include<algorithm>
#include<iomanip>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using vs = vector<string>;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define vsort(v) sort(v.begin(), v.end())
#define rv(v) reverse(v.begin(), v.end())
#define ll long long
const ll MOD = 1e9 + 7;



int main() {
	int a, b, c, x, y;
	cin >> a >> b >> c >> x >> y;
	ll c = 1e9 + 7;
	rep(i, x + 1) {
		rep(j, y + 1) {
			int s, t;
			s = 2 * (x - i);
			t = 2 * (y - j);
			s = max(s, t);
			c = min(c, a * i + b * j + c * s);
		}
	}
	cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: conflicting declaration 'long long int c'
   23 |         ll c = 1e9 + 7;
      |            ^
a.cc:21:19: note: previous declaration as 'int c'
   21 |         int a, b, c, x, y;
      |                   ^
Language: Java



import java.util.Scanner;

public class soeza {

	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 gg=Math.min(x, y);
		int cost=0;
		cost=Math.min((a*gg+b*gg),gg*c*2);
		
		if(x>=y)
		{
		 int xneed=x-gg;	
		 cost+=Math.min(a*xneed,2*c*xneed);
		}else {
			int need=y-gg;
			cost+=Math.min(a*need,2*c*need);
		}
		System.out.println(cost);
	}
}


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

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

int main(){
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  
  int max;
  int min;
  int maxnedan;
  int minnedan;
  
  if (x>y){
    max = x;
    min = y;
    maxnedan = a;
  }
  else if (x < y){
    max = y;
    min = x;
    maxnedan = b;
  }
  
  int total;
  if (a+b > c*2){
    int total1,total2;
    total1 = c*2*min + (max-min)*maxnedan;
    total2 = c*2*max;
    total = min(total1,total2);
  }
  else{
    total = a*x + b*y;
  }
  
  cout << total << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'min' cannot be used as a function
   29 |     total = min(total1,total2);
      |             ~~~^~~~~~~~~~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:33:23: error: expected '}' at end of input
   33 |   cout << ans << endl;
      |                       ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//#include <Windows.h>
#include <math.h>
//#include "Header.h"

int main(){
	int a, b, c, x, y;		// A:a円、B:b円、AB:c円、A:x枚、B:y枚必要
	scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);

	int money = 0;
	// Cの方が安い場合Cを優先して買う
	if (a + b > c * 2)
	{
		money = c * 2 * __min(x, y);

		int xy = abs(x - y);		// 差分
		// AorBとC2枚の安い方を買う
		if (x > y)
		{
			money += __min(a, c * 2) * xy;
		}
		else
		{
			money += __min(b, c * 2) * xy;
		}
	}
	else
	{
		money = a * x + b * y;
	}

	printf("%d", money);
	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: '__min' was not declared in this scope; did you mean '__sin'?
   16 |                 money = c * 2 * __min(x, y);
      |                                 ^~~~~
      |                                 __sin
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//#include <Windows.h>
#include <math.h>
//#include "Header.h"

int main(){
	int a, b, c, x, y;		// A:a円、B:b円、AB:c円、A:x枚、B:y枚必要
	scanf_s("%d %d %d %d %d", &a, &b, &c, &x, &y);

	int money = 0;
	// Cの方が安い場合Cを優先して買う
	if (a + b > c * 2)
	{
		money = c * 2 * __min(x, y);

		int xy = abs(x - y);		// 差分
		// AorBとC2枚の安い方を買う
		if (x > y)
		{
			money += __min(a, c * 2) * xy;
		}
		else
		{
			money += __min(b, c * 2) * xy;
		}
	}
	else
	{
		money = a * x + b * y;
	}

	printf("%d", money);
	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d %d %d %d %d", &a, &b, &c, &x, &y);
      |         ^~~~~~~
      |         scanf
a.cc:16:33: error: '__min' was not declared in this scope; did you mean '__sin'?
   16 |                 money = c * 2 * __min(x, y);
      |                                 ^~~~~
      |                                 __sin
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
  long a,b,c;
  cin >> a >> b >> c;
  
  int x,y;
  cin >> x >> y;
  
  long d = a * x + b * y;
  long e = c * max(x,y);
  long f;
  if(x >= y)
    f = b * y + a * (x - y);
  else
    f = a * x + b * (y - x);
  
  cout << min({d,e,f}) << endl;
  
  return 0;
  
}
#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
  long a,b,c;
  cin >> a >> b >> c;
  
  int x,y;
  cin >> x >> y;
  
  long d = a * x + b * y;
  long e = c * max(x,y) * 2;
  long f;
  if(x >= y)
    f = c * 2 * y + a * (x - y);
  else
    f = a * 2 * x + b * (y - x);
  
  cout << min({d,e,f}) << endl;
  
  return 0;
  
}


Compiler output:
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main(void){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(void){
      |     ^~~~
Language: C++

#include <iostream>
#include <algoruthm>
using namespace std;
int main(void){
  long a,b,c;
  cin >> a >> b >> c;
  
  int x,y;
  cin >> x >> y;
  
  long d = a * x + b * y;
  long e = c * max(x,y);
  long f;
  if(x >= y)
    f = b * y + a * (x - y);
  else
    f = a * x + b * (y - x);
  
  cout << min({d,e,f}) << endl;
  
  return 0;
  
}


Compiler output:
a.cc:2:10: fatal error: algoruthm: No such file or directory
    2 | #include <algoruthm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

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

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

  int i,j,ans;

  if(A+B<=2*C){
    ans=A*X+B*Y;
  }else{
    int s=min(X,Y);
    ans = 2*C*S +A*(X-s) + B*(Y-s);
  }
  cout<<ans<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'S' was not declared in this scope
   14 |     ans = 2*C*S +A*(X-s) + B*(Y-s);
      |               ^
Language: C++

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

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

  int i,j,ans;

  if(A+B<=2*C){
    ans=A*X+B*Y
  }else{
    int s=min(X,Y);
    ans = 2*C*S +A*(X-s) + B*(Y-s);
  }
  cout<<ans<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before '}' token
   11 |     ans=A*X+B*Y
      |                ^
      |                ;
   12 |   }else{
      |   ~             
a.cc:14:15: error: 'S' was not declared in this scope
   14 |     ans = 2*C*S +A*(X-s) + B*(Y-s);
      |               ^
Language: C++

#include <stdio.h>
#include <string>
#include <algorithm>
#include <map>
#include <iostream>
using namespace std;

int main() {
	int A, B, C, X, Y;
	cin >> A >> B >> C >> X >> Y;
	if (C - 0.5*A - 0.5*B >= 0)cout << X * A + Y * B << endl;
	else cout << X * A + B * Y + (C - 0.5*A - 0.5*B) * 2 * min(X, Y) << endl;;
}
#include <stdio.h>
#include <string>
#include <algorithm>
#include <map>
#include <iostream>
using namespace std;

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


Compiler output:
a.cc:21:5: error: redefinition of 'int main()'
   21 | int main() {
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main() {
      |     ^~~~
Language: C++

#include<vector>
#include<algorithm>
using namespace std;
 
int main(){
  int A,B,C,X,Y;
  cin >> A >> B >> C >> X >> Y;
  vector<int> value;
  for(int c=0;c<(X+Y+2)/2;c++){
    int a=X-c;if(a<0) a=0;
    int b=Y-c;if(b<0) b=0;
    value.push_back(2*C*c+A*a+B*b);
  }
  sort(value.begin(),value.end());
  cout<<*(value.begin())<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> A >> B >> C >> X >> Y;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout<<*(value.begin())<<endl;
      |   ^~~~
a.cc:15:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:27: error: 'endl' was not declared in this scope
   15 |   cout<<*(value.begin())<<endl;
      |                           ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:60: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |     cout << A*(X-(min(X,Y)) +B*(Y-(min(X,Y))+C*(min(X,Y)*2)<<endl;
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:8:66: error: expected ')' before ';' token
    8 |     cout << A*(X-(min(X,Y)) +B*(Y-(min(X,Y))+C*(min(X,Y)*2)<<endl;
      |                                ~                                 ^
      |                                                                  )
a.cc:8:66: error: expected ')' before ';' token
    8 |     cout << A*(X-(min(X,Y)) +B*(Y-(min(X,Y))+C*(min(X,Y)*2)<<endl;
      |               ~                                                  ^
      |                                                                  )
Language: C++

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

int main() {
    int A, B, C, X, Y;
    cin >> A >> B >> C >> X >> Y;
    long ans = 10000000000;
    for (int i=0; i<100001; i++) {
        //ABセットをi枚購入した場合の所要金額
        int sum = 0;
        sum = i * 2 * C + max(0, X-i) * A + max(0, Y-i) * B;
        ans = min(sum, ans);
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: no matching function for call to 'min(int&, long int&)'
   12 |         ans = min(sum, ans);
      |               ~~~^~~~~~~~~~
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:12:18: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   12 |         ans = min(sum, ans);
      |               ~~~^~~~~~~~~~
/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:12:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |         ans = min(sum, ans);
      |               ~~~^~~~~~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'min' cannot be used as a function
   10 |         sum += min(X, Y) * 2 * C;
      |                ~~~^~~~~~
a.cc:12:36: error: 'min' cannot be used as a function
   12 |             sum += (max(X, Y) - min(X, Y)) * A;
      |                                 ~~~^~~~~~
a.cc:14:36: error: 'min' cannot be used as a function
   14 |             sum += (max(X, Y) - min(X, Y)) * B;
      |                                 ~~~^~~~~~
Language: C++

int main()
{
  int a,b,c,x,y,ans;
  cin>>a>>b>>c>>x>>y;
  ans=0;
  if(a+b>c*2)
  {
    int m=min(x,y),num,price;
    ans+=m*2*c;
    x-=m,y-=m;
    price=x==0?b:a;
    num=max(x,y);
      
    if(price>c*2)
      ans+=num*2*c,x=0,y=0;
  }
  
  ans+=x*a+y*b;
  
  cout<<ans<<endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>a>>b>>c>>x>>y;
      |   ^~~
a.cc:8:11: error: 'min' was not declared in this scope; did you mean 'main'?
    8 |     int m=min(x,y),num,price;
      |           ^~~
      |           main
a.cc:11:5: error: 'price' was not declared in this scope
   11 |     price=x==0?b:a;
      |     ^~~~~
a.cc:12:5: error: 'num' was not declared in this scope; did you mean 'enum'?
   12 |     num=max(x,y);
      |     ^~~
      |     enum
a.cc:12:9: error: 'max' was not declared in this scope
   12 |     num=max(x,y);
      |         ^~~
a.cc:20:3: error: 'cout' was not declared in this scope
   20 |   cout<<ans<<endl;
      |   ^~~~
a.cc:20:14: error: 'endl' was not declared in this scope
   20 |   cout<<ans<<endl;
      |              ^~~~
Language: C++

#include <iostream>
#include<cmath>
using namepsace std;

int main()
{
  int a,b,c,x,y,ans;
  cin>>a>>b>>c>>x>>y;
  ans=0;
  if(a+b>c*2)
  {
    int m=min(x,y),num,price;
    ans+=m*2*c;
    x-=m,y-=m;
    price=(x==0?b:a);
    num=max(x,y);
      
    if(price>c*2)
      ans+=num*2*c,x=0,y=0;
  }
  
  ans+=x*a+y*b;
  
  cout<<ans<<endl;
  
  return 0;
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namepsace'
    3 | using namepsace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin>>a>>b>>c>>x>>y;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
   12 |     int m=min(x,y),num,price;
      |           ^~~
      |           std::min
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:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:15:5: error: 'price' was not declared in this scope
   15 |     price=(x==0?b:a);
      |     ^~~~~
a.cc:16:5: error: 'num' was not declared in this scope; did you mean 'enum'?
   16 |     num=max(x,y);
      |     ^~~
      |     enum
a.cc:16:9: error: 'max' was not declared in this scope; did you mean 'std::max'?
   16 |     num=max(x,y);
      |         ^~~
      |         std::max
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:24:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |   cout<<ans<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |   cout<<ans<<endl;
      |              ^~~~
      |              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,X,Y,ans=0;
  cin>>A>>B>>C>>X>>Y;
  if(X>Y){
    ans=min((A*X+B*Y),((X+Y)*2*C),(Y*2*C+X*A));
  }
  else {
    ans = min((A*X+B*Y),((X+Y)*2*C),(X*2*C+Y*B));
    }
  cout<<ans<<endl;
}

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:7:12:   required from here
    7 |     ans=min((A*X+B*Y),((X+Y)*2*C),(Y*2*C+X*A));
      |         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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<bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) (v).begin(),(v).end()
#define int long long
using namespace std;
typedef vector<int>   vint;
typedef pair<int,int> pint;

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

    C*=2;

    ans=1e18;
    for(int c=0;c<=100000;c++){
        int a=max(0LL,X-c);
        int b=max(0LL,Y-c);
        ans=min(ans,A*a+B*b+C*c);
    }
    cout<<ans<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |     ans=1e18;
      |     ^~~
      |     abs
Language: C++

#include <iostream>
using namespace std;

int main(){
    int A,B,C,X,Y,a[2500]ans;
    cin >> A >> B >> C >> X >> Y;
    for (int i=0; i<2500; ++i){
        if (2*C<=A+B){
            if (X>=Y) a[i] = 2*Y*C+(X-Y)*A;
            else a[i] = 2*X*C+(Y-X)*A;
        }
        if (2*C>A+B) a[i] = A*X+B*Y;
    }
    ans = 100000000000;
    for (int i=0; i<2500; ++i){
        if (ans>a[i]) ans=a[i];
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected initializer before 'ans'
    5 |     int A,B,C,X,Y,a[2500]ans;
      |                          ^~~
a.cc:9:23: error: 'a' was not declared in this scope
    9 |             if (X>=Y) a[i] = 2*Y*C+(X-Y)*A;
      |                       ^
a.cc:10:18: error: 'a' was not declared in this scope
   10 |             else a[i] = 2*X*C+(Y-X)*A;
      |                  ^
a.cc:12:22: error: 'a' was not declared in this scope
   12 |         if (2*C>A+B) a[i] = A*X+B*Y;
      |                      ^
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |     ans = 100000000000;
      |     ^~~
      |     abs
a.cc:16:17: error: 'a' was not declared in this scope
   16 |         if (ans>a[i]) ans=a[i];
      |                 ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int A,B,C,X,Y,a[2500]ans;
    cin >> A >> B >> C >> X >> Y;
    for (int i=0; i<2500; ++i){
        if (2*C<=A+B){
            if (X>=Y) a[i] = 2*Y*C+(X-Y)*A;
            else a[i] = 2*X*C+(Y-X)*A;
        }
        if (2*C>A+B) a[i] = A*X+B*Y;
    }
    ans = 1000000;
    for (int i=0; i<2500; ++i){
        if (ans>a[i]) ans=a[i];
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected initializer before 'ans'
    5 |     int A,B,C,X,Y,a[2500]ans;
      |                          ^~~
a.cc:9:23: error: 'a' was not declared in this scope
    9 |             if (X>=Y) a[i] = 2*Y*C+(X-Y)*A;
      |                       ^
a.cc:10:18: error: 'a' was not declared in this scope
   10 |             else a[i] = 2*X*C+(Y-X)*A;
      |                  ^
a.cc:12:22: error: 'a' was not declared in this scope
   12 |         if (2*C>A+B) a[i] = A*X+B*Y;
      |                      ^
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |     ans = 1000000;
      |     ^~~
      |     abs
a.cc:16:17: error: 'a' was not declared in this scope
   16 |         if (ans>a[i]) ans=a[i];
      |                 ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <iterator>  // std::back_inserter()
#include <set>
#include <map>
#include <algorithm>  // std::copy()
#include <functional>  // std::greater<T>()
#include <utility>  // std::swap()
#include <numeric>  // accumulate(ALL(vec), 0)  0 は初期値
#include <bitset>  // static_cast<std::bitset<8>>
#include <sstream>  // std::stringstream
#include <cmath>
#include <climits>  // INT_MIN
#include <cctype>  // std::isdigit()
#include <iomanip>  // std::setprecision()
using namespace std;

#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, n) for (int i=0; i < (int)(n); i++)  // 0 ~ n-1
#define REPN(i, n) for (int i=1; i <= (int)(n); i++)  // 1 ~ n
#define MIN(vec) min_element(ALL((vec)))  // イテレータのため、値を取り出すときは * を先頭につける
#define MAX(vec) max_element(ALL((vec)))
#define IDX(vec, element_iter) distance((vec).begin(), element_iter)
#define SUM(vec) accumulate(ALL((vec)), 0)  // 0 は初期値
#define COPY(vec1, vec2) copy(ALL(vec1), back_inserter(vec2))  // vec1をvec2にコピーする vec2は空にしておく必要あり
typedef long long ll;

const int MOD = 1000000007;  // 1 000 000 007


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

    // input
    ll A, B, AB, X, Y;
    cin >> A >> B >> AB >> X >> Y;
    
    // calculation
    int sum = 0, num = 1000000000;  // 1 000 000 000
    for (i = 0; i < num; i++) {
        sum++;
    }
    
    return 0;
}


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

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <iterator>  // std::back_inserter()
#include <set>
#include <map>
#include <algorithm>  // std::copy()
#include <functional>  // std::greater<T>()
#include <utility>  // std::swap()
#include <numeric>  // accumulate(ALL(vec), 0)  0 は初期値
#include <bitset>  // static_cast<std::bitset<8>>
#include <sstream>  // std::stringstream
#include <cmath>
#include <climits>  // INT_MIN
#include <cctype>  // std::isdigit()
#include <iomanip>  // std::setprecision()
using namespace std;

#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, n) for (int i=0; i < (int)(n); i++)  // 0 ~ n-1
#define REPN(i, n) for (int i=1; i <= (int)(n); i++)  // 1 ~ n
#define MIN(vec) min_element(ALL((vec)))  // イテレータのため、値を取り出すときは * を先頭につける
#define MAX(vec) max_element(ALL((vec)))
#define IDX(vec, element_iter) distance((vec).begin(), element_iter)
#define SUM(vec) accumulate(ALL((vec)), 0)  // 0 は初期値
#define COPY(vec1, vec2) copy(ALL(vec1), back_inserter(vec2))  // vec1をvec2にコピーする vec2は空にしておく必要あり
typedef long long ll;

const int MOD = 1000000007;  // 1 000 000 007


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

    // input
    ll A, B, AB, X, Y;
    cin >> A >> B >> AB >> X >> Y;
    
    // calculation
    int sum = 0, num = 1000000000  // 1 000 000 000
    for (i = 0; i < num; i++) {
        sum++;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:5: error: expected ',' or ';' before 'for'
   43 |     for (i = 0; i < num; i++) {
      |     ^~~
a.cc:43:17: error: 'i' was not declared in this scope
   43 |     for (i = 0; i < num; i++) {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main{
  int a,b,c,x,y;
  cin >> a >> b >> c >> x >> y;
  if(x < y){
    swap(x,y);
    swap(a,b);
    }
  bool ab,ac;
  ab=ac= false;
  if(a+b > 2*c) ab = true;
  if(a >2*c) ac = true;
  if(ab == true && ac == true) cout << 2*x*c << endl;
  else cout << 2*y*c + a*(x-y) << endl;
    }


Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int a,b,c,x,y;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> a >> b >> c >> x >> y;
      |   ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
    6 |   if(x < y){
      |   ^~
a.cc:11:3: error: 'ab' does not name a type
   11 |   ab=ac= false;
      |   ^~
a.cc:12:3: error: expected unqualified-id before 'if'
   12 |   if(a+b > 2*c) ab = true;
      |   ^~
a.cc:13:3: error: expected unqualified-id before 'if'
   13 |   if(a >2*c) ac = true;
      |   ^~
a.cc:14:3: error: expected unqualified-id before 'if'
   14 |   if(ab == true && ac == true) cout << 2*x*c << endl;
      |   ^~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else cout << 2*y*c + a*(x-y) << endl;
      |   ^~~~
a.cc:16:5: error: expected declaration before '}' token
   16 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main{
  int a,b,c,x,y;
  cin >> a >> b >> c >> x >> y;
  if(x < y){
    swap(x,y);
    swap(a,b);
    }
  bool ab,ac;
  ab=ac= false;
  if(a+b > 2*c) ab = true;
  if(a >2*c) ac = true;
  if(ab == true && ac == true) cout << 2*x*c << endl;
  else cout << 2*y*c + a*(x-y) << endl;
    


Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int a,b,c,x,y;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> a >> b >> c >> x >> y;
      |   ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
    6 |   if(x < y){
      |   ^~
a.cc:11:3: error: 'ab' does not name a type
   11 |   ab=ac= false;
      |   ^~
a.cc:12:3: error: expected unqualified-id before 'if'
   12 |   if(a+b > 2*c) ab = true;
      |   ^~
a.cc:13:3: error: expected unqualified-id before 'if'
   13 |   if(a >2*c) ac = true;
      |   ^~
a.cc:14:3: error: expected unqualified-id before 'if'
   14 |   if(ab == true && ac == true) cout << 2*x*c << endl;
      |   ^~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else cout << 2*y*c + a*(x-y) << endl;
      |   ^~~~
Language: C++

#include <iostream>
#include <algorithm>
int main(){
	int A, B, C, X, Y;
	std::cin >> A >> B >> C >> X >> Y;
	int result = 0x7ffffff;
	result = std::min(result, A*X+B*Y);
	result = std::min(result, C*std::max(X,Y)*2);
	result=std::min(result,C*std::min(X,Y)*2+(X<Y?B:A)*abs(Y-X));
	result::min(result,(A+B)*std::min(X,Y)+C*abs(X-Y)*2);
  std::cout << result << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'result' is not a class, namespace, or enumeration
   10 |         result::min(result,(A+B)*std::min(X,Y)+C*abs(X-Y)*2);
      |         ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <string>
#include <string.h>
#include <bitset>
#include <map>

using namespace std;

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

    int l_ab = max(X, Y) * 2;
    int lowest_price = INT_MAX;
    int n[3];
    for (int i = 0; i <= l_ab; ++i)
    {
        int l_a = max(X - i / 2, 0);
        int l_b = max(Y - i / 2, 0);
        auto price = l_a * A + l_b * B + i * C;
        if (price < lowest_price)
        {
            lowest_price = price;
            n[0] = l_a;
            n[1] = l_b;
            n[2] = l_ab;
        }
    }

    cout << lowest_price << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: 'INT_MAX' was not declared in this scope
   18 |     int lowest_price = INT_MAX;
      |                        ^~~~~~~
a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    8 | #include <map>
  +++ |+#include <climits>
    9 |
Language: C++

#include <iostream>
#include <algorothm>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int mincost = 2147483647;
  for (int cq = 0; cq <= 100000; cq++) {
    int aq = max(x - cq, 0);
    int bq = max(y - cq, 0);
    int cost = aq * a + bq * b + c * cq * 2;
    if (mincost > cost) mincost = cost;
  }
  cout << mincost << endl;
}

Compiler output:
a.cc:2:10: fatal error: algorothm: No such file or directory
    2 | #include <algorothm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: Java

/*
全部でいくらかかるかは、各ピザの組み合わせによって決まる（値段が与えられているため）から、
単純に枚数の組み合わせを考えればよかった（枚数の樹形図書けばわかりやすかった）
*/

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

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();

    long ans = Long.MAX_VALUE;

    for(int k = 0; k < 10000; k++){
      long sum = c*2*k + a*Math.max(x-k, 0) + b*Math.max(y-k, 0);
      ans = Math.min(ans, sum);
    }

    System.out.println(min);
  }
}


Compiler output:
Main.java:25: error: cannot find symbol
    System.out.println(min);
                       ^
  symbol:   variable min
  location: class Main
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a,b,c,x,y,ans;
  cin>>a>>b>>c>>x>>y;
  ans=0;
  if(a+b>c*2)
  {
    int m=min(x,y),num,price;
    ans+=m*2*c;
    x-=m,y-=m;
    price=x==0?a:b;
    num=max(x,y)
      
    if(price>c*2)
      ans=num*2*price,x=y=0;
  }
  
  ans+=x*a+y*b;
  
  cout<<ans<<endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before 'if'
   14 |     num=max(x,y)
      |                 ^
      |                 ;
   15 | 
   16 |     if(price>c*2)
      |     ~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int A,B,C,X,Y;
    int min_sum = INF;
    cin >> A >> B >> C >> X >> Y;
    for(int i=0;i<=100000;i++){
      min_sum = min(min_sum, i * 2 * C + A * max(0, X - i) + B * max(0, Y - i))
    }
    cout << min_sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:80: error: expected ';' before '}' token
   27 |       min_sum = min(min_sum, i * 2 * C + A * max(0, X - i) + B * max(0, Y - i))
      |                                                                                ^
      |                                                                                ;
   28 |     }
      |     ~