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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(){
  int one, two, a, b, c, d, e, f, N;
  char buf[255];
  fgets(buf, sizeof(buf), stdin);
  a = 4*atoi(strtok(buf, " "));
  b = 2*atoi(strtok(NULL, " "));
  c = atoi(strtok(NULL, " "));
  one = a; if(one>b)one=b; if(one>c)one=c;
  two = atoi(strtok(NULL, " "));
  d = a*2; e = b*2; f = c*2;
  if(two>d)two = d; if(two>e)two = e; if(two>f)two = f;
  fgets(buf, sizeof(buf), stdin);
  N = atoi(buf);
  printf("%d", ((N-N%2)/2)*two) + (N%2)*one);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:44: error: expected ';' before ')' token
   18 |   printf("%d", ((N-N%2)/2)*two) + (N%2)*one);
      |                                            ^
      |                                            ;
Language: C++

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

typedef long long ll;
const long double pi = acos(-1);
ll X1,Y1,X2,Y2,n,a[200020],d[200020],len;
map<ll,ll> x,y;

int main(){
    ios::sync_with_stdio(false);
    cin >> X1 >> Y1 >> X2 >> Y2 >> n;
    if(X2 < X1){
        swap(X1,X2);
        swap(Y1,Y2);
    }
    for(int i = 1,u,v;i <= n;++i){
        cin >> u >> v;
        x[u] = v;
        y[v] = u;
    }
    double qc = 5 * pi, ans = 0;
    if(X1 == X2){
        int p = min(Y1,Y2), q = max(Y1,Y2);
        ans = 100 * (q - p);
        if(x.count(X1) && x[X1] > p && x[X1] < q) ans += 2*qc - 20;
        cout << fixed << setprecision(12) << ans << endl;
        return 0;
    }
    if(Y1 == Y2){
        int p = min(X1,X2), q = max(X1,X2);
        ans = 100 * (q - p);
        if(y.count(Y1) && y[Y1] > p && y[Y1] < q) ans += 2*qc - 20;
        cout << fixed << setprecision(12) << ans << endl;
        return 0;
    }

    ll cnt = 0, mny = min(Y1,Y2), mxy = max(Y1,Y2);
    ans = 100.0 * (X2 - X1 + mxy - mny);
    for(auto p: x){
        if(p.first < X1 || p.first > X2) continue;
        if(p.second >= mny && p.second <= mxy) a[++cnt] = (Y1 < Y2 ? 1 : -1) * p.second;
    }

    for(int i = 1;i <= cnt;++i) d[i] = 1e12;
    for(int i = 1;i <= cnt;++i){
        int pos = lower_bound(d+1,d+1+len,a[i]) - d;
        if(pos == len + 1) len++;
        d[pos] = a[i];
    }

    ans -= (20 - qc) * len;
    if(len > min(X2 - X1,mxy - mny) ans += qc;

    cout << fixed << setprecision(12) << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:36: error: expected ';' before 'ans'
   52 |     if(len > min(X2 - X1,mxy - mny) ans += qc;
      |                                    ^~~~
      |                                    ;
a.cc:54:53: error: expected ')' before ';' token
   54 |     cout << fixed << setprecision(12) << ans << endl;
      |                                                     ^
      |                                                     )
a.cc:52:7: note: to match this '('
   52 |     if(len > min(X2 - X1,mxy - mny) ans += qc;
      |       ^
Language: C++

#include <iostream>
#include <algorithm>


int main() {
	int resurt;
	double n, q, h, s, d, qx, hx, sx, dx, notresurt;
	std::cin >> q >> h >> s >> d >> n;



	if (n / d != 0) {
		qx = n / 0.25;
		q = q * qx;
		hx = n / 0.5;
		h = h * hx;
		dx = n / 2;
		d = d * dx;
		notresurt = std::min(q, h, n);
		resurt = std::min(notresurt, d);

		std::cout << resurt << '\n';
	}
	else {
		qx = n / 0.25;
		q = q * qx;
		hx = n / 0.5;
		h = h * hx;
		resurt = std::min(q, h, n);
		std::cout << resurt << '\n';
	}



	return 0;

}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = double; _Compare = double]':
a.cc:19:23:   required from here
   19 |                 notresurt = std::min(q, h, n);
      |                             ~~~~~~~~^~~~~~~~~
/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 <algorithm>


int main() {
	int n, resurt;
	double q, h, s, d, qx, hx, sx, dx, notresurt;
	std::cin >> q >> h >> s >> d >> n;



	if (n / d != 0) {
		qx = n / 0.25;
		hx = n / 0.5;
		dx = n / 2;
		notresurt = std::min(q*qx, h*hx, n);
		resurt = std::min(notresurt, dx*d);

		std::cout << resurt << '\n';
	}
	else {
		qx = n / 0.25;
		hx = n / 0.5;
		resurt = std::min(q*qx, h*hx, n);
		std::cout << resurt << '\n';
	}



	return 0;

}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = double; _Compare = int]':
a.cc:16:23:   required from here
   16 |                 notresurt = std::min(q*qx, h*hx, n);
      |                             ~~~~~~~~^~~~~~~~~~~~~~~
/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 <algorithm>
using namespace std;




int main() {
	int n, resurt;
	double q, h, s, d, qx, hx, sx, dx, notresurt;
	cin >> q >> h >> s >> d;



	if (n / d != 0) {
		qx = n / 0.25;
		hx = n / 0.5;
		dx = n / 2;
		notresurt = min(q*qx, h*hx, n);
		resurt = min(notresurt, dx*d);

		cout << resurt << '\n';
	}
	else {
		qx = n / 0.25;
		hx = n / 0.5;
		resurt = min(q*qx, h*hx, n);
		cout << resurt << '\n';
	}



	return 0;

}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = double; _Compare = int]':
a.cc:19:18:   required from here
   19 |                 notresurt = min(q*qx, h*hx, n);
      |                             ~~~^~~~~~~~~~~~~~~
