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

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

int main() {
  int a, b, c, d, e, f, p, q; long double l = 0; scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
  rep(i, f/100){
    bool g = 0;
    rep(j, (i+1)/a+1){
      if(i+1-j*a >= 0 && (i+1-j*a)%b == 0){
        g = 1;
        break;
      }
    }
    if(g){
      rep(j, min((i+1)*e+1, f-i*100-100)){
        bool h = 0;
        rep(k, j/c+1){
          if(j-k*c >= 0 && (j-k*c)%d == 0){
            h = 1;
            break;
          }
        }
        if(h && l < (j+0.0)/(i+1){
          p = (i+1)*100;
          q = j;
          l = (q+0.0)/p;
          if(l == (e+0.0)/100) break;
        }
      }
    }
  }
  printf("%d %d\n", p+q, q);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:34: error: expected ')' before '{' token
   24 |         if(h && l < (j+0.0)/(i+1){
      |           ~                      ^
      |                                  )
a.cc:30:7: error: expected primary-expression before '}' token
   30 |       }
      |       ^
Language: C++

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

int main() {
  int a, b, c, d, e, f, p, q; ldouble l = 0; scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
  rep(i, f/100){
    bool g = 0;
    rep(j, (i+1)/a+1){
      if(i+1-j*a >= 0 && (i+1-j*a)%b == 0){
        g = 1;
        break;
      }
    }
    if(g){
      rep(j, min((i+1)*e+1, f-i*100-100)){
        bool h = 0;
        rep(k, j/c+1){
          if(j-k*c >= 0 && (j-k*c)%d == 0){
            h = 1;
            break;
          }
        }
        if(h && l < (j+0.0)/(i+1){
          p = (i+1)*100;
          q = j;
          l = (q+0.0)/p;
          if(l == (e+0.0)/100) break;
        }
      }
    }
  }
  printf("%d %d\n", p+q, q);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:31: error: 'ldouble' was not declared in this scope; did you mean 'double'?
    6 |   int a, b, c, d, e, f, p, q; ldouble l = 0; scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
      |                               ^~~~~~~
      |                               double
a.cc:24:17: error: 'l' was not declared in this scope
   24 |         if(h && l < (j+0.0)/(i+1){
      |                 ^
a.cc:24:34: error: expected ')' before '{' token
   24 |         if(h && l < (j+0.0)/(i+1){
      |           ~                      ^
      |                                  )
a.cc:30:7: error: expected primary-expression before '}' token
   30 |       }
      |       ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    double c=-1;
    int counter=0;
    int counterr=0;
    int answer,answerr;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[F],ves[F];
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}}}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j]){
    double cc=100*ves[j]/(vec[i]+ves[j])}
    if(cc>c){
    answer=ves[j]+vec[i];
    answerr=ves[j]
    c==cc;}
    }}
    cout << answer<< " " << answerr << endl;
  return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:27:41: error: expected ',' or ';' before '}' token
   27 |     double cc=100*ves[j]/(vec[i]+ves[j])}
      |                                         ^
a.cc:28:8: error: 'cc' was not declared in this scope; did you mean 'c'?
   28 |     if(cc>c){
      |        ^~
      |        c
a.cc:30:19: error: expected ';' before 'c'
   30 |     answerr=ves[j]
      |                   ^
      |                   ;
   31 |     c==cc;}
      |     ~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    double c=-1;
    int counter=0;
    int counterr=0;
    int answer,answerr;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[F],ves[F],
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}}}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j]){
    double cc=100*ves[j]/(vec[i]+ves[j])}
    if(cc>c){
    answer=ves[j]+vec[i];
    answerr=ves[j]
    c==cc;}
    }}
    cout << answer<< " " << answerr << endl;
  return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for(i=0;i<=F/(100*A);i++ ){
      |     ^~~
a.cc:12:29: error: expected ';' before ')' token
   12 |     for(i=0;i<=F/(100*A);i++ ){
      |                             ^~
      |                             ;
a.cc:27:41: error: expected ',' or ';' before '}' token
   27 |     double cc=100*ves[j]/(vec[i]+ves[j])}
      |                                         ^
a.cc:28:8: error: 'cc' was not declared in this scope; did you mean 'c'?
   28 |     if(cc>c){
      |        ^~
      |        c
a.cc:30:19: error: expected ';' before 'c'
   30 |     answerr=ves[j]
      |                   ^
      |                   ;
   31 |     c==cc;}
      |     ~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    double c=-1;
    int counter=0;
    int counterr=0;
    int answer,answerr;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[],ves[],
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}}}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j]){
    double cc=100*ves[j]/(vec[i]+ves[j])}
    if(cc>c){
    answer=ves[j]+vec[i];
    answerr=ves[j]
    c==cc;}
    }}
    cout << answer<< " " << answerr << endl;
  return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: storage size of 'vec' isn't known
   11 |     int vec[],ves[],
      |         ^~~
