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 = int;
using ULL = unsigned long long;
long long MOD = 1000000000 + 7;
constexpr long long INF = numeric_limits<LL>::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:
/tmp/ccNtDxde.o: in function `main':
a.cc:(.text+0x137): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x163): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x185): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x1b4): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x2f1): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x32b): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x3ca): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x466): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x629): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccNtDxde.o
/tmp/ccNtDxde.o: in function `__tcf_0':
a.cc:(.text+0x775): relocation truncated to fit: R_X86_64_PC32 against symbol `vec' defined in .bss section in /tmp/ccNtDxde.o
a.cc:(.text+0x77c): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status