Language: C++

# include <iostream>
# include <algorithm>
#include <array>
# include <cassert>
#include <cctype>
#include <climits>
#include <numeric>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <tuple>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <chrono>
# include <random>
# include <limits.h>
# include <unordered_map>
# include <unordered_set>
# include <deque>
# include <cstdio>
# include <cstring>
#include <stdio.h>
#include<time.h>
#include <stdlib.h>
#include <cstdint>
#include <cfenv>

//#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
long long MOD = 1000000000 + 7;
constexpr long long INF = numeric_limits<int>::max();
const double PI = acos(-1);
#define fir first
#define sec second
#define thi third
#define debug(x) cerr<<#x<<": "<<x<<'\n'
typedef pair<LL, LL> Pll;
typedef pair<LL, pair<LL, LL>> Ppll;
typedef pair<LL, pair<LL, bitset<100001>>> Pbll;
typedef pair<LL, pair<LL, vector<LL>>> Pvll;
typedef pair<LL, LL> Vec2;
struct Tll { LL first, second, third; };
struct Fll { LL first, second, third, fourd; };
typedef pair<LL, Tll> Ptll;
#define rep(i,rept) for(LL i=0;i<rept;i++)
#define Mfor(i,mf) for(LL i=mf-1;i>=0;i--)
int h, w, n, m, k, t, s, q, last, cnt, sum, ans, dp[12][200000000], a[101000], b[10000];
string str, ss;
bool f;
char c;
int di[4][2] = { { 0,1 },{ 1,0 },{0,-1},{-1,0} };
struct Edge { LL to, cost; };
vector<LL>vec[27];
vector<Pll>v[200000];
map<Pll, LL>ma;
set<LL>st;
void YN(bool f) {
	if (f)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}
void yn(bool f) {
	if (f)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}

int main() {
	cin >> n >> m;
	rep(i, n) {
		cin >> a[i] >> b[i];
		b[i] /= 100;
	}
	m /= 100;
	
	rep(i, n+2)rep(j, m+2)dp[i][j] = INF;
	rep(i,n)
	dp[i][0] = 0;
	
	rep(i, n) {
		rep(j, m+1) {
			rep(k, a[i]) {
				if (dp[i][j] != INF) {
					if (k + 1 == a[i])
						dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
					else
						dp[i + 1][min(j + (i + 1)*(k + 1), m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1), m)], dp[i][j] + k + 1,dp[i][min(j + (i + 1)*(k + 1), m)] });
				}
			}
		}
		Mfor(j, m + 1) {
			dp[i][j] = min(dp[i][j], dp[i][j +1]);
		}
	}
	cout << dp[n][m] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:97:62: error: no matching function for call to 'min(LL, int&)'
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:97:62: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:2:
/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:97:62: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:97:116: error: no matching function for call to 'min(LL, int&)'
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                                                                                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:97:116: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                                                                                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
/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:97:116: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                                                                                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:97:177: error: no matching function for call to 'min(LL, int&)'
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                                                                                                                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:97:177: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                                                                                                                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
/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:97:177: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                                                                                                                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:97:100: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   97 |                                                 dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)] = min({ dp[i + 1][min(j + (i + 1)*(k + 1) + b[i], m)], dp[i][j] + k + 1 ,dp[i][min(j + (i + 1)*(k + 1) + b[i], m)] });
      |                                                                                                 ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
/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:   template argument deduction/substitution failed:
/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:   candidate expects 2 arguments,