Language: C++

//#include <bits/stdc++.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <locale>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <exception>
#include <functional>
#include <map>
#include <ios>
#include <iosfwd>
#include <istream>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>
#include <cwchar>
#include <cwctype>
#include <complex.h>
#include <fenv.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <tgmath.h>
#include <conio.h>
#include <numeric>
#include <list>
#include <windows.h>
#include <cfloat>
#include <climits>
#include <unordered_map>
#include <unordered_set>
using namespace std;

template<typename T> bool getint(T &x)
{
	char t=getchar();
	bool neg=false;
	x=0;
	for(;(t>'9'||t<'0')&&t!='-'&&t!=EOF;t=getchar());
	if(t=='-') neg=true,t=getchar(); if(t==EOF)return false;
	for(;t<='9'&&t>='0';t=getchar()) x=x*10+t-'0';
	if(neg) x=-x;
	return true;
}
template<typename T> void printint(T x)
{
	if(x<0) putchar('-'),x=-x;
	short a[20]={},sz=0;
	while(x>0) a[sz++]=x%10,x/=10;
	if(sz==0) putchar('0');
	for(int i=sz-1;i>=0;i--) putchar('0'+a[i]);
}

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
typedef float fl;
typedef double ld;
typedef pair<int,int> pii;
#define ui(n) ((unsigned int)(n))
#define ll(n) ((long long)(n))
#define ull(n) ((unsigned long long)(n))
#define fl(n) ((float)(n))
#define ld(n) ((double)(n))
#define fixpoint(n) fixed<<setprecision(n)
const int INF=1e9+7;
const ll LINF=1e18;
#define pb push_back
#define pop_b pop_back
#define m_p make_pair
#define all(a) (a).begin(),(a).end()
#define pall(a) (a).rbegin(),(a).rend()
#define mod 1000000007
#define sz(a) ((int)(a).size())
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define repa(i,a,n) for(int i=a;i<n;i++)
#define repa1(i,a,n) for(int i=a;i<=n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define per1(i,n) for(int i=n;i>0;i--)
#define pera(i,a,n) for (int i=n-1;i>=a;i--)
#define pera1(i,a,n) for (int i=n;i>a;i--)
#define sqr(x) ((x)*(x))

ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}

ll n,h,mx,ans;

int main()
{
	cin>>n>>h;
	
	vector<ll> v(n);
	rep(i,n)
	{
		ll a;
		cin>>a>>v[i];
		mx=max(mx,a);
	}
	
	sort(all(v));
	while(h>0&&!v.empty())
	{
		ll t=v.back();
		if(t<=mx) break;
		ans++;
		h-=t;
		v.pop_back();
	}
	
	if(h>0) ans+=(h+mx-1)/mx;
	
	cout<<ans;
	
	return 0;
}

Compiler output:
a.cc:54:10: fatal error: conio.h: No such file or directory
   54 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.