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

#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <math.h>
using namespace std;

int main() {
    int n,x;
    cin>>n>>x;
    int m[101]={0};
    for(int i=0;i<n;++i) cin>>m[i];
    int s=0;
    for(int i=0;i<101;++i) s+=m[i];
    x-=s;
    sort(m,m+101);
    int a=0;
    for(int i=0;i<101;++i){
        if(m[i]!=0){
            a=x/m[i];
            cout<<a+n<<endl;
            return 0;
        }
    }
    return 0;
}#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <math.h>
using namespace std;

int main() {
    int n,x;
    cin>>n>>x;
    int m[101]={0};
    for(int i=0;i<n;++i) cin>>m[i];
    int s=0;
    for(int i=0;i<101;++i) s+=m[i];
    x-=s;
    sort(m,m+101);
    int a=0;
    for(int i=0;i<101;++i){
        if(m[i]!=0){
            a=x/m[i];
            cout<<a+n<<endl;
            return 0;
        }
    }
    return 0;
}

Compiler output:
a.cc:26:2: error: stray '#' in program
   26 | }#include <iostream>
      |  ^
a.cc:26:3: error: 'include' does not name a type
   26 | }#include <iostream>
      |   ^~~~~~~
a.cc:33:5: error: redefinition of 'int main()'
   33 | int main() {
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main() {
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int N,X;
    cin>>N>>X;
    int m[100],wa=0,mini=1001;
    for(int i=0;i<N;i++){
        cin>>m[i];
        wa+=m[i];
        if(m[i]<mini){mini=m[i];}
    }

    int ans=N;
    X-=wa;
    ans+=X/mini;
    cout<<ans<<endl;
    
    return 0;
}3 

Compiler output:
a.cc:20:2: error: expected unqualified-id before numeric constant
   20 | }3
      |  ^
Language: C++

include<iostream>

using namespace std;

int main(){
    int n,x;
    cin >> n >> x;
    int minM = 2000;
    for (int i=0;i<n;i++){
        int m;
        cin >> m;
        x-=m;
        if (m<minM)minM=m;
    }
    cout << n+x/minM << endl;
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> n >> x;
      |     ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << n+x/minM << endl;
      |     ^~~~
a.cc:15:25: error: 'endl' was not declared in this scope
   15 |     cout << n+x/minM << endl;
      |                         ^~~~
Language: C++

#include<iostream>
#include<algoprithm>
using namespace std;
int main()
{
	int n,x;cin>>n>>x;
	int a[108]={0};
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		x-=a[i];
	}
	int ans=n;
	sort(a,a+n);
	cout<<ans+x/a[0]<<endl;
	return 0;
}

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

#include<algorithm>
#include<stdio.h>
#include<stdlib.h>
#include<queue>
#include<stack>
#include<string>
#include<vector>

