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

#include <iostream>
#include <algorithm>
using namespace std;
int main(int argc, char const *argv[])
{
    int a, b, c, d, e, f, l, r;
    double mi = 0.0;
    l = r = 0;
    cin >> a >> b >> c >> d >> e >> f;
    int n = __gcd(100*a, 100*b), m = __gcd(c, d);
    for (int i = 0; i <= f; i++)
        for (int j = 0; j+i <= f; j++)
            if ((i%n==0 || i%(a*100)==0 || i％(b*100)==0) && (j%m==0||j%c==0||j%d==0) && j*100 <= i*e)
                if ((double)j/(i+j) >= mi) {
                    l = i, r = j;
                    mi = (double)j/(i+j);
                }
    cout << l+r << " " << r << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:13:44: error: 'i\U0000ff05' was not declared in this scope
   13 |             if ((i%n==0 || i%(a*100)==0 || i％(b*100)==0) && (j%m==0||j%c==0||j%d==0) && j*100 <= i*e)
      |                                            ^~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(int argc, char const *argv[])
{
    int a, b, c, d, e, f, l, r;
    double mi = 0.0;
    l = r = 0;
    cin >> a >> b >> c >> d >> e >> f;
    int n = __gcd(100*a, 100*b), m = __gcd(c, d);
    for (int i = 0; i <= f; i++)
        for (int j = 0; j+i <= f; j++)
            if ((i%n == 0 || i%(a*100)==0 || i％(b*100)==0) && (j%m == 0||j%c==0||j%d==0) && j*100 <= i*e)
                if ((double)j/(i+j) >= mi) {
                    l = i, r = j;
                    mi = (double)j/(i+j);
                }
    cout << l+r << " " << r << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:13:46: error: 'i\U0000ff05' was not declared in this scope
   13 |             if ((i%n == 0 || i%(a*100)==0 || i％(b*100)==0) && (j%m == 0||j%c==0||j%d==0) && j*100 <= i*e)
      |                                              ^~~
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        System.out.println();
    }

    private static String solve(Scanner scanner) {
        String[] split = scanner.nextLine().split(" ");

        int A = Integer.parseInt(split[0]);
        int B = Integer.parseInt(split[1]);
        int C = Integer.parseInt(split[2]);
        int D = Integer.parseInt(split[3]);
        int E = Integer.parseInt(split[4]);
        int F = Integer.parseInt(split[5]);
    }
}


Compiler output:
Main.java:17: error: missing return statement
    }
    ^
1 error
Language: C++

#include <iostream>
using namespace std;

