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

use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;

fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

fn solve(g: u32, problems: &Vec<(u32, u32, u32, u32)>, flags: Vec<bool>) -> u32{
    if flags.len() < problems.len(){
        let mut flags_tmp = flags.clone();
        flags_tmp.push(false);
        let ans1 = solve(g, problems, flags_tmp.clone());
        flags_tmp.pop();
        flags_tmp.push(true);
        let ans2 = solve(g, problems, flags_tmp.clone());
        cmp::min(ans1, ans2)
    }else{
        //println!("{:?}", flags);
        let comp_sum: u32 = problems.iter().zip(flags.iter()).filter(|(_, y)| **y).map(|(x, _)| x.2).sum();
        let num_of_solved: u32 = problems.iter().zip(flags.iter()).filter(|(_, y)| **y).map(|(x, _)| x.0).sum();
        //println!("comp_sum = {}, num_of_solved = {}", comp_sum, num_of_solved);
        if g <= comp_sum{
            num_of_solved
        }else{
            if let Some(t) = problems.iter().zip(flags.iter()).filter(|(_, y)| !**y)
                .map(|(x, _)| *x).next(){
                    if g <= comp_sum + t.0*t.3{
                        num_of_solved + (g -comp_sum)/t.3
                    }else{
                        100*10
                    }

                }else{
                    100*10
                }
        }
    }
}

fn main(){
    let line = read_as_vec::<u32>();
    let (d, g) = (line[0], line[1]);
    let mut problems: Vec<(u32, u32, u32, u32)> = Vec::new();
    
    for i in 1..d+1{
        let line = read_as_vec::<u32>();
        let (p, c) = (line[0], line[1]);
        problems.push((p, c, 100*i*p+c, 100*i));
    }

    
    problems.reverse();
    //println!("problems = {:?}\ng = {}", problems, g);

    let flags: Vec<bool> = Vec::new();
    let ans = solve(g, &problems, flags.clone());
    println!("{}", ans);
}