/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<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<bitset>
#include<vector>
#include<deque>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<iomanip>
#include <functional>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
const double EPS = 1e-10;
//cout << fixed << std::setprecision(9)
//memset(a, 0, sizeof(a));
//--------------------------

int main()
{
	ll q, h, s, d, n;

	cin >> q >> h >> s >> d >> n;

	ll min1 = LLONG_MAX;
	ll min2 = LLONG_MAX;

	for(ll i25=0;i25<9;i25++)
		for (ll i50 = 0;i50<9;i50++)
			for (ll i1 = 0;i1<9;i1++)
				for (ll i2 = 0;i2 < 9;i2++) {
					ll temp = i25 / 4 + i50 / 2 + i1 + 2 * i2;
					ll sum = q * i25 + h * i50 + s * i1 + d * i2;

					if (temp == 1) {
						if (min1 > sum) min1 = sum;
					}

					if (temp == 2) {
						if (min2 > sum) min2 = sum;
					}
				}

	if (n % 2) {
		cout << (n / 2) * min2 + min1 << endl;
	}
	else {
		cout << (n / 2) * min2 << endl;
	}

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:30:19: error: 'LLONG_MAX' was not declared in this scope
   30 |         ll min1 = LLONG_MAX;
      |                   ^~~~~~~~~
a.cc:16:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   15 | #include <functional>
  +++ |+#include <climits>
   16 | using namespace std;
Language: Java

import java.util.*;
public class con1{
     static double count(long y)
	 {
		 double count=0;
		 double f=2;
		 double x=1;
		 while(y>0)
		 {
			 long t=y%10;
			 y=y/10;
			 count+=(f*t);
			 f-=x;
			 x=x/2;
		 }
		 return count;
	 }
	 public static void main(String args[])
	 {
		 Scanner in=new Scanner(System.in);
		 long q=in.nextInt();
		 long h=in.nextInt();
		 long s=in.nextInt();
		 long d=in.nextInt();
		 long n=in.nextInt();
		 
		 long minans=10000000;
		 for(long i=1;i<10000;i++)
		 {
		 if(count(i)!=(double)n)
			 continue;
		 long h1=i;
		 long r=4;
		 long ans=0;
		     while(h1>0)
			 {
				 long temp=h1%10;
				 if(r==4)
					 ans+=temp*d;
				 else if(r==3)
					 ans+=temp*s;
				 else if(r==2)
					 ans+=temp*h;
				 else
					 ans+=temp*q;
				 r--;
				 h1=h1/10;
			 }
			
			 if(ans<minans)
				 minans=ans;
		 }
		 System.out.println(minans);
	 }

}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ZTF = sc.nextLong();
		long F025 = ZTF * 4;

		long ZFZ = sc.nextLong();
		long F050 = ZFZ * 2;

		long One = sc.nextLong();
		long F100 = One;

		long Two = sc.nextLong();

		long want = sc.nextLong();

		long ans;

		Long[] nums = {F025,F050,F100};//ここで0.25、0.50、1.00のどれを使うか決める
		int min = 0;
		for(int i = 0;i < 3; i++) {
			if(nums[min] > nums[i]) {
				min = i;
			}
		}

		if(nums[min] * 2 > Two && want >= 2) {
			if(want % 2 == 0) {
				ans = Two * (want / 2);
			} else {
				ans = Two * (want / 2) + nums[min];
			}
		} else  {
			ans = nums[min] * want;
		}

		System.out.println(ans);
	}
}package AGC019;
import java.util.Scanner;

public class IceTeaStore {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long ZTF = sc.nextLong();
		long F025 = ZTF * 4;

		long ZFZ = sc.nextLong();
		long F050 = ZFZ * 2;

		long One = sc.nextLong();
		long F100 = One;

		long Two = sc.nextLong();

		long want = sc.nextLong();

		long ans;

		Long[] nums = {F025,F050,F100};//ここで0.25、0.50、1.00のどれを使うか決める
		int min = 0;
		for(int i = 0;i < 3; i++) {
			if(nums[min] > nums[i]) {
				min = i;
			}
		}

		if(nums[min] * 2 > Two && want >= 2) {
			if(want % 2 == 0) {
				ans = Two * (want / 2);
			} else {
				ans = Two * (want / 2) + nums[min];
			}
		} else  {
			ans = nums[min] * want;
		}

		System.out.println(ans);
	}
}

Compiler output:
Main.java:41: error: class, interface, enum, or record expected
}package AGC019;
 ^
Main.java:42: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
Language: C++

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




int main() {
	int n, q, h, s, d, qx, hx, sx, dx, resurt;
	scanf("%d", &q);
	scanf("%d", &h);
	scanf("%d", &s);
	scanf("%d", &d);
	scanf("%d", &n);



	if (n / d != 0) {
		qx = n / 0.25;
		hx = n / 0.5;
		dx = n / 2;
		resurt = min(q*qx, h*hx, n);
		resurt = min(resurt, dx*d);
		printf("%d\n", resurt);
	}
	else {
		qx = n / 0.25;
		hx = n / 0.5;
		resurt = min(q*qx, h*hx, n);
		printf("%d\n", resurt);
	}



	return 0;

}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:23:15:   required from here
   23 |                 resurt = min(q*qx, h*hx, n);
      |                          ~~~^~~~~~~~~~~~~~~
/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 <vector>

typedef unsigned long long int ll;
using namespace std;

ll q, h, s, d, n;
ll ans = 0;

void dd(ll *n, ll *ans) {
    if (*n / 8) {
        *ans += (*n / 8) * d;
        *n -= (*n / 8) * 8;
    }
}

