Language: C++

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()/2+i]){
      ans=false;
      break;
    }
  }
  return ans;
}



int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin>>N;
  vector<l_l>pair[N]; 
  rep(i,N){
        ll a;
        ll b;
        cin >> a >> b;
        pair[i] = make_pair(b, a);
     
    }
  sort(pair.begin(),pair.end());
  ll time=0;
  rep(i,N){
    if(time+pair[i].first>=pair[i].second){
      time+=pair[i].first;
    }
    else{
      cout<<"No"<<endl;
      return 0;
    }
  }
  cout<<"Yes"<<endl;
}
    
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:42:33: error: no match for 'operator=' (operand types are 'std::vector<std::pair<long long int, long long int> >' and 'std::pair<long long int, long long int>')
   42 |         pair[i] = make_pair(b, a);
      |                                 ^
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:2:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'const std::vector<std::pair<long long int, long long int> >&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'std::vector<std::pair<long long int, long long int> >&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'std::initializer_list<std::pair<long long int, long long int> >'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:45:13: error: request for member 'begin' in 'pair', which is of non-class type 'std::vector<std::pair<long long int, long long int> > [N]'
   45 |   sort(pair.begin(),pair.end());
      |             ^~~~~
a.cc:45:26: error: request for member 'end' in 'pair', which is of non-class type 'std::vector<std::pair<long long int, long long int> > [N]'
   45 |   sort(pair.begin(),pair.end());
      |                          ^~~
a.cc:48:21: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'first'
   48 |     if(time+pair[i].first>=pair[i].second){
      |                     ^~~~~
a.cc:48:36: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'second'
   48 |     if(time+pair[i].first>=pair[i].second){
      |                                    ^~~~~~
a.cc:49:21: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'first'
   49 |       time+=pair[i].first;
      |                     ^~~~~