a.cc:11:15: error: storage size of 'ves' isn't known
   11 |     int vec[],ves[],
      |               ^~~
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for(i=0;i<=F/(100*A);i++ ){
      |     ^~~
a.cc:12:29: error: expected ';' before ')' token
   12 |     for(i=0;i<=F/(100*A);i++ ){
      |                             ^~
      |                             ;
a.cc:28:8: error: 'cc' was not declared in this scope; did you mean 'c'?
   28 |     if(cc>c){
      |        ^~
      |        c
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    double c=-1;
    int counter=0;
    int counterr=0;
    int answer;
    pair<int, int> ans;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[F],ves[F];
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}}}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j]){
    double cc=100*ves[j]/(vec[i]+ves[j]);}
    if(cc>c){
    ans=make_pair(ves[j]+vec[i],ves[j]);
    c==cc;}
    }}
    cout << ans.first << " " << ans.second << endl;
  return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:29:8: error: 'cc' was not declared in this scope; did you mean 'c'?
   29 |     if(cc>c){
      |        ^~
      |        c
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    double c=-1;
    int counter=0;
    int counterr=0;
    int answer;
    pair<int, int> ans;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[F],ves[F];
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}}}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j]){
    double cc=100*ves[j]/(vec[i]+ves[j])}
    if(cc>c){
    ans=make_pair(a+b,b);
    c==cc;}
    }}
    cout << ans.first << " " << ans.second << endl;
  return 0;
    }}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:41: error: expected ',' or ';' before '}' token
   28 |     double cc=100*ves[j]/(vec[i]+ves[j])}
      |                                         ^
a.cc:29:8: error: 'cc' was not declared in this scope; did you mean 'c'?
   29 |     if(cc>c){
      |        ^~
      |        c
a.cc:30:19: error: 'a' was not declared in this scope
   30 |     ans=make_pair(a+b,b);
      |                   ^
a.cc:30:21: error: 'b' was not declared in this scope
   30 |     ans=make_pair(a+b,b);
      |                     ^
a.cc: At global scope:
a.cc:35:6: error: expected declaration before '}' token
   35 |     }}
      |      ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    double c=-1;
    int counter=0;
    int counterr=0;
    int answer;
    pair<int, int> ans;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[F],ves[F],
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}}}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j]){
    double cc=100*ves[j]/(vec[i]+ves[j])}
    if(cc>c){
    ans=make_pair(a+b,b);
    c==cc;}
    }}
    cout << ans.first << " " << ans.second << endl;
  return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected unqualified-id before 'for'
   13 |     for(i=0;i<=F/(100*A);i++ ){
      |     ^~~
a.cc:13:29: error: expected ';' before ')' token
   13 |     for(i=0;i<=F/(100*A);i++ ){
      |                             ^~
      |                             ;
a.cc:28:41: error: expected ',' or ';' before '}' token
   28 |     double cc=100*ves[j]/(vec[i]+ves[j])}
      |                                         ^
a.cc:29:8: error: 'cc' was not declared in this scope; did you mean 'c'?
   29 |     if(cc>c){
      |        ^~
      |        c
a.cc:30:19: error: 'a' was not declared in this scope
   30 |     ans=make_pair(a+b,b);
      |                   ^
a.cc:30:21: error: 'b' was not declared in this scope
   30 |     ans=make_pair(a+b,b);
      |                     ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    double c=-1;
    int counter=0;
    int counterr=0;
    int answer;
    pair<int, int> ans;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[],ves[],
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}}}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j]){
    double cc=100*ves[j]/(vec[i]+ves[j])}
    if(cc>c){
    ans=make_pair(a+b,b);
    c==cc;}
    }}
    cout << ans.first << " " << ans.second << endl;
  return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: storage size of 'vec' isn't known
   12 |     int vec[],ves[],
      |         ^~~
a.cc:12:15: error: storage size of 'ves' isn't known
   12 |     int vec[],ves[],
      |               ^~~
