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

#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
using ll = long long;
#define vl vector<long long>
#define vvl vector<vector<long long>>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using pll = pair<long long,long long>;
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
//以上テンプレ

int main(){
    ll D,G;
    cin>>D>>G;
    vl a(D);
    vl b(D);
    rep(i,D) cin>>a.at(i)>>b.at(i);
    ll ans=INF;//回数
    for(ll bit=0;bit<(1<<D);++bit){
        ll sum=0;
        ll ifans=0;
        rep(i,D){
            if(bit&(1<<i)){//全完フラグ
                sum+=a.at(i)*100*(i+1)+b.at(i);
                ifans+=a.at(i);
            }
        }
            if(sum>=G){
                chmin(ans,ifans);
            }else{
                for(ll j=D-1;j>=0;--j){//高い順
                    if(bit&(1<<j)){//全完なら
                        continue;
                    }
                    rep(k,a.at(i)){//高いのを１問ずつ
                    sum+=100*(i+1);
                    ifans++;
                    if(sum>=G){
                        break;
                    }
                    }
                }
            chmin(ans,ifans);
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:32: error: 'i' was not declared in this scope
   51 |                     rep(k,a.at(i)){//高いのを１問ずつ
      |                                ^
a.cc:7:45: note: in definition of macro 'rep'
    7 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

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

#define int64 long long

int main()
{
int64 dd, gg, min = LLONG_MAX, xx;//LLong:longlong max
scanf("%lld %lld", &dd, &gg);
int64 pp[dd], cc[dd], score[dd];
for(int64 ii = 0;ii < dd;ii++){
 scanf("%lld %lld", &pp[ii], &cc[ii]);
 score[ii] = pp[ii] * (ii + 1) * 100 + cc[ii];//ボーナスあり
}
int64 tmp, kosu;
for(int64 bit = 0;bit < (1 << dd);bit++){//2^ddまで
 tmp = 0;
 kosu = 0;
 for(int64 ii = 0;ii < dd;ii++){
  if(bit & (1 << ii)){//2^(ii-1)の数字を比べる
   tmp += score[ii];//完全に解く
   kosu += pp[ii];
}}
if(tmp < gg){
for(int64 ii = dd - 1;ii >= 0;ii--){
 if(!(bit & (1 << ii))){//点数高いものから：上から
  xx = (gg - tmp) / ((ii + 1) * 100);
　//残り点数/配点：残り問題数
 if((gg - tmp) % ((ii + 1) * 100))xx++;
　//割り切れないときの調整
 if(xx > pp[ii])break;//ボーナスもらえるはず、おかしい
  tmp += xx * (ii + 1) * 100;//中途半端に解いた時
  kosu += xx;
 break;
}}}
		
if(min > kosu && tmp >= gg){
　//目標点数以上且つ個数(初期値最大)を小さめに
 min = kosu;
}}
printf("%lld\n", min);

return 0;}

Compiler output:
a.cc:31:1: error: extended character 　 is not valid in an identifier
   31 | 　//残り点数/配点：残り問題数
      | ^
a.cc:33:1: error: extended character 　 is not valid in an identifier
   33 | 　//割り切れないときの調整
      | ^
a.cc:41:1: error: extended character 　 is not valid in an identifier
   41 | 　//目標点数以上且つ個数(初期値最大)を小さめに
      | ^
a.cc: In function 'int main()':
a.cc:31:1: error: '\U00003000' was not declared in this scope
   31 | 　//残り点数/配点：残り問題数
      | ^~
a.cc:33:3: error: expected ';' before 'if'
   33 | 　//割り切れないときの調整
      |   ^
      |   ;
   34 |  if(xx > pp[ii])break;//ボーナスもらえるはず、おかしい
      |  ~~
a.cc:41:1: error: '\U00003000' was not declared in this scope
   41 | 　//目標点数以上且つ個数(初期値最大)を小さめに
      | ^~
Language: C++

#include<bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0);
#define ll long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define endl '\n'

using namespace std;

main()
{
    fast;
    int d,g,i;
    cin>>d>>g;
    int p[d],c[d];
    for (i=0;i<d;i++)
        cin>>p[i]>>c[i];
    int ans=INT_MAX,mask;
    for (mask=0;mask<(1<<d);mask++)
    {
        int s=0,cnt=0,left=-1
        for (i=0;i<D;i++)
        {
            if ((mask>>i)&1)
            {
                s+=p[i]*100*(i+1)+c[i];
                cnt+=p[i];
            }
            else
                left=i;
        }
        if (s<g)
        {
            int rem=g-s;
            if (rem<(left+1)*100*p[left])
            {
                int extra;
                if (rem%((left+1)*100)==0)
                    extra=rem/((left+1)*100);
                else
                    extra=rem/((left+1)*100)+1;
                if (extra<p[left])
                    cnt+=extra;
                else
                    continue;
            }
            else
                continue;
        }
        ans=min(ans,cnt);
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:24:9: error: expected ',' or ';' before 'for'
   24 |         for (i=0;i<D;i++)
      |         ^~~
a.cc:24:20: error: 'D' was not declared in this scope
   24 |         for (i=0;i<D;i++)
      |                    ^
a.cc:24:25: error: expected ';' before ')' token
   24 |         for (i=0;i<D;i++)
      |                         ^
      |                         ;
Language: C++

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

int vsum(vector<int> v){
  int a=0;
  for(int i=0;i<v.size();i++)a+=v[i];
  return a;
}

int check(vector<int> a,vector<int> b,int k){
  int c=0;
  for(i=0;i<k;i++)if(a[i]!=b[i])c=1;
  return c;
}

void kansu(vector<int> &p,vector<int> &c,int &D,int &G,vector<int> N,int n,int sum,int &K){
  if(N[n]==p[n])sum+=c[n];
  if(sum>=G){if(vsum(N)<K)K=vsum(N);return;}
  if(n!=D-1&&!check(N,p,n))kansu(p,c,D,G,N,n+1,sum,K);
  if(n==D-1&&N[n]==p[n])return;
  if(N[n]!=p[n]){sum+=(n+1)*100;N[n]++;kansu(p,c,D,G,N,n,sum,K);}
  return;
}
int main(){
  int i,D,G,n=0,sum=0;
  cin>>D>>G;
  vector<int> p(D),c(D),N(D);
  for(i=0;i<D;i++)cin>>p[i]>>c[i];
  int K=vsum(p);
  kansu(p,c,D,G,N,n,sum,K);
  cout<<K<<endl;
}

/*
N[i]!=P[i]の組が二つ現れないようにする！
*/


Compiler output:
a.cc: In function 'int check(std::vector<int>, std::vector<int>, int)':
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i=0;i<k;i++)if(a[i]!=b[i])c=1;
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MOD=1000000007;
const double PI=3.14159265358979;
const ll INF= pow(10,18);
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  
int main() {
  ll D,G;
  cin >> D >> G;
  vl p(D),c(D);
  rep(i,D){
    cin >> p[i] >> c[i];
  }
  vvl dp(D,vl(D*100,-INF));//dp[i][j]で、(i+1)*100点文台以上で計j問解いた時の得点の最大値とする。
  rep(i,p[D-1]){
    dp[D-1][i]=100*D*i;
  }
  dp[D-1][p[D-1]]=100*D*p[D-1]+c[D-1];
  ll sumP=p[D-1];
  ll x=sumP;
  for(ll i=D-2;i>=0;i--){
    sumP+=p[i];
    rep(j,sumP+1){
      if(p[i]<=x){
        if(j<p[i]){
          dp[i][j]=dp[i+1][j];
        }
        else if(j>=p[i]&&j<=x){
          dp[i][j]=max(dp[i+1][j],c[i]+dp[i+1][j-p[i]]+p[i]*(100+i));
        }
        else(x<j){
          if(j!=sumP){
            dp[i][j]=max(dp[i][j],dp[i+1][x]+(j-x)*(i+1)*100);
          }
          else
            dp[i][j]=dp[i+1][x]+(sumP-x)*(i+1)*100+c[i];
        }
      }
      else(x<p[i]){
        if(j<=x){
          dp[i][j]=dp[i+1][j];
        }
        else if(j<p[i]){
          dp[i][j]=dp[i+1][x]+(j-x)*100*(i+1);
        }
        else if(j==sumP){
          dp[i][j]=dp[i+1][x]+(p[i])*100*(i+1)+c[i];
        }
        else
          dp[i][j]=max(dp[i+1][x]+(j-x)*100*(j+1),dp[i+1][j-p[1]]+(p[i])*100*(i+1)+c[i]);
      }
    }
    x=sumP;
  }
  ll i=0;
  while(dp[0][i]<G){
    i++;
  }
  cout << i << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:18: error: expected ';' before '{' token
   39 |         else(x<j){
      |                  ^
      |                  ;
a.cc:47:19: error: expected ';' before '{' token
   47 |       else(x<p[i]){
      |                   ^
      |                   ;
Language: C++

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

int main(){
    ll d,g;
    cin >> d >> g;
    vector<pair<ll,ll>> pc(d);
    for (ll i = 0; i < d; i++){
        cin >> pc[i].first >> pc[i].second;
    }
    ll sum;
    ll solve;
    ll maxi;
    ll ans = 10000;
    ll x;
    for (ll bit = 0; bit <= (1<<d); bit++){
        sum = 0;
        maxi = 0;
        solve = 0;
        for (ll i = 0; i < d; i++){
            if (bit & (1 << i)){
                sum += pc[i].first*(i+1)*100 + pc[i].second;
                solve += pc[i].first;
            }else{
                maxi = i+1;
            }
        }
        
        if (g > sum){
            x = g - sum;
            x /= maxi*100;
            if (x >= pc[maxi-1].first){
                continue;
            }
            solve += x;
            sum += maxi*100*y;
        }
        
        ans = min(ans,solve);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:29: error: 'y' was not declared in this scope
   37 |             sum += maxi*100*y;
      |                             ^
Language: C++

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

void hantei(vector<int> &p,vector<int> &c,vector<int> r,int i,int &N,int n,int &G,int sum){
  if(i<p.size()-1)hantei(p,c,r,i+1,N,n,G,sum);
  sum+=100*p[i]*(i+1)+c[i];
  n+=p[i];
  r[i]=p[i];
  for(j=p.size()-1;j>=0;j--)if(!r[j]){k=j;break;}
  if(sum>=G)N=min(n,N);
  else if(sum+100*(k+1)*(p[k]-1)<G&&i<p.size()-1&&N>n+p[i+1])hantei(p,c,r,i+1,N,n,G,sum);
  else if(sum+100*(k+1)*p[k]>=G){
    n+=(G-sum)/(100*(k+1));
    if(((G-sum)%(100*(k+1))))n++;
    N=min(n,N);
    r[k]=(G-sum)/(100*(k+1));
  }
  //for(int a=0;a<p.size();a++)cout <<r[a]<<"/"<<p[a]<<",";cout<<"A."<< n <<endl;
}

int main() {
  int D,i,G,N=1000;
  cin>>D>>G;
  vector<int> p(D),c(D),r(D);//p:100i点の問題数,c:完答ボーナス,r:100i点の問題の正当数
  for(i=0;i<D;i++)cin>>p[i]>>c[i];
  int n=0;
  if(100*D*p[D-1]>=G){
    n+=G/(100*D);
    if(G%(100*D))n++;
    N=min(n,N);
  }
  hantei(p,c,r,0,N,0,G,0);
  cout << N <<endl;
}

Compiler output:
a.cc: In function 'void hantei(std::vector<int>&, std::vector<int>&, std::vector<int>, int, int&, int, int&, int)':
a.cc:9:7: error: 'j' was not declared in this scope
    9 |   for(j=p.size()-1;j>=0;j--)if(!r[j]){k=j;break;}
      |       ^
a.cc:9:39: error: 'k' was not declared in this scope
    9 |   for(j=p.size()-1;j>=0;j--)if(!r[j]){k=j;break;}
      |                                       ^
a.cc:11:20: error: 'k' was not declared in this scope
   11 |   else if(sum+100*(k+1)*(p[k]-1)<G&&i<p.size()-1&&N>n+p[i+1])hantei(p,c,r,i+1,N,n,G,sum);
      |                    ^
Language: C++

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

int keisan(vector<int> &p,vector<int> &c,vector<int> r,int &N,long int G){
  long int sum=0,n=0;
  for(int i=0;i<p.size();i++){
    sum+=100*(i+1)*r[i];
    if(r[i]==p[i])sum+=c[i];
    n+=r[i];
    if(sum>=G||n>=N){
      N=min(N,n);
      return 1;
    }
  }
  return 0;
}

void hantei(vector<int> &p,vector<int> &c,vector<int> r,int i,int &N,long int G){
  for(int j=0;j<=p[i];j++){
    r[i]=j;
    if(keisan(p,c,r,N,G))return;
    if(i<p.size()-1)hantei(p,c,r,i+1,N,G);
  }
}

int main() {
  int D,i,N=0;
  long int G;
  cin>>D>>G;
  vector<int> p(D),c(D),r(D);//p:100i点の問題数,c:完答ボーナス,r:100i点の問題の正当数
  for(i=0;i<D;i++){
    cin>>p[i]>>c[i];
    N+=p[i];
  }
  hantei(p,c,r,0,N,G);
  cout << N <<endl;
}

Compiler output:
a.cc: In function 'int keisan(std::vector<int>&, std::vector<int>&, std::vector<int>, int&, long int)':
a.cc:11:12: error: no matching function for call to 'min(int&, long int&)'
   11 |       N=min(N,n);
      |         ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:11:12: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   11 |       N=min(N,n);
      |         ~~~^~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:11:12: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   11 |       N=min(N,n);
      |         ~~~^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int D,G,p[11],c[11],min_ca;
    cin >> D >> G;
    for(int i; i < D, ++i){
        cin >> p[i] >>c[i];
    }

    for (int mask; mask < (1 << D); mask++){
        int score=0;max_rate=-1, ca=0;
        for(int i; i < D; i++){
            if(mask >> i == 1){
                score = p[i]*100*(i+1) + c[i];
                ca += p[i];
            }else{
                max_rate=i;//ボーナスを取らない最大のレート
            }
        }
        int required_ca = (G-score) / (p[max_rate]*100);
        ca += required_ca;
        if(required_ca < p[max_rate] && ca < min_ca){
            min_ca = ca;
        }
    }
    cout << min_ca << endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: expected ';' before ')' token
    6 |     for(int i; i < D, ++i){
      |                          ^
      |                          ;
a.cc:11:21: error: 'max_rate' was not declared in this scope
   11 |         int score=0;max_rate=-1, ca=0;
      |                     ^~~~~~~~
a.cc:11:34: error: 'ca' was not declared in this scope; did you mean 'c'?
   11 |         int score=0;max_rate=-1, ca=0;
      |                                  ^~
      |                                  c
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int d,g;
    cin >> d >> g;
    int p[11];c[11];
    for(int i=0;i<d;i++)cin >> p[i] >> c[i];
    int ans=10000000;
    for(int mask=0;mask<(1<<d);mask++){
        int s=0,num=0,rest_max=-1;
        for(int i=0;i<d;i++){
            if(mask&1<<i){
                s+=100*(i+1)*p[i]+c[i];
                num +=p[i];
            }
            else{
                rest_max=i;
            }
        }
        if(s<g){
            int s1=100*(rest_max+1);
            int need = (g - s + s1 - 1) / s1;
            if(need > p[rest_max]){
                continue;
        }
        num+=need;
        }
        ans=min(ans,num);
        cout << ans;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'c' was not declared in this scope
    6 |     int p[11];c[11];
      |               ^
Language: C++

program name
    implicit none
    integer(4):: d,g
    integer(4),allocatable:: p(:),c(:)
    integer(4):: i,scr,slv,ans = 1000000000

    read*, d,g
    allocate(p(d),c(d))

    do i=1,d
        read*,p(i),c(i)
    end do


    do i= 0,2**d-1
        call calc_point(i,scr,slv)
        if (scr < g) cycle
        ans = min(ans,slv)
    end do

    print*, ans

    contains
    subroutine calc_point(num,score,solve)
        integer(4),intent(in):: num
        integer(4),intent(out):: score, solve
        integer(4):: i, max_not_solve, max_limit
        score=0
        solve=0
        max_not_solve = 0
        max_limit = 0

        do i=1,d
            if (and(rshift(num,i-1),1) == 1) then
                score=score + 100*i*p(i) + c(i)
                solve=solve + p(i)
            else
                max_not_solve = max(max_not_solve, 100*i)
                max_limit = p(i)
            end if
        end do

        if (score < g) then
            do i=1,max_limit-1
                score = score + max_not_solve
                solve = solve + 1
                if (score >= g) exit
            end do
        end if
    end subroutine
end program name

Compiler output:
a.cc:1:1: error: 'program' does not name a type
    1 | program name
      | ^~~~~~~
Language: C++

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

int main() {
    int d, g;
    cin >> d >> g;
    vector<int> p(n), c(n);
    for(int i = 0; i < d; i++){
        cin >> p[i] >> c[i];
    }

    int ans = 1e9;
    for(int bit = 0; bit < (1 << d); bit++){
        int s = 0, num = 0, rest_max = -1;
        for(int i = 0; i < d; i++){
            if(bit & (1 << i)){
                s += (i + 1) * 100 * p[i] + c[i];
                num += p[i];
            }else{
                rest_max = i;
            }
        }
        if(s < g){
            int ss = (rest_max + 1) * 100;
            int need = ((g - s) + (ss - 1)) / ss;
            if(need >= p[rest_max]){
                continue;
            }
            num += need;
        }
        ans = min(ans, num);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'n' was not declared in this scope
    7 |     vector<int> p(n), c(n);
      |                   ^
Language: C++

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

#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i < (ll)(n); i++)
#define INF 1000000000000
#define MOD 1000000007
using ll = long long;

int main(){
  ll d,g;
  cin >> d >> g;
  vector<ll> P(d),C(D),A(D);
  rep(i,d)cin>>P.at(i)>>C.at(i);
  rep(i,d)A.at(i) = 100*P.at(i)*(i+1)+C.at(i);

  ll res = (1<<30);
  for(int bit = 1; bit < (1<<D); bit++){
    ll sum = 0, num = 0;
    rep(i,D){
      if(bit&(1<<i))sum+=A.at(i), num+=P.at(i);
    }
    if(sum>g)res=min(res,num);
    else{
      for(int i = d-1; i >= 0; i--){
        if(bit&(1<<i))continue;
        for(int j = 0; j< P.at(i); j++){
          if(sum>=G)break;
          sum += 100*(i+1);
          num++;
        }
      }
      res = min(res,num);
    }
  }
  cout<<res<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'D' was not declared in this scope
   13 |   vector<ll> P(d),C(D),A(D);
      |                     ^
a.cc:28:19: error: 'G' was not declared in this scope
   28 |           if(sum>=G)break;
      |                   ^
Language: C++

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

#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i < (ll)(n); i++)
#define INF 1000000000000
#define MOD 1000000007
using ll = long long;

int main(){
  ll d,g;
  cin >> d >> g;
  vector<ll> P(d),C(D),A(D);
  rep(i,d)cin>>P.at(i)>>C.at(i);
  rep(i,d)A.at(i) = 100*P.at(i)*(i+1)+C.at(i);

  ll res = (1<<30);
  for(int bit = 1; bit < (1<<D); bit++){
    ll sum = 0, num = 0;
    rep(i,D){
      if(bit&(1<<i))sum+=A.at(i), num+=p.at(i);
    }
    if(sum>g)res=min(res,num);
    else{
      for(int i = d-1; i >= 0; i--){
        if(bit&(1<<i))continue;
        for(int j = 0; j< p.at(i); j++){
          if(sum>=G)break;
          sum += 100*(i+1);
          num++;
        }
      }
      res = min(res,num);
    }
  }
  cout<<res<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'D' was not declared in this scope
   13 |   vector<ll> P(d),C(D),A(D);
      |                     ^
a.cc:21:40: error: 'p' was not declared in this scope
   21 |       if(bit&(1<<i))sum+=A.at(i), num+=p.at(i);
      |                                        ^
a.cc:27:27: error: 'p' was not declared in this scope
   27 |         for(int j = 0; j< p.at(i); j++){
      |                           ^
a.cc:28:19: error: 'G' was not declared in this scope
   28 |           if(sum>=G)break;
      |                   ^
Language: C++

#include<iostream>
#include<vector>
#include<map>

int main(){
	int i,count=0;
	long long int d,g,sum=0;
	std::cin>>d>>g;

	std::map<long long int, long long int> mp;

	std::vector<long long int> p;
	std::vector<long long int> c;

	i = d;

	while (i>0) {
		long long int x, y;
		std::cin >> x >> y;

		p.push_back(x);
		c.push_back(y);
		i--;
	}

	std::reverse(p.begin(), p.end());
	std::reverse(c.begin(), c.end());

	for (i = 0; i < d; i++){
		for (int j = 0; j < p[i]; j++) {
			sum += (d-i)*100;
			count++;
			if (sum > g) {
				std::cout << count-1 << std::endl;
				exit(0);
			}
		}
		sum += c[i];
		if (sum > g) {
			std::cout << count-1 << std::endl;
			exit(0);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: 'reverse' is not a member of 'std'
   26 |         std::reverse(p.begin(), p.end());
      |              ^~~~~~~
a.cc:27:14: error: 'reverse' is not a member of 'std'
   27 |         std::reverse(c.begin(), c.end());
      |              ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main() {
  int d, g, a = 1e9;
  cin >> d >> g; g /= 100;
  v1i n(d), b(d), p(d), c(d);
  rep(i, d){
    cin >> n[i] >> b[i];
    b[i] /= 100;
    p[i] = (i+1)*n[i]+b[i];
    c[i] - (i+1)*(n[i]-1);
  }
  rep(i, pow(3, d)){
    int tmp = 0, e = i, f = 0, h = 0;
    bool k = 1, l = 0;
    rep(j, d){
      if(e % 3 == 1){
        tmp += p[j];
        f += n[i];
      }
      else if(k && e % 3 = 2){
        tmp += c[j];
        h = j+1;
        k = 0;
      }
      else if(e % 3 == 2){
        l = 1;
        break;
      }
      e /= 3;
    }
    if(l) contine;
    if(tmp >= g){
      if(h > 0){
        tmp -= c[h-1];
        f += (g-tmp-1)/h+1;
      }
      a = min(a, f);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:17: error: lvalue required as left operand of assignment
   48 |       else if(k && e % 3 = 2){
      |               ~~^~~~~~~~
a.cc:59:11: error: 'contine' was not declared in this scope
   59 |     if(l) contine;
      |           ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main() {
  int d, g, a = 1e9;
  cin >> d >> g; g /= 100;
  vi1 n(d), b(d), p(d), c(d);
  rep(i, d){
    cin >> n[i] >> b[i];
    b[i] /= 100;
    p[i] = (i+1)*n[i]+b[i];
    c[i] - (i+1)*(n[i]-1);
  }
  rep(i, pow(3, d)){
    int tmp = 0, e = i, f = 0, h = 0;
    bool k = 1, l = 0;
    rep(j, d){
      if(e % 3 == 1){
        tmp += p[j];
        f += n[i];
      }
      else if(k && e % 3 = 2){
        tmp += c[j];
        h = j+1;
        k = 0;
      }
      else if(e % 3 == 2){
        l = 1;
        break;
      }
      e /= 3;
    }
    if(l) contine;
    if(tmp >= g){
      if(h > 0){
        tmp -= c[h-1];
        f += (g-tmp-1)/h+1;
      }
      a = min(a, f);
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:3: error: 'vi1' was not declared in this scope; did you mean 'v1i'?
   33 |   vi1 n(d), b(d), p(d), c(d);
      |   ^~~
      |   v1i
a.cc:35:12: error: 'n' was not declared in this scope
   35 |     cin >> n[i] >> b[i];
      |            ^
a.cc:35:20: error: 'b' was not declared in this scope
   35 |     cin >> n[i] >> b[i];
      |                    ^
a.cc:37:5: error: 'p' was not declared in this scope
   37 |     p[i] = (i+1)*n[i]+b[i];
      |     ^
a.cc:38:5: error: 'c' was not declared in this scope
   38 |     c[i] - (i+1)*(n[i]-1);
      |     ^
a.cc:45:16: error: 'p' was not declared in this scope
   45 |         tmp += p[j];
      |                ^
a.cc:46:14: error: 'n' was not declared in this scope
   46 |         f += n[i];
      |              ^
a.cc:48:17: error: lvalue required as left operand of assignment
   48 |       else if(k && e % 3 = 2){
      |               ~~^~~~~~~~
a.cc:49:16: error: 'c' was not declared in this scope
   49 |         tmp += c[j];
      |                ^
a.cc:59:11: error: 'contine' was not declared in this scope
   59 |     if(l) contine;
      |           ^~~~~~~
a.cc:62:16: error: 'c' was not declared in this scope
   62 |         tmp -= c[h-1];
      |                ^
Language: C++

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

int main(){
  int D,G;
  cin >> D >> G;
  vector<pair<int,int>> p(D);
  for(int i=0;i<D;++i){
    cin >> p.at(i).first >> p.at(i).second;
  }

  int ans = 1e9;
  for(int mask=0;mask<(1 << D);++mask){
    int s = 0, num = 0, rest_max = -1;
    for(int i=0;i<D;++i){
      if(mask >> i & 1){
        //マスクで"1"だった問題をすべて解いた時の基本点と、ボーナス点を"s"に追加
        //"numには解いた問題数を追加"
        s += 100*(i+1)*p.at(i).first+p.at(i).second;
        num += p.at(i).first;
      }else{
        rest_max = i;
      }
    }
    if(s<G){
      int s1 = 100*(rest_max+1);
      int need = (G-s+s1-1)/s1;
      //解く必要のある問題数を求める
      if(need>=p.at(rest_max).first){
        //解く必要のある問題数より実際の問題数が少なかった場合"continue"する
        continue;
      }
      num += need;
    }
    ans = min(ans,num);
  }
  cout << and << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:15: error: expected identifier before '<<' token
   37 |   cout << and << endl;
      |               ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int D,G;
int p[11],c[11];
int ans = 9999999;

void ZTS(int i,int sum,int ssum,vector<bool> X) {
  if (i == D) {
    int f = 0;
    for (int j = D - 1; j >= 0; j--) {
      if (X[j] != true) f = j + 1; break;
    }
    if (ssum < G && ssum + f * (p[f] - 1) > G) {
      int kou = sum + ((G - ssum + 100 * f - 1) / 100 * f);
      ans = min(ans,kou);
    }
  }
  else {
    X.push_back(false);
    ZTS(i + 1,sum,ssum,X);
    X.pop_back();
    X.push_back(true);
    ZTS(i + 1,sum + p[i],ssum + p[i] * (i + 1) * 100 + c[i],X);
  }
}

int main() {
  cin >> D >> G;
  for (int i = 0; i < D; i++) {
    cin >> p[i + 1] >> c[i + 1];
  }
  vector<bool> SYOKI(0);
  ZTS(0,0,0,SYOKI)
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:19: error: expected ';' before 'cout'
   34 |   ZTS(0,0,0,SYOKI)
      |                   ^
      |                   ;
   35 |   cout << ans << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int D,G;
int p[11],c[11];
int ans = 9999999;

void ZTS(int i,int sum,int ssum,vector<bool> X) {
  if (i == D) {
    int f = 0;
    for (int j = D - 1; j >= 0; j--) {
      if (X[j] != true) f = j + 1; break;
    }
    if (ssum < G && ssum + f * (p[f] - 1) > G) {
      int kou = sum + ((G - ssum + 100 * f - 1) / 100 * f);
      ans = min(ans,kou);
    }
  }
  else {
    X.push_back(false);
    ZTS(i + 1,sum,ssum,X);
    X.pop.back();
    X.push_back(true);
    ZTS(i + 1,sum + p[i],ssum + p[i] * (i + 1) * 100 + c[i],X);
  }
}

int main() {
  cin >> D >> G;
  for (int i = 0; i < D; i++) {
    cin >> p[i + 1] >> c[i + 1];
  }
  vector<bool> SYOKI(0);
  ZTS(0,0,0,SYOKI)
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'void ZTS(int, int, int, std::vector<bool>)':
a.cc:22:7: error: 'class std::vector<bool>' has no member named 'pop'
   22 |     X.pop.back();
      |       ^~~
a.cc: In function 'int main()':
a.cc:34:19: error: expected ';' before 'cout'
   34 |   ZTS(0,0,0,SYOKI)
      |                   ^
      |                   ;
   35 |   cout << ans << endl;
      |   ~~~~
Language: C++

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
using PII = pair<int, int>;
using VPII = vector<PII>;

int main()
{
  int D, G;  cin >> D >> G;
  VPII Problems(D);
  int p, c;
  REP(i, D) {
    cin >> p >> c;
    Problems[i] = make_pair(p, c);
  }
  
  int ans = -1;
  for(int i=0; i < (1<<D); i++) {
    bitset<10> bs(i);
    int point = 0, pnum = 0;
    REP(j, D) {
      if(bs.test(j)) {
        tie(p, c) = Problems[j];
        point += 100*(j+1)*p + c;
        pnum += p;
      }
    }
    if(point >= G) {
      if(ans == -1 || ans > pnum)
        ans = pnum;
    } else {
      REP(j, D) {
        int pn = D-1-j;
        if(!bs.test(pn)) {
          REP(k, Problems[pn].first+1) {
            point += 100*(pn+1);
            pnum++;
            if(k == 
            if(point >= G) {
              if(ans == -1 || ans > pnum)
                ans = pnum;
            }
          }
        }
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:13: error: expected primary-expression before 'if'
   41 |             if(point >= G) {
      |             ^~
a.cc:40:20: error: expected ')' before 'if'
   40 |             if(k ==
      |               ~    ^
      |                    )
   41 |             if(point >= G) {
      |             ~~      
a.cc:45:11: error: expected primary-expression before '}' token
   45 |           }
      |           ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
typedef long int li;



int main(){
  int n,g,lim; cin >>n >>g;
  lim=1<<n;
  int ans=0;
  vector<int> p(n),c(n),full(n);
  rep(i,n){
    cin >>p[i] >>c[i];
    ans+=p[i];
    full[i]=(i+1)*p[i]*100+c[i];
  }
  if(df){
    for(auto x:full) cout << x << " ";
    cout << "\n";
  }
  
  auto f=
    [&](int a,int bs){
      if(df)printf("(%d,%d)\n",a,bs);
      li gain=0;
      int cnt=0;
      rep(i,n){
        if(bs%2 and a!=i){
          gain+=full[i];
          cnt+=p[i];
          if(df)printf("%d ",i+1);
        } 
        bs/=2;
      }
      if(df)printf("\n");
      if(gain>=g)return cnt;
      if(gain+full[a]<g) {
        if(df)printf("impossible\n");
        return ans;
      }
      if(gain+(a+1)*p[a]*100<=g){
        if(df)printf("all\n");
        return cnt+p[a];
      } 
      if(df)printf("[%d]",(g-gain+(a+1)*100-1)/((a+1)*100));
      return cnt+(g-gain+(a+1)*100-1)/((a+1)*100);
    };

  rep(i,n)
    rep(bs,lim){
    int ret=f(i,bs);
    if(ans>ret) ans=ret;
  }
  cout << ans << "\n";
}


Compiler output:
a.cc: In lambda function:
a.cc:49:17: error: inconsistent types 'int' and 'long int' deduced for lambda return type
   49 |       return cnt+(g-gain+(a+1)*100-1)/((a+1)*100);
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

//  ABC104_C_AllGreen.go
// 

package main

import (
    "fmt"
    //"strings"
)

var pc [][]int
var pointMatrix [][]int
var min int

func calPoint(point int,i int ,D int ,G int,correct int,min *int) {

  if i == D - 1 {
      for j := 0; j < pc[i][0]+1; j++{
          //fmt.Println(j,":",point+pointMatrix[i][j],"correct:",correct+j)
          if point+pointMatrix[i][j] >= G && correct+j <= *min {
             *min = correct+j
          }
      }
      return

  } else {

     for j := 0 ; j < pc[i][0]+1 ; j++ {
       //fmt.Print(j,"-")
        if correct+j > *min {
           return
        }
        calPoint(point+pointMatrix[i][j],i+1,D,G,correct+j,min)
     }
  }
}

func main() {
  var D int
  var G int
  var P int
  var C int
  var point int
  var correct int

  fmt.Scan(&D,&G)

  pc = make([][]int,D)

  for i := 0; i < D; i++ {
     pc[i] = make([]int,2)
  }

  min = 1

  for i := 0 ; i < D ; i++ {
    fmt.Scan(&P,&C)
    pc[i][0] = P
    pc[i][1] = C
    min *= P

    }

  //fmt.Println(pc)

  pointMatrix = make([][]int,D)

  for i := 0; i < D; i++ {
    pointMatrix[i] = make([]int,pc[i][0]+1)
  }

  for i :=0; i < D; i++ {
    for j :=0 ; j <= pc[i][0]; j++ {
      pointMatrix[i][j] = j * (i+1) * 100
    }
      pointMatrix[i][pc[i][0]] += pc[i][1]
   }

    //fmt.Println(pointMatrix)

  point = 0
  correct = 0

  calPoint(point,0,D,G,correct,&min)

  fmt.Println(min)
}




Compiler output:
a.cc:4:1: error: 'package' does not name a type
    4 | package main
      | ^~~~~~~
a.cc:38:1: error: 'func' does not name a type
   38 | func main() {
      | ^~~~
Language: C++

int main() {
    int d, g;
    cin >> d >> g;
    vector<pair<int, int>> pc(d);
    for(int i = 0; i < d; ++i)
        cin >> pc.at(i).first >> pc.at(i).second;
    int ans = 0x40000000;
    for(int i = 0, tmp, tn,rest_max; i < (1 << d); ++i) {
        tmp = 0, tn = 0,rest_max=-1;
        for(int j = 0; j < d; ++j) {
            if(i & (1 << j)) {
                tn += pc.at(j).first;
                tmp += pc.at(j).first * 100 * (j + 1) + pc.at(j).second;
            }else{
				rest_max=j;
			}
        }
        if(tmp < g) {
            int s1=100*(rest_max+1);
			int need=(g-tmp)/s1;
			if(need>=pc.at(rest_max).first)
				continue;
			tn+=need;
		}
        ans = min(ans, tn);
    }
    cout << ans << "\n"s;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> d >> g;
      |     ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<pair<int, int>> pc(d);
      |     ^~~~~~
a.cc:4:12: error: 'pair' was not declared in this scope
    4 |     vector<pair<int, int>> pc(d);
      |            ^~~~
a.cc:4:17: error: expected primary-expression before 'int'
    4 |     vector<pair<int, int>> pc(d);
      |                 ^~~
a.cc:6:16: error: 'pc' was not declared in this scope
    6 |         cin >> pc.at(i).first >> pc.at(i).second;
      |                ^~
a.cc:12:23: error: 'pc' was not declared in this scope
   12 |                 tn += pc.at(j).first;
      |                       ^~
a.cc:21:34: error: 'pc' was not declared in this scope
   21 |                         if(need>=pc.at(rest_max).first)
      |                                  ^~
a.cc:25:15: error: 'min' was not declared in this scope; did you mean 'main'?
   25 |         ans = min(ans, tn);
      |               ^~~
      |               main
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout << ans << "\n"s;
      |     ^~~~
a.cc:27:20: error: unable to find string literal operator 'operator""s' with 'const char [2]', 'long unsigned int' arguments
   27 |     cout << ans << "\n"s;
      |                    ^~~~~
Language: C++

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

int main(){
	int d,g;
	cin>>d>>g;
	vector<pair<int,int>>pc(d);
	for(int i=0;i<d;++i)cin>>pc.at(i).first>>pc.at(i).second;
	int ans=inf;
	for(int i=0,tmp,tn;i<(1<<d);++i){
		tmp=0,tn=0;
		vector<bool>used(d,false);
		for(int j=0;j<d;++j){
			if(i&(1<<j)){
				tn+=pc.at(j).first;
				tmp+=pc.at(j).first*100*(j+1)+pc.at(j).second;
				used.at(j)=true;
			}
		}
		if(tmp<g){
			for(int i=d-1;i>=0;--i){
				if(used.at(i)==false){
					for(int j=0;j<pc.at(i).first;++j){
						++tn;
						tmp+=(i+1)*100;
						if(tmp>=g)goto loopbreak;
					}
				}
			}
		}
		loopbreak:
		if(tmp>=g)ans=min(ans,tn);
	}
	cout<<ans<<"\n"s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'inf' was not declared in this scope; did you mean 'ynf'?
    9 |         int ans=inf;
      |                 ^~~
      |                 ynf
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main()
{
	int D, G;
	cin >> D >> G;
	vector<int> p(D, 0), c(D, 0);
	for (int i = 0;i < D;i++) {
		cin >> p[i];
		cin >> c[i];
	}
	int min = 1000000000;
	//全部解く問題の種類をbit全探索する.
	for (int bit = 0;bit < (1 << D);bit++) {
		int count = 0;
		int sum = 0;
		//全部解く問題についての点数と問題数を足しておく。
		for (int i = 0;i < D;i++) {
			if (bit & (1 << i)) {
				sum += c[i] + p[i] * 100 * (i+1);
				count += p[i];
			}
		}
		if (sum >= G) {
			min = std::fmin(min, count);
		}
		else {
			//点数の高いほうから解く
			for (int i = D - 1;i >= 0;i--) {
				//既に全部解いている場合は飛ばす。
				if (bit & (1 << i)) {
					continue;
				}
				else {
					//ひたすら足していき、点数に届いたら抜ける。
					for (int j = 0;j < p[i];j++) {
						if (sum >= G) {
							break;
						}
						else {
							sum += 100 * (i + 1);
							count++;
						}
					}
				}
			}
			min = std::fmin(min, count);
		}
	}
	cout << min << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:36: error: 'fmin' is not a member of 'std'; did you mean 'min'?
   28 |                         min = std::fmin(min, count);
      |                                    ^~~~
      |                                    min
a.cc:50:36: error: 'fmin' is not a member of 'std'; did you mean 'min'?
   50 |                         min = std::fmin(min, count);
      |                                    ^~~~
      |                                    min
Language: C

#include<stdio.h>
int main(void){
  int D,G,cc=0;
  int p[11],c[11],s[1000];
  scanf("%d %d", &D,&G);
  for(int i=0;i<D;i++){
    scanf("%d %d",&p[i],&c[i]);
  }
for(int bit=0;bit<(1<<D);bit++){
 int mcount= tansaku(int bit, int D, int s[]);
for(i=0;i<mcount;i++){
  mondaisu[cc]+=p[s[i]];			//あるパターンにおける解いた問題数の合計
  score[cc]+=(s[i]+1)*100+c[i];		//あるパターンにおけるスコアの合計
}
  cc++;
  
  tansaku(int bit, int D){int count=0;
    for(int i=0;i<D;i++){
      if(bit&(1<<i)){
        s[count]=i;
        count++;
      }
    }
              return count;
                          

Compiler output:
main.c: In function 'main':
main.c:10:14: error: implicit declaration of function 'tansaku' [-Wimplicit-function-declaration]
   10 |  int mcount= tansaku(int bit, int D, int s[]);
      |              ^~~~~~~
main.c:10:22: error: expected expression before 'int'
   10 |  int mcount= tansaku(int bit, int D, int s[]);
      |                      ^~~
main.c:11:5: error: 'i' undeclared (first use in this function)
   11 | for(i=0;i<mcount;i++){
      |     ^
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:3: error: 'mondaisu' undeclared (first use in this function)
   12 |   mondaisu[cc]+=p[s[i]];                        //あるパターンにおける解いた問題数の合計
      |   ^~~~~~~~
main.c:13:3: error: 'score' undeclared (first use in this function)
   13 |   score[cc]+=(s[i]+1)*100+c[i];         //あるパターンにおけるスコアの合計
      |   ^~~~~
main.c:17:11: error: expected expression before 'int'
   17 |   tansaku(int bit, int D){int count=0;
      |           ^~~
main.c:17:26: error: expected ';' before '{' token
   17 |   tansaku(int bit, int D){int count=0;
      |                          ^
      |                          ;
main.c:24:15: error: expected declaration or statement at end of input
   24 |               return count;
      |               ^~~~~~
main.c:24:15: error: expected declaration or statement at end of input
Language: C++

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

int main(){
    int d, g, i, count, score, p_n, mask, ans = MOD;
    cin >> d >> g;
    int p[d], c[d];
    for(i=0; i<d; i++){
        cin >> p[i] >> c[i];
    }
    for(i=0; i<(1 << d); i++){
        score = 0;
        count = 0;
        p_n = -1;
        for(mask=0; mask<d; mask++){
            if((1 << mask) & i){
                score += p[mask]*(mask+1)*100 + c[mask];
                count += p[i];
            }else{
                p_n = mask;
            }
        }
        if(score < g){
            if(d-score > (p_n+1)*100*p[p_n]) count = MOD;
            else{
                count += (d - score + ((p_n+1)*100)-1) / ((p_n+1)*100)
            }
        }
        ans = min(count, ans);
    }
    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:71: error: expected ';' before '}' token
   28 |                 count += (d - score + ((p_n+1)*100)-1) / ((p_n+1)*100)
      |                                                                       ^
      |                                                                       ;
   29 |             }
      |             ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int d,g,p[d],c[d],ans=1000000,sum,rest,num;
int main(){
    scanf("%d %d",&d,&g);
    for(int i=0;i<d;i++) scanf("%d %d",&p[i],&c[i]);
    for(int bit=0;bit < (1<<d);bit++){
        sum=rest=num=0;
        for(int i=0;i<d;i++){
            if(bit & (1<<i)){
                sum+=100*(i+1)*p[i]+c[i];
                num+=p[i];
            }
            else rest=i;
        }
		if(sum>=g)
            ans=min(ans,num);
		else if(sum<g){
            int sh = g-sum;
            int sum2=0;
            int num2=0;
            for(int j=0;j<p[rest];j++){
                sum2=100*(rest+1)*(j+1);
                num2++;
                if(j==p[rest]-1) sum2+=c[rest];
				if(sum2>=sh){
                    ans=min(ans, num+num2);
                    break;
                }
            }
        }
    }
cout << ans << endl;
return 0;
}

Compiler output:
a.cc:3:11: error: size of array 'p' is not an integral constant-expression
    3 | int d,g,p[d],c[d],ans=1000000,sum,rest,num;
      |           ^
a.cc:3:16: error: size of array 'c' is not an integral constant-expression
    3 | int d,g,p[d],c[d],ans=1000000,sum,rest,num;
      |                ^
Language: C++

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

int main(void){
    long long int d,g;
    cin >> d >> g;
    int p[d],c[d],ans = 100;
    for(int i = 0;i < d;i++)cin >> p[i] >> c[i];
    for(int i = 0;i < d;i++){
        long int sum = (i+1)*100*p[i]+c[i];
        if(sum >= g){
            ans = min(ans,p[i]);
        }
    }
    long int sum = 0,a = 1;
    for(int i = d-1;i >= 0;i--){
        for(int j = 0;j < p[i];j++,a++){
            sum += (i+1)*100;
            if(j == p[i]-1)sum += c[i];
            if(sum >= g){
                ans = min(ans,a);
            }
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: no matching function for call to 'min(int&, long int&)'
   21 |                 ans = min(ans,a);
      |                       ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:21:26: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   21 |                 ans = min(ans,a);
      |                       ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:21:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   21 |                 ans = min(ans,a);
      |                       ~~~^~~~~~~