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

#include<stdio.h>

int main(){

  int a,b,c,i = 1;
  scanf("%d %d",&a,&b);
  c = a;

  while(c < b){
    c = c + a;
    c--;
    i++;
  }

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

  return 0;

}


#include<stdio.h>

int main(){

  int a,b,c,i = 1;
  scanf("%d %d",&a,&b);
  c = a;

  while(c < b){
    c = c + a;
    c--;
    i++;
  }

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

  return 0;

}


#include<stdio.h>

int main(){

  int a,b,c,i = 1;
  scanf("%d %d",&a,&b);
  c = a;

  while(c < b){
    c = c + a;
    c--;
    i++;
  }

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

  return 0;

}




Compiler output:
main.c:24:5: error: redefinition of 'main'
   24 | int main(){
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int()'
    3 | int main(){
      |     ^~~~
main.c:45:5: error: redefinition of 'main'
   45 | int main(){
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int()'
    3 | int main(){
      |     ^~~~
Language: C++

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

int main() {
  int64_t q,h,s,d,n;
  cin>>q>>h>>s>>d>>n;
  int a=4*#include <bits/stdc++.h>
using namespace std;

int main() {
  int64_t q,h,s,d,n;
  cin>>q>>h>>s>>d>>n;
  int a=4*q,b=2*q+h,c=2*h,z=s;
  int64_t mini=min(a,min(b,min(c,z)));
    if(d/2>=mini){
      cout<<mini*n;
    }
    else{
      if(n%2==1&&n>2){
        cout<<d*(n/2)+mini;
      }
      if(n==1){
        cout<<mini;
      }
      if(n%2==0){
        cout<<d*n;
      }
    }
}q,b=2*q+h,c=2*h,z=s;
  int64_t mini=min(a,min(b,min(c,z)));
    if(d/2>=mini){
      cout<<mini*n;
    }
    else{
      if(n%2==1&&n>2){
        cout<<d*(n/2)+mini;
      }
      if(n==1){
        cout<<mini;
      }
      if(n%2==0){
        cout<<(d/2)*n;
      }
    }
}

Compiler output:
a.cc:7:11: error: stray '#' in program
    7 |   int a=4*#include <bits/stdc++.h>
      |           ^
a.cc: In function 'int main()':
a.cc:7:12: error: 'include' was not declared in this scope
    7 |   int a=4*#include <bits/stdc++.h>
      |            ^~~~~~~
a.cc:7:21: error: 'bits' was not declared in this scope
    7 |   int a=4*#include <bits/stdc++.h>
      |                     ^~~~
a.cc:7:26: error: 'stdc' was not declared in this scope; did you mean 'std'?
    7 |   int a=4*#include <bits/stdc++.h>
      |                          ^~~~
      |                          std
a.cc:8:1: error: expected primary-expression before 'using'
    8 | using namespace std;
      | ^~~~~
a.cc:10:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   10 | int main() {
      |         ^~
a.cc:10:9: note: remove parentheses to default-initialize a variable
   10 | int main() {
      |         ^~
      |         --
a.cc:10:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:10:12: error: a function-definition is not allowed here before '{' token
   10 | int main() {
      |            ^
a.cc:29:4: error: 'b' was not declared in this scope
   29 | }q,b=2*q+h,c=2*h,z=s;
      |    ^
a.cc:29:12: error: 'c' was not declared in this scope
   29 | }q,b=2*q+h,c=2*h,z=s;
      |            ^
a.cc:29:18: error: 'z' was not declared in this scope
   29 | }q,b=2*q+h,c=2*h,z=s;
      |                  ^
Language: C++

#include<bits/stdc++.h>//头文件
using namespace std;
long long q,h,s,d,n;
int main(){
    cin>>q>>h>>s>>d>>n;
    cout<<(n%2==0?min(min(min(q*8,h*4),s*2),d)*n/2):(min(min(q*4,h*2),s)+min(min(min(q*8,h*4),s*2),d)*(n-1)/2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:51: error: expected ':' before ')' token
    6 |     cout<<(n%2==0?min(min(min(q*8,h*4),s*2),d)*n/2):(min(min(q*4,h*2),s)+min(min(min(q*8,h*4),s*2),d)*(n-1)/2);
      |                                                   ^
      |                                                   :
a.cc:6:51: error: expected primary-expression before ')' token
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long q,h,s,d,n,ans,k;
int main()
{
    cin>>q>>h>>s>>d;
    cin>>n;
    ans=((n%2)*k)+n/2*d
    k=min(q*4,min(h*2,s));
    if(k*2<=d)cout<<k*n<<endl;
    else cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before 'k'
    8 |     ans=((n%2)*k)+n/2*d
      |                        ^
      |                        ;
    9 |     k=min(q*4,min(h*2,s));
      |     ~
Language: C++

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

using ll = long long;

int main() {
  ll a,b,c,d;
  cin>>a>>b>>c>>d;
  a*=4; b*=2;
  c = min(a,min(b,c));
  ll n; cin >> n;
  ll ans = n/2*min(d,2*c);
  if (n&1) ans += c;
  cout << ans << endl;
	
  return 0;
}

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

#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef long double ld;
const ll INF = 1e+14;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back

void Yes(){
	cout<<"Yes"<<endl;
	exit(0);
}
 
void No(){
	cout<<"No"<<endl;
	exit(0);
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
    ll Q, H, S, D, N;
    cin >> Q >> H >> S >> D >> N;
    Q *= 4; H *= 2;
    S = min({Q, H, S});
    ll D = min(D, 2 * S);
    ll ans = (N / 2) * D + (N % 2) * S;
    cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:8: error: redeclaration of 'll D'
   60 |     ll D = min(D, 2 * S);
      |        ^
a.cc:56:17: note: 'll D' previously declared here
   56 |     ll Q, H, S, D, N;
      |                 ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	long long Q,H,S,D,N = 0;
	cin>>Q;
	cin>>H,
	cin>>S;
	cin>>D;
	cin>>N;
	Q = Q *2;
	if(Q<H)
	{
	    H = Q;
	}
	H = H*2;
	if(H<S)
    {
        S = H;
    }
    long long res= 0;
    if(2*S <= D)
    {
        res = N*S;
    }
    else
    {
        res = (N/2)*D + (N%2)*S;
    }
    cout << res;
	return 0;

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

#include<string>
#include<typeinfo>
#include<vector>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
int main()
{
	int Q,H,S,D,N;
	cin >> Q >> H >> S >> D >> N;

	ll min_1;
	//int min_1_times;
	if(Q*2<H){
		min_1=Q*4;
	//	min_1_times=4;
	}else{
		min_1=H*2;
	//	min_1_times=2;
	}
	if(min_1>S){
		min_1=S;
	//	min_1_times=1;
	}

	ll price=0;
	if(N%2){
		price+=min_1;
		N--;
	}

	if(min_1*2 < D){
		price+=N*min_1;
	}else{
		price+=N*D/2;
	}

	cout << price << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> Q >> H >> S >> D >> N;
      |         ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include<map>
  +++ |+#include <iostream>
    6 | using namespace std;
a.cc:39:9: error: 'cout' was not declared in this scope
   39 |         cout << price << endl;
      |         ^~~~
a.cc:39:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:26: error: 'endl' was not declared in this scope
   39 |         cout << price << endl;
      |                          ^~~~
a.cc:6:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    5 | #include<map>
  +++ |+#include <ostream>
    6 | using namespace std;
Language: C++

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

int main()
{
	double a,b,c,d,n;	
	cin >> a >> b >> c >> d >> n;

	if(n%2==0){
		cout << n*min({4*a,2*b,c,d/2}) << endl;
	}
	else{
		cout << (n-1)*min({4*a,2*b,c,d/2}) + min({4*a,2*b,c}) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   10 |         if(n%2==0){
      |            ~^~
      |            | |
      |            | int
      |            double
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long int llint;
#define MM 1000000000
#define MOD MM+7
#define MAX 101000
#define MAP 110
#define initial_value -1
#define Pair pair<int,int>
#define chmax(a,b) (a<b ? a=b:0)
#define chmin(a,b) (a>b ? a=b:0)
#define INF (1 << 29) //536870912
int dx[4] = {-1,0,1,0};
int dy[4] = {0,-1,0,1};
ll Q,H,S,D;
ll N;
int main(){
    cin >> Q >> H >> S >> D >> N;
    ll mxli = max(4*Q, max(2*H, S));
    if(mxli*2 =< D){
        cout << N*mxli << endl;
        return 0;
    } else {
        if(N % 2 == 0){
            cout << (N/2)*D << endl;
            return 0;
        } else {
            cout << (N/2)*D + mxli << endl;
            return 0;
        }
    }
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: expected primary-expression before '<' token
   21 |     if(mxli*2 =< D){
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long int llint;
#define MM 1000000000
#define MOD MM+7
#define MAX 101000
#define MAP 110
#define initial_value -1
#define Pair pair<int,int>
#define chmax(a,b) (a<b ? a=b:0)
#define chmin(a,b) (a>b ? a=b:0)
#define INF (1 << 29) //536870912
int dx[4] = {-1,0,1,0};
int dy[4] = {0,-1,0,1};
ll Q,H,S,D;
ll N;
int main(){
    cin >> Q >> H >> S >> D >> N;
    mxli = max(4*Q, max(2*H, S));
    if(mxli*2 >= D){
        cout << N*mxli << endl;
        return 0;
    } else {
        if(N % 2 == 0){
            cout << (N/2)*D << endl;
            return 0;
        } else {
            cout << (N/2)*D + mxli << endl;
            return 0;
        }
    }
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'mxli' was not declared in this scope
   20 |     mxli = max(4*Q, max(2*H, S));
      |     ^~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
typedef unsigned long long ll;

ll n;
ll ans = ULLONG_MAX;
ll Q, H, S, D;

void dfs(ll q, ll h, ll s, ll d) {
	if (q + 2ull * h + 4ull * s + 8ull * d > n) {
		return;
	}
	if (q + 2ull * h + 4ull * s + 8ull * d == n) {
		ans = min(Q*q + H*h + S*s + D*d, ans);
	}
	dfs(q + 1ull, h, s, d);
	dfs(q, h + 1ull, s, d);
	dfs(q, h, s + 1ull, d);
	dfs(q, h, s, d + 1ull);
}

int main() {
	cin >> Q >> H >> S >> D >> n;
	n *= 4ull;
	dfs(0ull, 0ull, 0ull, 0ull);
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:7:10: error: 'ULLONG_MAX' was not declared in this scope
    7 | ll ans = ULLONG_MAX;
      |          ^~~~~~~~~~
a.cc:3:1: note: 'ULLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<algorithm>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<58;
 
int main(){
    ll Q, H, S, D, N;
  	cin >> Q >> H >> S >> D >> N;
    chmin(H, 2*Q);
  	chmin(S, 2*H);
  	if(2*S < D){
      cout << S * N <<  endl;
      return 0;
    }
  	else{
      if(N % 2 == 0){
         cout << D * N / 2 <<  endl;
      	return 0;
      }
      else{
        cout << D * N / 2　+ S * N % 2 <<  endl;
      	return 0;
      }
    }
}

Compiler output:
a.cc:36:25: error: extended character 　 is not valid in an identifier
   36 |         cout << D * N / 2　+ S * N % 2 <<  endl;
      |                         ^
a.cc: In function 'int main()':
a.cc:36:25: error: unable to find numeric literal operator 'operator""\U00003000'
   36 |         cout << D * N / 2　+ S * N % 2 <<  endl;
      |                         ^~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll INF = 1LL<<58;
 
int main(){
    ll Q, H, S, D, N;
  	cin >> Q >> H >> S >> D >> N;
    chmin(H, 2Q);
  	chmin(S, 2H);
  	if(2S < D){
      cout << S * N <<  endl;
      return 0;
    }
  	else{
      if(N % 2 == 0){
         cout << D * N / 2 <<  endl;
      	return 0;
      }
      else{
        cout << D * N / 2　+ S * N % 2 <<  endl;
      	return 0;
      }
    }
}

Compiler output:
a.cc:36:25: error: extended character 　 is not valid in an identifier
   36 |         cout << D * N / 2　+ S * N % 2 <<  endl;
      |                         ^
a.cc: In function 'int main()':
a.cc:24:14: error: unable to find numeric literal operator 'operator""Q'
   24 |     chmin(H, 2Q);
      |              ^~
a.cc:25:18: error: unable to find numeric literal operator 'operator""H'
   25 |         chmin(S, 2H);
      |                  ^~
a.cc:26:12: error: unable to find numeric literal operator 'operator""S'
   26 |         if(2S < D){
      |            ^~
a.cc:36:25: error: unable to find numeric literal operator 'operator""\U00003000'
   36 |         cout << D * N / 2　+ S * N % 2 <<  endl;
      |                         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	long long A[4], N;
	for (int i = 0; i < 4; i++) {
		cin >> A[i];
		if (i >= 1) {
			A[i] = min(A[i], A[i - 1] * 2);
		}
		cout << A[3] * (n / 2) + A[2] * (n % 2) << endl;
		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'n' was not declared in this scope
   10 |                 cout << A[3] * (n / 2) + A[2] * (n % 2) << endl;
      |                                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    ll q,h,s,d,n;
	cin >> q >> h >> s >> d >> n;
	cout << (n/2)*min(q * 8,min(h * 4, min(s * 2,d))) + ((n%2) * min(q * 4,min(h * 2,s))) << endl;
    return 0;
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'll' was not declared in this scope
    4 |     ll q,h,s,d,n;
      |     ^~
a.cc:5:16: error: 'q' was not declared in this scope
    5 |         cin >> q >> h >> s >> d >> n;
      |                ^
a.cc:5:21: error: 'h' was not declared in this scope
    5 |         cin >> q >> h >> s >> d >> n;
      |                     ^
a.cc:5:26: error: 's' was not declared in this scope
    5 |         cin >> q >> h >> s >> d >> n;
      |                          ^
a.cc:5:31: error: 'd' was not declared in this scope
    5 |         cin >> q >> h >> s >> d >> n;
      |                               ^
a.cc:5:36: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |         cin >> q >> h >> s >> d >> n;
      |                                    ^
      |                                    yn
Language: C++

#include<bits/stdc++.h>
using namespace std;
int  a,h,s,d,n,ans,k,kk,kkk;
int main()
{
    cin>>a>>h>>s>>d>>n;
    k=min(q*4,min(h*2,s));
    if(k*2<=d)
    {
        cout<<k*n<<endl;
    }
    else
    {
        cout<<((n%2)*k)+n/2*d<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'q' was not declared in this scope
    7 |     k=min(q*4,min(h*2,s));
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int  a,h,s,d,n,ans,k,kk,kkk;
int main()
{
    cin>>q>>h>>s>>d>>n;
    k=min(q*4,min(h*2,s));
    if(k*2<=d)
    {
        cout<<k*n<<endl;
    }
    else
    {
        cout<<((n%2)*k)+n/2*d<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'q' was not declared in this scope
    6 |     cin>>q>>h>>s>>d>>n;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long q,h,s,x,y,ans,k;
int main()
{
    cin>>q>>h>>s>>x>>y;
    k=min(Q*4,min(H*2,S));
    if(k*2<=x)
    {
        cout<<k*y<<endl;
    }
    else
    {
        cout<<((y%2)*k)+N/2*x<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'Q' was not declared in this scope
    7 |     k=min(Q*4,min(H*2,S));
      |           ^
a.cc:7:19: error: 'H' was not declared in this scope
    7 |     k=min(Q*4,min(H*2,S));
      |                   ^
a.cc:7:23: error: 'S' was not declared in this scope
    7 |     k=min(Q*4,min(H*2,S));
      |                       ^
a.cc:14:25: error: 'N' was not declared in this scope
   14 |         cout<<((y%2)*k)+N/2*x<<endl;
      |                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    int f=e/2*2;
    if(e%2==0){
        cout<<min({a*e*4,b*e*2,c*e,d*e/2})<<endl;
    }
    else{
        cout<<min({a*f*4,b*f*2,c*f,d*f/2})+min(a*4,b*2,c)<<endl;
    }
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:11:47:   required from here
   11 |         cout<<min({a*f*4,b*f*2,c*f,d*f/2})+min(a*4,b*2,c)<<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;
long long Q,H,S,D,N,ans,t;
int main()
{
    cin>>Q>>H>>S>>D>>N;
    t=min(Q*4,min(H*2,S));
    if(t*2<=D)
      cout<<k*N<<endl;
    else cout<<((N%2)*t)+N/2*D<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'k' was not declared in this scope
    9 |       cout<<k*N<<endl;
      |             ^
Language: C

#include<stdio.h>
#define MAX(X,Y) X>=Y?X:Y
#define MIN(X,Y) X<=Y?X:Y

int main(){
    double q, h, s, d, half, one, two, sum;
    double n;
    scanf("%le %le %le %le %le",&q,&h,&s,&d,&n);
    half = MIN(2*q,h);
    one = MIN(4*q,MIN(2h,s));
    two = MIN(8*q,MIN(4*h,MIN(2*s,d)));
    sum = two*n/2 + (double)(one*n%2) + half*n/0.5 +(double)(q*n%0.5);
    print("%d",(int)sum);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:21: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                     ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:21: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                     ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:25: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                         ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:25: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                         ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:12:35: error: invalid operands to binary % (have 'double' and 'int')
   12 |     sum = two*n/2 + (double)(one*n%2) + half*n/0.5 +(double)(q*n%0.5);
      |                              ~~~~~^
      |                                 |
      |                                 double
main.c:12:65: error: invalid operands to binary % (have 'double' and 'double')
   12 |     sum = two*n/2 + (double)(one*n%2) + half*n/0.5 +(double)(q*n%0.5);
      |                                                              ~~~^
      |                                                               |
      |                                                               double
main.c:13:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |     print("%d",(int)sum);
      |     ^~~~~
      |     printf
Language: C

#include<stdio.h>
#define MAX(X,Y) X>=Y?X:Y
#define MIN(X,Y) X<=Y?X:Y

int main(){
    double q, h, s, d, half, one, two, sum;
    double n;
    scanf("%d%d%d%d%d",&q,&h,&s,&d,&n);
    half = MIN(2*q,h);
    one = MIN(4*q,MIN(2h,s));
    two = MIN(8*q,MIN(4*h,MIN(2*s,d)));
    sum = two*n/2 + (double)(one*n%2) + half*n/0.5 +(double)(q*n%0.5);
    print("%d",(int)sum);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:21: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                     ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:21: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                     ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:25: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                         ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:10:23: error: invalid suffix "h" on integer constant
   10 |     one = MIN(4*q,MIN(2h,s));
      |                       ^~
main.c:3:25: note: in definition of macro 'MIN'
    3 | #define MIN(X,Y) X<=Y?X:Y
      |                         ^
main.c:10:19: note: in expansion of macro 'MIN'
   10 |     one = MIN(4*q,MIN(2h,s));
      |                   ^~~
main.c:12:35: error: invalid operands to binary % (have 'double' and 'int')
   12 |     sum = two*n/2 + (double)(one*n%2) + half*n/0.5 +(double)(q*n%0.5);
      |                              ~~~~~^
      |                                 |
      |                                 double
main.c:12:65: error: invalid operands to binary % (have 'double' and 'double')
   12 |     sum = two*n/2 + (double)(one*n%2) + half*n/0.5 +(double)(q*n%0.5);
      |                                                              ~~~^
      |                                                               |
      |                                                               double
main.c:13:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |     print("%d",(int)sum);
      |     ^~~~~
      |     printf
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  cout<<(e/2)*min(8*a,min(4*b,min(2*c,d)))+e%2*min(4*a,min(2*b,c)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:66: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout<<(e/2)*min(8*a,min(4*b,min(2*c,d)))+e%2*min(4*a,min(2*b,c)<<endl;
      |                                                        ~~~~~~~~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long q,h,s,d,n,ans;
int main(){
    cin>>q>>h>>s>>d>>n;
    ans=min(q*8,min(h*4,min(s*2,d));
    cout<<ans*n/2<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:36: error: expected ')' before ';' token
    6 |     ans=min(q*8,min(h*4,min(s*2,d));
      |            ~                       ^
      |                                    )
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long q,h,s,d,n,ans,;
int main(){
    cin>>q>>h>>s>>d>>n;
    ans=min(q*8,min(h*4,min(s*2,d));
    cout<<ans*n/2<<endl;
    return 0;
}

Compiler output:
a.cc:3:25: error: expected unqualified-id before ';' token
    3 | long long q,h,s,d,n,ans,;
      |                         ^
a.cc: In function 'int main()':
a.cc:6:36: error: expected ')' before ';' token
    6 |     ans=min(q*8,min(h*4,min(s*2,d));
      |            ~                       ^
      |                                    )
Language: C++

#include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int Q,H,S,D,N;
int main(){
    cin >> Q >> H >> S >> D >> N;
    long long int li = min{ 4 * Q, 2 * H, S};
    if( li * 2 <= D ) cout << N * li << endl;
    else cout << N / 2 * D + ( N % 2 ) * D << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: cannot resolve overloaded function 'min' based on conversion to type 'long long int'
    8 |     long long int li = min{ 4 * Q, 2 * H, S};
      |                        ^~~
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Collections;
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		List<Integer> list1 = new ArrayList<>();
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		int n = sc.nextInt();
		for(int i = 0; i <= n/2; i++){
			for(int j = 0; j <= n - 2*i; i++){
				for(int k = 0; k <= (n - 2*i - j)*2; k+2){
					for(int f = 0; f <= (n - 2*i - j - k/2)*4; f+4){
						if(2*i + j + k/2 + f/4 == n){
							list1.add(a*f + b*k + c*j + d*i);	
						}
					}
				}
			}
		}
		Collections.sort(list1);
		System.out.println(list1.get(0));
	}
}

Compiler output:
Main.java:16: error: not a statement
				for(int k = 0; k <= (n - 2*i - j)*2; k+2){
				                                      ^
Main.java:17: error: not a statement
					for(int f = 0; f <= (n - 2*i - j - k/2)*4; f+4){
					                                            ^
2 errors
Language: C++

q,h,s,d=map(int,input().split())

h=min(h,q+q)
s=min(s,h+h)
d=min(d,s+s)

n=int(input())

print(n//2*d+n%2*s)


Compiler output:
a.cc:1:1: error: 'q' does not name a type
    1 | q,h,s,d=map(int,input().split())
      | ^
Language: C

#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#define REP(i, n) for(i=0; i<n; i++)
#define REPR(i, n) for(i=n; i>=0; i--)
#define FOR(i, m, n) for(i=m; i<n; i++)
#define max(a, b) ((a)>(b) ? (a):(b))
#define min(a, b) ((a)<(b) ? (a):(b))
#define INF 10000000000
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
typedef pair<double, double> doup;
ll rec(ll n);

int main(void) {
    ll tmp, min, d, n, ans=0;
    
    cin >> tmp;
    min=tmp*4;
    cin >> tmp;
    min=min(min, tmp*2);
    cin >> tmp;
    min=min(min, tmp);
    cin >> d;
    cin >> n;
    
    if(min*2<=d) {
        ans=n*min;
    }else {
        if(n%2==0) {
            ans=n/2*d;
        }else {
            ans=(n-1)/2*d+min;
        }
    }
    cout << ans << endl;
}

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

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

typedef long long ll;

int main(){
  ll q,h,s,d,n,ans=0;
  cin>>q>>h>>s>>d>>n;
  ll one=min({4*q,2*h,s});
  ll two=min(2*o,d);
  ans=two*n/2;
  if(n%2==1)ans+=one;
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'o' was not declared in this scope
   12 |   ll two=min(2*o,d);
      |                ^
Language: C++

#include <vector>
#include <algorithm>

typedef long long ll;

int main()
{
  ll Q, H, S, D;
  ll N;

  std::cin >> Q >> H >> S >> D;
  std::cin >> N;
  N *= 100;

  std::vector< std::pair< double, ll > > vp(4, std::make_pair(0.0, 0));
  vp[0].first = 25;
  vp[1].first = 50;
  vp[2].first = 100;
  vp[3].first = 200;

  vp[0].second = Q;
  vp[1].second = std::min(vp[0].second * 2, H);
  vp[2].second = std::min(vp[1].second * 2, S);
  vp[3].second = std::min(vp[2].second * 2, D);

  std::reverse(vp.begin(), vp.end());

  ll ans = 0;
  std::vector< std::pair< double, ll > >::iterator it;
  for (it = vp.begin(); it != vp.end(); it++) {
    ll num = N / it->first;
    ans += it->second * num;
    N -= num * it->first;
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'cin' is not a member of 'std'
   11 |   std::cin >> Q >> H >> S >> D;
      |        ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | 
a.cc:12:8: error: 'cin' is not a member of 'std'
   12 |   std::cin >> N;
      |        ^~~
a.cc:12:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:8: error: 'cout' is not a member of 'std'
   36 |   std::cout << ans << std::endl;
      |        ^~~~
a.cc:36:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:28: error: 'endl' is not a member of 'std'
   36 |   std::cout << ans << std::endl;
      |                            ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 |
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
using namespace std;
using ll = long long;
map <int ,int> mpa,mpb;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int Q,H,S,D;
  cin >> Q >> H >> S >> D;
  int N;
  cin >> N;
  int a=min(Q*8,H*4,S*2,D);
  int b=min(Q*4,H*2,S);
  int ans=(N/2)*a+(N%2)*b;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:12: error: no matching function for call to 'min(int, int, int, int&)'
   24 |   int a=min(Q*8,H*4,S*2,D);
      |         ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 4 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, 4 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/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, 4 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:   candidate expects 2 arguments, 4 provided
/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:25:12:   required from here
   25 |   int b=min(Q*4,H*2,S);
      |         ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int Q,H,S,D,N;
	long price=0;
	cin >> Q >> H >> S >> D >> N;
	Q*=4; H*=2;
	S = min({Q,H,S});
	D = min({2*S,D});
	cout << (N/2)*D + (N%2)*S << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    8 |         S = min({Q,H,S});
      |             ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   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:9:16: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    9 |         D = min({2*S,D});
      |             ~~~^~~~~~~~~
/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++

q,h,s,d=list(map(int,input().split()))
n = int(input())

ans = int(0)

if d < 2*s and d < 4*h and d < 8*q:
    ans += int(n/2)*d
    n %= 2

if s < 2*h and s < 4*q:
    ans += n*d
elif h < 2*q:
    ans += n*2*h
else:
    ans += n*4*q

print(ans)


Compiler output:
a.cc:1:1: error: 'q' does not name a type
    1 | q,h,s,d=list(map(int,input().split()))
      | ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
   int a,b,c,d;
   cin>>a>>b>>c>>d;
   int n;
   cin>>n;
   cout<<(n/2)*min(8*a,4*b,2*c,d)+(n%2)*min(4*a,2*b,c)<<endl;
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: no matching function for call to 'min(int, int, int, int&)'
   10 |    cout<<(n/2)*min(8*a,4*b,2*c,d)+(n%2)*min(4*a,2*b,c)<<endl;
      |                ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 4 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, 4 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, 4 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:   candidate expects 2 arguments, 4 provided
/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:10:44:   required from here
   10 |    cout<<(n/2)*min(8*a,4*b,2*c,d)+(n%2)*min(4*a,2*b,c)<<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 <iostream>
#include <string>
#include <algorithm>
using namespace std;
typedef long long ll;
int n,a,b,c,d;
int main(void){
    cin>>a>>b>>c>>d>>n;
    int one=min(a*4,b*2,c);
    int two=min(a*8,b*4,c*2,d);
    cout<<n/2*two+n%2*one;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'min(int, int, int, int&)'
   10 |     int two=min(a*8,b*4,c*2,d);
      |             ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 4 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, 4 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/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, 4 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:   candidate expects 2 arguments, 4 provided
/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:9:16:   required from here
    9 |     int one=min(a*4,b*2,c);
      |             ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.*;
 
public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long n = sc.nextLong();
		
		b = Math.min(b,2*a);
		c = Math.min(c,2*b);
		
		if (2*c <= d) {System.out.println(n*c);}
		else {
			long d_num = n/2;
			long c_num = 0;
			if (n%2==1) {c_num++;}
			System.out.println(c_num*c+d_num*d);
		}
	}


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

package Test;

import java.util.Scanner;
public class Test {

	public static void main(String[] args) {

int q,h,s,d,n;
Scanner scan=new Scanner(System.in);
q=scan.nextInt();
h=scan.nextInt();
s=scan.nextInt();
d=scan.nextInt();
n=scan.nextInt();
System.out.println(solve(n,q,h,s,d));
		
	}
	
	public static int solve (double n,int q,int h,int s,int d) {
	System.out.println("going for "+n);
		if(n>=2) {
		return Math.max(Math.min(d+solve(n-2,q,h,s,d),s+solve(n-1,q,h,s,d)), Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d)));
        
	}
	else if(n>=1) {
		return Math.min(s+solve(n-1,q,h,s,d), Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d)));
	}
	else if(n==0.75)return Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d));
	else if(n==0.5) return Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d));
	else if(n==0.25)return q;
	else return 0;
	}

}


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

package yenProblem;

import java.util.Scanner;

public class Test {

	public static void main(String[] args) {

int q,h,s,d,n;
Scanner scan=new Scanner(System.in);
q=scan.nextInt();
h=scan.nextInt();
s=scan.nextInt();
d=scan.nextInt();
n=scan.nextInt();
System.out.println(solve(n,q,h,s,d));
		
	}
	
	public static int solve (double n,int q,int h,int s,int d) {
	if(n>=2) {
		return Math.max(Math.min(d+solve(n-2,q,h,s,d),s+solve(n-1,q,h,s,d)), Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d)));
	}
	else if(n>=1) {
		return Math.min(s+solve(n-1,q,h,s,d), Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d)));
	}
	else if(n==0.75)return Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d));
	else if(n==0.5) return Math.min(q+solve(n-0.25,q,h,s,d),h+solve(n-0.5,q,h,s,d));
	else if(n==0.25)return q;
	else return 0;
	}

}


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

#include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back

#define ll __int64
//#define ll long long
#define P pair<ll,ll>

ll q,h,s,d,n;

int main(){
	cin>>q>>h>>s>>d>>n;
	q*=4;//1l
	h*=2;//1l
	
	ll ans=0;
	ll one=1000000000000;
	ll two=one;

	one=min(one,q);
	one=min(one,h);
	one=min(one,s);
	two=min(one*2,d);
	//cout<<one<<" "<<two<<endl;
	ans=n/2*two;
	if(n%2)ans+=one;
	cout<<ans<<endl;
 
	return 0;
}

Compiler output:
a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'?
   16 | #define ll __int64
      |            ^~~~~~~
a.cc:20:1: note: in expansion of macro 'll'
   20 | ll q,h,s,d,n;
      | ^~
a.cc: In function 'int main()':
a.cc:23:14: error: 'q' was not declared in this scope
   23 |         cin>>q>>h>>s>>d>>n;
      |              ^
a.cc:23:17: error: 'h' was not declared in this scope
   23 |         cin>>q>>h>>s>>d>>n;
      |                 ^
a.cc:23:20: error: 's' was not declared in this scope
   23 |         cin>>q>>h>>s>>d>>n;
      |                    ^
a.cc:23:23: error: 'd' was not declared in this scope
   23 |         cin>>q>>h>>s>>d>>n;
      |                       ^
a.cc:23:26: error: 'n' was not declared in this scope
   23 |         cin>>q>>h>>s>>d>>n;
      |                          ^
a.cc:16:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   16 | #define ll __int64
      |            ^~~~~~~
a.cc:27:9: note: in expansion of macro 'll'
   27 |         ll ans=0;
      |         ^~
a.cc:28:12: error: expected ';' before 'one'
   28 |         ll one=1000000000000;
      |            ^~~
a.cc:29:12: error: expected ';' before 'two'
   29 |         ll two=one;
      |            ^~~
a.cc:31:9: error: 'one' was not declared in this scope
   31 |         one=min(one,q);
      |         ^~~
a.cc:34:9: error: 'two' was not declared in this scope
   34 |         two=min(one*2,d);
      |         ^~~
a.cc:36:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   36 |         ans=n/2*two;
      |         ^~~
      |         abs
Language: C++

a = input().split(" ")
b = list(map(int, a))
c = int(input())
ans = 0
r = min([b[0] * 4, b[1] * 2, b[2]])
r2 = min([b[0]*8,b[1]*4,b[2]*2, b[3]])
if c % 2 == 1:
    ans += r
    c -= 1
ans += r2 * (c / 2)
print(int(ans))


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = input().split(" ")
      | ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    int c[4], n;
    for (auto& x : c) cin >> x; cin >> n;

    vector<pair<int, int>> p;
    for (int i = 0; i < 4; i++) p.push_back(make_pair((1 << (3 - i)) * c[i], c[i]));

    long long ans = min(min(p[0].first, p[1].first), p[2].first) / 2;
    sort(p.begin(), p.end());

    while (n >= 2) {
        ans += p[0].first;
        n -= 2;
    }

    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'vector' was not declared in this scope
   11 |     vector<pair<int, int>> p;
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:11:25: error: expected primary-expression before '>' token
   11 |     vector<pair<int, int>> p;
      |                         ^~
a.cc:11:28: error: 'p' was not declared in this scope
   11 |     vector<pair<int, int>> p;
      |                            ^