a.cc:13:5: error: expected unqualified-id before 'for'
   13 |     for(i=0;i<=F/(100*A);i++ ){
      |     ^~~
a.cc:13:29: error: expected ';' before ')' token
   13 |     for(i=0;i<=F/(100*A);i++ ){
      |                             ^~
      |                             ;
a.cc:29:8: error: 'cc' was not declared in this scope; did you mean 'c'?
   29 |     if(cc>c){
      |        ^~
      |        c
a.cc:30:19: error: 'a' was not declared in this scope
   30 |     ans=make_pair(a+b,b);
      |                   ^
a.cc:30:21: error: 'b' was not declared in this scope
   30 |     ans=make_pair(a+b,b);
      |                     ^
Language: C++

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

int main(){
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  int max_water = 0;
  for(int a = 0; a <= F / ((100 + E) * A); a++){
    int b = (F / (100 + E) - a * A) / B;
    if((A * a + B * b) * 100 > max_water) max_water = (A * a + B * b) * 100;
  }
  int max_sugar = 0;
  for(int c = 0; c <= F * E / ((100 + E) * C; c++){
    int d = (F * E / (100 + E) - c * C) / D;
    if(c * C + D * d > max_sugar) max_sugar = c * C + d * D;
  }
  cout << max_sugar + max_water << max_sugar << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:45: error: expected ')' before ';' token
   13 |   for(int c = 0; c <= F * E / ((100 + E) * C; c++){
      |                               ~             ^
      |                                             )
Language: C++

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

int main(){
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  int max_water = 0;
  for(int a = 0; a <= F / ((100 + E) * A); a++){
    int b = (F / (100 + E) - a * A) / B;
    if((A * a + B * b) * 100 > max_water) max_water = (A * a + B * b) * 100;
  }
  int max_sugar = 0;
  for(int c = 0; c <= F * E / ((100 + E) * C){
    int d = (F * E / (100 + E) - c * C) / D;
    if(c * C + D * d > max_sugar) max_sugar = c * C + d * D;
  }
  cout << max_sugar + max_water << max_sugar << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:46: error: expected ';' before '{' token
   13 |   for(int c = 0; c <= F * E / ((100 + E) * C){
      |                                              ^
      |                                              ;
a.cc:13:46: error: expected primary-expression before '{' token
a.cc:13:46: error: expected ')' before '{' token
   13 |   for(int c = 0; c <= F * E / ((100 + E) * C){
      |      ~                                       ^
      |                                              )
Language: C++

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

int main(){
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  int max_water = 0;
  for(int a = 0; a <= F / ((100 + E) * A); a++){
    int b = (F / (100 + E) - a * A) / B;
    if((A * a + B * b) * 100 > max_water) max_water = (A * a + B * b) * 100;
  }
  int max_sugar = 0;
  for(int c = 0; c <= F * E / ((100 + E) * C)){
    int d = (F * E / (100 + E) - c * C) / D;
    if(c * C + D * d > max_sugar) max_sugar = c * C + d * D;
  }
  cout << max_sugar + max_water << max_sugar << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:46: error: expected ';' before ')' token
   13 |   for(int c = 0; c <= F * E / ((100 + E) * C)){
      |                                              ^
      |                                              ;
Language: C++

// -----------------------------------
// Author     : MatsuTaku
// Country    : Japan
// Created    : 04/12/20 07:29:17
// -----------------------------------

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

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

  int a,b,c,d,e,f; cin>>a>>b>>c>>d>>e>>f;
  set<int> ws;
  for (int i = 0; i <= f/(100*a); ++i) {
    auto ff = f-(100*a*i);
    for (int j = 0; j <= ff/(100*b); ++j) {
      ws.insert(100*(i+j));
    }
  }
  set<int> ss;
  for (int i = 0; i <= f/c; ++i) {
    auto ff = f-(100*a*i);
    for (int j = 0; j <= ff/d; ++j) {
      ss.insert((i+j));
    }
  }
  int ans_sum = 0;
  int ans_sug = 0;
  double ans_n = 0;
  for (auto w : ws) {
    auto up = w/100*e;
    int s = *prev(ss.lower_bound(up));
    double n = (double)s/(up+s);
    if (n > ans_n) {
      ans_n = n;
      ans_sum = up;
      ans_sug = s;
    }
  }
  cout << ans_sum << " " << ans_sug << endl;
  
  cout << ans << " " << dp[ans] << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   45 |   cout << ans << " " << dp[ans] << endl;
      |           ^~~
      |           abs
a.cc:45:25: error: 'dp' was not declared in this scope; did you mean 'd'?
   45 |   cout << ans << " " << dp[ans] << endl;
      |                         ^~
      |                         d
Language: C++

#include "template.hpp"

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

  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;

  pair<int, int> ans = {a * 100, 0};

  vector<bool> dp(f + 1, false);
  dp[0] = true;
  REP(i, f + 1) {
    if (i - c >= 0)
      dp[i] = dp[i] || dp[i - c];
    if (i - d >= 0)
      dp[i] = dp[i] || dp[i - d];
  }

  for (int i = 0;; i++) {
    if (100 * a * i > f)
      break;
    for (int j = 0;; j++) {
      int w = 100 * (a * i + b * j);
      if (w > f)
        break;
      int ma = min(w / 100 * e, f - w);
      REP(i, ma + 1) {
        if (dp[i] && ans.second < i) {
          ans = {w + i, i};
        }
      }
    }
  }
  cout << ans.first << " " << ans.second << endl;

  return 0;
}


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

#include <algorithm>
#include <iostream>
#include <sys/syslimits.h>

int calc_noudo(int a, int b) {
  return (100 * b) / (a + b);
}

int main() {
  int A, B, C, D, E, F;
  std::cin >> A >> B >> C >> D >> E >> F;

  int noudo = -1, suger = 0, water = 0;
  for (int a = 0; a < (F / 100); ++a)
    for (int b = 0; b < (F / 100); ++b)
      for (int c = 0; c < (F / C); ++c)
        for (int d = 0; d < (F / D); ++d) {
          int w = a * 100 * A + b * 100 * B;
          int s = c * C + d * D;
          if (w == 0 || s == 0)
            continue;
          if (((float)s / (float)(w / 100)) > E)
            continue;
          if ((w + s) > F)
            continue;
          int n = calc_noudo(w, s);
          if (noudo < n) {
            noudo = n;
            suger = s;
            water = w;
          }
        }

  std::cout << water + suger << " " << suger << std::endl;
}


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

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



int main() {

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

	int water, sugar;
	double rat = 0;

	int i = 0;
	while (100 * A * i <= F) {
		int j = 0;
		while (100 * (A * i + B * j) <= F) {
			int k = 0;
			while (100 * (A * i + B * j) + C * k <= F) {
				int l = 0;
				while (100 * (A * i + B * j) + C * k + D * l <= F && 100 * (A * i + B * j) + C * k + D * l >= 100*A) {
					double a_i_j_k_l = (100*(C * k + D * l)) / (100 * (A * i + B * j) + C * k + D * l);
					if (C * k + D * l <= E * (A * i + B * j) && a_i_j_k_l => rat) {
						water = 100 * (A * i + B * j) + C * k + D * l;
						sugar = C * k + D * l;
						rat = a_i_j_k_l;
					}
					l++;
				}
				k++;
			}
			j++;
		}
		i++;
	}

	cout << water << " " << sugar;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:96: error: expected primary-expression before '>' token
   23 |                                         if (C * k + D * l <= E * (A * i + B * j) && a_i_j_k_l => rat) {
      |                                                                                                ^
Language: C++

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

int main() {
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  int max = 0;
  int all = 0, sugar = 0;
  for (int i = 0; i < F/(A*100); i++) {
    for (int j = 0; j < (F-A*100*i)/(B*100); j++) {
      for (int k = 0; k < (F-A*100*i-B*100*j)/C; k++) {
        for (int l = 0; l < (F-A*100*i-B*100*j-C*k)/D; l++) {
          int tmp_sugar = C*k+D*l;
          int tmp_all = A*100*i+B*100*j+C*k+D*l;
          if (tmp_all > F) break;
          else if (tmp_sugar / (A*i+B+j) > E) break;
          else {
            int x = tmp_sugar*100 / tmp_all;
            if (x > max) {
              all = tmp_all;
              sugar = tmp_sugar;
              max = x;
            }
          }
        }
      }
    }
  }
  cout << max << 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:1: error: expected primary-expression before '}' token
   30 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define rep(i,N) for(ll (i)=0;(i)<(N);(i)++)
const int mod = 1000000007;
int a, b, c, d, e, f;



int main(){
  
  cin >> a >> b >> c >> d >> e >> f;
  a *= 100;
  b *= 100;
  double ma = 0;
  P ans;
  for(int i = 0; i * a <= f; ++i){
    double water1 = i * a;
    for(int j = 0; water1 + j * b <= f; ++j){
      double water2 = water1 + j * b;
      if(i == 0 && j == 0) continue;
      for(int k = 0; water2 + k * c <= f; ++k){
        double sugar1 = k * c;
        double max_sugar = e * water2 / 100;

        if(sugar1 > max_sugar) break;
        int tmp = (max_sugar - sugar1) / d;
        int sugar2 = tmp;
        
        double density = 100 * (sugar1 + sugar2) / sugar1 + sugar2 + water2);
        if(water2 + sugar1 + sugar2 > f) continue;
        if(ma < density){
          ma = density;
          ans.first = water2;
          ans.second = sugar1 + sugar2;
        }
      }
    }
  }
  cout << ans.first + ans.second << ' ' << ans.second << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:76: error: expected ',' or ';' before ')' token
   31 |         double density = 100 * (sugar1 + sugar2) / sugar1 + sugar2 + water2);
      |                                                                            ^
Language: C++

//include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef long long ll;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const long long INF = 1000000007;
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
// chmax chmin
template<class T> inline bool chmax(T& a, T b) { if (a =< b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

int main(void){
    int A,B,C,D,E,F; cin >> A >> B >> C >> D >> E >> F;
    int f = F/100+1;
    bool can[f]; REP(i,f) can[i] = false; can[0] = true;
    FOR(i,0,f){
        if(can[i]){
            if(i+A < f) can[i+A] = true;
            if(i+B < f) can[i+B] = true;
        }
    }
    double ans=0;
    int mizu=0,satou=0;
    FOR(i,A,f){
        if(can[i]){
            int s = min(i*E, F-100*i)+1;
            bool sugar[s]; REP(j,s) sugar[j] = false; sugar[0] = true;
            int maxi = 0;
            REP(j,s){
                if(sugar[j]){
                    if(j+C < s){
                        sugar[j+C] = true; chmax(maxi, j+C);
                    }
                    if(j+D < s){
                        sugar[j+D] = true; chmax(maxi, j+D);
                    }
                }
            }
            double a = (double)100*i, b = (double)maxi;
            if(chmax(ans, b/(a+b))){
                mizu = 100*i; satou = maxi;
            }
        }
    }
    cout << mizu+satou << " " << satou << endl;
    return 0;
}

Compiler output:
a.cc: In function 'bool chmax(T&, T)':
a.cc:44:57: error: expected primary-expression before '<' token
   44 | template<class T> inline bool chmax(T& a, T b) { if (a =< b) { a = b; return true; } return false; }
      |                                                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0;i<int(N);++i)
#define rep1(i,N) for(int i=1;i<int(N);++i)
#define all(a) (a).begin(),(a).end()
#define print(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<_<<", "; cerr<<"]"<<endl; }
#define printpair(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<"{"<<_.first<<","<<_.second<<"}"<<", "; cerr<<"]"<<endl; }
#define bit(k) (1LL<<(k))
typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

const int INF = 1e9;
const ll INFLL = 1e18;
const ll MOD = 1e9+7;
const double PI = acos(-1.0);

const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

/*------------------------------------/
for library*/

/*------------------------------------*/

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    int a,b,c,d,e,f;
    cin>>a>>b>>c>>d>>e>>f;
    a *= 100;
    b *= 100;
    int ans_all = 0;
    int ans_s = 0;
    double ans_n = 0;
    for(int i = 0; i*a <= f; i++){
        for(int j = 0; i*a + j*b <= f;j++){
            int w = i*a + j*b;
            if(w == 0)continue;
            for(int k = 0;w + k*c <= f;k++){
                for(int l = 0; w + k*c + l*d <= f;l++){
                    int s = k*c + l*d;
                    if(s > w / 100 * end)continue;
                    double noudo = 100*s/double(w + s);
                    if(ans_n < noudo){
                        ans_s = s;
                        ans_all = w + s;
                    }
                }
            }
        }
    }
    cout<<ans_all<<" "<<ans_s<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:45:36: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator*'
   45 |                     if(s > w / 100 * end)continue;
      |                            ~~~~~~~~^~~~~
Language: C++

#include <iostream>
using namespace std;

int mAin() {
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;

  long double conc = -1;
  int water = 0, sugar = 0;

  for (int i = 0; i <= F; i += 100 * A) {
    for (int j = 0; i + j <= F; j += 100 * B) {
      int a = i + j;
      int div_a = (i + j) / 100;
      for (int k = 0; k <= div_a * E; k += C) {
        for (int l = 0; k + l <= div_a * E; l += D) {
          int b = k + l;
          if (A + B == 0 || A + B > F) continue;
          if (conc < double(100 * b) / double(a + b)) {
            conc = double(100 * b) / double(a + b);
            water = A;
            sugar = B;
          }
        }
      }
    }
  }

  cout << water + sugar << ' ' << sugar << endl;
}

Compiler output:
a.cc: In function 'int mAin()':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
   30 | }
      | ^
/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;


int a,b,c,d,e,f;
double m=-1;

double memo[50][3005];

double dfs(int s,int t){
  if(100*s+t+100*a<=f){
    double r;
    r=(double)100*t/(100*(s+a)+t);
    m=max(m,r);
    if(memo[s+a][t]==0){
      dfs(s+a,t);
    }
  }
  if(100*s+t+100*b<=f){
    double r;
    r=(double)100*t/(100*(s+b)+t);
    m=max(m,r);
    if(memo[s+b][t]==0){
      dfs(s+b,t);
    }
  }
  if(100*s+t+c<=f && t+c<=s*e){
    double r;
    r=(double)100*(t+c)/(100*s+t+c);
    m=max(m,r);
    if(memo[s][t+c]==0){
      dfs(s,t+c);
    }
  }
  if(100*s+t+d<=f && t+d<=s*e){
    double r;
    r=(double)100*(t+d)/(100*s+t+d);
    m=max(m,r);
    if(memo[s][t+d]==0){
      dfs(s+a,t);
    }
  }
  return memo[s][t]=m;
}

int p=-1;
int q=-1;
bool memoo[50][3005];
void dfss(int s,int t,double n){
  if(100*s+t+100*a<=f){
    double r;
    r=(double)100*t/(100*(s+a)+t);
    if(n==r){
      p=100*(s+a)+t;
      q=t;
    }
    if(!memoo[s+a][t]){
          memoo[s+a][t]=true;
          dfss(s+a,t,n);
    }
  }
  if(100*s+t+100*b<=f){
    double r;
    r=(double)100*t/(100*(s+b)+t);
    if(n==r){
      p=100*(s+b)+t;
      q=t;
    }
    if(!memoo[s+b][t]){
        memoo[s+b][t]=true;
        dfss(s+b,t,n);
    }
  }
  if(100*s+t+c<=f && t+c<=s*e){
    double r;
    r=(double)100*(t+c)/(100*s+t+c);
    if(n==r){
      p=100*s+t+c;
      q=t+c;
    }
    if(!memoo[s][t+c]){
        memoo[s][t+c]=true;
        dfss(s,t+c,n);
    }
  }
  if(100*s+t+d<=f && t+d<=s*e){
    double r;
    r=(double)100*(t+d)/(100*s+t+d);
    if(n==r){
      p=100*s+t+d;
      q=t+d;
    }
    if(!memoo[s][t+d]){
        memoo[s][t+d]=true;
        dfss(s,t+d,n);
    }
  }
}



int main(){
  cin >> a >> b >> c >> d >> e >> f;
  double n=dfs(0,0);
  dfss(0,0,n);
  cout << p << ' ' << q << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:107:33: error: expected '}' at end of input
  107 |   cout << p << ' ' << q << endl;
      |                                 ^
a.cc:103:11: note: to match this '{'
  103 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
  #include "LOCAL_DEBUG.hpp"
#endif
#define int long long

signed main(){

  vector<int> v(7);
  for(int i = 1; i <= 6; i++){
    cin >> v[i];
  }

  vector<int> dp(v[6]), dp2(v[6]);
  dp[0] = dp2[0] = 1;
  for(int i = 0; i + max(v[1], v[2]) < v[6]; i++){
    dp[i + v[1] * 100] |= dp[i];
    dp[i + v[2] * 100] |= dp[i];
  }
  for(int i = 0; i + max(v[3], v[4]) < v[6]; i++){
    dp2[i + v[3]] |= dp2[i];
    dp2[i + v[4]] |= dp2[i];
  }

  double t = -1;
  pair<int, int> ans = {a, 0};
  for(int i = 100; i < dp.size(); i++){
    for(int j = 1; j < dp2.size(); j++){
      if(dp[i] & dp2[j]){
        double res = (double)j * 100 / i;
        if(i + j <= v[6] && res <= v[5]){
          if(res > t){
            t = res;
            ans = {i + j, j};
          }
        }
      }
    }
  }
  cout << ans.first << " " << ans.second << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: 'a' was not declared in this scope
   27 |   pair<int, int> ans = {a, 0};
      |                         ^
a.cc:27:29: error: could not convert '{<expression error>, 0}' from '<brace-enclosed initializer list>' to 'std::pair<long long int, long long int>'
   27 |   pair<int, int> ans = {a, 0};
      |                             ^
      |                             |
      |                             <brace-enclosed initializer list>
Language: C

#include<cstdio>

using namespace std;

int a, b, c, d, e, f;
int ans_all = 0, ans_sugar = 0;
int lst[30][1500];


void noudo(int n, int m, int s, int t){
    int water_ = n * a + m * b;
    int water = water_ * 100;
    int sugar = s * c + t * d;
    int all = water + sugar;

    if (ans_sugar * all <= sugar * ans_all) {
        ans_sugar = sugar;
        ans_all = all;
    }
    lst[water][sugar] = 1;
    if (all + 100 * a <= f && lst[water_ + a][sugar] != 1) noudo(n+1,m,s,t);
    if (all + 100 * b <= f && lst[water_ + b][sugar] != 1) noudo(n,m+1,s,t);
    if (all + c <= f && (n * a + m * b) * e >= sugar + c && lst[water_][sugar + c] != 1) noudo(n,m,s+1,t);
    if (all + d <= f && (n * a + m * b) * e >= sugar + d && lst[water_][sugar + d] != 1) noudo(n,m,s,t+1);

}

int main(){
    scanf("%d",&a);
    scanf("%d",&b);
    scanf("%d",&c);
    scanf("%d",&d);
    scanf("%d",&e);
    scanf("%d",&f);
    if (100 * a <= f) {
        noudo(1,0,0,0);
    }
    if (100 * b <= f) {
        noudo(0,1,0,0);
    }

    printf("%d %d\n", ans_all, ans_sugar);
}

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

#include<iostream>
#include<queue>
#include <math.h>
using namespace std;

double noudo(double w, double s){
    return s/(w+s);
}


int main(){
    int a,b,c,d,e,f;
    cin >> a >> b >> c >> d >> e >> f;

    int water=0, sugar=0;
    double ans = 0.0;
    double defaultNoudo = noudo(100, e);
    //cout << defaultNoudo << endl;

    int nw=0, ns=0;
    for(int i=0; i<=f/(100*a); i++){
        //cout << "a";
        for(int j=0; j<=f/(100*b); j++){
            //cout << "b";
            nw = 100*a*i+100*b*j;
            double max_sugar = e*(i*a+j*b);
            //cout << "(i,j)=" <<i<<" "<< j<<endl;
            //cout << "max_sugar = " << max_sugar << endl;
            for(int k=0; k*c<=max_sugar;k++){
                //cout << "c";
                for(int l=0;k*c+l*d<=max_sugar; l++){
                    //cout << "d";
                    ns = c*k+d*l;
                    double n = noudo((double)nw, (double)ns);
                    //cout << "(i,j,k,l)=" <<i<<" "<< j<<" "<<k<<" "<<l<<endl;
                    if((nw+ns <= f)&&(n<=defaultNoudo)){//総量＆＆濃度
                        //cout << "e";       
                        //cout << n << " "<< nw << " "<<ns <<endl;
                        if(ans < n){
                          //  cout << "f";
                            ans = n;
                            water = nw;
                            sugar = ns;
                        }
                        if(n==defaultNoudo){
                            i=3000;
                            j=3000;
                            k=3000;
                            l=3000;
                        }
                    }
                }
            }
        }
    }

    cout << water+sugar << " " <<  sugar << endl;
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<queue>
^
Main.java:3: error: illegal character: '#'
#include <math.h>
^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
double noudo(double w, double s){
^
  (use --enable-preview to enable unnamed classes)
Main.java:13: error: not a statement
    cin >> a >> b >> c >> d >> e >> f;
                                 ^
Main.java:57: error: not a statement
    cout << water+sugar << " " <<  sugar << endl;
                                         ^
6 errors
Language: C

#include<stdio.h>

int A,B,C,D,E,F;
int ans_w=1;
int ans_s=0;

void func(int sum,int tmpw,int tmps){
  if(F<sum) reutrn;
  
  if(tmpw!=0 && tmps!=0 && (double)(ans_s/ans_w)<(double)(tmps/tmpw)){
    ans_s = tmps;
    ans_w = tmpw;
  }
  
  func(sum+100*A,tmpw+100*A,tmps);
  func(sum+100*B,tmpw+100*B,tmps);
  func(sum+C,tmpw,tmps+C);
  func(sum+D,tmpw,tmps+D);
  return;
}

int main(void){
  scanf("%d %d %d %d %d %d",&A,&B,&C,&D,&E,&F);
  func(0,0,0);
  printf("%d %d\n",ans_w,ans_s);
  retrun 0;
}

Compiler output:
main.c: In function 'func':
main.c:8:13: error: 'reutrn' undeclared (first use in this function)
    8 |   if(F<sum) reutrn;
      |             ^~~~~~
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:26:3: error: 'retrun' undeclared (first use in this function)
   26 |   retrun 0;
      |   ^~~~~~
main.c:26:9: error: expected ';' before numeric constant
   26 |   retrun 0;
      |         ^~
      |         ;
Language: C++

#include <bits/stdc++.h>

#define REP(i, n) for(int (i)=0;(i)<(n);++(i))
#define MOD 1000000007

typedef long long ll;

using namespace std;
int main()
{
    int A, B, C, D, E, F;
    cin >> A >> B >> C >> D >> E >> F;
    int ansWater = 0, ansSuger = 0;
    
    for (int a = 1; a <= F / (100 * A); ++a)
    {
        int maxB = (F - 100 * A * a) / (100 * B);
        for (int b = 0; b <= maxB; ++b)
        {
            int water = 100 * A * a + 100 * B * b;
            int sugerMax = water * E / 100;
            for (int c = 1; c <= sugerMax / C; ++c)
            {
                int maxD = (sugerMax - C * c) / D;
                for (int d = 0; d <= maxD; ++d)
                {
                    int suger = C * c + D * d;
                    if (suger <= sugerMax && suger + waters <= F)
                    {
                        if (suger * (ansWater + ansSuger) >= ansSuger * (water + suger))
                        {
                            ansWater = water;
                            ansSuger = suger;
                        }
                    }
                }
            }
        }
    }

    cout << ansWater + ansSuger << " " << ansSuger << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:54: error: 'waters' was not declared in this scope; did you mean 'water'?
   28 |                     if (suger <= sugerMax && suger + waters <= F)
      |                                                      ^~~~~~
      |                                                      water
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define RFOR(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define REP(i,n) FOR(i,0,(n))
#define REPS(i,n) FOR(i,1,(n)+1)
#define RREP(i,n) RFOR(i,0,(n))
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define DEBUG(x)  cout << #x << " = " << (x) << endl;
#define SORT(x) sort(ALL(x));
#define RSORT(x) sort(RALL(x));
#define SUM(x) accumulate(ALL(x),0);
#define FI first
#define SE second
#define PB push_back
#define EB emplace_back
#define SZ(x) (int)(x).size()
#define BN(x) ((1<<x)-1)
#define DUP(x,y) (((x)+(y)-1)/(y))
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const ll mod = 1e9+7;
const int INF = (1<<30)-1;
const ll INFLL = (1LL<<62)-1;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//cout << fixed << setprecision(10);

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int main () {
  int a , b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;

  vector<double> water, sugar;
  REP(i,f+1) {
    REP(j,f+1) {
      int x = 100*a*i + 100*b*j;
      int y = c*i + d*j;
      if (x <= f) water.push_back(x);
      if (y <= f) sugar.push_back(y);
    }
  }

  SORT(water);
  SORT(sugar);

  water.erase(unique(ALL(water)),water.end());
  sugar.erase(unique(ALL(sugar)),sugar.end());

  //DEBUG(cnct_e);
  double cnct_max = 0;
  int xm, ym;
  for (auto x : water) {
    for (auto y : sugar) {
      //DEBUG(x);
      //DEBUG(y);
      if (x == 0 && y == 0) continue;
      double cnct = 100*(double)y/ß(x+y);
      //DEBUG(cnct);
      if (y > (double)e/100*x || x+y > f) {
        continue;
      }
      else {
        if (cnct_max < cnct) {
          cnct_max = cnct;
          xm = x;
          ym = y;
        }
      } 
    }
  }

  cout << xm+ym << " " << ym << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:35: error: '\U000000df' was not declared in this scope
   67 |       double cnct = 100*(double)y/ß(x+y);
      |                                   ^
Language: Java

import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int D = sc.nextInt();
    int E = sc.nextInt();
    int F = sc.nextInt();

    double max = -1;
    int maxSugar = 0;
    int maxSugarWater = 0;
    for (int i = 0; i*100 <= F; i++) {
      for (int m = 0; m*A*100 <= i*100; m++) {
        if ((i-m*A)%B == 0) {
          int n = (i-m*A)/B;
          for (int p = 0; p*C <= i*E; p++) {
            int q = (i*E-p*C) / D;
            int sugar = p*C + q*D;
            int sugarWater = sugar + m*A*100 + n*B*100;
            if (sugarWater == 0){
              continue;
            }
            double v = (double) 100*sugar/sugarWater;
            if (sugarWater <= F && max < v) {
              max = v;
              maxSugar = sugar;
              maxSugarWater = sugarWater;
            }
          }
        }
      }
    }
    
    System.out.println(maxSugarWater + " " + maxSugar);
  }


Compiler output:
Main.java:40: error: reached end of file while parsing
  }
   ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

class CSugarWater {
public:
void solve(std::istream& cin, std::ostream& cout) {
    int A, B, C, D, E, F;
    cin >> A >> B >> C >> D >> E >> F;

    double ma = 0;
    int ma_g = 100 * A, ma_sugar = 0;

    for (int a = 0; a <= 30; a++){
        for (int b = 0; b <= 30; b++){
            int water = 100 * a * A + 100 * b * B;
            for (int c = 0; c * C <= water; c++){
                int t = (E * water - 100 * c * C) / (100 * D);
                int s = (F - water - c * C) / D;
                int d = min(t, s);
                int sugar = c * C + d * D;
                int g = water + sugar;
                if (d < 0)
                    continue;
                if (g == 0)
                    continue;
                if (g > F)
                    continue;
                double percent = double(100 * sugar) / g;
                if (sugar * (100 + E) > E * g)
                    continue;
                if (ma < percent){
                    ma = percent;
                    ma_g = g;
                    ma_sugar = sugar;
                }
            }
        }
    }

    cout << ma_g << " " << ma_sugar << endl;
}
};

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 <iostream>
#include <vector>

using namespace std;

int main(){
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  
  int lima = (F + A - 1) / A;
  int limb = (F + B - 1) / B;
  int limc = (F + C - 1) / C;
  int limd = (F + D - 1) / D;
  int water = 0;
  int sugar = 0;
  for(int a = 0; a < lima; a++){
    for(int b = 0; b < limb; b++){
      int X = 100 * a * A + 100 * b * B;
      if(X > F) continue;
      int Z = F - X;
      int maxsugar = min(X/100 * E, Z);
      int s = 0;
      for(int c = 0; c < limc; c++){
        for(int d = 0; d < limd; d++){
          if(c * C + d * D > maxsugar) continue;
          if(c * C + d * D >= s){
            s = c * C + d * D;
          }
        }
      }
      double p = 0.0;
      if(p > s(double)/(Z(double) + s(double))){
        water = Z;
        sugar = s;
      }
    }
  }
  cout  << water << " " << sugar;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:16: error: expected primary-expression before 'double'
   32 |       if(p > s(double)/(Z(double) + s(double))){
      |                ^~~~~~
a.cc:32:22: error: 's' cannot be used as a function
   32 |       if(p > s(double)/(Z(double) + s(double))){
      |                      ^
a.cc:32:27: error: expected primary-expression before 'double'
   32 |       if(p > s(double)/(Z(double) + s(double))){
      |                           ^~~~~~
a.cc:32:33: error: 'Z' cannot be used as a function
   32 |       if(p > s(double)/(Z(double) + s(double))){
      |                                 ^
a.cc:32:39: error: expected primary-expression before 'double'
   32 |       if(p > s(double)/(Z(double) + s(double))){
      |                                       ^~~~~~
a.cc:32:45: error: 's' cannot be used as a function
   32 |       if(p > s(double)/(Z(double) + s(double))){
      |                                             ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<map>
#include<stdio.h>
#include<vector>
#define int long long
using namespace std;
#define rep(s,i,n) for(int i=s;i<n;i++)
#define c(n) cout<<n<<endl;
#define ic(n) int n;cin>>n;
signed main(){
	double a,b,c,d,e,f;
	cin>>a>>b>>c>>d>>e>>f;
	double mostnodo=0;
	double ans1=0;
	double ans2=0;
	rep(0,i,30){
		rep(0,j,15){
			rep(0,k,1500){
				rep(0,l,750){
					sum++;
					if(((k*c+l*d)*100)/(a*i+b*j)<=e&&a*i+b*j+k*c+l*d<=f){
						cout<<"a"<<endl;
						if(((k*c+l*d)*100)/(a*i+b*j)>mostnodo){
							mostnodo=((k*c+l*d)*100)/(a*i+b*j);
							ans1=a*i+b*j;
							ans2=k*c+l*d;
						}
					}
				}
			}
		}
	}
	cout<<ans1<<" "<<ans2<<endl;						
}	


Compiler output:
a.cc: In function 'int main()':
a.cc:22:41: error: 'sum' was not declared in this scope
   22 |                                         sum++;
      |                                         ^~~
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
  int a,b,c,d,e,f;
  cin>>a>>b>>c>>d>>e>>f;
  a*=100;b*=100;
  for(int i=0;i<=30&&i*a<=f;i++)
    for(int j=0;j<=30&&i*a+j*b<=f;j++)
      if(i+j)
      {
        g=i*a+j*b;
        h=min(g*e/100,f-g);
        t=0;
        for(int k=0;k<=100&&c*k<=h;k++)
          for(int l=0;l<=100&&c*k+d*l<=h;l++)
            t=max(t,c*k+d*l);
		    if(s1==0||t*(s1+s2)>s2*(g+t))
        {
          s1=g;
          s2=t;
        }
      }
  if(e+f>=d)cout<<(a*e+b*f)-c*(e+f)<<endl;
  else cout<<(a*e+b*f)<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'g' was not declared in this scope
   13 |         g=i*a+j*b;
      |         ^
a.cc:14:9: error: 'h' was not declared in this scope
   14 |         h=min(g*e/100,f-g);
      |         ^
a.cc:15:9: error: 't' was not declared in this scope
   15 |         t=0;
      |         ^
a.cc:19:24: error: 's1' was not declared in this scope
   19 |                     if(s1==0||t*(s1+s2)>s2*(g+t))
      |                        ^~
a.cc:19:37: error: 's2' was not declared in this scope
   19 |                     if(s1==0||t*(s1+s2)>s2*(g+t))
      |                                     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a, b, c, d, e, f,i,j,k,l,ans1,ans2;
  cin >> a >> b >> c >> d >> e >> f;
  ans1=0;
  ans2=0;
  double co=-1;
  for (i=0;i*a*100<=f;i++){
    for(j=0;i*a*100+j*b*100<=f;j++){
      int w=i*a*100+j*b*100;
      for(k=0;c*k<=e*w/100&&w+c*k<=f;k++){
        int s=c*k;
        for (l=0;s+d<=e*w/100&&w+s+d<=f;l++){
          s+=d;
          if(w!=0){
            double res=1000000*s/(w+s);
          if(co<res){
              co=res;
              ans1=w+s;
              ans2=s;
          }
        }
      }
    }
  }
  cout << ans1 << ' ' << ans2 << endl;
}

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