int main(void) {

	int N = 0,X = 0, A[100] = { 0 };
	int ans = 0,min = INT_MAX;

	scanf("%d%d", &N, &X);
	for (int i = 0; i < N; i++) {
		scanf("%d", &A[i]);
		if (min > A[i])
			min = A[i];
		ans++;
		X -= A[i];
	}

	ans += X / min;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: 'INT_MAX' was not declared in this scope
   12 |         int ans = 0,min = INT_MAX;
      |                           ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    6 | #include<string>
  +++ |+#include <climits>
    7 | #include<vector>
Language: C++

using System;
class Program {
  static void Main (string[] args) {
    // スペース区切りの整数の入力
    string[] input = Console.ReadLine ().Split (' ');
    int N= int.Parse (input[0]);
    int X= int.Parse (input[1]);

    int[] a = new int[N];
    int max=0;
    int min =1000000;
    for (int i = 0; i < N; i++) {
      a[i] = int.Parse (Console.ReadLine ());
      max += a[i];
      if (min>a[i])min=a[i];
    }
    
    int count=N;
    for (int i=0;i<100;i++){
      if (max+min<X){
        max+=min;
        count++;
      }else{
        break;
      }
    }

  Console.WriteLine (count);

  }

}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:3:21: error: 'string' has not been declared
    3 |   static void Main (string[] args) {
      |                     ^~~~~~
a.cc:3:30: error: expected ',' or '...' before 'args'
    3 |   static void Main (string[] args) {
      |                              ^~~~
a.cc:32:2: error: expected ';' after class definition
   32 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string[] input = Console.ReadLine ().Split (' ');
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before ']' token
    5 |     string[] input = Console.ReadLine ().Split (' ');
      |            ^
a.cc:6:12: error: expected primary-expression before 'int'
    6 |     int N= int.Parse (input[0]);
      |            ^~~
a.cc:7:12: error: expected primary-expression before 'int'
    7 |     int X= int.Parse (input[1]);
      |            ^~~
a.cc:9:8: error: structured binding declaration cannot have type 'int'
    9 |     int[] a = new int[N];
      |        ^~
a.cc:9:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:8: error: empty structured binding declaration
a.cc:9:11: error: expected initializer before 'a'
    9 |     int[] a = new int[N];
      |           ^
a.cc:13:7: error: 'a' was not declared in this scope
   13 |       a[i] = int.Parse (Console.ReadLine ());
      |       ^
a.cc:13:14: error: expected primary-expression before 'int'
   13 |       a[i] = int.Parse (Console.ReadLine ());
      |              ^~~
a.cc:28:3: error: 'Console' was not declared in this scope
   28 |   Console.WriteLine (count);
      |   ^~~~~~~
Language: C++

#include <cstdio>

using namespace std;

int main(){
  int N, X;
  int mini = 1000000;
  int ans = 0;
  
  scanf("%d%d", &N, &X);
  for(int i = 0; i < N; i++){
    int a;
	scanf("%d", &a);
    X -= a;
    ans += 1
    if(a < mini)
      mini = a;
  }
  ans += X / mini;
  printf("%d\n", ans);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before 'if'
   15 |     ans += 1
      |             ^
      |             ;
   16 |     if(a < mini)
      |     ~~
Language: C++

#include<iostream>
#include<iomanip>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<cstring>
#include<sstream>
using namespace std;
 
#define P(p) cout<<(p)<<endl
#define rep(i,m,n) for(int i = (m); i < (int)(n); i++)
#define rrep(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define vsort(v) sort(v.begin(), v.end());
#define rvsort(v) sort(v.begin(), v.end(),greater<int>());
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl  
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define ret return
#define lb(v,n) lower_bound(v.begin(),v.end(),n)
#define ub(v,n) upper_bound(v.begin(),v.end(),n)


////////////////////////////////////////////////////////////

int main(){
	int n , x;
	cin >> n >> x;
	vector<int> m(n);
	
	long sum = 0;
	
	rep(i,0,n){
		cin >> m[i];
		sum += m[i];
	}
	vsort(m);
	x -= sum;

	cout << n + x/m[0] << endl;

	ret 0;
}::x


Compiler output:
a.cc:50:4: error: 'x' in namespace '::' does not name a type
   50 | }::x
      |    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
//KASRA FOULADI;
int main(){
    int n, m, k, num , num1;
    cin >> n >> m >> k >> num >> num1;
    if(2 * k <= n + m)
        cout << (2 *  k  *min(num, num1)) + (min(m, 2 * k)  max(num1 - num, 0)) + (min(m, 2 * k)  max(num - num1, 0)) << '\n';
    else
        cout << (n * num) + (m *  num1) << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:59: error: expected ')' before 'max'
    8 |         cout << (2 *  k  *min(num, num1)) + (min(m, 2 * k)  max(num1 - num, 0)) + (min(m, 2 * k)  max(num - num1, 0)) << '\n';
      |                                             ~             ^ ~~~
      |                                                           )
Language: C++

# coding: utf-8


def main():
    A, B, C, X, Y = map(int, input().split())
    ans = 0
    min_p = min(X, Y)
    d = X - Y

    if A + B > 2 * C:
        ans += 2 * C * min_p
    else:
        ans += (A + B) * min_p

    if d > 0:
        if A > 2 * C:
            ans += 2 * C * d
        else:
            ans += A * d
    elif d < 0:
        if B > 2 * C:
            ans += 2 * C * -d
        else:
            ans += B * -d

    print(ans)

if __name__ == "__main__":
    main()


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def main():
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
    ll a,b,c,x,y;
  cin >>a>>b>>c>>x>>y;
  ll sum=1000000000;
  
for (int i = 0; i <=x; ++i){
     for (int j=0; j<=y; ++j){
      ll k=max(x-i,y-j);
      ll ans =a*i+b*j+c*k
     sum=min(sum,ans);
     }
} 
      
  cout << sum <<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: expected ',' or ';' before 'sum'
   13 |      sum=min(sum,ans);
      |      ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
    ll a,b,c,x,y;
  cin >>a>>b>>c>>x>>y;
  ll sum=INF;
  
for (int i = 0; i <=x; ++i){
     for (int j=0; j<=y; ++j){
      ll k=max(x-i,y-j);
      ans =a*i+b*j+c*k
     sum=min(sum,ans);
     }
} 
      
  cout << sum <<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'INF' was not declared in this scope
    7 |   ll sum=INF;
      |          ^~~
a.cc:12:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |       ans =a*i+b*j+c*k
      |       ^~~
      |       abs
Language: C++

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

long main() {

    long A; //Aピザ 値段
    long B; //Bピザ 値段
    long C; //ハーフピザ 値段

    long X; //Aピザ 必要枚数
    long Y; //Bピザ 必要枚数

    // long x = 0;  //a枚数
    // long y = 0;  //b枚数
    // long z = 0; //ab枚数

    long goukei = 0;
    // 最小値を求める
    // (A * a_mai) + (B * b_mai) + (C * ab_mai) = goukei

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

    // ハーフビザ2枚 = Aを1枚 + Bを1枚
    // 2C = A + B

    long sa = X - Y;
    long a_tarinai = 0;
    long b_tarinai = 0;
    if (sa >= 0){
        a_tarinai = sa;
    }
    else{
        b_tarinai = abs(sa);
    }


    long saishou_mai = min(X, Y);

    // 単体の方が安いパターン
    if ((2 * C) >= (A + B)){

        goukei = (A * saishou_mai) + (B * saishou_mai) + (A * a_tarinai) + (B * b_tarinai);
    }
    // ハーフの方が安いパターン
    else if ((2 * C) < (A + B)){

        goukei = (2 * C * saishou_mai)+ (A * a_tarinai) + (B * b_tarinai);
    }

    cout << goukei << endl;


    return 0;

}

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

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

long main() {

    long A; //Aピザ 値段
    long B; //Bピザ 値段
    long C; //ハーフピザ 値段

    long X; //Aピザ 必要枚数
    long Y; //Bピザ 必要枚数

    long x = 0;  //a枚数
    long y = 0;  //b枚数
    long z = 0; //ab枚数

    long goukei = 0;
    // 最小値を求める
    // (A * a_mai) + (B * b_mai) + (C * ab_mai) = goukei

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

    // ハーフビザ2枚 = Aを1枚 + Bを1枚
    // 2C = A + B

    long sa = X - Y;
    long a_tarinai = 0;
    long b_tarinai = 0;
    if (sa >= 0){
        a_tarinai = sa;
    }
    else{
        b_tarinai = abs(sa);
    }


    long saishou_mai = min(X, Y);

    // 単体の方が安いパターン
    if ((2 * C) >= (A + B)){

        goukei = (A * saishou_mai) + (B * saishou_mai) + (A * a_tarinai) + (B * b_tarinai);
    }
    // ハーフの方が安いパターン
    else if ((2 * C) < (A + B)){

        goukei = (2 * C * saishou_mai)+ (A * a_tarinai) + (B * b_tarinai);
    }

    cout << goukei << endl;


    return 0;

}

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

#include <stdio.h>
int a,b,c,x,y;
int main(){
	scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);
	if(a+b>2*c){
		ans = x > y ? 2*c*y+(x-y)*a;
	} else {
		ans = x < y ? 2*c*x+(y-x)*b;
	}
	printf("%d",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'ans' was not declared in this scope
    6 |                 ans = x > y ? 2*c*y+(x-y)*a;
      |                 ^~~
a.cc:6:44: error: expected ':' before ';' token
    6 |                 ans = x > y ? 2*c*y+(x-y)*a;
      |                                            ^
      |                                            :
a.cc:6:44: error: expected primary-expression before ';' token
a.cc:8:17: error: 'ans' was not declared in this scope
    8 |                 ans = x < y ? 2*c*x+(y-x)*b;
      |                 ^~~
a.cc:8:44: error: expected ':' before ';' token
    8 |                 ans = x < y ? 2*c*x+(y-x)*b;
      |                                            ^
      |                                            :
a.cc:8:44: error: expected primary-expression before ';' token
a.cc:10:21: error: 'ans' was not declared in this scope
   10 |         printf("%d",ans);
      |                     ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
using ll = long long;

ll A[200][200];

int main() {

	int a,b,c,x,y;

	cin >> a >> b >> c >> x >> y;
	int xymax = max(x, y);
	int min_cost = INT_MAX;
	for (int i = 0; i <= xymax; i++) {
		auto cost = max(0, (x - i)) * a + max(0, (y - i)) * b + i * 2 * c;
		/*cout << "current cost: " << cost << endl;
		cout << "\ti = " << i << endl;*/
		min_cost = min(min_cost, cost);
	}
	cout << min_cost << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'INT_MAX' was not declared in this scope
   15 |         int min_cost = INT_MAX;
      |                        ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <functional>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;

#define rep(i, n) for(ll i = 0; i < n; i++)
#define REP(i, n) for(ll i = 1; i < n + 1; i++)
#define PI 3.14159265359
#define EPS 0.0000000001
#define MOD 1000000007
//cout << std::fixed << std::setprecision(15) << y << endl;


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

    ll addA = min(A, 2 * C);
    ll addB = min(B, 2 * C);
    ll addAB = min(A + B, 2 * C);
    ll ans = 0;
    if(X >= Y){
        ans += Y * addAB + (X - Y) * addA;
    }else{
        ans += X * addAB + (Y - X) * addB);
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:42: error: expected ';' before ')' token
   36 |         ans += X * addAB + (Y - X) * addB);
      |                                          ^
      |                                          ;
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 = 1e7;
    for (int i = 0; i < 200000; i++) {
        int sum = C * i;

        int a = X - i / 2;
        int b = Y - i / 2;
      
        if (0 < a) sum += a * A;
        if (0 < b) sum += b * B;

        ans = min(ans, sum);
    }
    cout << ans << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: expected '}' at end of input
   20 |     cout << ans << endl;
      |                         ^
a.cc:4:12: note: to match this '{'
    4 | 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;
  if (a + b <= c*2) {
    cout << a*x + b*y << endl;
    return 0;
  }
  if (x == y) {
    cout << 2*c*x << endl;
  } else if (x > y) {
    cout << 2*c*y + (x-y) * min(a,2*c) << endl;
  } else if (x < y) {
    cout << 2*c*x + (y-x) * min(b,2*c) << endl;
  }
  return 0;
}

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

#include <iostream>
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++) //n回繰り返すときだけ使う普通はforで楽しないのがいいかな

using namespace std;
typedef long long int ll;
int main()
{        
    int a,b,c,x,y;
    int sum;

    cin >> a >> b >> c >> x >> y;
    if(temp>max(x,y)*2*c)
        {
            sum = max(x,y)*2*c;
            cout << sum <<endl;
            return 0;
        }
    if(c * 2 < a + b)
    {
        int temp=a*x+b*y;

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



}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'temp' was not declared in this scope; did you mean 'tm'?
   13 |     if(temp>max(x,y)*2*c)
      |        ^~~~
      |        tm
Language: C

#include<stdio.h>
int main()
{
long int a,b,c,x,y,z,k;
  scanf("%ld %ld %ld %ld %ld",&a,&b,&c,&x,&y);
  if(a+b<2*c) printf("%ld",a*x+b*y);
  else 
  {
  if(x<y) {z=x;
          k=y-x;
          if(a<2*c) printf("%ld",z*c+a*k);
          else{
           printf("%ld",c*(z+2*k));
           }
          }
  else {z=y;
       k=x-y;
        if(b<2*c) printf("%ld",z*c+b*k);
          else{
           printf("%ld",c*(z+2*k));
       }
  }
  
  return 0;}

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

#include<stdio.h>
int main()
{
long int a,b,c,x,y,z,k;
  scanf("%ld %ld %ld %ld %ld",&a,&b,&c,&x,&y);
  if(a+b<2*c) printf("%ld",a*x+b*y);
  else 
  {
  if(x<y) {z=x;
          k=y-x;
          if(a<2*c) printf("%ld",z*c+a*k);
          else{
           printf("%ld",c*(z+2*k));
           }
          }
  else {z=y;
       k=x-y;
        if(b<2*c) printf("%ld",z*c+b*k);
          else{
           printf("%ld",c*(z+2*k));
       }
  }
  
}

Compiler output:
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
long int a,b,c,x,y,z,k;
  scanf("%ld %ld %ld %ld %ld",&a,&b,&c,&x,&y);
  if(a+b<2*c) printf("%ld",a*x+b*y);
  else 
  {
  if(x<y) {z=x;
          k=y-x;
          if(a<2*c) printf("%ld",z*c+a*k);
          else{
           printf("%ld",c*(z+2*k));
           }
          }
  else {z=y;
       k=x-y;
        if(b<2*c) printf("%ld",z*c+b*k);
          else{
           printf("%ld",c*(z+2*k));
       }
  }
return 0;}

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

#include<stdio.h>
int mnain()
{
long int a,b,c,x,y,z,k;
  scanf("%ld %ld %ld %ld %ld",&a,&b,&c,&x,&y);
  if(a+b<2*c) printf("%ld",a*x+b*y);
  else 
  {
  if(x<y) {z=x;
          k=y-x;
          if(a<2*c) printf("%ld",z*c+a*k);
          else{
           printf("%ld",c*(z+2*k));
           }
          }
  else {z=y;
       k=x-y;
        if(b<2*c) printf("%ld",z*c+b*k);
          else{
           printf("%ld",c*(z+2*k));
       }
  }
return 0;}

Compiler output:
main.c: In function 'mnain':
main.c:23:1: error: expected declaration or statement at end of input
   23 | return 0;}
      | ^~~~~~
Language: C

#include<stdio.h>
int mnain()
{
long int a,b,c,x,y,z,k;
  scnaf("%ld %ld %ld %ld %ld",&a,&b,&c,&x,&y);
  if(a+b<2*c) printf("%ld",a*x+b*y);
  else 
  {
  if(x<y) {z=x;
          k=y-x;
          if(a<2*c) printf("%ld",z*c+a*k);
          else{
           printf("%ld",c*(z+2*k));
           }
          }
  else {z=y;
       k=x-y;
        if(b<2*c) printf("%ld",z*c+b*k);
          else{
           printf("%ld",c*(z+2*k));
       }
  }
return 0;}

Compiler output:
main.c: In function 'mnain':
main.c:5:3: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |   scnaf("%ld %ld %ld %ld %ld",&a,&b,&c,&x,&y);
      |   ^~~~~
      |   scanf
main.c:23:1: error: expected declaration or statement at end of input
   23 | return 0;}
      | ^~~~~~
Language: C++

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

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);


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


    int ans = 1001001001;
    for(int i = 0; i <= 100000; ++i) {
        int A = i * a;
        int AB = (x - i) * 2;
        int C = AB * c;
        int B = 0;
        if(AB/2 > y) B = y * b;
        else B = (y - (AB/2)) * b;
        ll sum = A + B + C;

        ans = min(ans , sum);
    }

    cout << ans << endl;
    return 0;
}

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

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

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);


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

    int ans = 1001001001;
    for(int i = 0; i <= 100000;; ++i) {
        int A = max(0,x-i);
        int B = max(0, y-i);
        ans = min(ans, i*(2*c)+(A*a)+(B*b));
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:32: error: expected primary-expression before ';' token
   16 |     for(int i = 0; i <= 100000;; ++i) {
      |                                ^
a.cc:16:32: error: expected ')' before ';' token
   16 |     for(int i = 0; i <= 100000;; ++i) {
      |        ~                       ^
      |                                )
a.cc:16:36: error: 'i' was not declared in this scope
   16 |     for(int i = 0; i <= 100000;; ++i) {
      |                                    ^
Language: C++

#include <iostream>
#include <cmath>

using namespace std;
typedef long long ll;
int main() {
    ll A, B, C, X, Y;
    cin >> A >> B >> C >> X >> Y;

    ll ans = LLONG_MAX;
    for (int i = 0; i <= 2*max(X, Y); i+=2) {
        ll tmp = i*C;
        tmp += max((ll)0, X-i/2)*A + max((ll)0, Y-i/2)*B;
        ans = min(ans, tmp);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'LLONG_MAX' was not declared in this scope
   10 |     ll 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 <cmath>
  +++ |+#include <climits>
    3 |
Language: C++

#include <iostream>

using namespace std;
typedef long long ll;
int main() {
    ll A, B, C, X, Y;
    cin >> A >> B >> C >> X >> Y;

    ll ans = LLONG_MAX;
    for (int i = 0; i <= 2*max(X, Y); i+=2) {
        ll tmp = i*C;
        tmp += max((ll)0, X-i/2)*A + max((ll)0, Y-i/2)*B;
        ans = min(ans, tmp);
    }
    cout << ans << endl;
    return 0;
}

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

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

int main(){
  int A,B,C,X,Y;
  cin >> A >> B >> C >> X >> Y;
  int p = 2*max(X,Y);
  int ans = A*X+B*Y;
  int q;
  int a,b;
  for(int c = 2;c <= p;c += 2){
    if(X-c/2 > 0){
      a = X-c/2;
    }else{
      a = 0;
    }
    if(Y-c/2 > 0{
      b = Y-c/2;
    }else{
      b = 0;
    }
    q=A*a+B*b+C*c;
    if(q<ans){ans=q;}
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: expected ';' before '{' token
   17 |     if(Y-c/2 > 0{
      |                 ^
      |                 ;
a.cc:19:6: error: expected primary-expression before 'else'
   19 |     }else{
      |      ^~~~
a.cc:19:6: error: expected ')' before 'else'
   19 |     }else{
      |      ^~~~
      |      )
a.cc:17:7: note: to match this '('
   17 |     if(Y-c/2 > 0{
      |       ^
Language: C++

#include <bits/stdc++.h>
//#define DEBUG
#define REP(i, nn ) for(int i = 0 ; i < (int) nn; i++)
#define deb(x) std::cout << #x << " " << x << endl;

using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;

template<typename... T>
void read(T& ... a){
    ((cin >> a),...);
}
template<typename... T>
void write(T... a){
    ((cout << a << "\n"),...);
}

void solve(){
    int a, b, c, x, y;
    read(a, b, c, x, y);
    int min_cost = a * x + b * y;
    for(int z = 0; z <= max(x,y) * 2 z++){
        int cost = a * max(x - z /2, 0) + b * max(y - z/2, 0) + c * z;
        if( cost < min_cost){
            min_cost = cost;
        }
    }
    write(min_cost);
} 

int main()
{
    //making data IO Fast
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    /****************************/

    #ifdef DEBUG
    int TEST_CASES = 2;
    while(TEST_CASES--){
    #endif // DEBBUG

    solve();

    #ifdef DEBUG
    }
    #endif // DEBUG
    
    return 0;
}

//Thanks to CSES problemset
// I am trained with this kind of problem

Compiler output:
a.cc: In function 'void solve()':
a.cc:24:37: error: expected ';' before 'z'
   24 |     for(int z = 0; z <= max(x,y) * 2 z++){
      |                                     ^~
      |                                     ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'a' was not declared in this scope
    5 |   cin >> a >> b >> c >> x >> y;
      |          ^
a.cc:5:15: error: 'b' was not declared in this scope
    5 |   cin >> a >> b >> c >> x >> y;
      |               ^
a.cc:5:20: error: 'c' was not declared in this scope
    5 |   cin >> a >> b >> c >> x >> y;
      |                    ^
a.cc:5:25: error: 'x' was not declared in this scope
    5 |   cin >> a >> b >> c >> x >> y;
      |                         ^
a.cc:5:30: error: 'y' was not declared in this scope
    5 |   cin >> a >> b >> c >> x >> y;
      |                              ^
Language: C++

int A, B, C, X, Y;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> A >> B >> C >> X >> Y;
      |     ^~~
a.cc:8:25: error: 'max' was not declared in this scope
    8 |         int price = A * max(X - i, 0) + B * max(Y - i, 0) + AB * i;
      |                         ^~~
a.cc:9:15: error: 'min' was not declared in this scope; did you mean 'main'?
    9 |         ans = min(price, ans);
      |               ^~~
      |               main
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << ans << endl;
      |     ^~~~
a.cc:11:20: error: 'endl' was not declared in this scope
   11 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9;

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

  ll cost = INF;
  for (int ab = 0; ab <= 200000; ab += 2) {
    cost = min(cost, 2 * c * ab + a * max(0, x - ab) + b * max(0, y - ab));
  }
  cout << cost << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: no matching function for call to 'min(ll&, int)'
   12 |     cost = min(cost, 2 * c * ab + a * max(0, x - ab) + b * max(0, y - ab));
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:15: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   12 |     cost = min(cost, 2 * c * ab + a * max(0, x - ab) + b * max(0, y - ab));
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |     cost = min(cost, 2 * c * ab + a * max(0, x - ab) + b * max(0, y - ab));
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
    int A, B, C, X, Y;
    cin >> A >> B >> C >> X >> Y;
    ll ans = min(A*X+B*Y, 2*C*max(X,Y), 2*C*min(X,Y)+A*max(0,X-Y)+B*max(0,Y-X));

    cout << ans << "\n";
}


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:17:   required from here
    8 |     ll ans = min(A*X+B*Y, 2*C*max(X,Y), 2*C*min(X,Y)+A*max(0,X-Y)+B*max(0,Y-X));
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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++

/*
    Problem 5
    https://atcoder.jp/contests/abc095/tasks/arc096_a
*/
#include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
/* function */
/* main */
int main(){
    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;

    int ans = INF;
    for (int i = 0; i <= max(x, y); i++) {
        sum += 2 * i * c + max(0, x - i) * a + max(0, y - i) * b;
        ans = min(ans, sum);
    }
    cout << ans << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'sum' was not declared in this scope
   25 |         sum += 2 * i * 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;
  cin >> a >> b >> c >> x >> y;
  if (a >= 2*c && b >= 2*c){
  	cout << 2*c*max(x,y) << endl;
  }
  else if (a+b <= 2*c)){
    cout << a*x+b*y << endl;
  }

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



Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before ')' token
    9 |   else if (a+b <= 2*c)){
      |                       ^
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 >= 2*c && b >= 2*c){
  	cout << 2*c*max(x,y) << endl;
  }
  else if (a+b <= 2*c || (x == 1 && y == 1){
    cout << a*x+b*y << endl;
  }

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



Compiler output:
a.cc: In function 'int main()':
a.cc:9:44: error: expected ')' before '{' token
    9 |   else if (a+b <= 2*c || (x == 1 && y == 1){
      |           ~                                ^
      |                                            )
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected ';' before 'k'
   14 |      sum k = 0;
      |         ^~
      |         ;
a.cc:15:7: error: 'k' was not declared in this scope
   15 |       k = 2 * c * i + a * max(0, x - i) + b * max(0, y - i);
      |       ^
a.cc:18:17: error: expected '}' at end of input
   18 |     cout << sum;
      |                 ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

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

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

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

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

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

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

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

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

    int sum = A*X + B*Y;
    for(int i = 0; i <= max(X, Y); i++){
        int sum1 = c*2*i;
        if((X-i) > 0){
            sum1 += A*(X-i);
        }
        if((Y-i) > 0){
            sum1 += B*(Y-i);
        }
        sum = min(sum, sum1);
    }
    cout << sum << endl;

    return 0;
}

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

#include <stdio.h>

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

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

    //それぞれ買う
    int each = a*x + b*y;

    //A,B少ない方に合わせてCを買って、残りは単体で買う
    int tmp = x>y ? a:b;
    int mix = 2*c*min(x,y) + tmp*abs(x-y);

    //余ってもいいからCだけで買う
    int only = 2*c*max(x,y);

    //比較
    printf("%d\n", min(each, mix, only));
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:19: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   13 |     int mix = 2*c*min(x,y) + tmp*abs(x-y);
      |                   ^~~
      |                   main
main.c:13:34: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   13 |     int mix = 2*c*min(x,y) + tmp*abs(x-y);
      |                                  ^~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:16:20: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   16 |     int only = 2*c*max(x,y);
      |                    ^~~
Language: C++

B1;3409;0c#include<bits/stdc++.h>

using namespace std;

int A,B,C,X,Y;
int ans;

void input(){
  cin >> A >> B >> C >> X >> Y;
}

void solve(){
  int a,b,c;
  if (A+B>2*C){
    if ((2*C>A)&&(2*C>B)){
      int tmp=min(X,Y);
      c=tmp*2;
      a=X-tmp;
      b=Y-tmp;
      ans=A*a+B*b+C*c;
    }
    if ((2*C<A)&&(2*C>B)){
      c=2*X;
      a=0;
      b=max(Y-X,0);
      ans=A*a+B*b+C*c;
    } 
    if ((2*C>A)&&(2*C<B)){
      c=2*Y;
      a=max(X-Y,0);
      b=0;
      ans=A*a+B*b+C*c;
    } 
    if ((2*C<A)&&(2*C<B)){
      int tmp=max(X,Y);
      c=tmp*2;
      a=0;
      b=0;
      ans=A*a+B*b+C*c;
    }

  }
  if (A+B<=2*C){
    a=X;
    b=Y;
    c=0;
    ans=A*a+B*b+C*c;
  }
}

int main(){
  input();
  solve();
  cout << ans << endl;
  return 0;
}
  


Compiler output:
a.cc:1:11: error: stray '#' in program
    1 | B1;3409;0c#include<bits/stdc++.h>
      |           ^
a.cc:1:1: error: 'B1' does not name a type
    1 | B1;3409;0c#include<bits/stdc++.h>
      | ^~
a.cc:1:4: error: expected unqualified-id before numeric constant
    1 | B1;3409;0c#include<bits/stdc++.h>
      |    ^~~~
a.cc:1:9: error: expected unqualified-id before numeric constant
    1 | B1;3409;0c#include<bits/stdc++.h>
      |         ^~
a.cc: In function 'void input()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> A >> B >> C >> X >> Y;
      |   ^~~
a.cc: In function 'void solve()':
a.cc:16:15: error: 'min' was not declared in this scope
   16 |       int tmp=min(X,Y);
      |               ^~~
a.cc:25:9: error: 'max' was not declared in this scope
   25 |       b=max(Y-X,0);
      |         ^~~
a.cc:30:9: error: 'max' was not declared in this scope
   30 |       a=max(X-Y,0);
      |         ^~~
a.cc:35:15: error: 'max' was not declared in this scope
   35 |       int tmp=max(X,Y);
      |               ^~~
a.cc: In function 'int main()':
a.cc:54:3: error: 'cout' was not declared in this scope
   54 |   cout << ans << endl;
      |   ^~~~
a.cc:54:18: error: 'endl' was not declared in this scope
   54 |   cout << ans << endl;
      |                  ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: unable to find numeric literal operator 'operator""c'
    9 |     int sum=i*2c+a*max(x-i,0)+b*max(y-i,0);
      |               ^~
Language: C++

#include "../bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rem(i, m, n) for (int i = m; i < (n); i++)
#define eps (1e-7)
#define inf (1e9)
#define pi (acos(-1))
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

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

    int a, b, c, x, y;
    cin >> a >> b >> c >> x >> y;
    int ab = a + b;
    int c2 = c * 2;
    int ans = 0;
    if (c2 > ab)
        ans = a * x + b * y;
    else
    {
        if (x > y)
        {
            ans = c2 * y;
            ans += min(a, c2) * (x - y);
        }
        else
        {
            ans = c2 * x;
            ans += min(b, c2) * (y - x);
        }
    }

    cout << ans << "\n";

    return 0;
}

Compiler output:
a.cc:1:10: fatal error: ../bits/stdc++.h: No such file or directory
    1 | #include "../bits/stdc++.h"
      |          ^~~~~~~~~~~~~~~~~~
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;
  
  long long sum1=0;
  long long sum2=0;
  long long sum3=0;
  long long ans = 99999;
  
  sum1 = A*X + B*Y;
  
  for(int i=1;i<=max(X,Y);i++){
    sum2 = 2*i;
    sum3 = C*sum2 + A*min(0,X-i) + B*min(0,Y-i);
    ans = min(ans,sum3);
  }
    
  cout << ans << endl;
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected '}' at end of input
   22 |   return 0;
      |            ^
a.cc:4:11: note: to match this '{'
    4 | 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;
  
  long long sum1=0;
  long long sum2=0;
  long long sum3=0;
  long long ans = 99999;
  
  sum1 = A*X + B*Y;
  
  for(int i=1;i<=max(X,Y);i++){
    sum2 = 2*i;
    sum3 = C*sum2 + A*min(0,X-i) + B*min(0.Y-i);
    ans = min(ans,sum3);
  }
    
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:42: error: unable to find numeric literal operator 'operator""Y'
   17 |     sum3 = C*sum2 + A*min(0,X-i) + B*min(0.Y-i);
      |                                          ^~~