Compiler output:
a.cc:50:14: error: too many decimal points in number
   50 |     for i in 1..d+1{
      |              ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::str::FromStr;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::fmt::Debug;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::cmp;
      | ^~~
a.cc:5:1: error: 'fn' does not name a type
    5 | fn read_as_vec<T>() -> Vec<T>
      | ^~
a.cc:13:1: error: 'fn' does not name a type
   13 | fn solve(g: u32, problems: &Vec<(u32, u32, u32, u32)>, flags: Vec<bool>) -> u32{
      | ^~
a.cc:45:1: error: 'fn' does not name a type
   45 | fn main(){
      | ^~
Language: C++

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int d = sc.nextInt();
        int g = sc.nextInt();
        int[] p = new int[d];
        int[] c = new int[d];
        for (int i = 0; i < d; i++) {
            p[i] = sc.nextInt();
            c[i] = sc.nextInt();
        }

        int ans = Integer.MAX_VALUE;
        for (int i = 1; i < (1 << d); i++) {
            int point = 0;
            int count = 0;
            for (int j = 0; j < d; j++) {
                if (((i >> j) & 1) == 1) {
                    point += c[j] + (j + 1) * 100 * p[j];
                    count += p[j];
                }
            }

            if (point < g) {
                count += plus(p, c, i, d, count, point, g);
            }
            ans = Math.min(ans, count);
        }
        System.out.println(ans);
    }

    int plus(int[] p, int[] c, int i, int d, int count, int point, int g) {
        for (int j = d - 1; j >= 0; j--) {
            if (((i >> j) & 1) == 0) {
                for (int k = 0; k < p[j] - 1; k++) {
                    point += (j + 1) * 100;
                    count++;

                    if (point >= g) {
                        return count;
                    }
                }
            }
        }
        return Integer.MAX_VALUE;
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

import itertools

D,G = list(map(int,input().split()))
d = []
ans = (10e10)

for i in range(D):
    a,b = list(map(int,input().split()))
    d.append([100*(i+1) for j in range(a-1)])
    d[i].append(100*(i+1)+b)

for ar in itertools.permutations(d):
    num = cnt = 0
    for i in ar:
        if num+sum(i) < G:
            num += sum(i)
            cnt += len(i)
        else:
            for j in i:
                if num+j < G:
                    num += j
                    cnt += 1
                else:
                    ans = min(ans,cnt+1)

print(ans)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import itertools
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

int main() {
  int D, G;
  cin >> D >> G;
  vector<int> P(D), C(D);

  for (int i = 0; i < D; i++) {
    cin >> P[i] >> C[i];
  }

  int res = 1 << 29;
  for (int bit = 0; bit < (1 << D); bit++) {
    int sum = 0, num = 0;
    for (int i = 0; i < D; i++) {
      if ((bit >> i) & 1) {
        sum += (i + 1) * 100 P[i] + C[i];
        num += P[i];
      }
    }
    if (sum >= G)
      res = min(res, num);
    for (int i = D - 1; i >= 0; i--) {
      if ((bit >> i) & 1)
        continue;
      for (int j = 0; j < P[i] - 1; j++) {
        if (sum >= G) {
          res = min(res, num);
          break
        }
      }
    }
  }
  cout << res << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: expected ';' before 'P'
   19 |         sum += (i + 1) * 100 P[i] + C[i];
      |                             ^~
      |                             ;
a.cc:31:16: error: expected ';' before '}' token
   31 |           break
      |                ^
      |                ;
   32 |         }
      |         ~
Language: C++

#include<iostream>
#include<utility>
#include<vector>
#define all(v) v.begin(),v.end()
#define pb push_back
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;

int main(){
	ll d,g;
	cin>>d>>g;
	pll pro[d];
	vector<pll> ans;
	rep(i,d)cin>>pro[i].first>>pro[i].second;
	for(int i=0;i<(1<<d);i++){
		pll tmp=pll(0,0);
		rep(j,d){
			if(i&(1<<j)){
				tmp.first+=pro[j].first;
				tmp.second+=100*(j+1)*pro[j].first+pro[j].second;
			}
		}
		for(int j=d-1;j>=0;j--){
			if(!(i&(1<<j))){
				int num=0;
				while(num<pro[j].first&&tmp.second<g){
					num++;
					tmp.first++;
					tmp.second+=100*(j+1);
				}
			}
		}
		ans.pb(tmp);
	}
	sort(all(ans));
	cout<<ans[0].first<<endl;
	return 0;
}

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

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

int main(){
	ll n,m;
	cin>>n>>m;
	ll p[n+1],c[n+1],dp[11][1000000];
	rep(j,11)rep(i,1000000-1)dp[j][i]=0;
	for(int i=0;i<n;i++){
		cin>>p[i]>>c[i];
	}
	rep(i,n){
		rep(j,p[i]+1){
			rep(k,1000*2){
				if(k>=j){
					if(j==p[i]){
						dp[i+1][k]=max(dp[i][k-j]+(i+1)*100*j+c[i],dp[i][k]);
					}
			else dp[i+1][k]=max(dp[i][k-j]+(i+1)*100*j+c[i],dp[i][k]);
		}
		else{
			dp[i+1][k]=dp[i][k];
		}
		}
		}
	}
	int ans=100000000;
	rep(i,1000000-1){
		if(dp[n][i]>=m){
			ans=min(ans,i);
		}
	}
	cout<<ans<<"\n";

  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:32: error: no matching function for call to 'min(int&, long long int&)'
   34 |                         ans=min(ans,i);
      |                             ~~~^~~~~~~
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:34:32: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   34 |                         ans=min(ans,i);
      |                             ~~~^~~~~~~
/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:34:32: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   34 |                         ans=min(ans,i);
      |                             ~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

int main(){
	ll n,m;
	cin>>n>>m;
	ll p[n+1],c[n+1],dp[11][1000000];
	rep(j,11)rep(i,1000000-1)dp[j][i]=0;
	for(int i=0;i<n;i++){
		cin>>p[i]>>c[i];
	}
	rep(i,n){
		rep(j,p[i]+1){
			rep(k,1000*2){
				if(k>=j){
					if(j==p[i]){
						dp[i+1][k]=max(dp[i][k-j]+(i+1)*100*j+c[i],dp[i][k]);
					}
			else dp[i+1][k]=max(dp[i][k-j]+(i+1)*100*j+c[i],dp[i][k]);
		}
		else{
			dp[i+1][k]=dp[i][k];
		}
		}
		}
	}
	int ans=100000000;
	rep(i,1000000-1){
		if(dp[n][i]>=m){
			ans=min(ans,i);
		}
	}
	cout<<ans<<"\n";

  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'j' was not declared in this scope
   10 |         rep(j,11)rep(i,1000000-1)dp[j][i]=0;
      |             ^
a.cc:10:9: error: 'rep' was not declared in this scope
   10 |         rep(j,11)rep(i,1000000-1)dp[j][i]=0;
      |         ^~~
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         rep(i,n){
      |             ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<list>
#include<cmath>
using namespace std;
using ll = long long;
const int INF = 1e8;
int D, G, P[10], C[10];
int dp[11][1010];//i番目の問題まで見て、合計j個の問題をすでに解いている際における総合スコアの最大値
int main() {
	cin >> D >> G;
	for (int i = 1; i <= D; ++i) {
		cin >> P[i] >> C[i];
	}
	for (int i = 1; i <= D; ++i) {
		for (int j = 0; j <= 1010; ++j) {
			for (int k = 0; k <= P[i]; ++k) {
				if (k == P[i]) {
					dp[i][j + k] = max(dp[i][j + k], dp[i-1][j] + 100 * (i)*k + C[i]);
				}
				else {
					dp[i][j + k] = max(dp[i][j + k], dp[i-1][j] + 100 * (i)*k);
				}
			}
		}
	}
	for(int j = 0; j < 1010; ++j) {
		if (dp[D][j] >= G)
			cout << j << endl;
		break;
	}
	return 0;


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

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

int main() {
    ll d, g;
    cin >> d >> g;
    vector<ll> nums(d);
    vector<ll> bonus(d);
    for (int i = 0; i < d; ++i) {
        cin >> nums[i] >> bonus[i];
    }
    ll ans = 1e9;
    for (int mask = 0; mask < 1 << d; ++mask) {
        int tmp = mask;
        int cnt = 0;
        int score = g;
        int last = 0;
        for (int i = 0; i < d; ++i) {
            if (tmp & 1) {
                score -= (nums[i] * (i + 1) * 100 + bonus[i]);
                cnt += nums[i];
            } else last = i;
            tmp >>= 1;
            if (score <= 0) ans = min(ans, cnt);
            else {
                for (int j = 1; j < nums[last]; ++j) {
                    if (j * 100 * (last + 1) >= score) {
                        cnt += j;
                        ans = min(ans, cnt);
                        break;
                    }
                }
            }
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <numeric>
using namespace std;
typedef long long unsigned int ll;
 #define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
 int main() {
   int D, G;
   cin >> D >> G;
  vector<int> p(D+1), c(D+1);
  p[0] = 0;
  c[0] = 0;
  for (int i = 1; i <= D; i++){
    cin >> p[i] >> c[i];
  }
   vector<vector<int>> d(D);
   for (int i = 1; i <= D; i++){
     for (int j = 1; j <= p[i]; j++){
      if (i == 1){
        if (j == p[i]){
          d[i][j] = 100 * j + c[i]
        }else{
          d[i][j] = 100 * j
        }
      }
      if (j != p[i]){
        d[i][j] = max(100 * i * j, d[i-1][j])
      }
    }
  }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:35: error: expected ';' before '}' token
   36 |           d[i][j] = 100 * j + c[i]
      |                                   ^
      |                                   ;
   37 |         }else{
      |         ~                          
a.cc:38:28: error: expected ';' before '}' token
   38 |           d[i][j] = 100 * j
      |                            ^
      |                            ;
   39 |         }
      |         ~                   
a.cc:42:46: error: expected ';' before '}' token
   42 |         d[i][j] = max(100 * i * j, d[i-1][j])
      |                                              ^
      |                                              ;
   43 |       }
      |       ~
Language: C++

#include<iostream>
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 =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){
	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 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: 'G' was not declared in this scope
   25 |       int need = (G - s + s1 - 1) / s1;
      |                   ^
Language: C++

#include <bits/stdc++.h>

using namespace std ;

string s ;

int a ;

int main ()
{
    cin >> s ;
    a = s . size () ;
    string t = "AC" ;
    int b = 0 ;
    if ( s [ 0 ] != 'A' ){
        t = "WA" ;
    }
    for ( int i = 1 ; i < a ; ++ i ){
        if ( isupper ( s [ i ] ) ){
            if ( i == 1 || i = a - 1 || s [ i ] != 'C' ){
                t = "WA" ;
            }
            b ++ ;
        }
    }
    if ( b != 1 ){
        t = "WA" ;
    }
    cout << t ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: lvalue required as left operand of assignment
   20 |             if ( i == 1 || i = a - 1 || s [ i ] != 'C' ){
      |                  ~~~~~~~^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std ;

string s ;

int a ;

int main ()
{
    cin >> s ;
    a = s . size () ;
    string t = "AC" ;
    int b = 0 ;
    if ( s [ 0 ] != 'A' ){
        t = "WA" ;
    }
    for ( int i = 1 ; i < a ; ++ i ){
        if ( isupper (s [ i ] ) ){
            if ( i == 1 || i = a - 1 || s [ i ] != 'C' ){
                t = "WA" ;
            }
            b ++ ;
        }
    }
    if ( b != 1 ){
        t = "WA" ;
    }
    cout << t ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: lvalue required as left operand of assignment
   20 |             if ( i == 1 || i = a - 1 || s [ i ] != 'C' ){
      |                  ~~~~~~~^~~~
Language: C++

#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <utility>
#include <functional>
#include <iomanip>
#include <typeinfo>
#include <iterator>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <tuple>
#include <map>
#include <set>
using namespace std;


typedef long long       ll;
struct edge { ll to; ll cost; };
typedef vector<int>     vi;
typedef vector<ll>      vll;
typedef vector<double>  vd;
typedef vector<bool>    vb;
typedef vector<string>  vs;
typedef vector<char>    vc;
typedef vector<edge>    ve;
typedef pair<int, int>  pii;
typedef pair<ll, ll>    pll;
typedef vector<pii>     vpii;
typedef vector<pll>     vpll;
typedef vector<vll>		vvll;
typedef vector<vi>		vvi;
typedef vector<ve>      vve;
typedef vector<vc>		vvc;

// マクロ
#define repr(itr, bgn, end) for (ll itr = (ll)bgn; itr < (ll)end; ++itr)
#define rep(itr, end) repr(itr, 0, end)
#define reprrev(itr, bgn, end) for (ll itr = (ll)end - 1; itr >= (ll)bgn; --i)
#define reprev(itr, end) reprrev(itr, 0, end)
#define all(container) container.begin(), container.end()
#define sortall(container) sort(all(container))
#define yn(cond) cond ? (cout << "Yes" << endl) : (cout << "No" << endl)
#define YN(cond) cond ? (cout << "YES" << endl) : (cout << "NO" << endl)

// 定数
#define LLONG_MAX 9223372036854775807
constexpr double PI = 3.14159265358979323846;
constexpr ll INF = 1 << 15;
constexpr ll MOD = (ll)1e9 + 7;
constexpr double EPS = 1e-7;

// よく使うもの
constexpr int dy[4] = { 0, 1, 0, -1 };
constexpr int dx[4] = { 1, 0, -1, 0 };


// vector入力
template<typename T>
istream& operator >> (istream& is, vector<T>& vec) {
	for (T& x : vec) is >> x;
	return is;
}

// vector出力
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec) {
	for (T& x : vec) os << x << " ";
	return os;
}

// ***<ここから>****************************************************************

long long Pow(long long a, long long n) {
	long long x = 1;
	while (n > 0) {
		if (n & 1) x = x * a;
		a = a * a;
		n = n >> 1;
	}
	return x;
}

int main(void) {

	int D, G;
	cin >> D >> G;
	vi p(D), c(D);
	rep(i, D) cin >> p[i] >> c[i];

	int ans = INT_MAX;
	rep(i, Pow(2, D)) {
		ll score = 0;
		int num = 0;

		rep(j, D) {
			if (i >> j == 1) {
				score += (j + 1) * p[j] * 100 + c[j];
				num += p[j];
			}
		}

		if (num >= G) {
			ans = min(ans, num);
			continue;
		}


		int last = 0;

		rep(j, D) {
			if (i >> j == 0) last = j;
		}

		while (score < G) {
			score += (last + 1) * 100;
			num++;
		}
		ans = min(ans, num);
	}

	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:93:19: error: 'INT_MAX' was not declared in this scope
   93 |         int ans = INT_MAX;
      |                   ^~~~~~~
a.cc:17:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   16 | #include <set>
  +++ |+#include <climits>
   17 | using namespace std;
Language: C++

#include <algorithm>
using namespace std;

int D, G;
int p[10], c[10];
int sum_n = 0;

int dfs(int i, int sum, int check[10]){
	//cout << " i: " << i << "sum: " << sum << "\n";
	int check1[10];
	for(int k=0;k<10;k++){
		check1[k] = check[k];
	}
	int l = sum - 100 * (i+1) * p[i] - c[i];
	if(i==D){
		if(sum>0){
			int x = 0;
			int a;
			for(int j =D-1;j>=0;j--){
				if(check[j]==1) continue;
				x = sum / (100*(j+1));
				a = j;
				break;
			}
			if(x <= p[a] && sum - 100 * (a+1) * x ==0) return x;
			else if(x <= p[a] && sum - 100 * (a+1) * x <0) return x+1;
			/*
			else if(sum - 100 * (a+1) * (x+1) <0) return x + 1;
			*/
			else return 1000;

		} else {
			return 0;
		}
		
	}
	
	 else {
	
		check1[i] = 1;
		int a = p[i] + dfs(i+1, l, check1);
		int b = dfs(i+1, sum, check);
		if(a>b) return b;
		else return a;
	}

}


int main(){
	
	cin >> D >> G;
	int i;
	for(i=0;i<D;i++) cin >> p[i] >> c[i];
	int check[10];
	for(int i=0;i<10;i++){
		check[i] = 0;
	}
	int ans  = dfs(0, G, check);
	

	cout << ans <<"\n";

}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:9: error: 'cin' was not declared in this scope
   52 |         cin >> D >> G;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:62:9: error: 'cout' was not declared in this scope
   62 |         cout << ans <<"\n";
      |         ^~~~
a.cc:62:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <cstdio>
#include <algorithm>

using namespace std;

#define MAXN 10
#define INF 0x3f3f3f3f

int D, G;
int P[MAXN + 5], C[maxn + 5];

int main() {
    scanf("%d %d", &D, &G);

    for (int i = 1; i <= D; ++i) {
        scanf("%d %d", &P[i], &C[i]);
    }

    int Max = (1 << D) - 1, Ans = INF;

    for (int i = 0; i <= Max; ++i) {
        int cnt = 0, rest = G;
        for (int j = D; j >= 1 && rest > 0; --j) {
            if (i & (1 << (j - 1))) {
                int tmp = P[j] * j * 100;
                if (tmp >= rest) {
                    cnt += (rest + 100 * j - 1) / (100 * j);
                    rest = 0;
                    break;
                }else {
                    rest -= tmp + C[j];
                    cnt += P[j];
                }
            }
        }
        if (rest <= 0) {
            Ans = min(Ans, cnt);
        }
    }
    printf("%d", Ans);

    return 0;
}

Compiler output:
a.cc:10:20: error: 'maxn' was not declared in this scope
   10 | int P[MAXN + 5], C[maxn + 5];
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:16:32: error: 'C' was not declared in this scope
   16 |         scanf("%d %d", &P[i], &C[i]);
      |                                ^
a.cc:31:35: error: 'C' was not declared in this scope
   31 |                     rest -= tmp + C[j];
      |                                   ^
Language: C++

// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using std::cerr;using std::cin;using std::cout;using std::abs;using std::min;using std::max;using std::swap;using std::map;using std::unordered_map;using std::unordered_set;using std::bitset;using std::pair;using std::set;using std::string;using std::vector;using ll=long long;using uint=unsigned int;using pii=pair<int,int>;using pll=pair<ll,ll>;using ull = unsigned long long;using ld=long double;using vci=vector<int>;using vcl=vector<ll>;template<typename T>void _dbg(const char*_s,T _h){cerr<<_s<<" = "<<_h<<"\n";}template<typename T,typename...Ts>void _dbg(const char*_s,T _h,Ts..._t){int _b=0;while(((_b+=*_s=='(')-=*_s==')')!=0||*_s!=',')cerr<<*_s++;cerr<<" = "<<_h<<",";_dbg(_s+1,_t...);}
#define f first
#define s second
#define pb emplace_back
struct init{init(){cin.tie(0);std::iostream::sync_with_stdio(0);cout<<std::fixed<<std::setprecision(10);cerr<<std::fixed<<std::setprecision(5);}~init(){
#ifdef LOCAL
#define dbg(...) _dbg(#__VA_ARGS__,__VA_ARGS__)
cerr<<"Time elapsed: "<<(double)clock()/CLOCKS_PER_SEC<<"s.\n";
#else
#define dbg(...) 
#endif
}}init;
ll p[11],c[11];
int32_t main() {
    
    ll n,g;
    cin>>n>>g;
    for(int i=1;i<=n;++i)
        cin>>p[i]>>c[i];
    vector<int> v(n);
    iota(v.begin(), v.end(), 1);
    int ans=123456789
    do{
        ll cur=g;
        int pot=0;
        for (int i : v){
            int w=p[i];
            while(w&&cur>0){
                pot++;
                w--;
                cur-=i*100;
            }
            if(!w)
                cur -= c[i];
            if(cur<0){
                break;
            }
        }
        ans=min(ans,pot);
    }while(next_permutation(v.begin(), v.end()));
    cout<<ans<<'\n';

    

    return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:26:5: error: expected ',' or ';' before 'do'
   26 |     do{
      |     ^~
Language: C++

#include <iostream>
#include <vector>
#include <valarray>
#include <cmath>
#include "../cxx-prettyprint/prettyprint.hpp"

std::vector<std::valarray<int>> create_bitarrays(int length) {
    std::vector<std::valarray<int>> bitarrays;
    for (int i = 0; i < std::pow(2, length); i++) {
        std::valarray<int> bits(0, length + 1);
        for (int j = 0; j < length; j++) {
            bits[j + 1] = i >> j & 1;
        }
        bitarrays.push_back(bits);
    }
    return bitarrays;
}

int main() {
    int D, G;
    std::cin >> D >> G;

    std::valarray<int> level(0, D + 1);
    std::valarray<int> p(0, D + 1);
    std::valarray<int> c(0, D + 1);
    for (int i = 1; i <= D; i++) {
        level[i] = i;
        std::cin >> p[i] >> c[i];
    }
    std::valarray<int> complete_scores = level * 100 * p + c;

    int min_problems = p.sum();
    for (std::valarray<int> bits : create_bitarrays(D)) {
        int complete_score_sum = (bits * complete_scores).sum();
        int score_rest = G - complete_score_sum;
        if (score_rest == 0) {
            min_problems = std::min(min_problems, (bits * p).sum());
        } else if (score_rest > 0) {
            for (int i = D; i >= 1; i--) {
                int n_problems = (score_rest + 1) / (i * 100);
                if (bits[i] == 0 & n_problems < p[i]) {
                    min_problems = std::min(min_problems, (bits * p).sum() + n_problems);
                    break;
                }
            }
        }
    }
    std::cout << min_problems << std::endl;
}


Compiler output:
a.cc:5:10: fatal error: ../cxx-prettyprint/prettyprint.hpp: No such file or directory
    5 | #include "../cxx-prettyprint/prettyprint.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int n,m,a[11],c[11],i,s[12][100000000],t=1,j,k;
int main(){
	cin>>n>>m;
	for(i=1;i<=n;i++){
		cin>>a[i]>>c[i];
	}
	memset(s,0,sizeof(s));
	for(i=0;i<t;i++){
		if(s[0][i]>=m){
			cout<<s[11][i];
			return 0;
		}
		for(j=1;j<=n;j++){
			if(s[j][i]<a[j]){
				for(k=0;k<=n;k++){
					s[k][t]=s[k][i];
				}
				s[j][t]++;
				s[0][t]+=j*100;
				if(s[j][t]==a[j]){
					s[0][t]+=c[j];
				}
				s[11][t]=s[11][i]+1;
				t++;
			}
		}
	}
	for(i=0;i<t;i++){
		for(j=0;j<=n;j++){
			cout<<s[j][i]<<" ";
		}
		cout<<s[11][i]<<endl;
	}
}

Compiler output:
/tmp/cchyHhZB.o: in function `main':
a.cc:(.text+0x142): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x151): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x17e): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x1a0): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x1ac): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x1b8): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x207): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x210): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x216): relocation truncated to fit: R_X86_64_PC32 against symbol `k' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x226): relocation truncated to fit: R_X86_64_PC32 against symbol `j' defined in .bss section in /tmp/cchyHhZB.o
a.cc:(.text+0x292): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
long long a,b,c,d=0,e[1000001],f[1000001];
inline long long read(){
	long long x,f=1,o=0;
	char s;
	s=getchar();
	while(s>'9'||s<'0'){
		if(s=='-'){
			f=-1;
		}
		s=getchar();
	}
	while(s<='9'&&s>='0'){
		o=o*10+s-'0';
		s=getchar();
	}	
	return x=o*f;
}
int main(){
	a=read();
	b=read();
	for(long long i=1;i<=a;i++){
		c=read();
		e[i]=read();
	}
	printf("%lld",ceil(b/i));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:30: error: 'i' was not declared in this scope
   30 |         printf("%lld",ceil(b/i));
      |                              ^
Language: C++

#include<iostream>
#include<string>
#include<cstdlib>
#include<vector>
#include<algorithm>
#include<functional>

#define REP(i,n) for(int i=0;i<n;i++)
#define ll long long int

using namespace std;

int to_int(string s) {
  return atoi(s.c_str());
}

int main() {
  int d,g;
  int p[10], c[10],s[10];
  cin >> d >> g;
  REP(i,d) {
    cin >> p[i] >> c[i];
    s[i] = p[i]*(i+1)*100 + c[i];
  }


  int result = 100000;

  REP(i,d+1) {
    REP(j,pow(2,i)) {
      int tmp = 0;
      int count = 0;
      int minj = 0;
      REP(k,i) {
        if((j >> k)%2 == 1) {
          count += s[k];
          tmp += p[k];
        }
      }
      if(count < g) {
        int sh = d-1;
        while(true) {
          if(((j >> sh) & 1) == 0) break;
          sh--;
        }
        REP(l,p[sh]) {
          if(l*100*(sh+1) + count >= g) {
            tmp += l;
            count += l*100*(sh+1);
            break;
          }
        }
        if(count < g) continue;
      }
      if(tmp < result) {
        result = tmp;
      }
    }
  }

  cout << result << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: 'pow' was not declared in this scope
   30 |     REP(j,pow(2,i)) {
      |           ^~~
a.cc:8:32: note: in definition of macro 'REP'
    8 | #define REP(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>

using namespace std;

int D,G;
vector<int> p,c;

int main(){
	cin>>D>>G;
	p.resize(D);
	c.resize(D);
	
	long long int ans=10e9;

	for(int i=0;i<D;i++){
		cin>>p[i]>>c[i];
	}
	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){
				s+=100*(i+1)*p[i]+c[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);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:24: error: no matching function for call to 'min(long long int&, int&)'
   46 |                 ans=min(ans,num);
      |                     ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string: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:46:24: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   46 |                 ans=min(ans,num);
      |                     ~~~^~~~~~~~~
/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,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 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:46:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   46 |                 ans=min(ans,num);
      |                     ~~~^~~~~~~~~
Language: C++

#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>

using namespace std;

int D,G;
vector<int> p,c;

int main(){
	cin>>D>>G;
	p.resize(D);
	c.resize(D);
	
	long long int ans=10e9;

	for(int i=0;i<D;i++){
		cin>>p[i]>>c[i];
	}
	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){
				s+=100*(i+1)*p[i]+c[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);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:26: error: 'num' was not declared in this scope; did you mean 'enum'?
   30 |                 int s=0; num=0;rest_max=-1;
      |                          ^~~
      |                          enum
a.cc:30:32: error: 'rest_max' was not declared in this scope
   30 |                 int s=0; num=0;rest_max=-1;
      |                                ^~~~~~~~
Language: C

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define SORT(v) sort(v.begin(), v.end());
#define REVERSE(v)  reverse(v.begin(), v.end());
typedef long long ll;
using namespace std;

int main() {
  int D,G; cin>>D>>G;
  vector<ll> p(D),c(D); REP(i,D) cin>>p[i]>>c[i];

  ll res=1<<29;
  for(int bit=0; bit<(1<<D); ++bit) {
    ll sum=0;
    ll num=0;
    REP(i,D) {
      if(bit & (1<<i)) sum += c[i] + p[i] * 100 * (i+1), num += p[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[i]; ++j) {
          if(sum >= G) break;
          sum += 100 * (i+1);
          ++num;
        }
      }
      res = min(res, num);
    }
  }
  cout<<res<<endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int D,G;
  cin >> D >> G;
  vector<int> p(D),c(D);
  for(int i=0;i<D;i++){
    cin >> p.at(i) >> c.at(i);}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected '}' at end of input
    9 |     cin >> p.at(i) >> c.at(i);}
      |                                ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#include <set>
#include <map>
#define REP(i,n) for(ll i = 0; i < (ll)n; i++)
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;

int main(){
  ll d,g;
  cin >> d >> g;
  ll p[d],c[d];
  REP(i,d){
    cin >> p[i] >> c[i];
  }
  ll min_num = INF;
  REP(i,1<<d){
    ll score = 0;
    ll cnt = 0;
    REP(j,d){
      if((i>>j)&1){
        score += c[j];
        score += 100*(j+1)*p[j];
        cnt += p[j];
      }
    }
    for(ll j = d-1; j>=0; j--){
      if(score>=g){
        break;
      }
      if(((i>>j)&1)==true) continue;
      cnt += min(p[j]-1,(g-score+100*(j+1)-1)/(100*(j+1)));
      score += 100*(j+1)*min(p[j]-1,(g-score+100*(j+1)-1)/(100*(j+1)));
    }
    if(score<g){
      cnt = INF;
    }
    if(min_num>cnt) min_num = cnt;
  cout << min_num << endl;
  return 0;
}


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

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

int dp[12][102][10010];
int q[12],val[12];
int n, d;

int solve(int pt, int taken, int cap) {
    if (pt >= n && cap > 0)
        return (int)1e9;
    if (cap <= 0)
        return 0;
    if (dp[pt][taken][cap] != -1)
        return dp[pt][taken][cap];
    if (q[pt] == taken) {
        dp[pt][taken][cap] =  + solve(pt + 1, 0, cap - val[pt]);
        //cerr << "special " << dp[pt][taken][cap];
        return dp[pt][taken][cap];
    }
    int x = 1 + solve(pt, taken + 1, cap - (pt+1));
    int y = solve(pt + 1, 0, cap);

    int ans = min(x,y);
    dp[pt][taken][cap] = ans;
    return dp[pt][taken][cap];
}

int main() {
    memset(dp, -1, sizeof(dp));
    cin >> n >> d;
    d /= 100;
    //cerr << d << endl;
    for(int i = 0; i < n; i++) {
        cin >> q[i] >> val[i];
        val[i] /= 100;
    }
    int ans = solve(0,0, d);
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:5: error: 'memset' was not declared in this scope
   32 |     memset(dp, -1, sizeof(dp));
      |     ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <cmath>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	int D, G;
	cin >> D >> G;
	vector<int> P(D);
	vector<int> C(D);

	for (int d=0; d<D; d++){
		cin >> P[d] >> C[d];
	}

	int min_solve = 1000;
	int score;
	int solve;
	int maxpro;
	int extra;

	//bit全探索, 完全に解く場合
	for (int bit=0; bit <(1<<D); bit++){
		score=0;
		solve=0;
		maxpro = -1;
		for (int i=0; i<D; i++){
			if (bit & (1 << i)){
				score += (i+1)*100*P[i];
				score += C[i];
				solve += P[i];
			}
			else{
				maxpro = i;
			}
		}

		if (score >= G){
			if (min_solve > solve) min_solve = solve;
		}else{
			if (maxpro >= 0){
				//extra = ceil((G-score)/((maxpro+1)*100));
				extra = (G-score+(maxpro+1)*100 - 1)/((maxpro+1)*100)
              	//cout << bit << " " << extra << endl;
				if (extra < P[maxpro]){
					solve += extra;
					if (min_solve > solve) min_solve = solve;			
				}
			}
		}
	}

	cout << min_solve << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:86: error: expected ';' before 'if'
   42 |                                 extra = (G-score+(maxpro+1)*100 - 1)/((maxpro+1)*100)
      |                                                                                      ^
      |                                                                                      ;
   43 |                 //cout << bit << " " << extra << endl;
   44 |                                 if (extra < P[maxpro]){
      |                                 ~~
Language: C++

#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

const int MOD = 1e9 + 7;
const int iINF = 1000000000;
const long long int llINF = 1000000000000000000;

using namespace std;
using ll = long long int;
using P = pair<int, int>;
using edge = struct {
  int to;
  int cost;
};
#define ALL(a) (a).begin(), (a).end()
#define REP(i, n) for (ll i = 0; i < (n); i++)
#define RREP(i, n) for (ll i = (n)-1; i >= 0; i--)
#define MAX(vec) *std::max_element(vec.begin(), vec.end());
#define MIN(vec) *std::min_element(vec.begin(), vec.end());
#define MAXI(vec)                                                              \
  std::distance(vec.begin(), *std::max_element(vec.begin(), vec.end()));
#define MINI(vec)                                                              \
  std::distance(vec.begin(), *std::min_element(vec.begin(), vec.end()));
#define BIT(n, num) std::bitset<(n)>((num)).to_string()
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

template <typename T, typename U> U read(ll V, T a, U b) {
  REP(i, V) {
    cin >> a;
    b.push_back(a);
  }
  return b;
}

int main() {
  ll D, G;
  vector<ll> p, c;
  ll minc = llINF;
  cin >> D >> G;
  REP(i, D) {
    ll pi, ci;
    cin >> pi >> ci;
    p.push_back(pi);
    c.push_back(ci);
  }
  REP(i, pow(2, D)) {
    string b = bitset<(10)>(i).to_string();
    ll score = 0;
    ll count = 0;
    ll maxi = 0;
    reverse(ALL(b));
    REP(j, D) {
      if (b[j] == '1') {
        score += (j + 1) * 100 * p[j];
        score += c[j];
        count += p[j];
      } else if (maxi < j) {
        maxi = j;
      }
    }
    if (score >= G) {
      if (count < minc)
        minc = count;
    } else if (G - score <= (maxi + 1) * 100 * p[maxi] &&
               minc > count + ceil((float)(G - score) / ((maxi + 1) * 100))) {
      minc = count + ceil((float)(G - score) / ((maxi + 1) * 100));
    }
  }
  cout << minc << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:16: error: 'bitset' was not declared in this scope
   57 |     string b = bitset<(10)>(i).to_string();
      |                ^~~~~~
a.cc:10:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    9 | #include <stack>
  +++ |+#include <bitset>
   10 | #include <string>
a.cc:57:32: error: request for member 'to_string' in 'i', which is of non-class type 'll' {aka 'long long int'}
   57 |     string b = bitset<(10)>(i).to_string();
      |                                ^~~~~~~~~
Language: C++

#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

const int MOD = 1e9 + 7;
const int iINF = 1000000000;
const long long int llINF = 1000000000000000000;

using namespace std;
using ll = long long int;
using P = pair<int, int>;
using edge = struct {
  int to;
  int cost;
};
#define ALL(a) (a).begin(), (a).end()
#define REP(i, n) for (ll i = 0; i < (n); i++)
#define RREP(i, n) for (ll i = (n)-1; i >= 0; i--)
#define MAX(vec) *std::max_element(vec.begin(), vec.end());
#define MIN(vec) *std::min_element(vec.begin(), vec.end());
#define MAXI(vec)                                                              \
  std::distance(vec.begin(), *std::max_element(vec.begin(), vec.end()));
#define MINI(vec)                                                              \
  std::distance(vec.begin(), *std::min_element(vec.begin(), vec.end()));
#define BIT(n, num) std::bitset<(n)>((num)).to_string()
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

template <typename T, typename U> U read(ll V, T a, U b) {
  REP(i, V) {
    cin >> a;
    b.push_back(a);
  }
  return b;
}

int main() {
  ll D, G;
  vector<ll> p, c;
  ll minc = llINF;
  cin >> D >> G;
  REP(i, D) {
    ll pi, ci;
    cin >> pi >> ci;
    p.push_back(pi);
    c.push_back(ci);
  }
  REP(i, pow(2, D)) {
    string b = BIT(10, i);
    ll score = 0;
    ll count = 0;
    ll maxi = 0;
    reverse(ALL(b));
    REP(j, D) {
      if (b[j] == '1') {
        score += (j + 1) * 100 * p[j];
        score += c[j];
        count += p[j];
      } else if (maxi < j) {
        maxi = j;
      }
    }
    if (score >= G) {
      if (count < minc)
        minc = count;
    } else if (G - score <= (maxi + 1) * 100 * p[maxi] &&
               minc > count + ceil((float)(G - score) / ((maxi + 1) * 100))) {
      minc = count + ceil((float)(G - score) / ((maxi + 1) * 100));
    }
  }
  cout << minc << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:26: error: 'bitset' is not a member of 'std'
   33 | #define BIT(n, num) std::bitset<(n)>((num)).to_string()
      |                          ^~~~~~
a.cc:57:16: note: in expansion of macro 'BIT'
   57 |     string b = BIT(10, i);
      |                ^~~
a.cc:10:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    9 | #include <stack>
  +++ |+#include <bitset>
   10 | #include <string>
a.cc:33:45: error: request for member 'to_string' in 'i', which is of non-class type 'll' {aka 'long long int'}
   33 | #define BIT(n, num) std::bitset<(n)>((num)).to_string()
      |                                             ^~~~~~~~~
a.cc:57:16: note: in expansion of macro 'BIT'
   57 |     string b = BIT(10, i);
      |                ^~~
Language: C++

#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

const int MOD = 1e9 + 7;
const int iINF = 1000000000;
const long long int llINF = 1000000000000000000;

using namespace std;
using ll = long long int;
using P = pair<int, int>;
using edge = struct {
  int to;
  int cost;
};
#define ALL(a) (a).begin(), (a).end()
#define REP(i, n) for (ll i = 0; i < (n); i++)
#define RREP(i, n) for (ll i = (n)-1; i >= 0; i--)
#define MAX(vec) *std::max_element(vec.begin(), vec.end());
#define MIN(vec) *std::min_element(vec.begin(), vec.end());
#define MAXI(vec)                                                              \
  std::distance(vec.begin(), *std::max_element(vec.begin(), vec.end()));
#define MINI(vec)                                                              \
  std::distance(vec.begin(), *std::min_element(vec.begin(), vec.end()));
#define BIT(n, num) bitset<n>(num).to_string();
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

template <typename T, typename U> U read(ll V, T a, U b) {
  REP(i, V) {
    cin >> a;
    b.push_back(a);
  }
  return b;
}

int main() {
  ll D, G;
  vector<ll> p, c;
  ll minc = llINF;
  cin >> D >> G;
  REP(i, D) {
    ll pi, ci;
    cin >> pi >> ci;
    p.push_back(pi);
    c.push_back(ci);
  }
  REP(i, pow(2, D)) {
    string b = BIT(10, i);
    ll score = 0;
    ll count = 0;
    ll maxi = 0;
    reverse(ALL(b));
    REP(j, D) {
      if (b[j] == '1') {
        score += (j + 1) * 100 * p[j];
        score += c[j];
        count += p[j];
      } else if (maxi < j) {
        maxi = j;
      }
    }
    if (score >= G) {
      if (count < minc)
        minc = count;
    } else if (G - score <= (maxi + 1) * 100 * p[maxi] &&
               minc > count + ceil((float)(G - score) / ((maxi + 1) * 100))) {
      minc = count + ceil((float)(G - score) / ((maxi + 1) * 100));
    }
  }
  cout << minc << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:21: error: 'bitset' was not declared in this scope
   33 | #define BIT(n, num) bitset<n>(num).to_string();
      |                     ^~~~~~
a.cc:57:16: note: in expansion of macro 'BIT'
   57 |     string b = BIT(10, i);
      |                ^~~
a.cc:10:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    9 | #include <stack>
  +++ |+#include <bitset>
   10 | #include <string>
a.cc:33:36: error: request for member 'to_string' in 'i', which is of non-class type 'll' {aka 'long long int'}
   33 | #define BIT(n, num) bitset<n>(num).to_string();
      |                                    ^~~~~~~~~
a.cc:57:16: note: in expansion of macro 'BIT'
   57 |     string b = BIT(10, i);
      |                ^~~