int main(void){
    int  A, B, C, D, E, F;
    cin>>A>>B>>C>>D>>E>>F;
    A *= 100, B *= 100;

    int suger[100], water[10000];
    int k = 0,      l = 0;
    for(int i=0; A*i<=F || B*j<=F; i++){
        for(int j=0; (A*i + B*j)<=F || (A*i + B*j)<=F; j++){
            if( (A*i + B*j)<=F ) suger[k++] = A*i + B*j;
            if( (C*i + D+j)<=F ) water[l++] = C*i + D*j;
        }
    }

    int ansSuger = 0, ansWater = 0;
    for(int i = 0; i < k; i++){
        for(int j = 0; j < l; j++){
            if( suger[i]+water[j] <= F ){               //F以下？
                if( 100*suger[i] <= water[j]*E ){       //E以下？
                    if( ansWater*suger[i] >= water[j]*ansSuger ){
                        ansSuger = suger[i];
                        ansWater = water[j];
                    }
                }
            }
        }
    }

    cout << ansSuger+ansWater << ansSuger << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: 'j' was not declared in this scope
   11 |     for(int i=0; A*i<=F || B*j<=F; i++){
      |                              ^
Language: C++

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

/*
int dp[3030]; // given i amount of water, how much sugar can i get?
int ps[3030]; // what the most sugar i can get that has weight <= i?

int a,b,c,d,e,f;
double density;
int sugar_water, dissolved_sugar;
int main(){
  scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);

  ps[0] = 0;

  for(int i = 0; i <= f; i++){
    if(i > 0) ps[i] = max(ps[i], ps[i-1]);

    if(i+c <= f){
      ps[i+c] = max(ps[i+c], ps[i] + c);
    }

    if(i+d <= f){
      ps[i+d] = max(ps[i+d], ps[i] + d);
    }
  }

  for(int i = 1; i <= f; i++){
    dp[i] = -1;
  }

  dp[0] = 0;

  for(int i = 0; i <= f; i+= 100){
    if(dp[i] != -1){
      if(i + 100*a <= f){
        dp[i+100*a] = 0;
      }

      if(i+100*b <= f){
        dp[i+100*b] = 0;
      }
    }
  }


  for(int i = 100; i <= f; i+=100){
    if(dp[i] != -1){
      int sugar_limit = min(e*i/100, f-i);
      dp[i] = ps[sugar_limit];
      double current_density = (double)dp[i]/(i+dp[i]);
      // printf("%d %d %f\n", i, sugar_limit, current_density);
      if(current_density > density){
        sugar_water = i+dp[i];
        dissolved_sugar = dp[i];
        density = current_density;
      }
    }
  }

  printf("%d %d\n", sugar_water, dissolved_sugar);

  return 0;
}
*/

vector<int> water, sugar;
int main(){
  scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);

  for(int i = 0; i*100*a <= f; i++){
    for(int j = 0; j*100*b <= f; j++){
      if(j != 0 || i != 0) water.push_back(i*100*a + j*100*b);
    }
  }

  for(int i = 0; i*c <= f; i++){
    for(int j = 0; j*d <= f; j++){
      if(j != 0 || i != 0) sugar.push_back(i*c + j*d);
    }
  }

  double max_density = 0.0;
  int max_sw = 0, max_sugar = 0;

  for(auto w: water){
    for(auto s: sugar){
      if(w+s <= f && s <= e*w/100){
        double den = (double)s/(w+s);
        if(den > max_density){
          max_sugar = s;
          max_sw = s+w;
        }
      }

    }
  }

  printf("%d %d\n", max_sw, max_sugar);

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:69:26: error: 'a' was not declared in this scope
   69 |   scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
      |                          ^
a.cc:69:30: error: 'b' was not declared in this scope
   69 |   scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
      |                              ^
a.cc:69:34: error: 'c' was not declared in this scope
   69 |   scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
      |                                  ^
a.cc:69:38: error: 'd' was not declared in this scope
   69 |   scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
      |                                      ^
a.cc:69:42: error: 'e' was not declared in this scope
   69 |   scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
      |                                          ^
a.cc:69:46: error: 'f' was not declared in this scope
   69 |   scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
      |                                              ^
Language: C++

#include<iostream>
#include <vector>

using namespace std;

int main() {



    // 整数の入力 スペース区切りの整数の入力
    int A, B, C, D, E, F;
    cin >> A >> B >> C >> D >> E >> F;


    int w_suger_water = 0;
    int w_suger = 0;

    int current_water_mass = 0;

   // std::vector<int> beaker_state;


    std::vector<int> water_paterrn;
    for (int a = 1; a <= 30; a++) {
        for (int b = 0; b <= 30; b++) {

            int watter = ((a * A )+ (b * B)) * 100;
            if (watter <= F) {

                water_paterrn.push_back(watter);
            }

        }

    }


/*
    for (const auto &p : water_paterrn) {

        cout << p << endl;
    }
*/

    std::vector<double> result;
    std::vector<pair<int, int>> finalresult;


    for (int i = 0; i < water_paterrn.size(); i++) {

        int enable_suger_max = (int) ((water_paterrn[i] / 100) * E);


        int allsuger = 0;
        int water_and_suger_mass = 0;//water_paterrn[i];
        double concentration = 0;
        //
        double max_concentration = 0;
        int max_allsuger = 0;
        int max_water_and_suger = 0;

        for (int iter_c = 0; iter_c <= enable_suger_max; iter_c++) {

            for (int iter_d = 0; iter_d <= enable_suger_max; iter_d++) {

                allsuger = (iter_c * C) + (iter_d * D);
                water_and_suger_mass = water_paterrn[i] + allsuger;

                if ((water_and_suger_mass < F ) && ( enable_suger_max >= allsuger) && (water_and_suger_mass !=0)) {

                    double j=allsuger;
                    double k=water_and_suger_mass;
                    concentration = (100.0*j)/k;

                    if (concentration > max_concentration) {
                        max_concentration = concentration;
                        max_allsuger = allsuger;
                        max_water_and_suger = water_and_suger_mass;
                    }

                }
            }

        }

        result.push_back(max_concentration);
        finalresult.emplace_back(max_water_and_suger, max_allsuger);
    }

    //
    std::vector<auto>::iterator iter2 = std::max_element(result.begin(), result.end());
    size_t index2 = static_cast<size_t>(std::distance(result.begin(), iter2));


    w_suger_water = finalresult[index2].first;
    w_suger = finalresult[index2].second;


// 出力
    cout << w_suger_water << " " << w_suger << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:91:21: error: template argument 1 is invalid
   91 |     std::vector<auto>::iterator iter2 = std::max_element(result.begin(), result.end());
      |                     ^
a.cc:91:21: error: template argument 2 is invalid
a.cc:91:33: error: qualified-id in declaration before 'iter2'
   91 |     std::vector<auto>::iterator iter2 = std::max_element(result.begin(), result.end());
      |                                 ^~~~~
a.cc:92:71: error: 'iter2' was not declared in this scope
   92 |     size_t index2 = static_cast<size_t>(std::distance(result.begin(), iter2));
      |                                                                       ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int maxn=1010;
int n,d[maxn][maxn];
void add(int a,int b) {
	for (int i=a;i<=n;i+=i&(-i))
		for (int j=b;j<=n;j+=j&(-j)) {
			d[i][j]++;
		}
}
int query(int a,int b) {
	int res=0;
	for (int i=a;i>=1;i-=i&(-i))
		for (int j=b;j>=1;j-=j&(-j)) {
			res+=d[i][j];
		}
	return res;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main(){
	int a,b,c,d,e,f;
	vector<int> vx,vy;
	int m=0;
    cin>>a>>b>>c>>d>>e>>f;
	rep(i,f){
		rep(j,f){vx.push_back(100*a*i+100*b*j);
		vy.push_back(c*i+d*j);
		}
	}
	rep(i,vx.size()){s
		rep(j,vy.size()){
		m=max(m,((100*vy[j])/(vx[i]+vy[i])));
		}
	}
	cout<<m;
	
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: 's' was not declared in this scope
   16 |         rep(i,vx.size()){s
      |                          ^
a.cc:17:21: error: 'j' was not declared in this scope
   17 |                 rep(j,vy.size()){
      |                     ^
a.cc:4:33: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int (i)=0;(i)<n;i++)
      |                                 ^
Language: C++

#include <bits/stdc++.h>  
using namespace std;  
  
const int N = 3000;  
  
int a,b,c,d,e,f,ans,total;  
int dp[N+10][N+10];  
  
void dfs(int sugar,int water){  
    if (dp[sugar][water]!=-1) return;  
    dp[sugar][water] = 1;  
    if (sugar*100>e*water) return;  
    if (sugar+water>f) return;  
    if (total==0 || sugar*total>ans*(sugar+water)){  
        if (water>0){  
            ans = sugar;  
            total = sugar + water;  
        }  
    }  
    dfs(sugar,water+100*a);  
    dfs(sugar,water+100*b);  
    dfs(sugar+c,water);  
    dfs(sugar+d,water);  
}  
  
int main(){  
    //freopen("F:\\rush.txt","r",stdin);  
    memset(dp,255,sizeof dp);  
    ios::sync_with_stdio(0),cin.tie(0);  
    cin >> a >> b >> c >> d >> e >> f;  
    dfs(0,0);  
    cout << total << ' '<< ans << endl;  
    return 

Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: expected primary-expression at end of input
   33 |     return
      |           ^
a.cc:33:11: error: expected ';' at end of input
   33 |     return
      |           ^
      |           ;
a.cc:33:11: error: expected '}' at end of input
a.cc:26:11: note: to match this '{'
   26 | int main(){
      |           ^
Language: C++

// 答えとなる水の量と砂糖の量，砂糖水の濃度。
// 砂糖の量は0グラムになる可能性があるが，水は0グラムだと不正解になる
// Fは100*Aよりは大きいという制限があるので，初期値として100*Aを入れておく
int water = 100 * A;
int sugar = 0;
double noudo = 0.0;
// Eから導出される，答えとなる濃度の最大値。
// これを越えてしまうと不正解。
double maxn = 100.0 * E / (100.0 + E);

// 各操作を何回行うかをi1, i2, i3, i4として全ての場合を求める
for (int i1 = 0; i1 <= F / A * 100; i1++) {
    for (int i2 = 0; i2 <= F / B * 100; i2++) {
        // この組み合わせの時点で総量がFグラムを越えていたらスキップする
        if (i1 * A * 100 + i2 * B * 100 > F) {
            break;
        }
        
        for (int i3 = 0; i3 <= F / C; i3++) {
            // この組み合わせの時点で総量がFグラムを越えていたらスキップする
            if (i1 * A * 100 + i2 * B * 100 + i3 * C > F) {
                break;
            }                    
            
            for (int i4 = 0; i4 <= F / D; i4++) {
                // i1~i4の組み合わせでの水と砂糖の量を計算する                        
                int w = 100 * A * i1 + 100 * B * i2;
                int s = C * i3 + D * i4;
                // Fを越えていたらスキップ
                if (w + s > F) {
                    break;
                }
                // 濃度を求める
                double n = 100.0 * s / (w + s);
                // 濃度がEから求められる最大値を越えておらず，
                // 今までの計算の中での最大値より大きければその答えを保持する
                if (n <= maxn && noudo < n) {
                    noudo = n;
                    water = w;
                    sugar = s;
                }
            }                       
        }
    }           
}

Compiler output:
a.cc:4:19: error: 'A' was not declared in this scope
    4 | int water = 100 * A;
      |                   ^
a.cc:9:23: error: 'E' was not declared in this scope
    9 | double maxn = 100.0 * E / (100.0 + E);
      |                       ^
a.cc:9:36: error: 'E' was not declared in this scope
    9 | double maxn = 100.0 * E / (100.0 + E);
      |                                    ^
a.cc:12:1: error: expected unqualified-id before 'for'
   12 | for (int i1 = 0; i1 <= F / A * 100; i1++) {
      | ^~~
a.cc:12:18: error: 'i1' does not name a type
   12 | for (int i1 = 0; i1 <= F / A * 100; i1++) {
      |                  ^~
a.cc:12:37: error: 'i1' does not name a type
   12 | for (int i1 = 0; i1 <= F / A * 100; i1++) {
      |                                     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define x first
#define y second
#define dbg(x) cout << #x << '=' << x << '\n';
#define ll long long
#define pi pair<int,int>
#define pl pair<long long,long long>
#define lg length()
#define pb push_back
#define MAXN 100005
#define INF 1000000005
#define LINF 1000000000000000005

int a,b,c,d,e,f,p[3005],q[3005],x,y;

double t;

int32_t main(){
    ios_base :: sync_with_stdio(0); cin.tie(); cout.tie();
    cin >> a >> b >> c >> d >> e >> f;
    for(int i=0;i<=3000;i++){
        for(int j=0;j<=3000;j++){
            if(i*c+j*d>f) continue;
            p[i*c+j*d]=1;
        }
    }
    for(int i=0;i<=3000;i++){
        for(int j=0;j<=3000;j++){
            if(i*a*100+j*b*100>f) continue;
            q[i*a*100+j*b*100]=1;
        }
    }
    for(int i=0;i<=3000;i++){
        for(int j=0;j<=3000;j++){s
            if(p[i] && q[j] && i+j<=f && 100*i<=j*e && (double)i/(i+j)>t){
                t=(double)i/(i+j);
                x=i+j; y=i;
            }
        }
    }
    cout << x << ' ' << y;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:35:34: error: 's' was not declared in this scope
   35 |         for(int j=0;j<=3000;j++){s
      |                                  ^
Language: C++

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author ZYCSwing
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int d = in.nextInt();
            int e = in.nextInt();
            int f = in.nextInt();

            int res = 0, sugar = 0;

            for (int va = 0; va <= f; va += 100 * a) {
                for (int vb = 0; va + vb <= f; vb += 100 * b) {
                    int water = va + vb;
                    int upper = water / 100 * e;
                    for (int vc = 0; water + vc <= f && vc <= upper; vc += c) {
                        for (int vd = 0; water + vc + vd <= f && vc + vd <= upper; vd += d) {
                            if (sugar == 0) {
                                sugar = vc + vd;
                                res = water + sugar;
                            } else {
                                if ((vc + vd) * res > sugar * (water + vc + vd)) {
                                    sugar = vc + vd;
                                    res = water + sugar;
                                }
                            }
                        }
                    }
                }
            }

            System.out.println(res + " " + sugar);
        }

    }
}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.OutputStream;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStream;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.PrintStream;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.Scanner;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:1: error: expected unqualified-id before 'public'
   14 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

const int MAX = 111;
int a, b, c, d, e, f;

int main() {
  cin >> a >> b >> c >> d >> e >> f;
  for (int i = 0; i < MAX; i++) {
    for (int j = 0; j < MAX; j++) {
      for (int k = 0; k < MAX; k++) {
        for (int l = 0; l < MAX; l++) {
          dp[i][j][k][l] = -1;
        }
      }
    }
  }
  long double ma = -1;
  int total = 0, sugar = 0;
  for (int i = 0; i < MAX; i++) {
    for (int j = 0; j < MAX; j++) {
      for (int k = 0; k < MAX; k++) {
        for (int l = 0; l < MAX; l++) {
          const int sugarGram = k * c + l * d;
          const int waterGram = 100 * i * a + 100 * j * b;
          const int totalGram = waterGram + sugarGram;
          if (totalGram > f) {
            continue;
          }
          if ((waterGram / 100) * e < sugarGram) {
            continue;
          }
          const long double noudo = 100. * sugarGram / totalGram;
          if (ma < noudo) {
            ma = noudo;
            total = totalGram;
            sugar = sugarGram;
          }
        }
      }
    }
  }
  cout << total << " " << sugar << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'dp' was not declared in this scope; did you mean 'dup'?
   14 |           dp[i][j][k][l] = -1;
      |           ^~
      |           dup
Language: C++

import sys
import socket

if socket.gethostname() == 'N551J':
    sys.stdin = open('a1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_int():
    return int(input())


def read_str_list():
    return input().split()


def read_str():
    return input()


def solve():
    a, b, c, d, e, f = read_int_list()
    best_sugar = 0
    best_total = a
    for i in range(31):
        for j in range(31):
            if (i, j) != (0, 0):
                for k in range(3001):
                    water = i * 100 * a + j * 100 * b
                    if water + k * c <= f and k * c * 100 <= water * e:
                        l1 = int((f - water - k * c) / d)
                        l2 = int((water * e / 100 - k * c) / d)
                        l = min(l1, l2)
                        sugar = k * c + l * d
                        total = water + sugar
                        density = sugar / total
                        best_density = best_sugar / best_total
                        if density > best_density:
                            best_sugar = sugar
                            best_total = total
    return best_total, best_sugar


def main():
    res = solve()
    print(*res)


if __name__ == '__main__':
    main()


Compiler output:
a.cc:4:28: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    4 | if socket.gethostname() == 'N551J':
      |                            ^~~~~~~
a.cc:5:22: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |     sys.stdin = open('a1.in')
      |                      ^~~~~~~
a.cc:52:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   52 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
 
typedef long double dbl;
 
const int maxv = 3005;
 
dbl cmp(pair<int, int> a)
{
	if(a.first && a.second) return ((100*a.second)/(a.first+a.second));
	else return -1;
}
 
int main(void)
{
	int a, b, c, d, e, f;
	scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
 
	vector<int> poss;
	for(int i = 0;i < maxv;i++)
	{
		for(int j = 0;j < maxv;j++) poss.push_back(-(i*c+j*d));
	}
 
	sort(poss.begin(), poss.end());
	poss.resize(int(unique(poss.begin(), poss.end())-poss.begin()));
 
	pair<int, int> cur = {0, 0};
	for(int i = 0;i < maxv;i++)
	{
		for(int j = 0;j < maxv;j++)
		{
			int w = (i*a+j*b)*100;
			if(w > f) continue;
			int maxd = min(f-w, e*(w/100));
			int r = (-*lower_bound(poss.begin(), poss.end(), -maxd));
			if(cmp(cur) <= cmp({w, r})) cur = {w, r};
		}
	}
	printf("%d %d\n", cur.first+cur.second, cur.second);
}
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
 
typedef long double dbl;
 
const int maxv = 3005;
 
dbl cmp(pair<int, int> a)
{
	if(a.first && a.second) return (a.second/(a.first+a.second));
	else return -1;
}
 
int main(void)
{
	int a, b, c, d, e, f;
	scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
 
	vector<int> poss;
	for(int i = 0;i < maxv;i++)
	{
		for(int j = 0;j < maxv;j++) poss.push_back(-(i*c+j*d));
	}
 
	sort(poss.begin(), poss.end());
	poss.resize(int(unique(poss.begin(), poss.end())-poss.begin()));
 
	pair<int, int> cur = {0, 0};
	for(int i = 0;i < maxv;i++)
	{
		for(int j = 0;j < maxv;j++)
		{
			int w = (i*a+j*b)*100;
			if(w > f) continue;
			int maxd = min(f-w, e*(w/100));
			int r = (-*lower_bound(poss.begin(), poss.end(), -maxd));
			if(cmp(cur) <= cmp({w, r})) cur = {w, r};
		}
	}
	printf("%d %d\n", cur.first+cur.second, cur.second);
}


Compiler output:
a.cc:53:11: error: redefinition of 'const int maxv'
   53 | const int maxv = 3005;
      |           ^~~~
a.cc:9:11: note: 'const int maxv' previously defined here
    9 | const int maxv = 3005;
      |           ^~~~
a.cc:55:5: error: redefinition of 'dbl cmp(std::pair<int, int>)'
   55 | dbl cmp(pair<int, int> a)
      |     ^~~
a.cc:11:5: note: 'dbl cmp(std::pair<int, int>)' previously defined here
   11 | dbl cmp(pair<int, int> a)
      |     ^~~
a.cc:61:5: error: redefinition of 'int main()'
   61 | int main(void)
      |     ^~~~
a.cc:17:5: note: 'int main()' previously defined here
   17 | int main(void)
      |     ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;

const int maxv = 3005;

double cmp(pair<int, int> a)
{
	if(a.first && a.second) return ((100*a.second)/(a.first+a.second));
	else return 0;
}

int main(void)
{
	int a, b, c, d, e, f;
	scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);

	vector<int> poss;
	for(int i = 0;i < maxv;i++)
	{
		for(int j = 0;j < maxv;j++) poss.push_back(-(i*c+j*d));
	}

	sort(poss.begin(), poss.end());
	poss.resize(int(unique(poss.begin(), poss.end())-poss.begin()));

	pair<int, int> cur = {0, 0};
	for(int i = 0;i < maxv;i++)
	{
		for(int j = 0;j < maxv;j++)
		{
			int w = (i*a+j*b)*100;
			if(w > f) continue;
			int maxd = min(f-w, e*(w/100));
			int r = (-*lower_bound(poss.begin(), poss.end(), -maxd));
			if(cmp(cur) < cmp({w, r})) cur = {w, r};
		}
	}
	printf("%d %d\n", cur.first+cur.second, cur.second);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |         sort(poss.begin(), poss.end());
      |         ^~~~
      |         short
a.cc:26:25: error: 'unique' was not declared in this scope
   26 |         poss.resize(int(unique(poss.begin(), poss.end())-poss.begin()));
      |                         ^~~~~~
Language: C++

#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0), cin.tie(0)
#define RI(x) x = rit()
#define RII(a,b) a = rit(), b = rit()
#define RIII(a,b,c) a = rit(), b = rit(), c = rit()
#define REP(I, N) for(int I=0;I<(N);I++)
#define REPP(I, N) for(int I=1;I<=(N);I++)
#define SZ(x) (int)(x).size()
#define P pair<int, int>
#define F first
#define S second
#define PB(x) push_back(x)
#define endl "\n"
#define ll long long
//#define int long long

//===================================================//

#define N 100000
#define modn 1000000007

using namespace std;
inline int rit(){
    int f=0,key=1;
    char ch;
    do{
        ch = getchar();
        if(ch=='-') key=-1;
    }while(ch<'0'||ch>'9');
    do{
        f = f*10+ch-'0';
        ch = getchar();
    }while(ch>='0'&&ch<='9');
    return f*key;
}
int a,b,c,d,e,f;
P ans;
int32_t main(void){
    RIII(a,b,c), RIII(d,e,f);
    ans.F = a*100, ans.S = 0;
    for(int ii=0;ii<=30;++ii) for(int jj=0;jj<=30;++jj) for(int kk=0;kk<=3000;++kk) for(int uu=0;uu<=3000;++uu){
        int i = ii*a, j = jj*b, k = kk*c, u = uu*d;
        int als = 100 * (i+j) + k + u ;
        if( als <= f && (k+u) <= e * (i+j) && k+u * ans.F > per * als ){
            ans.F = als, ans.S = u+k ;
        }
    }
    printf("%d %d\n", ans.F, ans.S);
	return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:44:61: error: 'per' was not declared in this scope
   44 |         if( als <= f && (k+u) <= e * (i+j) && k+u * ans.F > per * als ){
      |                                                             ^~~
Language: C++

#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long int;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;

//struct edge {int from, to, cost;};

constexpr double EPS = 1e-10;
constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;

template<class T> inline T sqr(T x) {return x*x;}

int dp[3001][3001] = {};

int main() {
    int a,b,c,d,e,f;
    cin >> a >> b >> c >> d >> e >> f;
    VI x, y;
    for (int i = 0; i * a <= f; ++i)
        for (int j = 0; j * b <= f; ++j)
            if (i * a + j * b <= f) x.push_back(i * a + j * b);
    for (int i = 0; i * c <= f; ++i)
        for (int j = 0; j * d <= f; ++j)
            if (i * c + j * d <= f) y.push_back(i * c + j * d);
    double ans;
    int maxx = 0; maxy = 0;
    EACH(i, x) EACH(j, y) {
        if (100.0 * j / i <= e) {
            ans = max(ans, 100.0 * j / (i + j));
            maxx = x;
            maxy = y;
        }
    }
    cout << maxx + maxy << " " << maxy << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:19: error: 'maxy' was not declared in this scope; did you mean 'maxx'?
   69 |     int maxx = 0; maxy = 0;
      |                   ^~~~
      |                   maxx
a.cc:73:20: error: cannot convert 'VI' {aka 'std::vector<int>'} to 'int' in assignment
   73 |             maxx = x;
      |                    ^
      |                    |
      |                    VI {aka std::vector<int>}
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>

#define CK(N,A,B) (A<=N&&N<B)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define RREP(i,a,b) for(int i=(b-1);a<=i;i--)
#define F first
#define S second
#define ll long long

const int INF = 1e9;
const long long  LLINF = 1e18;

using namespace std;


/*==================================================*/

/*==================================================*/

int A, B, C, D, E, F;
int slt[6010];

void func(int na, int nb){
  for(int wa = na; wa*100 <= F; wa += A){
    for(int wb = nb; wb*100 <= F; wb += B)
      for(int sc = 0; sc <= F; sc += C){
        for(int sd = 0; sd <= F; sd += D){
          if(wa*100+wb*100+sc+sd > F) continue;
          if(sc+sd > (wa+wb)*E) continue;
          if(slt[wa*100+wb*100] < sc+sd){
            slt[wa*100+wb*100] = sc+sd;
          }
        }
    }
  }
}

int main(){

  cin>>A>>B>>C>>D>>E>>F;

  func(A,0);
  func(0,B);

  int maxslt = 0;
  int wtr = 0;
  REP(i,0,F){
    if(maxslt < slt[i]){
      maxslt = slt[i];
      wtr = i;
    }
  }

  cout<<minwtr+maxslt<<" "<<maxslt<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:9: error: 'minwtr' was not declared in this scope
   67 |   cout<<minwtr+maxslt<<" "<<maxslt<<endl;
      |         ^~~~~~
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
    #define oo 200000000
    const int N = 100010;
    int arr[N] , n  , m; 
     
    int main(){
    	//freopen("in.txt","r",stdin);
    	int a, b, c ,d ,e,f;
    	cin >> a >> b >> c >> d >> e >> f;
    	int ans = 0 , ans2 = 0 ;
    	long double mx = 0 ;
    	for(int i=0;i<31;i++){
    		for(int j=0;j<31;j++){
    			for(int k=0;k<3100;k++){
if(i == 0 && j == ) continue;
    					int num = ((i * a + j * b) * e);
    					if(num < k * c) continue;
    					int l = (num - (k * c)) / d;
    					int cur = 100 * i * a + 100 * j * b + k * c + l * d;
    					if(cur > f) continue;
    					long double m = (100 * (k*c + l * d));
    					long double m2 = (100 * i * a + 100 * j * b) + (k*c + l * d);
    					long double all = (long double)(m) / (long double)m2;
    					if(all > mx){
    						mx = all;
    						ans = cur;
    						ans2 = k*c + l * d;
    					}
    				
    			}
    		}
    	}
    	cout << ans << " " << ans2 << endl;
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected primary-expression before ')' token
   16 | if(i == 0 && j == ) continue;
      |                   ^
Language: C++

#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long int;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;

//struct edge {int from, to, cost;};

constexpr double EPS = 1e-10;
constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;

template<class T> inline T sqr(T x) {return x*x;}

int dp[3001][3001] = {};

int main() {
    int a,b,c,d,e,f;
    cin >> a >> b >> c >> d >> e >> f;
    REP(i,0,f+1) REP(j,0,3001) {
        if (i-100*a >= 0) dp[i][j] += dp[i-100*a][j];
        if (i-100*b >= 0) dp[i][j] += dp[i-100*b][j];
        if (i-c>=0 && j-c>=0) dp[i][j] += dp[i-c][j-c];
        if (i-d>=0 && j-d>=0) dp[i][j] += dp[i-d][j-d];
        if (100.0 * j / i > e) dp[i][j] = 0;
    }
    double ans = 0;
    int x = 0, y = 0;
    REP(i,0,f+1) REP(j,0,3001) {
        if (dp[i][j] == 0) continue;
        if (1.0 * j / (i+j) > ans) {
            ans = 1.0 * j / (i+j);
            x = i;
            y = j;
        }
    }
    cout << i + j << " " << j << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:78:13: error: 'i' was not declared in this scope
   78 |     cout << i + j << " " << j << endl;
      |             ^
a.cc:78:17: error: 'j' was not declared in this scope
   78 |     cout << i + j << " " << j << endl;
      |                 ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define each(a,x) for(auto a : (x))
#define all(a) (a).begin(),(a).end()
#define chmin(a,b) ((a) = min((a),(b)))
#define chmax(a,b) ((a) = max((a),(b)))
#define in_range(x,l,r) ((l)<=(x) && (x)<(r))
#define printvec(a) rep(i,a) cout << a[i] << " \n"[i+1==(a).size()];
#define fs first
#define sc second
#define em emplace
#define eb emplace_back
#define sz size()
#define MP make_pair
using namespace std;
typedef long long ll;
typedef double D;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vs;

const ll INF = 1e8;
const D EPS = 1e-8;
const ll MOD = 1e9+7;

int main(){
  ll a,b,c,d,e,f;
  cin >> a >> b >> c >> d >> e >> f;
  ll ans_t = 100*a, ans_s = 0;
  rep(i, 100) {
    rep(j, 100) {
      ll w = 100*a*i+100*b*j;
      if (w > f) continue;
      if (w <= 0) continue;
      ll lim_s = e*w/100;
      rep(k, 5000) {
	if (c*k > lim_s) continue;
	ll l = min(f-w, lim_s-c*k))/d;
	if (l<0) continue;
	ll s = c*k + d*l, t = w + s;
	if (s <= lim_s and t <= f and ans_s * t < ans_t * s) {
	  ans_t = t;
	  ans_s = s;
	}
      }
    }
  }

  if (ans_s == 0) ans_t = 100*a;
  cout << ans_t << " " << ans_s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:35: error: expected ',' or ';' before ')' token
   41 |         ll l = min(f-w, lim_s-c*k))/d;
      |                                   ^
Language: C++

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <map>
#include <iostream>
#include <set>
#include <utility>
#include <vector>

using namespace std;

int main(){
  long long int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  vector<long long int> dp(F+1, -1);
  dp[0] = 0;
  for (long long int i = 100*A; i <= F; i++){
    long long int a = -1, b = -1, c = -1, d = -1;
    if ((i >= 100*A) && (dp[i-100*A] != -1)){
      a = dp[i-100*A];
    }
    if ((i >= 100*B) && (dp[i-100*B] != -1)){    
      b = dp[i-100*B];
    }
    if ((i >= C) && (dp[i-C] != -1)){        
      c = dp[i-C]+C;
    }
    if ((i >= D) && (dp[i-D] != -1)){            
      d = dp[i-D]+D;
    }
    //cerr << a << ',' << b << ',' << c << ',' << d << endl;
    if ((100*a*(100+E)) <= (100*E*i)){
      dp[i] = max(dp[i], a);
    }
    if ((100*b*(100+E)) <= (100*E*i)){
      dp[i] = max(dp[i], b);
    }
    if ((100*c*(100+E)) <= (100*E*i)){    
      dp[i] = max(dp[i], c);
    }
    if ((100*d*(100+E)) <= (100*E*i)){        
      dp[i] = max(dp[i], d);
    }    
  }
  long long int maxresult = 0;
  long long int maxi = 0;
  double maxm = 0;
  for (long long int i = 100*A; i <= F; i++){
    //cerr << dp[i] << ',';
    if ((dp[i] >= i*maxxm) && ((100*dp[i]*(100+E)) <= (100*E*i))){
      //cerr << i << endl;
      maxi = i;
      maxresult = dp[i];
      maxm = (double)dp[i]/(double)i;
    }
  }
  cout << maxi << ' ' << maxresult;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:21: error: 'maxxm' was not declared in this scope; did you mean 'maxm'?
   51 |     if ((dp[i] >= i*maxxm) && ((100*dp[i]*(100+E)) <= (100*E*i))){
      |                     ^~~~~
      |                     maxm
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <ctime>
#define ld long double
using namespace std;
const int maxn = 1000;
int n,p[maxn+1],X[maxn+1],color[maxn+1],sumB[maxn+1],sumW[maxn+1];
vector<int> V[maxn+1];
bool flag;
void dfs(int x)
{
	if (!flag) return;
	sumB[x]=0;
	sumW[x]=0;
	for (auto it=V[x].begin(); it!=V[x].end(); it++)
	{
		dfs(*it);
		if (!flag) return;
		sumB[x]+=sumB[*it];
		sumW[x]+=sumW[*it];
	}
	if (sumB[x]>X[x] and sumW[x]>X[x])
	{
		flag=false;
		return;
	}
	else
	if (sumB[x]<=X[x] and sumW[x]<=X[x])
	{
		int c=rand()%2;
		if (c==0) sumB[x]=X[x];
		else sumW[x]=X[x];
	}
	else
	if (sumB[x]<=X[x])
	sumB[x]=X[x];
	else
	if (sumW[x]<=X[x])
	sumW[x]=X[x];
}
int main()
{
	ios_base::sync_with_stdio(0);
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	srand(time(NULL));
	cin >> n;
	for (int i=1; i<=n; i++)
	V[i].clear();
	for (int i=2; i<=n; i++)
	{
		cin >> p[i];
		V[p[i]].push_back(i);
	}
	for (int i=1; i<=n; i++)
	cin >> X[i];
	do
	{
		flag=true;
		dfs(1);
		if (flag) break;
	}
	while (clock()/(ld) CLOCKS_PER_SEC<=1.90);
	if (flag) cout << "POSSIBLE";
	else
	if (n>=500) while (true) {};
	else
	cout << "IMPOSSIBLE";
	return 0;
}


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

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

const int MaxN = 1e5;
using namespace std;
int a, b, b, d, e, f;
int main()
{
	while(~scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f)){
		int ansa = 0, ansb = 0;
		int water = 0, sugar = 0, cnt = 0;
		for(int i  = 0; i * a * 100 <= f; i++){
			for(int j = 0; j * b * 100 <= f; j++){
				if(i == 0 && j == 0) continue;
				if((i*a + j*b) * 100 > f) break;
				for(int k = 0; ; k++){
					if((i*a + j*b) * 100 + k * c > f) break;
					for(int l = 0; ; l++){
						int tempa = (i*a + j*b) * 100; 
						int tempb = c * k + d * l;
						int cnt = (i*a + j*b) * e;
						if(tempa + tempb > f) break;
						if(tempb <= cnt){
							if(ansa == 0 && ansb == 0){
								ansa = tempa, ansb = tempb;
							}
							else if(1.0 * tempb / (tempa + tempb) > 1.0 * ansb / (ansa + ansb)){
								ansa = tempa, ansb = tempb;
							}
						}
					}
				}
			}
		}
		printf("%d %d\n", ansa + ansb, ansb);
	}
	return 0;
}

Compiler output:
a.cc:8:11: error: redefinition of 'int b'
    8 | int a, b, b, d, e, f;
      |           ^
a.cc:8:8: note: 'int b' previously declared here
    8 | int a, b, b, d, e, f;
      |        ^
a.cc: In function 'int main()':
a.cc:11:52: error: 'c' was not declared in this scope
   11 |         while(~scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f)){
      |                                                    ^
Language: C++


// ~/BAU/ACM-ICPC/Teams/A++/BlackBurn95
// ~/sudo apt-get Accpeted
// OverflowLimitExceeded

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <limits.h>
#include <math.h>
#include <string.h>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

int main() {
	/*
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
#endif
	*/
	ll A, B, C, D, E, F;
	scanf("%lld%lld%lld%lld%lld%lld", &A, &B, &C, &D, &E, &F);

	vector<ll> va;
	for (ll i = 0; i <= 3000; i++)
		for (ll j = 0; j <= 3000; j++) {
			ll val = 100 * A*i + 100 * B*j;
			if (val <= F) va.push_back(val);
		}

	vector<ll> vb;
	for (ll i = 0; i <= 3000; i++)
		for (ll j = 0; j <= 3000; j++) {
			ll val = C*i + D*j;
			if (val <= F) vb.push_back(val);
		}

	long double best = 0.0;
	ll a = 0, b = 0;

	for (int i = 0; i < va.size(); i++)
		for (int j = 0; j < vb.size(); j++) {
			ll x = va[i] / 100 * E;

			if (vb[j] > x || va[i]+vb[j] > F) continue;

			long double cur = (100.0*long double(vb[j])) / long double(va[i] + vb[j]);

			if (best + 1e-11 < cur) {
				best = cur;
				a = va[i], b = vb[j];
			}
		}

	printf("%lld %lld\n", a + b, b);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:50: error: expected primary-expression before 'long'
   59 |                         long double cur = (100.0*long double(vb[j])) / long double(va[i] + vb[j]);
      |                                                  ^~~~
a.cc:59:50: error: expected ')' before 'long'
   59 |                         long double cur = (100.0*long double(vb[j])) / long double(va[i] + vb[j]);
      |                                           ~      ^~~~
      |                                                  )
Language: Java

public class Main {
	public static void main(String[] args){
		int a, b, c, d, e, f;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		c = sc.nextInt();
		d = sc.nextInt();
		e = sc.nextInt();
		f = sc.nextInt();
		
		float max;
		int maxw, maxs;
		max = -10.0f;
		maxw = 0;
		maxs = 0;
		
		for(int i=0; i*a*100<=f; i++){
			for(int j=0; i*a*100 + j*b*100<=f; j++){
				for(int k=0; i*a*100 + j*b*100 + k*c<=f; k++){
					for(int l=0; i*a*100 + j*b*100 + k*c + l*d<=f; l++){
						if((i*a+j*b)*e >= k*c+l*d){
							if(i+j == 0){
								break;
							}
							if((float)(100*(k*c+l*d)) / (float)(100*i*a+100*j*b+k*c+l*d) > max){
								max = (float)(100*(k*c+l*d)) / (float)(100*i*a+100*j*b+k*c+l*d);
								maxw = 100*i*a + 100*j*b;
								maxs = k*c + l*d;
							}
						}
					}
				}
			}
		}
		
		System.out.println((maxw+maxs) + " " + maxs);
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <fstream>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>

#define REP(i,x) for(int i=0 ; i<(int)(x) ; i++)
#define ALL(x) (x).begin(),(x).end()
#define LL long long

using namespace std;

int main(){
    int A, B, C, D, E, F;
    cin >> A >> B >> C >> D >> E >> F;
    pair<double, pair<int, int> > res = make_pair(-1, make_pair(-1, -1));
    for(int a=0; a*100*A<=F; a++){
        for(int b=0; a*100*A+b*100*B<=F; b++){
            int w = a*100*A+b*100*B;
            int max_suger = w/100*E;
            for(int c=0; w+c*C<=F && c*C<=max_suger; c++){
                for(int d=0; w+c*C+d*D<=F && c*C+d*D<=max_suger; d++){
                    int s = c*C+d*D;
                    if(w+s==0)continue;
                    double tmp = 100.0*s/(w+s);
                    //if(tmp>res.first){
                    //    cerr << tmp << ", res: " << res.first << ", a: " << a << "b: " << b << "c: " << c << "d: " << d << endl;
                    //}
                    res = max(res, make_pair(tmp, make_pair(w+s, s)));
                }
            }
        }
    }
    cout << res.second.first << " " << res.second.second << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: 'cin' was not declared in this scope
   24 |     cin >> A >> B >> C >> D >> E >> F;
      |     ^~~
a.cc:15:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   14 | #include <cstring>
  +++ |+#include <iostream>
   15 | 
a.cc:43:5: error: 'cout' was not declared in this scope
   43 |     cout << res.second.first << " " << res.second.second << endl;
      |     ^~~~
a.cc:43:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

/* AtCoder. Task C - Sugar Water, by Abreto<m@abreto.net>. */
#include <bits/stdc++.h

using namespace std;

#define REP(i,iup)    for(i = 0;i <= iup;i++)

int main(void)
{
    int i, j, k, l;
    int A, B, C, D, E, F;
    int anssw = 0, anss = 0;
    scanf("%d%d%d%d%d%d", &A, &B, &C, &D, &E, &F);
    REP(i,30)REP(j,30)
    {
        int water = (i*A) + j(*B);
        water *= 1000;
        int maxsugar = (i+j)*E;
        if( water <= F )
        {
            REP(k,30)REP(l,30)
            {
                int sugar = C*k+D*l;
                if( (water+sugar) <= F && sugar <= maxsugar )
                {
                    int sw = water + sugar;
                    int left = anss * sw, right = anssw * sugar;
                    if( left < right )
                    {
                        anss = sugar;
                        anssw = sw;
                    }
                }
            }
        }
    }
    printf("%d %d\n", anssw, anss);
    return 0;
}


Compiler output:
a.cc:2:24: error: missing terminating > character
    2 | #include <bits/stdc++.h
      |                        ^
a.cc: In function 'int main()':
a.cc:16:31: error: invalid type argument of unary '*' (have 'int')
   16 |         int water = (i*A) + j(*B);
      |                               ^~
a.cc:16:33: error: 'j' cannot be used as a function
   16 |         int water = (i*A) + j(*B);
      |                                 ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char *argv[]) {
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  vector<int> a(F + 1), b(F + 1);
  a[0] = b[0] = 1;
  for (int i = 0; i <= F; i++) {
    if (a[i] && i + A <= F) a[i + A] = 1;
    if (a[i] && i + B <= F) a[i + B] = 1;
    if (b[i] && i + C <= F) b[i + C] = 1;
    if (b[i] && i + D <= F) b[i + D] = 1;
  }
  double mx = -1, x, y;
  for (int i = 1; i <= F; i++) {
    if (b[i]) {
      for (int j = 1; j <= F; j++) {
        if (j * E >= i && i + j * 100 <= F && a[j]) {
          if (i * 1.0 / (i + 100 * j) > mx) {
            mx = i * 1.0 / (i + 100 * j);
            x = i + j * 100, y = i;
          }
        }
      }
    }
  }
  cout << x << " " << y << endl;''
  return 0;
}


Compiler output:
a.cc:29:33: error: empty character constant
   29 |   cout << x << " " << y << endl;''
      |                                 ^~
a.cc: In function 'int main(int, char**)':
a.cc:29:35: error: expected ';' before 'return'
   29 |   cout << x << " " << y << endl;''
      |                                   ^
      |                                   ;
   30 |   return 0;
      |   ~~~~~~