Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define unsigned long long
#define pii pair<ull ,ull >
vector < pair < ull , ull > > kat;
bool comp(pii a,pii b)
{
	if(a.first < b.first) return false;
	if(a.first > b.first) return true;
	if(a.second < b.first) return true;
	return false;
}
int main()
{
	int H,N;
	cin >> N >> H;
	for(int i = 0; i < N; ++i)
	{
		int x,y;
		cin >> x >> y;
		kat.push_back(make_pair(x,y));
	}
	sort(kat.begin(),kat.end(), comp);
	vector< ull > secondary;
	for(int i =1; i<N;++i)
	{
		if(kat[i].second > kat[0].first)
			secondary.push_back(kat[i].second);
	}
	ull cnt = 0;
	for(int i = 0; i < secondary.size();++i)
	{
		cnt++;
		if(H <= secondary[i])
			break;
		H-=secondary[i];
	}
	if(H > 0)
	{
		if(kat[0].second > kat[0].first)
		{
			if(kat[0].second >= H){
				cnt++;
			}else{
				cnt+=(H-kat[0].second + kat[0].first-1)/kat[0].first+1;
			}
		}else{
			cnt+=(H+kat[0].first-1)/kat[0].first;
		}
	}
	cout << cnt << endl;
}

Compiler output:
a.cc:7:17: error: 'ull' was not declared in this scope
    7 | vector < pair < ull , ull > > kat;
      |                 ^~~
a.cc:7:23: error: 'ull' was not declared in this scope
    7 | vector < pair < ull , ull > > kat;
      |                       ^~~
a.cc:7:27: error: template argument 1 is invalid
    7 | vector < pair < ull , ull > > kat;
      |                           ^
a.cc:7:27: error: template argument 2 is invalid
a.cc:7:29: error: template argument 1 is invalid
    7 | vector < pair < ull , ull > > kat;
      |                             ^
a.cc:7:29: error: template argument 2 is invalid
a.cc:6:18: error: 'ull' was not declared in this scope
    6 | #define pii pair<ull ,ull >
      |                  ^~~
a.cc:8:11: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |           ^~~
a.cc:6:23: error: 'ull' was not declared in this scope
    6 | #define pii pair<ull ,ull >
      |                       ^~~
a.cc:8:11: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |           ^~~
a.cc:6:27: error: template argument 1 is invalid
    6 | #define pii pair<ull ,ull >
      |                           ^
a.cc:8:11: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |           ^~~
a.cc:6:27: error: template argument 2 is invalid
    6 | #define pii pair<ull ,ull >
      |                           ^
a.cc:8:11: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |           ^~~
a.cc:6:18: error: 'ull' was not declared in this scope
    6 | #define pii pair<ull ,ull >
      |                  ^~~
a.cc:8:17: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |                 ^~~
a.cc:6:23: error: 'ull' was not declared in this scope
    6 | #define pii pair<ull ,ull >
      |                       ^~~
a.cc:8:17: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |                 ^~~
a.cc:6:27: error: template argument 1 is invalid
    6 | #define pii pair<ull ,ull >
      |                           ^
a.cc:8:17: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |                 ^~~
a.cc:6:27: error: template argument 2 is invalid
    6 | #define pii pair<ull ,ull >
      |                           ^
a.cc:8:17: note: in expansion of macro 'pii'
    8 | bool comp(pii a,pii b)
      |                 ^~~
a.cc: In function 'bool comp(int, int)':
a.cc:10:14: error: request for member 'first' in 'a', which is of non-class type 'int'
   10 |         if(a.first < b.first) return false;
      |              ^~~~~
a.cc:10:24: error: request for member 'first' in 'b', which is of non-class type 'int'
   10 |         if(a.first < b.first) return false;
      |                        ^~~~~
a.cc:11:14: error: request for member 'first' in 'a', which is of non-class type 'int'
   11 |         if(a.first > b.first) return true;
      |              ^~~~~
a.cc:11:24: error: request for member 'first' in 'b', which is of non-class type 'int'
   11 |         if(a.first > b.first) return true;
      |                        ^~~~~
a.cc:12:14: error: request for member 'second' in 'a', which is of non-class type 'int'
   12 |         if(a.second < b.first) return true;
      |              ^~~~~~
