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

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <vector>
#include <queue>
#include <functional>
#include <math.h>
#include <string.h>

using std::endl;
using std::string;

#define ll long long int
#define LEP(a, n) for(int a = 0; a < n; ++a)
#define INF 1145141919810
#define OUT std::cout
#define IN std::cin
#define itn int
#define fro for
#define sdt std

ll N, C;
ll x, v;
ll R, L, RX, LX, HR, HL, QR, QL;
ll HRN, HLN, QRN, QLN;
ll Ans = 0;

using namespace std;

int main()
{
	IN >> N >> C;

	std::vector<std::pair<ll, ll> > RValue(N), LValue(N);
	for (ll a = 0; a < N; a++)
	{
		IN >> x >> v;

		x = x % C;

		RValue[a] = make_pair(x, v);
		LValue[a] = make_pair(C - x, v);

	}

	sort(RValue.begin(), RValue.end());
	sort(LValue.begin(), LValue.end());

	R = 0;
	L = 0;
	RX = 0;
	LX = 0;

	for (int a = 0; a < N; ++a)
	{
		R += RValue[a].second;
		L += LValue[a].second;

		RX = RValue[a].first;
		LX = LValue[a].first;

		Ans = max(max(R - RX, L - LX), Ans);

	}

	HR = 0;
	HL = 0;

	HRN = 0;
	HLN = 0;
	QRN = 0;
	QLN = 0;

	R = 0;
	L = 0;

	for (ll a = 0; a < N; a++)
	{
		if (RValue[a].first > C / 2) break;

		R += RValue[a].second;

		if (HR < R - RValue[a].first)
		{
			HR = R - RValue[a].first;
			HRN = RValue[a].first;
		}

	}

	for (ll a = 0; a < N; a++)
	{
		if (LValue[a].first > C / 2) break;

		L += LValue[a].second;

		if (HL < L - LValue[a].first)
		{
			HL = L - LValue[a].first;
			HLN = LValue[a].first;
		}

	}


	R = 0;
	L = 0;
	QR = 0;
	QL = 0;

	for (ll a = 0; a < N; a++)
	{
		if (RValue[a].first > C / 4) break;

		R += RValue[a].second;


		if (QR < R - RValue[a].first * 2)
		{
			QR = R - RValue[a].first * 2;
			QRN = RValue[a].first;
		}


	}

	for (ll a = 0; a < N; a++)
	{
		if (LValue[a].first > C / 4) break;

		L += LValue[a].second;

		if (QL < L - LValue[a].first * 2)
		{
			QL = L - LValue[a].first * 2;
			QLN = LValue[a].first;
		}

	}

	Ans = max(Ans, max(QR + HL + max(QRN, HLN), QL + HR + max(QLN, HRN)), QR + QL + max(QRN, QLN));

	OUT << Ans << endl;

	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:147:11:   required from here
  147 |         Ans = max(Ans, max(QR + HL + max(QRN, HLN), QL + HR + max(QLN, HRN)), QR + QL + max(QRN, QLN));
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

    long long int sum=0;
    long long int label[2][N];
    long long int max0,max1;
    int destination0=0,destination1=0;
    int destination=0;
    int index0=0,index1=0;
    int index=0;
    long long int sum0,sum1;
    REP(j,N){
        max0 = -1000000000000000;
        max1 = -1000000000000000;
        REP(i,N){
            label[0][i] = n[i]-x[i];
            label[1][i] = n[i]+C+1-x[i];
            if(label[0][i]>max0){
                max0 = label[0][i];
                destination0 = x[i]-destination;
                index0 = i;
            }
            if(label[1][i]>max1){
                max1 = label[1][i];
                destination1 = C-x[i]-destination;
                index1 = i;
            }
        }
        if(index0==index&&index1==index){
            break;
        }
        sum0 -= destination1;
        for(int i=N-1;i>=index1;--i){
            sum0 += n[i];
        }
        sum1 -= destination0;
        REP(i,index0+1){
            sum1 += n[i];
        }
        if(sum0<sum1){
            destination = destination1;
            sum += sum1;
            index = index1;
            for(int i=N-1;i>=index1;--i){
                n[i] = 0;
            }
        }else{
            destination = destination0;
            sum += sum0;
            index = index0;
            REP(i,index0+1){
                n[i] = 0;
            }
        }
    }
    cout << sum;
}

