Language: C++

#include <bits/stdc++.h>
using namespace std;
#define repd(i,a,b) for(int i=a;i<b;i++)
#define repds(i,a,b) for(int i=a+1;i<=b;i++)
#define rep(i,N) repd(i,0,N)
#define reps(i,N) repds(i,0,N)
#define debug(x) if(isDebugMode) cout<<#x<<"="<<x<<","
#define debugarr(arr,N,M){if(isDebugMode) rep(i,N+1){rep(j,M+1)\
	{if(arr[i][j]==INF)printf(" INF");\
		else printf(" %3d",arr[i][j]);} cout<<endl;}}
#define pb push_back
#define pob pop_back
#define cint(a) int a;cin>>a
#define cint2(a,b) int a,b;cin>>a>>b
#define cint3(a,b,c) int a,b,c;cin>>a>>b>>c
typedef long long ll;
typedef pair<int,int> P;
const int INF=100000000;
const int dx[4]={ 0, 1, 0,-1};
const int dy[4]={ 1, 0,-1, 0};

bool isDebugMode=true;
//--------------------------------------//
int d,g;
int p[100],c[100];


int main(){
	cin>>d>>g;
	int f[100];
	rep(i,d) {
		cin>>p[i];
		cin>>c[i];
		f[i]=p[i]*(i+1)*100+c[i];
	}
	ll a=0;
	ll b=d;
	int ans=INF;
	int beforeE;
	rep(i,1000){
		ll e=g-a;
		ll m=0;
		ll r=0;
		rep(j,1<<b){
			int q=j;
			ll z=0;
			while(q>0){
				if(q&1==1){
					m+=p[z];
					r+=f[z];
				}
				q>>=1;
				z++;
			}
			if(r>=e){
				ans=min(m+i,ans);
			}
		}
		if(e<0) {
			break;
		}
		a+=b*100;
		if(--p[b-1]==0){
			a+=c[b-1];
			b--;
		}
	}
		cout<<ans<<endl;
	return 0;
}


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