void ss(ll *n, ll *ans) {
    if (*n / 4) {
        *ans += (*n / 4) * s;
        *n -= (*n / 4) * 4;
    }
}

void hh(ll *n, ll *ans) {
    if (*n / 2) {
        *ans += (*n / 2) * h;
        *n -= (*n / 2) * 2;
    }
}

void qq(ll *n, ll *ans) {
    if (*n / 1) {
        *ans += (*n / 1) * q;
        *n -= (*n / 1) * 1;
    }
}

bool pairCompare(const std::pair<int, int> &firstElem,
                 const std::pair<float, int> &secondElem) {
    return firstElem.second < secondElem.second;
}

int main() {
    cin >> q >> h >> s >> d >> n;
    n *= 4;

    vector<pair<int, int> > qhsd{make_pair(q, q * 4), make_pair(h, h * 2),
                                 make_pair(s, s), make_pair(d, d / 2)};
    sort(qhsd.begin(), qhsd.end(), pairCompare);

    for (auto p : qhsd) {
        if (p.first == q && p.second == q * 4) {
            qq(&n, &ans);
        }
        if (p.first == h && p.second == h * 2) {
            hh(&n, &ans);
        }
        if (p.first == s && p.second == s) {
            ss(&n, &ans);
        }
        if (p.first == d && p.second == d / 2) {
            dd(&n, &ans);
        }
    }
    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   49 |     sort(qhsd.begin(), qhsd.end(), pairCompare);
      |     ^~~~
      |     short
Language: C++

def buy(q, h, s, d, n):
    min = float("inf")
    c_liter = 0
    c_price = 0
    while c_price > n:
        c_liter += 2
        c_price += d
        if c_price == n and c_price < min:
            min = c_price
        while c_price > n:
            c_liter += 1
            c_price += s
            if c_price == n and c_price < min:
                min = c_price
            while c_price > n:
                c_liter += 0.5
                c_price += h
                if c_price == n and c_price < min:
                    min = c_price
                while c_price > n:
                    c_liter += 0.25
                    c_price += q
                    if c_price == n and c_price < min:
                        min = c_price
    return min


if __name__ == '__main__':
    price = input()
    prices = price.split()
    prices = list(map(int, prices))
    n = int(input())
    print(buy(prices[0], prices[1], prices[2], prices[3], n))


Compiler output:
a.cc:28:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   28 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def buy(q, h, s, d, n):
      | ^~~
Language: C++


#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,a[4],n;
int maxa=100,maxb=100; 
cin>>a>>b>>c>>d>>i;
a[1]=a*4;
a[2]=b*2;
a[3]=c;
a[4]=d/2;
while(a<maxa(
maxa=a;
}
while(a>maxa&&a<maxb){
maxb=a;
}
if(a[1]=maxa){
cout<<i*a[1];
}
if(a[2]=maxa){
cout<<i*a[2];
}
if(a[3]=maxa){
cout<<i*a[3];
}
if(a[4]=maxa){
cout<<(i/2)*a[4]*2+(i-(i/2)*a[4]*2)*maxb;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: conflicting declaration 'int a [4]'
    5 | int a,b,c,d,a[4],n;
      |             ^
a.cc:5:5: note: previous declaration as 'int a'
    5 | int a,b,c,d,a[4],n;
      |     ^
a.cc:7:18: error: 'i' was not declared in this scope
    7 | cin>>a>>b>>c>>d>>i;
      |                  ^
a.cc:8:2: error: invalid types 'int[int]' for array subscript
    8 | a[1]=a*4;
      |  ^
a.cc:9:2: error: invalid types 'int[int]' for array subscript
    9 | a[2]=b*2;
      |  ^
a.cc:10:2: error: invalid types 'int[int]' for array subscript
   10 | a[3]=c;
      |  ^
a.cc:11:2: error: invalid types 'int[int]' for array subscript
   11 | a[4]=d/2;
      |  ^
a.cc:13:7: error: expected ')' before ';' token
   13 | maxa=a;
      |       ^
      |       )
a.cc:12:13: note: to match this '('
   12 | while(a<maxa(
      |             ^
a.cc:13:7: error: expected ')' before ';' token
   13 | maxa=a;
      |       ^
      |       )
a.cc:12:6: note: to match this '('
   12 | while(a<maxa(
      |      ^
a.cc: At global scope:
a.cc:15:1: error: expected unqualified-id before 'while'
   15 | while(a>maxa&&a<maxb){
      | ^~~~~
a.cc:18:1: error: expected unqualified-id before 'if'
   18 | if(a[1]=maxa){
      | ^~
a.cc:21:1: error: expected unqualified-id before 'if'
   21 | if(a[2]=maxa){
      | ^~
a.cc:24:1: error: expected unqualified-id before 'if'
   24 | if(a[3]=maxa){
      | ^~
a.cc:27:1: error: expected unqualified-id before 'if'
   27 | if(a[4]=maxa){
      | ^~
a.cc:30:1: error: expected unqualified-id before 'return'
   30 | return 0;
      | ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <cstdio>
#include <cmath>
#include <vector>
#include <iostream>
#include <set>
#include <queue>
#include <cstring>
#include <algorithm>
using namespace std;
#define mst(a,b) memset((a),(b),sizeof(a))
#define rush() int T;scanf("%d",&T);while(T--)
 
typedef long long ll;
const int maxn = 100005;
const ll mod = 1e9+7;
const int INF = 0x3f3f3f3f;
const double eps = 1e-9;
 
int n,m;
 
struct node
{
    double price,rate;
    int w;
    int id;
}a[maxn];
 
bool cmp(const node a,const node b)
{
    return a.rate<b.rate;
}
 
int main()
{
    for(int i=1;i<=4;i++)
    {
        scanf("%d",&a[i].w);
        if(i==1) a[i].price=0.25;
        if(i==2) a[i].price=0.50;
        if(i==3) a[i].price=1.00;
        if(i==4) a[i].price=2.00;
        a[i].rate=a[i].w*1.0/a[i].price;
        a[i].id=i;
    }
    scanf("%d",&n);
    sort(a+1,a+5,cmp);
    if(a[1].id!=4)
    {
        //puts("**");
        ll ans=(ll)(1.0*n/(a[1].price))*a[1].w;
        printf("%lld\n",ans);
    }
    else
    {
        if(n%2==0)
        {
            ll ans=(ll)(1.0*n/(a[1].price))*a[1].w;
            printf("%lld\n",ans);
        }
        else
        {
            ll ans=(ll)(1.0*(n-1)/(a[1].price))*a[1].w+(ll)(1.0/(a[2].price))*a[2].w;
            printf("%lld\n",ans);
        }
    }
    return 0;
}

Compiler output:
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |  
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |  
      | ^
a.cc:20:1: error: extended character   is not valid in an identifier
   20 |  
      | ^
a.cc:27:1: error: extended character   is not valid in an identifier
   27 |  
      | ^
a.cc:32:1: error: extended character   is not valid in an identifier
   32 |  
      | ^
a.cc:12:1: error: '\U000000a0' does not name a type
   12 |  
      | ^
a.cc:15:7: error: 'll' does not name a type
   15 | const ll mod = 1e9+7;
      |       ^~
a.cc:18:1: error: '\U000000a0' does not name a type
   18 |  
      | ^
a.cc:20:1: error: '\U000000a0' does not name a type
   20 |  
      | ^
a.cc:26:2: error: 'a' does not name a type
   26 | }a[maxn];
      |  ^
a.cc:27:1: error: '\U000000a0' does not name a type
   27 |  
      | ^
a.cc:32:1: error: '\U000000a0' does not name a type
   32 |  
      | ^
Language: C++


#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,a[4],n;
int maxa=100,maxb=100; 
cin>>a>>b>>c>>d>>i;
a[1]=a*4;
a[2]=b*2;
a[3]=c;
a[4]=d/2;
while(a<maxa){
maxa=a;
}
while(a>maxa&&a<maxb){
maxb=a;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: conflicting declaration 'int a [4]'
    5 | int a,b,c,d,a[4],n;
      |             ^
a.cc:5:5: note: previous declaration as 'int a'
    5 | int a,b,c,d,a[4],n;
      |     ^
a.cc:7:18: error: 'i' was not declared in this scope
    7 | cin>>a>>b>>c>>d>>i;
      |                  ^
a.cc:8:2: error: invalid types 'int[int]' for array subscript
    8 | a[1]=a*4;
      |  ^
a.cc:9:2: error: invalid types 'int[int]' for array subscript
    9 | a[2]=b*2;
      |  ^
a.cc:10:2: error: invalid types 'int[int]' for array subscript
   10 | a[3]=c;
      |  ^
a.cc:11:2: error: invalid types 'int[int]' for array subscript
   11 | a[4]=d/2;
      |  ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

# q:0.25 h:0.5 s:1 d:2
q,h,s,d = gets.chomp.split(" ").map(&:to_i)
n = gets.to_i

menu = { 0.25 => q/0.25,
         0.5  => h/0.5,
         1    => s,
         2    => d/2}

ans = 0
menu.sort{|(s1,p1),(s2,p2)| p1 <=> p2}.each do |size,price|
  num = n/size
  tmp = (price * size * num).to_i
  ans += tmp
  n -= size * num
  break if n <= 0
end

puts ans

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #q
    1 | # q:0.25 h:0.5 s:1 d:2
      |   ^
a.cc:2:1: error: 'q' does not name a type
    2 | q,h,s,d = gets.chomp.split(" ").map(&:to_i)
      | ^
a.cc:10:1: error: 'ans' does not name a type
   10 | ans = 0
      | ^~~
a.cc:11:39: error: expected unqualified-id before '.' token
   11 | menu.sort{|(s1,p1),(s2,p2)| p1 <=> p2}.each do |size,price|
      |                                       ^
Language: C++

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

__int64 n, cost[4], cnt[4],po[4] = {1,2,4,8};
__int64 ans=0;

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

    for(int i = 0; i < 4; i++)cin>>cost[i];
    cin>>n;
    n*=4;

    for(int i = 3; i >= 0; i--){
        cnt[i] = (int)(n/po[i]);
        n -= cnt[i] * po[i];
    }

    for(int i = 2; i >= 0; i--){
        if(2*cost[i] < cost[i+1]){
            cnt[i] += 2 * cnt[i+1];
            cnt[i+1] = 0;
        }
    }
    for(int i = 0; i < 4; i++)ans+=cnt[i]*cost[i];
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    4 | __int64 n, cost[4], cnt[4],po[4] = {1,2,4,8};
      | ^~~~~~~
      | __int64_t
a.cc:5:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | __int64 ans=0;
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:10:36: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   10 |     for(int i = 0; i < 4; i++)cin>>cost[i];
      |                                    ^~~~
      |                                    cosl
a.cc:11:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |     cin>>n;
      |          ^
      |          yn
a.cc:15:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   15 |         cnt[i] = (int)(n/po[i]);
      |         ^~~
      |         int
a.cc:15:26: error: 'po' was not declared in this scope; did you mean 'pow'?
   15 |         cnt[i] = (int)(n/po[i]);
      |                          ^~
      |                          pow
a.cc:20:14: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   20 |         if(2*cost[i] < cost[i+1]){
      |              ^~~~
      |              cosl
a.cc:21:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   21 |             cnt[i] += 2 * cnt[i+1];
      |             ^~~
      |             int
a.cc:25:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |     for(int i = 0; i < 4; i++)ans+=cnt[i]*cost[i];
      |                               ^~~
      |                               abs
a.cc:25:36: error: 'cnt' was not declared in this scope; did you mean 'int'?
   25 |     for(int i = 0; i < 4; i++)ans+=cnt[i]*cost[i];
      |                                    ^~~
      |                                    int
a.cc:25:43: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   25 |     for(int i = 0; i < 4; i++)ans+=cnt[i]*cost[i];
      |                                           ^~~~
      |                                           cosl
a.cc:26:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

//Author: Lixiang
#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
struct A{
	unsigned long long Q,H,S,D,N;
	void init(){
		cin>>Q>>H>>S>>D>>N;
		//scanf("%I64d%I64d%I64d%I64d%I64d",&Q,&H,&S,&D,&N);
	}
	void work(){
		cout<<min((N%2ull==0)?N/2*D:((N-1ull)/2ull*D+min(S,min(H*2ull,Q*4ull))),min(N*S,min(N*H*2ull,N*Q*4ull))))<<endl;
	}
}sol;
int main(){
	sol.init();
	sol.work();
	return 0;
}


Compiler output:
a.cc: In member function 'void A::work()':
a.cc:13:121: error: expected ';' before ')' token
   13 |                 cout<<min((N%2ull==0)?N/2*D:((N-1ull)/2ull*D+min(S,min(H*2ull,Q*4ull))),min(N*S,min(N*H*2ull,N*Q*4ull))))<<endl;
      |                                                                                                                         ^
Language: C++


import java.util.*;

class A {
    public static void main(String... args) {
        final Scanner sc = new Scanner(System.in);
        final int Q = sc.nextInt();
        final int H = sc.nextInt();
        int S = sc.nextInt();
        int D = sc.nextInt();
        final int N = sc.nextInt();
        S = Math.min(S, 2 * Math.min(H, 2 * Q));
        D = Math.min(D, 2 * S);
        System.out.println((long) N / 2 * D + N % 2 * S);
    }
}
public class Main {
    public static void main(String... args) {
        A.main();
    }
}

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:11: error: expected ':' before 'static'
    5 |     public static void main(String... args) {
      |           ^~~~~~~
      |           :
a.cc:5:29: error: 'String' has not been declared
    5 |     public static void main(String... args) {
      |                             ^~~~~~
a.cc:5:39: error: expansion pattern 'int' contains no parameter packs
    5 |     public static void main(String... args) {
      |                                       ^~~~
a.cc:16:2: error: expected ';' after class definition
   16 | }
      |  ^
      |  ;
a.cc: In static member function 'static void A::main(...)':
a.cc:6:9: error: 'final' was not declared in this scope
    6 |         final Scanner sc = new Scanner(System.in);
      |         ^~~~~
a.cc:7:15: error: expected ';' before 'int'
    7 |         final int Q = sc.nextInt();
      |               ^~~
a.cc:8:15: error: expected ';' before 'int'
    8 |         final int H = sc.nextInt();
      |               ^~~
a.cc:9:17: error: 'sc' was not declared in this scope
    9 |         int S = sc.nextInt();
      |                 ^~
a.cc:11:15: error: expected ';' before 'int'
   11 |         final int N = sc.nextInt();
      |               ^~~
a.cc:12:13: error: 'Math' was not declared in this scope
   12 |         S = Math.min(S, 2 * Math.min(H, 2 * Q));
      |             ^~~~
a.cc:12:38: error: 'H' was not declared in this scope
   12 |         S = Math.min(S, 2 * Math.min(H, 2 * Q));
      |                                      ^
a.cc:12:45: error: 'Q' was not declared in this scope
   12 |         S = Math.min(S, 2 * Math.min(H, 2 * Q));
      |                                             ^
a.cc:14:9: error: 'System' was not declared in this scope
   14 |         System.out.println((long) N / 2 * D + N % 2 * S);
      |         ^~~~~~
a.cc:14:35: error: 'N' was not declared in this scope
   14 |         System.out.println((long) N / 2 * D + N % 2 * S);
      |                                   ^
a.cc: At global scope:
a.cc:17:1: error: expected unqualified-id before 'public'
   17 | public class Main {
      | ^~~~~~
Language: C++

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

typedef long long LL;

LL N;

struct node {
  int price;
  int volum;

  bool operator < (const node &rhs) const {
    return (price / (volum * 1.0)) < (rhs.price / (rhs.volum * 1.0));
  }
};

vector<node> all_node;

int main() {
  int volumn = 25;
  int price;
  for(int i = 0; i < 4; i++) {
    cin >> price;
    all_node.push_back( node{price, volumn });
    volumn *= 2;
  }

  cin >> N;

  sort(all_node.begin(), all_node.end());

  N *= 100;
  LL total_cost = 0;

  for(auto &n: all_node) {
    if (N % n.volum == 0) {
      total_cost += (N / n.volum) * n.price;
      break;
    } else {
      total_cost += (N / n.volum) * n.price;
      N -= (N / n.volum) * n.volum;
    }
  }

  cout << total_cost << endl;
  
  return 0;
}


Compiler output:
a.cc:18:1: error: 'vector' does not name a type
   18 | vector<node> all_node;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:25:5: error: 'all_node' was not declared in this scope
   25 |     all_node.push_back( node{price, volumn });
      |     ^~~~~~~~
a.cc:31:8: error: 'all_node' was not declared in this scope
   31 |   sort(all_node.begin(), all_node.end());
      |        ^~~~~~~~
Language: C++

(define Q (read))
(define H (read))
(define S (read))
(define D (read))
(define N (read))

(define lineup
  (sort (list (cons 1 Q) (cons 2 (/ H 2)) (cons 4 (/ S 4)) (cons 8 (/ D 8)))
	(lambda (x y)
	  (< (cdr x) (cdr y)))))
(define (iter remaining cost lu)
  (if (zero? remaining)
      cost
      (let ((unit (car (car lu)))
	    (unitcost (cdr (car lu))))
	(iter (remainder remaining unit)
	      (+ cost (* unit unitcost (quotient remaining unit)))
	      (cdr lu)))))
(display (iter (* N 4)  0 lineup))
(newline)

Compiler output:
a.cc:1:8: error: expected ')' before 'Q'
    1 | (define Q (read))
      | ~      ^~
      |        )
Language: C++

// ConsoleApplication8.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"

#include<iostream>
#include<algorithm>
#include<functional>
#include <string>
#include<iomanip>
#include<cstdio>
#include<math.h>
#include<stack>
#include<queue>
#include<cstring>
#include<vector>
#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EREP(i,n) for(int i=(n-1);i>=0;--i)
#define D(n,retu) REP(i,n){cin>>retu[i];}
#define mod 1000000007
#define MIN -93193111451418101
#define INF 931931114518101
using namespace std;
typedef long long int ll;
template<typename T>
void fill_all(T& arr, const T& v) {
	arr = v;
}
template<typename T, typename ARR>
void fill_all(ARR& arr, const T& v) {
	for (auto& i : arr) { fill_all(i, v); }
}
#define MAX_NUM 50
long long comb[MAX_NUM + 1][MAX_NUM + 1];

ll par[100000], depth[100000];
static void calc_comb()
{
	for (uint32_t i = 0; i <= MAX_NUM; i++) {
		for (uint32_t j = 0; j <= i; j++) {
			if ((j == 0) || (i == j)) {
				comb[i][j] = 1;
			}
			else {
				comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
			}
		}
	}
}


void init(ll n) {
	REP(i, n) {
		par[i] = i;
		depth[i] = 0;
	}
	return;
}

ll find(ll x) {
	if (par[x] == x) { return x; }
	else { return par[x] = find(par[x]); }
}

void merge(ll x, ll y) {
	x = find(x); y = find(y);
	if (x == y) { return; }
	if (depth[x] > depth[y]) {
		par[y] = x;
	}
	else {
		par[x] = y;
		if (depth[x] == depth[y]) {
			depth[y]++;
		}
	}
}

bool same(ll x, ll y) {
	if (find(x) == find(y)) {
		return false;
	}
	return true;
}
int lcs(string X, string Y) {
	const int N = max(X.size(), Y.size()) + 1;
	vector<vector<int> > c(N, vector<int>(N, 0));
	int m = X.size();
	int n = Y.size();
	int maxl = 0;
	X = ' ' + X;
	Y = ' ' + Y;
	for (int i = 1; i <= m; i++) {
		for (int j = 1; j <= n; j++) {
			if (X[i] == Y[j]) c[i][j] = c[i - 1][j - 1] + 1;
			else c[i][j] = max(c[i - 1][j], c[i][j - 1]);
			maxl = max(maxl, c[i][j]);
		}
	}
	return maxl;
}
//------------------変数-----------------------//
//-------------------関数----------------------//

int main() {
	ll n;
	ll q, h, s, d; cin >> q >> h >> s >> d >> n;
	if (q * 2 < h) { h = q * 2; }
	if (h * 2 < s) { s = h * 2; }
	ll ct = 0;
	if (s * 2 < d) { d = s * 2; }
	while (n) {
		if (n /2) {
			ct += n / 2 * d;
			n -= n / 2 * 2;
		}
		else  { ct += n / 1 * s; n = 0; }
	}
	cout << ct << endl;
}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
#include<math.h>

using namespace std;

#define REP(i, n) for(int i=0; i<n; i++)
typedef pair<long long, double> pii;

long long q, h, s, d;
long long p[4];
vector<pii> price;
double n;

int main(){
    cin >> q >> h >> s >> d;
    cin >> n;

    price.push_back(make_pair(q*8, 0.25));
    price.push_back(make_pair(h*4, 0.5));
    price.push_back(make_pair(s*2, 1.0));
    price.push_back(make_pair(d, 2.0));
    sort(price.begin(), price.end());

    long long sum = 0;
    REP(i, 4){
        long long c = floor(n / price[i].second);
        sum += c * price[i].first * price[i].second / 2.0;
        n -= c * price[i].second;
    }
    cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   23 |     sort(price.begin(), price.end());
      |     ^~~~
      |     sqrt
Language: C++

#include<iostream>
#include <list>
#include<stack>
#include<queue>
#include <vector>
#include <set>
#include <map>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<string>
#include"time.h"
using namespace std;

#define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++)
#define REP(i,n) FOR((i),0,(n))
#define LL long long
#define CLR(a) memset((a),0,sizeof(a))
#define SZ(x) (int((x).size()))
#define dump(x)  cerr << #x << " = " << (x) << endl

//毎回変える場所
#define N_MAX 200
#define INF 922337203685477580

//問題文のとおり
LL Q,H,S,D,N;
LL ans=INF;
LL ansTemp;
LL NTemp;
int main() {
	cin>>Q>>H>>S>>D>>N;
	//1
	NTemp=N;
	ansTemp=NTemp*4*Q;
	ans=min(N*4*Q,ans);
	//2
	ans=min(N*2*H,ans);
	//3
	ans=min(N*S,ans);
	//4
	ans=min(LL(N/2)*D+S*(N%2),ans);
	//5
	ans = min((N / 2)*D + H*(N % 2) * 2, ans);
	//6
	ans = min((N / 2)*D + Q*(N % 2) * 4, ans);

	cout<<ans<<endl;
	//cin>>N;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: expected primary-expression before 'long'
   17 | #define LL long long
      |            ^~~~
a.cc:42:17: note: in expansion of macro 'LL'
   42 |         ans=min(LL(N/2)*D+S*(N%2),ans);
      |                 ^~
Language: C++

#include <cstdio>
#include <algorithm>
#pragma warning (disable : 4996)

int main()
{
	int q, h, s, d, n;
	long long ans = 0;
	scanf("%d%d%d%d%d", &q, &h, &s, &d, &n);
	if (s * 2 > d&&h * 4 > d&&q * 8 > d)
	{
		ans = long long(n / 2)*d;
		n &= 1;
	}
	int mi = std::min(s, std::min(h * 2, q * 4));
	ans += (long long)n*mi;
	printf("%lld", ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: expected primary-expression before 'long'
   12 |                 ans = long long(n / 2)*d;
      |                       ^~~~
Language: C++

#include<iostream>
#include<math.h>
#include<set>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#include<string>
#include<bitset>
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
typedef long long ll;
using namespace std;
long long inf = 1LL << 62;
static long parseans(long j, long l)
{
    string k = "";
    long ps = 0;
    for (long long i = (long long) j; i <= l; ++i)
    {
        ps *= 10;
        ps += k[i] - '0';
    }
    return ps;
}

int cur = 1;

static long gcd(long a, long b)
{
    if (b == 0)
    {
        return a;
    }
    else
    {
        return gcd(b, a % b);
    }
}

static bool pri(long long k)
{
    if (k == 1LL) return false;
    for (long long i = 2; i * i <= k; i++)
    {
        
        if (k % i == 0) return false;
    }
    return true;
}

double binpow (double a, ll n) {
    if (n == 0)
        return 1;
    if (n % 2 == 1)
        return binpow (a, n-1) * a;
    else {
        int b = binpow (a, n/2);
        return b * b;
    }
}
vector<int> calcz (string s)
{
    int n = s.length();
    vector<int> z (n);
    int l = 0, r = 0;
    for (int i = 1 ; i<n; i++)
    {
        if (i <= r)
        {
            z[i] = min (r - i+ 1, z[i - l]);
        }
        while (i + z[i] < n && s[ z[i] ] == s[i + z[i] ]) z[i]++;
        if (i + z[i] - 1 > r)
        {
            l = i;
            r = i + z[i] - 1;
        }
    }
    return z;
}


vector<int> calcpref(string s)
{
    vector<int> p(s.size() + 1);
    int n = s.length();
    p[0] = 0;
    for (int i = 2; i <= n; i++)
    {
        p[i] = p[i - 1];
        while (p[i] > 0 && s[p[i]] !=s[i-1]) p[i] = p[p[i]];
        if (s[p[i]] == s[i-1]) p[i]++;
    }
    return p;
}


int main()
{
    ios_base:: sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll q , n , h , d , s;
    cin >> q >> h >> s >> d >> n;
    ll a =  4 * q;
    ll b = 2 * h;
    ll c = s;
    ll ans = LONG_LONG_MAX;
    if(n == 1)
    {
        ans = min(ans , a);
        ans = min(ans , b);
        ans = min(ans , c);
    }
    else
    if(n % 2 == 0)
    {
        ans = n / 2 * d;
        ans = min(ans , n * a);
        ans = min(ans , n * b);
        ans = min(ans , n * c);
    }
    else
    {
        ans = min(ans , n * a);
        ans = min(ans , n * b);
        ans = min(ans , n * c);
        ans = min(ans , (n - 1) / 2 * d + a);
        ans = min(ans , (n - 1) / 2 * d + b);
        ans = min(ans , (n - 1) / 2 * d + c);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:112:14: error: 'LONG_LONG_MAX' was not declared in this scope
  112 |     ll ans = LONG_LONG_MAX;
      |              ^~~~~~~~~~~~~
Language: C++

#include<iostream>
#include <list>
#include<stack>
#include<queue>
#include <vector>
#include <set>
#include <map>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<string>
#include"time.h"
using namespace std;

#define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++)
#define REP(i,n) FOR((i),0,(n))
#define LL long long
#define CLR(a) memset((a),0,sizeof(a))
#define SZ(x) (int((x).size()))
#define dump(x)  cerr << #x << " = " << (x) << endl

//毎回変える場所
#define N_MAX 200
#define INF 922337203685477580

//問題文のとおり
LL Q,H,S,D,N;
LL ans=INF;
LL ansTemp;
LL NTemp;
int main() {
	cin>>Q>>H>>S>>D>>N;
	//1
	NTemp=N;
	ansTemp=NTemp*4*Q;
	ans=min(N*4*Q,ans);
	//2
	ans=min(N*2*H,ans);
	//3
	ans=min(N*S,ans);
	//4
	ans=min(LL(N/2)*D+S*(N%2),ans);
	//5
	ans = min(LL(N / 2)*D + H*(N % 2) * 2, ans);
	//6
	ans = min(LL(N / 2)*D + Q*(N % 2) * 4, ans);

	cout<<ans<<endl;
	//cin>>N;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: expected primary-expression before 'long'
   17 | #define LL long long
      |            ^~~~
a.cc:42:17: note: in expansion of macro 'LL'
   42 |         ans=min(LL(N/2)*D+S*(N%2),ans);
      |                 ^~
a.cc:17:12: error: expected primary-expression before 'long'
   17 | #define LL long long
      |            ^~~~
a.cc:44:19: note: in expansion of macro 'LL'
   44 |         ans = min(LL(N / 2)*D + H*(N % 2) * 2, ans);
      |                   ^~
a.cc:17:12: error: expected primary-expression before 'long'
   17 | #define LL long long
      |            ^~~~
a.cc:46:19: note: in expansion of macro 'LL'
   46 |         ans = min(LL(N / 2)*D + Q*(N % 2) * 4, ans);
      |                   ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<functional>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<unordered_set>
#include<unordered_map>
#define P pair<double,double>
using namespace std;

P a[4];
signed main() {
	double b, c, d, e; cin >> b >> c >> d >> e;
	double S; cin >> S;
	a[0] = { b * 4,0.25 };
	a[1] = { c * 2,0.5 };
	a[2] = { d * 1,1 };
	a[3] = { e * 0.5,2 };
	sort(a, a + 4);
	long long ans = 0;
	for (long long i = 0; i < 4; i++) {
		long long f = long long(S / a[i].second);
		ans += f*a[i].first*a[i].second;
		S -= f*a[i].second;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:31: error: expected primary-expression before 'long'
   25 |                 long long f = long long(S / a[i].second);
      |                               ^~~~
Language: Java

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

public class Stress {



    public void solve() throws IOException {
        int q = nextInt(), h = nextInt(), s = nextInt(), d = nextInt();
        long n = nextInt();
        if(h > 2 * q){
            h = 2 * q;
        }
        if(s > 2 * h){
            s = 2 * h;
        }
        if(d > 2 * s){
            d = 2 * s;
        }
        long res = 0;
        if(d <= 2 * s){
            res += n / 2 * d;
            res += (n % 2) * s;
        }else{
            res = n * s;
        }
        out.print(res);
    }

    BufferedReader br;
    StringTokenizer sc;
    PrintWriter out;

    public static void main(String[] args) throws IOException {
        Locale.setDefault(Locale.US);
        new Stress().run();
    }

    void run() throws IOException {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
//            br = new BufferedReader(new FileReader("reverse.in"));
//            out = new PrintWriter(new File("reverse.out"));
            solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    String nextToken() throws IOException {
        while (sc == null || !sc.hasMoreTokens()) {
            try {
                sc = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return sc.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
}

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

#include <cstdio>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <vector>
#include <iostream>
#include <ctime>
#include <unistd.h>

using namespace std;

#define TRACE(x) cerr << #x <<  " = " << x << endl
#define _ << " " <<
#define FOR(i, a, b) for (int i=(a); i<(b); i++)
#define REP(i, n) FOR(i, 0, n)

#define X first
#define Y second

typedef pair<int, int> P;
typedef long long ll;

int sz[4] = {1, 2, 4, 8}, cij[4];

int main()
{
  REP(i, 4) scanf("%d", &cij[i]);
  ll kol;
  scanf("%lld", &kol);

  kol *= 4;

  int mn[4];
  
  REP(i, 4) {
    ll tmp = -1;
    REP(j, i+1) {
      ll ncij = cij[j] << (i-j);
      if (ncij < tmp || tmp == -1)
	tmp = ncij;
    }
    mn[i] 1= tmp;
  }

  ll rje = kol / 8 * mn[3];
  kol %= 8;
  
  REP(i, 4)
    if (kol >> i & 1)
      rje += mn[i];

  printf("%lld\n", rje);
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:10: error: expected ';' before numeric constant
   42 |     mn[i] 1= tmp;
      |          ^~
      |          ;
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<functional>
#include<vector>
#include<map>
#include<string>
#include<set>
#include<unordered_set>
#include<unordered_map>
#define P pair<double,double>
#define int long long
using namespace std;

P a[4];
signed main() {
	double b, c, d, e; cin >> b >> c >> d >> e;
	double S; cin >> S;
	a[0] = { b * 4,0.25 };
	a[1] = { c * 2,0.5 };
	a[2] = { d * 1,1 };
	a[3] = { e * 0.5,2 };
	sort(a, a + 4);
	int ans = 0;
	for (int i = 0; i < 4; i++) {
		int f = int(S / a[i].second);
		ans += f*a[i].first*a[i].second;
		S -= f*a[i].second;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before 'long'
   12 | #define int long long
      |             ^~~~
a.cc:26:25: note: in expansion of macro 'int'
   26 |                 int f = int(S / a[i].second);
      |                         ^~~
Language: C++

#include <iostream>
#include <vector>
#include <argorithm>

using namespace std;

typedef long long LL;

int main(){
    LL Q, H, S, D, N;
    cin >> Q >> H >> S >> D >> N;
    LL d = N / 2;
    LL r = N % 2;
    LL ans = d * min(S*2, D) + r * min(Q*4, min(H*2, S));
    cout << ans << endl;
    return 0;
}



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

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <cmath>
#include <list>
#include <chrono>
#include <thread>
#include <thread>
#include <fstream>

using namespace std;

//const bool debug = false;

#ifndef M_PI
    const double M_PI = acos(-1.0);
#endif // M_PI

#define y1 roman_kaban
#define rank oryshych_konb
#define ull unsigned long long
#define ll long long
const int mod = int(1e9) + 7;
//const int inf = 1e7;
//const long long infLL = 1e16;
//const int MX2 = 10100500; //  e7
//const long long INF = 1e18 + 0.5;
const int MX = 100500; //       e6


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    //freopen("/Users/ozzy/Documents/in.txt","r", stdin);
    for(int i = 0; i < 4; i++){
        cin >> a[i];
    }
    for(int i = 1; i < 4; i++){
        a[i] = min(a[i], 2 * a[i - 1]);
    }
    int n;
    cin >> n;
    long long ans = n / 2; ans *= a[3];
    if(n & 1) ans += a[2];
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:16: error: 'a' was not declared in this scope
   41 |         cin >> a[i];
      |                ^
a.cc:44:9: error: 'a' was not declared in this scope
   44 |         a[i] = min(a[i], 2 * a[i - 1]);
      |         ^
a.cc:48:35: error: 'a' was not declared in this scope
   48 |     long long ans = n / 2; ans *= a[3];
      |                                   ^