Compiler output:
a.cc:2:28: error: 'N' was not declared in this scope
    2 |     long long int label[2][N];
      |                            ^
a.cc:7:9: warning: built-in function 'index' declared as non-function [-Wbuiltin-declaration-mismatch]
    7 |     int index=0;
      |         ^~~~~
a.cc:9:8: error: expected constructor, destructor, or type conversion before '(' token
    9 |     REP(j,N){
      |        ^
a.cc:53:5: error: 'cout' does not name a type
   53 |     cout << sum;
      |     ^~~~
a.cc:54:1: error: expected declaration before '}' token
   54 | }
      | ^
Language: C++

#include <cstdio>
#include <cmath>
using namespace std;


typedef long long ll;


ll N, C;
ll x[100000];
ll v[100000];
bool visit[100000];


int main() {
    scanf("%d %d", &N, &C);
    for(int i = 0; i < N; i++) {
        scanf("%d %d", x + i, v + i);
    }

    ll ans = 0;
    ll pos = 0;
    while(true) {
        ll index = -1;
        ll cal = 0;
        for(ull i = 0; i < N; i++) {
            if(abs(x[i] - pos) < abs(C - x[i] + pos)) {
                cal = v[i] - abs((x[i] - pos));
            }
            else {
                cal = v[i] - abs((C - x[i] + pos));
            }

            if(cal > 0 && !visit[i]) {
                index = i;
                visit[i] = true;
                break;
            }
        }

        if(index >= 0) {
            ans += cal;
            pos = x[index];
        }
        else {
            break;
        }
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'ull' was not declared in this scope; did you mean 'll'?
   26 |         for(ull i = 0; i < N; i++) {
      |             ^~~
      |             ll
a.cc:26:24: error: 'i' was not declared in this scope
   26 |         for(ull i = 0; i < N; i++) {
      |                        ^
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main4
{
    
    public static void main(String[] args) throws IOException
    {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);
        String s = r.readLine();
        String[] sl = s.split("[\\s]+");
        int n = Integer.parseInt(sl[0]);
        long c = Long.parseLong(sl[1]);
        long x[] = new long[123456];
        long vr[] = new long[123456];
        long vl[] = new long[123456];
        x[0] = 0;
        vr[0] = 0;
        for(int i = 1; i <= n; i++)
        {
          s = r.readLine();
          sl = s.split("[\\s]+");
          x[i] = Long.parseLong(sl[0]);
          vr[i] = Long.parseLong(sl[1]);
        }
      
      long max = 0;
      for(int i = 1; i <= n; i++)
      {
        vr[i] += vr[i - 1];
      }
      for(int i = 1; i <= n; i++)
      {
        vl[i] = vr[n] - vr[i - 1];
      }
      
      for(int i = 0; i <= n; i++)
      {
        max = Math.max(max, vr[i] - x[i]);
      }
      
      for(int i = 1; i <= n; i++)
      {
        //System.out.println(vl[i] - (c - x[i]));
        max = Math.max(max, vl[i] - (c - x[i]));
      }
      
      //System.out.println(max);
      max = Math.max(max, vr[n - 1] - c + x[0]);
      //System.out.println(max);
      for(int i = 1; i <= n; i++)
      {
        for(int j = n; i < j; j--)
        {
          max = Math.max(max, vr[i] + vl[j] - 2 * x[i] - (c - x[j]));
          max = Math.max(max, vr[i] + vl[j] - x[i] - 2 * (c - x[j]));
        }
      }
      System.out.println(max);
    }
    
    
}


Compiler output:
Main.java:5: error: class Main4 is public, should be declared in a file named Main4.java
public class Main4
       ^
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 m = min(2*c*max(x,y);
	m = min(m, a*x + b*y);
	m = min(m, a*x + 2*c*y);
	m = min(m, b*y + 2*c*x);
	if (x > y)
		m = min(m, 2*c*y + (x-y)*a);
	else 
		m = min(m, 2*c*x + (y-x)*b);
	cout << m << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ')' before ';' token
    8 |         int m = min(2*c*max(x,y);
      |                    ~            ^
      |                                 )
Language: C++

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

int main() {
  int A,B,C; //値段用の箱を宣言
  int X,Y; //個数用の箱を宣言
  int min_num,max_num;
  int ans=0;
  
  /////入力部/////
  cin>>A>>B>>C; //金額
  cin>>X>>Y; //個数
  
  
  /////判断部/////
  min_num =min(X,Y);
  max_num=max(X,Y);
  
  if(max_num*C <= X*A+Y*B )ans=C*max_num;
  
  else if(mun_num*2*C <= min_num*(A+B))ans=C*min_num + (X - min_num)*A + (Y - min_num)*B;
  
  else ans=X*A+Y*B;
  
  cout << ans;
  
}
    
    
  
   

Compiler output:
a.cc: In function 'int main()':
a.cc:21:11: error: 'mun_num' was not declared in this scope; did you mean 'min_num'?
   21 |   else if(mun_num*2*C <= min_num*(A+B))ans=C*min_num + (X - min_num)*A + (Y - min_num)*B;
      |           ^~~~~~~
      |           min_num
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long a,b,c,x,y,mn;
int main()
{
	scanf("%lld%lld%lld%lld%lld",&a,&b,&c,&x,&y);
	mn=min(a+b,2*c);
	if(y>x)
	{
		printf("%lld\n",(y-x)*min(b,c)+mn*x;
	}else
	{
		printf("%lld\n",(x-y)*min(a,c)+mn*y;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:52: error: expected ')' before ';' token
   10 |                 printf("%lld\n",(y-x)*min(b,c)+mn*x;
      |                       ~                            ^
      |                                                    )
a.cc:13:52: error: expected ')' before ';' token
   13 |                 printf("%lld\n",(x-y)*min(a,c)+mn*y;
      |                       ~                            ^
      |                                                    )
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
  	int A, B, C, X, Y;
  	cin >> A >> B >> C >> X >> Y;
  	long long ans=A*X+B*Y;
  	int many = max(X, Y);
  	
      	long long pay=A*(X-i)+B*(Y-i)+C*2*i;
      	if(X-i<0) pay=B*(Y-i)+C*2*i;
      	if(Y-i<0) pay=A*(X-i)+C*2*i;
      	ans=min(pay, ans);
    }
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'i' was not declared in this scope
   12 |         long long pay=A*(X-i)+B*(Y-i)+C*2*i;
      |                            ^
a.cc: At global scope:
a.cc:17:9: error: 'cout' does not name a type
   17 |         cout << ans << endl;
      |         ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
  	int A, B, C, X, Y;
  	cin >> A >> B >> C >> X >> Y;
  	long long ans=A*X+B*Y;
  	int expen = max(X, Y);
  	
  	for(int i=0;i<expen;i++){
      	long long pay=A*(X-i)+B*(Y-i)+c*2*i;
      	ans=min(pay, ans);
    }
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:39: error: 'c' was not declared in this scope
   13 |         long long pay=A*(X-i)+B*(Y-i)+c*2*i;
      |                                       ^
Language: C++

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

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

        for(int i=0;i<100000;++i){
            int sum=2*C*i+A*max(0,X-i)+B*max(0,Y-i);
            min_c=min(min_c,sum);
        
        cout<<min_c;
    

}

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

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
#define MOD 1e9+7;
using namespace std;
using ll = long long;

int main() {
	int a, b, c, x, y, ans = 0;
	cin >> a >> b >> c >> x >> y;
	if (a / 2 + b / 2 <= c) ans = a * x + b * y;
	else {
		ans = c * min(x,y) * 2;
		if (x > y && a > c * 2) ans += (x - y) * c * 2;
		if (x > y && a <= c * 2) ans += (x - y) * a;
		if (x < y && b > c * 2) ans += (y - x) * c * 2;
		if (x < y && b <= c * 2) ans += (y - x) * b;
	}
	cout << ans;
	return 0;


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

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

int main() {
  int A,B,AB,X,Y;
  cin >> A >> B >> AB >> X >> Y;
  int price=1000000001;
  for(int i=1;i<X+1;i++){
    int ab = (X-i)*2;
    int x = i*A+(Y-ab/2)*B+ab*C;
    price=min(price,x);
  }
  for(int i=1;i<Y+1;i++){
    int ab = (Y-i)*2;
    int x = i*B+(X-ab/2)*A+ab*C;
    price=min(price,x);
  }
  cout << price << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: 'C' was not declared in this scope
   10 |     int x = i*A+(Y-ab/2)*B+ab*C;
      |                               ^
a.cc:15:31: error: 'C' was not declared in this scope
   15 |     int x = i*B+(X-ab/2)*A+ab*C;
      |                               ^
Language: C++

int main() {
 
     LL A, B, C, X, Y;
     cin >> A >> B >> C >> X >> Y;
 
     LL ans = LONG_LONG_MAX;
     for (LL i = 0; i <= 300000LL; i += 2LL) {
         LL cost = i * C;
         cost += A * C_MAX(0LL, X - i / 2LL);
         cost += B * C_MAX(0LL, Y - i / 2LL);
         S_MIN(ans, cost);
     }
 
     OUT_L(ans);
 
     return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:3:6: error: 'LL' was not declared in this scope
    3 |      LL A, B, C, X, Y;
      |      ^~
a.cc:4:6: error: 'cin' was not declared in this scope
    4 |      cin >> A >> B >> C >> X >> Y;
      |      ^~~
a.cc:4:13: error: 'A' was not declared in this scope
    4 |      cin >> A >> B >> C >> X >> Y;
      |             ^
a.cc:4:18: error: 'B' was not declared in this scope
    4 |      cin >> A >> B >> C >> X >> Y;
      |                  ^
a.cc:4:23: error: 'C' was not declared in this scope
    4 |      cin >> A >> B >> C >> X >> Y;
      |                       ^
a.cc:4:28: error: 'X' was not declared in this scope
    4 |      cin >> A >> B >> C >> X >> Y;
      |                            ^
a.cc:4:33: error: 'Y' was not declared in this scope
    4 |      cin >> A >> B >> C >> X >> Y;
      |                                 ^
a.cc:6:8: error: expected ';' before 'ans'
    6 |      LL ans = LONG_LONG_MAX;
      |        ^~~~
      |        ;
a.cc:7:13: error: expected ';' before 'i'
    7 |      for (LL i = 0; i <= 300000LL; i += 2LL) {
      |             ^~
      |             ;
a.cc:7:21: error: 'i' was not declared in this scope
    7 |      for (LL i = 0; i <= 300000LL; i += 2LL) {
      |                     ^
a.cc:8:12: error: expected ';' before 'cost'
    8 |          LL cost = i * C;
      |            ^~~~~
      |            ;
a.cc:9:10: error: 'cost' was not declared in this scope; did you mean 'const'?
    9 |          cost += A * C_MAX(0LL, X - i / 2LL);
      |          ^~~~
      |          const
a.cc:9:22: error: 'C_MAX' was not declared in this scope
    9 |          cost += A * C_MAX(0LL, X - i / 2LL);
      |                      ^~~~~
a.cc:11:16: error: 'ans' was not declared in this scope
   11 |          S_MIN(ans, cost);
      |                ^~~
a.cc:11:10: error: 'S_MIN' was not declared in this scope
   11 |          S_MIN(ans, cost);
      |          ^~~~~
a.cc:14:12: error: 'ans' was not declared in this scope
   14 |      OUT_L(ans);
      |            ^~~
a.cc:14:6: error: 'OUT_L' was not declared in this scope
   14 |      OUT_L(ans);
      |      ^~~~~
Language: C++

ll A, B, C, X, Y;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> A >> B >> C >> X >> Y;
    
    ll ans = infl;
    rep(ab, 0, 201010) {
        ll sm = C * ab;
 
        ll x = X - ab / 2;
        ll y = Y - ab / 2;
 
        if (0 < x) sm += x * A;
        if (0 < y) sm += y * B;
 
        chmin(ans, sm);
    }
 
    cout << ans << endl;
}

Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll A, B, C, X, Y;
      | ^~
a.cc: In function 'void _main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> A >> B >> C >> X >> Y;
      |     ^~~
a.cc:4:12: error: 'A' was not declared in this scope
    4 |     cin >> A >> B >> C >> X >> Y;
      |            ^
a.cc:4:17: error: 'B' was not declared in this scope
    4 |     cin >> A >> B >> C >> X >> Y;
      |                 ^
a.cc:4:22: error: 'C' was not declared in this scope
    4 |     cin >> A >> B >> C >> X >> Y;
      |                      ^
a.cc:4:27: error: 'X' was not declared in this scope
    4 |     cin >> A >> B >> C >> X >> Y;
      |                           ^
a.cc:4:32: error: 'Y' was not declared in this scope
    4 |     cin >> A >> B >> C >> X >> Y;
      |                                ^
a.cc:6:5: error: 'll' was not declared in this scope
    6 |     ll ans = infl;
      |     ^~
a.cc:7:9: error: 'ab' was not declared in this scope
    7 |     rep(ab, 0, 201010) {
      |         ^~
a.cc:7:5: error: 'rep' was not declared in this scope
    7 |     rep(ab, 0, 201010) {
      |     ^~~
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << ans << endl;
      |     ^~~~
a.cc:19:13: error: 'ans' was not declared in this scope
   19 |     cout << ans << endl;
      |             ^~~
a.cc:19:20: error: 'endl' was not declared in this scope
   19 |     cout << ans << endl;
      |                    ^~~~
Language: C

#include<iostream>
#include<algorithm>

using namespace std;

int main() {

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

	
	
	int mn = 1001001001;

	int m;

	for (int i = 0; i <= max(2*x,2*y); i = i + 2) {

		m = i * c + max(x - i/2, 0) * a + max(y - i/2, 0) * b;
		if (mn > m) {
			mn = m;
		}

	}
	cout << mn << endl;

	return 0;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: 'min' cannot be used as a function
   10 |   for (int i = 0; i <= min(2*X,2*Y); i++) {
      |                        ~~~^~~~~~~~~
Language: C++

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

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

    int ans = 0;
    int money = (a + b) * (min(x, y));
    for (int i = 1; i <= min(x, y); i++) {
        money = min(money, 2 * c * i + (a + b) * (min(x, y) - i));
    }
    ans += money;

    money = 2 * c * abs(x - y);
    if (x >= y) {
        money = min(money, 2 * c * (x - y - i) + a * i);
    } else {
        money = min(money, 2 * c * (y - x - i) + b * i);
    }
    ans += money;

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:45: error: 'i' was not declared in this scope
   17 |         money = min(money, 2 * c * (x - y - i) + a * i);
      |                                             ^
a.cc:19:45: error: 'i' was not declared in this scope
   19 |         money = min(money, 2 * c * (y - x - i) + b * i);
      |                                             ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
#define all(x) (x).begin(), (x).end()
using ll = long long;
ll euclidean_gcd(ll a, ll b) {
  while(1) {
    if(a < b) swap(a, b);
    if(!b) break;
    a %= b;
  }
  return a;
}

int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int minv = 1e9;
  int sum = 0;
  rep(i,100000)){
    sum = i*2*c+max(0,x-i)*a+max(0,y-i)*b;
    minv = min(minv,sum);
  } 
  cout << minv << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: expected primary-expression before ')' token
   20 |   rep(i,100000)){
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int  A,B,C,X,Y;
  cin  >> A >> B >> C >> X >> Y;
  int t=100000;
  int a,b,i;
  for(a>=0 && b>=0){
    a=X-i;
    b=Y-i;
    if(A*a+B*b+C*2*i<t){t=A*a+B*b+C*2*i;};
    i++;
  }
  cout << t <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before ')' token
    9 |   for(a>=0 && b>=0){
      |                   ^
      |                   ;
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
a.cc:15:20: error: expected ')' before '}' token
   15 |   cout << t <<endl;
      |                    ^
      |                    )
   16 | }
      | ~                   
a.cc:9:6: note: to match this '('
    9 |   for(a>=0 && b>=0){
      |      ^
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
Language: C++

//
//  main.cpp
//  project for C++
//
//  Created by 伊藤博隆 on 2020/04/17.
//  Copyright © 2020 伊藤博隆. All rights reserved.
//

#include <iostream>
#include<set>
#include<string>
#include <sstream>

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




Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   19 |          cout << min({A*X+B*Y, A*(X-Y)+2*C*Y, max(2*C*Y , 2*C*X)});
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:9:
/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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
a.cc:21:15: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   21 |    cout << min({A*X+B*Y, B*(Y-X)+2*C*X, max(2*C*Y , 2*C*X)});
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:35:25: error: expected ';' before '}' token
   35 |     ans += A * X + B * Y
      |                         ^
      |                         ;
   36 |   }
      |   ~
Language: C++

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

int main(){
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int price = A * X + B * Y;
  int Z = min(X, Y);
  
  for(int i = 1; i <= D; i++){
    if(price > A * (X - i) + B * (Y - i) + C * 2 * i) price =  A * (X - i) + B * (Y - i) + C * 2 * i;
  }
}


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000000' to '1410065408' [-Woverflow]
    7 |   int ans=10000000000;
      |           ^~~~~~~~~~~
a.cc:9:51: error: expected ';' before ')' token
    9 |     ans = min(ans,i*2*c+max(0,x-i)*a+max(0,y-i)*b));
      |                                                   ^
      |                                                   ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);

  int ab = c * 2;

  for (int i = 0; i <= 100000; i++)
  {

    ans = min(ans, ab * i + a * max(0, x - i) + b * max(0, y - i);)
  }

  printf("%d", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:66: error: expected ')' before ';' token
   16 |     ans = min(ans, ab * i + a * max(0, x - i) + b * max(0, y - i);)
      |              ~                                                   ^
      |                                                                  )
a.cc:16:67: error: expected primary-expression before ')' token
   16 |     ans = min(ans, ab * i + a * max(0, x - i) + b * max(0, y - i);)
      |                                                                   ^
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()re


int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  
  int ans = 1e9;
  if (a+b > c*2) {　
    if (x > y) {
      for (int numc = y*2; numc <= x*2; numc += 2) {
        ans = min(ans, c*numc + a*(x - numc/2));
      }
    } else {
      for (int numc = x*2; numc <= y*2; numc += 2) {
        ans = min(ans, c*numc + b*(y - numc/2));
      }
    }
  } else {
    ans = a*x +b*y;
  }
  
  cout << ans << endl;
  
}

Compiler output:
a.cc:15:19: error: extended character 　 is not valid in an identifier
   15 |   if (a+b > c*2) {　
      |                   ^
a.cc: In function 'int main()':
a.cc:15:19: error: '　' was not declared in this scope
   15 |   if (a+b > c*2) {　
      |                   ^~
a.cc:20:7: error: expected '}' before 'else'
   20 |     } else {
      |       ^~~~
a.cc:15:18: note: to match this '{'
   15 |   if (a+b > c*2) {　
      |                  ^
a.cc: At global scope:
a.cc:25:5: error: expected unqualified-id before 'else'
   25 |   } else {
      |     ^~~~
a.cc:29:3: error: 'cout' does not name a type
   29 |   cout << ans << endl;
      |   ^~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y; cin >> A >> B >> C >> X >> Y;
  C *= 2;
  int XY;
  if(X > Y) {
    cout << min(C * X, C * Y + A * (X - Y), A * X + B * Y) << endl;
  }  else {
    cout << min(C * Y, C * X + B * (Y - X), A * X + B * Y) << 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:8:16:   required from here
    8 |     cout << min(C * X, C * Y + A * (X - Y), A * X + B * Y) << 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++

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

int main() {
  if (X > Y) {
    swap(A, B);
    swap(X, Y);
  }
  int min = 1000000000;
  for (int i = 0; i <= Y; i++) {
    int x = C*2*i + A*max(0, X-i) + B*max(0, Y-i);
    if (x < min) min = x;
  }
  cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:7: error: 'X' was not declared in this scope
   46 |   if (X > Y) {
      |       ^
a.cc:46:11: error: 'Y' was not declared in this scope
   46 |   if (X > Y) {
      |           ^
a.cc:47:10: error: 'A' was not declared in this scope
   47 |     swap(A, B);
      |          ^
a.cc:47:13: error: 'B' was not declared in this scope
   47 |     swap(A, B);
      |             ^
a.cc:51:24: error: 'Y' was not declared in this scope
   51 |   for (int i = 0; i <= Y; i++) {
      |                        ^
a.cc:52:13: error: 'C' was not declared in this scope
   52 |     int x = C*2*i + A*max(0, X-i) + B*max(0, Y-i);
      |             ^
a.cc:52:21: error: 'A' was not declared in this scope
   52 |     int x = C*2*i + A*max(0, X-i) + B*max(0, Y-i);
      |                     ^
a.cc:52:30: error: 'X' was not declared in this scope
   52 |     int x = C*2*i + A*max(0, X-i) + B*max(0, Y-i);
      |                              ^
a.cc:52:37: error: 'B' was not declared in this scope
   52 |     int x = C*2*i + A*max(0, X-i) + B*max(0, Y-i);
      |                                     ^
Language: C++

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

int main() {
    int A, B, C, X, Y;
    cin >> A >> B >> C >> X >> Y;
    int mincost = 1e7;
    for (int i = 0; i <= X; i++) {
        int c = i*2*C + max(0, X-i)*A + max(0, Y-i)*b;
        if (c < mincost) {
            mincost = c;
        }
    }
    cout << mincost << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:53: error: 'b' was not declared in this scope
    9 |         int c = i*2*C + max(0, X-i)*A + max(0, Y-i)*b;
      |                                                     ^
Language: C++

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

int main()
{
  int A, B, C, X, Y, r;
  int ans = 0;

  cin >> A >> B >> C >> X >> Y;
  r = X - Y;
  if (2 * C <= A && r >= 0)
  {
    if (A <= C)
      ans = 2 * C * r + A * min(r, X - r) + min(2 * C, A + B) * max(X - 2 * r, 0);
    else
      ans = 2 * C * r + min(2 * C, A + B) * (X + Y - r)
  }
  else if (2 * C <= B && r < 0)
  {
    if (B <= C)
      ans = 2 * C * abs(r) + B * min(r, Y - abs(r)) + min(2 * C, A + B) * max(Y - 2 * abs(r), 0);
    else
      ans = 2 * C * abs(r) + min(2 * C, A + B) * (X + Y - r);
  }
  else if (r >= 0)
    ans = A * r + min(2 * C, A + B) * (X + Y - r);
  else
    ans = B * r + min(2 * C, A + B) * (X + Y - r);
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:56: error: expected ';' before '}' token
   16 |       ans = 2 * C * r + min(2 * C, A + B) * (X + Y - r)
      |                                                        ^
      |                                                        ;
   17 |   }
      |   ~
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int main () {
    int A, B, C, X, Y;
    cin >> A >> B >> C >> X >> Y;
    long long ans = LLONG_MAX;
    for (int i = 0; i <= X || i <= Y; i++) {
        long long res = i*2*C; 
        if (X > i) res += (X-i)*A;
        if (Y > i) res += (Y-i)*B;
        ans = min(ans, res);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'LLONG_MAX' was not declared in this scope
    7 |     long long ans = LLONG_MAX;
      |                     ^~~~~~~~~
a.cc:3:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <cstdio>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    
    int pizzaC = c * 2;
    int pizzaAB = a + b;
    int price = 0;
    int pizzaMax = max(x, y);
    int pizzaMin = min(x, y);
    
    if (pizzaAB <= pizzaC){
        price = (a * x) + (b * y);
    }else if (pizzaAB > pizzaC){
        
        if (a > c && b > c){
            while (pizzaMax > 0){
                price = price + pizzaC;
                pizzaMax --;
            }
        }else{
             while (pizzaMin > 0){
                price = price + pizzaC;
                pizzaMin --;
                x --;
                y --;
         }
         price = price + (x * a) + (y * b);
        }
    }
    
    cout << price << endl;
}

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> a >> b >> c >> x >> y;
      |     ^~~
a.cc:7:20: error: 'max' was not declared in this scope
    7 |     int pizzaMax = max(x, y);
      |                    ^~~
a.cc:8:20: error: 'min' was not declared in this scope
    8 |     int pizzaMin = min(x, y);
      |                    ^~~
a.cc:10:5: error: expected unqualified-id before 'if'
   10 |     if (pizzaAB <= pizzaC){
      |     ^~
a.cc:12:6: error: expected unqualified-id before 'else'
   12 |     }else if (pizzaAB > pizzaC){
      |      ^~~~
a.cc:30:5: error: 'cout' does not name a type
   30 |     cout << price << endl;
      |     ^~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<bits/stdc++.h>


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

  int ans = 0;
  ans = a * x + b * y;

  for(int i = 0; i < 100000; i++){
   if(ans > i * 2 * c + max(0,x - i)*a + max(0,y-i) * b;
  }

  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected primary-expression before '}' token
   15 |   }
      |   ^
a.cc:14:57: error: expected ')' before '}' token
   14 |    if(ans > i * 2 * c + max(0,x - i)*a + max(0,y-i) * b;
      |      ~                                                  ^
      |                                                         )
   15 |   }
      |   ~                                                      
a.cc:15:3: error: expected primary-expression before '}' token
   15 |   }
      |   ^
Language: C++

#include <iostream>
using namespace std;

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

    long long result = 100000000;
    for(long long i = 0; i<=max(x,y); ++i){
        result = min(result, c*2*i+a*max(0L,x-i)+b*max(0L,y-i));
    }

    cout << result << endl; return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:41: error: no matching function for call to 'max(long int, long long int)'
   10 |         result = min(result, c*2*i+a*max(0L,x-i)+b*max(0L,y-i));
      |                                      ~~~^~~~~~~~
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: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:10:41: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   10 |         result = min(result, c*2*i+a*max(0L,x-i)+b*max(0L,y-i));
      |                                      ~~~^~~~~~~~
/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
a.cc:10:55: error: no matching function for call to 'max(long int, long long int)'
   10 |         result = min(result, c*2*i+a*max(0L,x-i)+b*max(0L,y-i));
      |                                                    ~~~^~~~~~~~
/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:10:55: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   10 |         result = min(result, c*2*i+a*max(0L,x-i)+b*max(0L,y-i));
      |                                                    ~~~^~~~~~~~
/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
Language: C++

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

    int result = 100000000;
    for(int i = 0; i<max(x,y); ++i){
        int cost = i*c + a*max(0,x-i) + b*max(0,y-i);
        if(cost < result) result = cost;
    }

    cout << result << endl; return 0;
}

Compiler output:
a.cc: In function 'int another()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a >> b >> c >> x >> y;
      |     ^~~
a.cc:6:22: error: 'max' was not declared in this scope
    6 |     for(int i = 0; i<max(x,y); ++i){
      |                      ^~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << result << endl; return 0;
      |     ^~~~
a.cc:11:23: error: 'endl' was not declared in this scope
   11 |     cout << result << endl; return 0;
      |                       ^~~~
Language: C++

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

int main()
{

	int A_yen;
	int B_yen;
	int AB_yen;
	int X;
	int Y;

	int z;
	
	int price = 0;

	cin >> A_yen >> B_yen >> AB_yen >> X >> Y;
	

	if (A_yen + B_yen < 2 * AB_yen ) {

		price = A_yen * X + B_yen * Y;

	}
	else {

		// ABピザをz枚買うときを考える
		for (int z = 0; z <= 2 * max(X,Y); z = z + 2) {

			price = min( price, A_yen * ( X - z * 0.5 ) + B_yen * (Y - z * 0.5) );
						
		}
	}
	
	cout << price <<  endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:36: error: no matching function for call to 'min(int&, double)'
   30 |                         price = min( price, A_yen * ( X - z * 0.5 ) + B_yen * (Y - z * 0.5) );
      |                                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:30:36: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'double')
   30 |                         price = min( price, A_yen * ( X - z * 0.5 ) + B_yen * (Y - z * 0.5) );
      |                                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:30:36: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   30 |                         price = min( price, A_yen * ( X - z * 0.5 ) + B_yen * (Y - z * 0.5) );
      |                                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
int main(){
  ll a,b,c,x,y;
  cin>>a>>b>>c>>x>>y;
  if(a+b<2*c) COUT(a*x+b*y);
  ll ans=0;
  else{
    if(x>y){
      x-=y;
      ans+=y*2*c+x*a;
      COUT(ans);
    }
    else{
      y-=x;
      ans+=x*2*c+y*b;
      COUT(ans);
    }
  }
}

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

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

int main(){
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = A*X+B*E;
    for (int i=0; i<=max(X,Y); i++)
      ans = min(ans,A*max(0,(X-i))+B*max(0,(Y-i))+C*2*i);
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'E' was not declared in this scope
    7 |   int ans = A*X+B*E;
      |                   ^
Language: C++

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

int main() {
  int a,b,ab,a_n,b_n;
  cin >> a >> b >> ab >> a_n >> b_n;
  int sum;
  for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
    if (i==a_n) {
      sum = i*a+j*b;
    }
    else {
      sum = min(sum, i*a+j*b + (a_n-i)*ab*2);
    }
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected primary-expression before '{' token
    8 |   for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
      |        ^
a.cc:8:32: error: 'i' was not declared in this scope
    8 |   for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
      |                                ^
a.cc:8:40: error: 'j' was not declared in this scope
    8 |   for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
      |                                        ^
a.cc:8:44: error: expected ')' before ';' token
    8 |   for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
      |       ~                                    ^~
      |                                            )
a.cc:8:48: error: 'i' was not declared in this scope
    8 |   for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
      |                                                ^
a.cc:8:53: error: 'j' was not declared in this scope
    8 |   for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
      |                                                     ^
a.cc:8:58: error: expected primary-expression before ')' token
    8 |   for ({int i=a_n; int j=b_n}; i>=0 && j>=0 ; {i--; j--;}) {
      |                                                          ^