a.cc:12:25: error: request for member 'first' in 'b', which is of non-class type 'int'
   12 |         if(a.second < b.first) return true;
      |                         ^~~~~
a.cc: In function 'int main()':
a.cc:23:21: error: request for member 'push_back' in 'kat', which is of non-class type 'int'
   23 |                 kat.push_back(make_pair(x,y));
      |                     ^~~~~~~~~
a.cc:25:18: error: request for member 'begin' in 'kat', which is of non-class type 'int'
   25 |         sort(kat.begin(),kat.end(), comp);
      |                  ^~~~~
a.cc:25:30: error: request for member 'end' in 'kat', which is of non-class type 'int'
   25 |         sort(kat.begin(),kat.end(), comp);
      |                              ^~~
a.cc:26:17: error: 'ull' was not declared in this scope
   26 |         vector< ull > secondary;
      |                 ^~~
a.cc:26:21: error: template argument 1 is invalid
   26 |         vector< ull > secondary;
      |                     ^
a.cc:26:21: error: template argument 2 is invalid
a.cc:29:23: error: invalid types 'int[int]' for array subscript
   29 |                 if(kat[i].second > kat[0].first)
      |                       ^
a.cc:29:39: error: invalid types 'int[int]' for array subscript
   29 |                 if(kat[i].second > kat[0].first)
      |                                       ^
a.cc:30:35: error: request for member 'push_back' in 'secondary', which is of non-class type 'int'
   30 |                         secondary.push_back(kat[i].second);
      |                                   ^~~~~~~~~
a.cc:30:48: error: invalid types 'int[int]' for array subscript
   30 |                         secondary.push_back(kat[i].second);
      |                                                ^
a.cc:32:12: error: expected ';' before 'cnt'
   32 |         ull cnt = 0;
      |            ^~~~
      |            ;
a.cc:33:38: error: request for member 'size' in 'secondary', which is of non-class type 'int'
   33 |         for(int i = 0; i < secondary.size();++i)
      |                                      ^~~~
a.cc:35:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   35 |                 cnt++;
      |                 ^~~
      |                 int
a.cc:36:34: error: invalid types 'int[int]' for array subscript
   36 |                 if(H <= secondary[i])
      |                                  ^
a.cc:38:29: error: invalid types 'int[int]' for array subscript
   38 |                 H-=secondary[i];
      |                             ^
a.cc:42:23: error: invalid types 'int[int]' for array subscript
   42 |                 if(kat[0].second > kat[0].first)
      |                       ^
a.cc:42:39: error: invalid types 'int[int]' for array subscript
   42 |                 if(kat[0].second > kat[0].first)
      |                                       ^
a.cc:44:31: error: invalid types 'int[int]' for array subscript
   44 |                         if(kat[0].second >= H){
      |                               ^
a.cc:45:33: error: 'cnt' was not declared in this scope; did you mean 'int'?
   45 |                                 cnt++;
      |                                 ^~~
      |                                 int
a.cc:47:33: error: 'cnt' was not declared in this scope; did you mean 'int'?
   47 |                                 cnt+=(H-kat[0].second + kat[0].first-1)/kat[0].first+1;
      |                                 ^~~
      |                                 int
a.cc:47:44: error: invalid types 'int[int]' for array subscript
   47 |                                 cnt+=(H-kat[0].second + kat[0].first-1)/kat[0].first+1;
      |                                            ^
a.cc:47:60: error: invalid types 'int[int]' for array subscript
   47 |                                 cnt+=(H-kat[0].second + kat[0].first-1)/kat[0].first+1;
      |                                                            ^
a.cc:47:76: error: invalid types 'int[int]' for array subscript
   47 |                                 cnt+=(H-kat[0].second + kat[0].first-1)/kat[0].first+1;
      |                                                                            ^
a.cc:50:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   50 |                         cnt+=(H+kat[0].first-1)/kat[0].first;
      |                         ^~~
      |                         int
a.cc:50:36: error: invalid types 'int[int]' for array subscript
   50 |                         cnt+=(H+kat[0].first-1)/kat[0].first;
      |                                    ^
a.cc:50:52: error: invalid types 'int[int]' for array subscript
   50 |                         cnt+=(H+kat[0].first-1)/kat[0].first;
      |                                                    ^
a.cc:53:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   53 |         cout << cnt << endl;
      |                 ^~~
      |                 int