Language: C++

#include <iostream>
#include <vector>
#include <deque>
#include <algorithm>
#include <numeric>
#include <string>
#include <cstring>
#include <list>
#include <unordered_set>
#include <tuple>
#include <cmath>
#include <limits>
#include <type_traits>
#include <iomanip>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>
#include <set>
#include <bitset>
#include <regex>
#include <random>
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
#define rep(i,n)for(ll i=0;i<n;++i)
#define exout(x) printf("%.10f\n", x)
const double pi = acos(-1.0);
const ll MOD = 1000000007;
const ll INF = 1e10;
const ll MAX_N = 1010;

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

ll dp[201010][2];
ll dx[4] = { 0,0,-1,1 };
ll dy[4] = { -1,1,0,0 };

//long longしか使わない
//素数は1より大きい
int main() {
	ll n, h;
	cin >> n >> h;
	vector<ll, ll>a(n), b(n);
	rep(i, n) {
		cin >> a[i] >> b[i];
	}
	sort(a.rbegin(), a.rend());
	sort(b.rbegin(), b.rend());
	ll ans = 0;
	rep(i, n) {
		if (a[0] <= b[i]) {
			ans++;
			h -= b[0];
		}
		if (h <= 0)break;
	}
	if (h > 0) {
		while (h > 0) {
			ans++;
			h -= a[0];
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<long long int, long long int>':
/usr/include/c++/14/bits/stl_vector.h:428:11:   required from 'class std::vector<long long int, long long int>'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:54:19:   required from here
   54 |         vector<ll, ll>a(n), b(n);
      |                          ^
/usr/include/c++/14/bits/stl_vector.h:87:28: error: 'long long int' is not a class, struct, or union type
   87 |         rebind<_Tp>::other _Tp_alloc_type;
      |                            ^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:89:9: error: 'long long int' is not a class, struct, or union type
   89 |         pointer;
      |         ^~~~~~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<long long int, long long int>':
a.cc:54:19:   required from here
   54 |         vector<ll, ll>a(n), b(n);
      |                          ^
/usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<long long int, long long int>::_Base'
  518 |       using _Base::_M_allocate;
      |                    ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<long long int, long long int>::_Base'
  519 |       using _Base::_M_deallocate;
      |                    ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<long long int, long long int>::_Base'
  521 |       using _Base::_M_get_Tp_allocator;
      |                    ^~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:56:25: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'll' {aka 'long long int'})
   56 |                 cin >> a[i] >> b[i];
      |                         ^
a.cc:56:33: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'll' {aka 'long long int'})
   56 |                 cin >> a[i] >> b[i];
      |                                 ^
a.cc:58:16: error: 'class std::vector<long long int, long long int>' has no member named 'rbegin'
   58 |         sort(a.rbegin(), a.rend());
      |                ^~~~~~
a.cc:58:28: error: 'class std::vector<long long int, long long int>' has no member named 'rend'
   58 |         sort(a.rbegin(), a.rend());
      |                            ^~~~
a.cc:59:16: error: 'class std::vector<long long int, long long int>' has no member named 'rbegin'
   59 |         sort(b.rbegin(), b.rend());
      |                ^~~~~~
a.cc:59:28: error: 'class std::vector<long long int, long long int>' has no member named 'rend'
   59 |         sort(b.rbegin(), b.rend());
      |                            ^~~~
a.cc:62:22: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
   62 |                 if (a[0] <= b[i]) {
      |                      ^
a.cc:62:30: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'll' {aka 'long long int'})
   62 |                 if (a[0] <= b[i]) {
      |                              ^
a.cc:64:31: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
   64 |                         h -= b[0];
      |                               ^
a.cc:71:31: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
   71 |                         h -= a[0];
      |                               ^