Language: C++

#include<iostream>
#include<vector>
typedef pair<int, int> pair;

int main()
{
  	int a,b,n,i; cin>>n;
  	vector<pair> something[n];
  	for(i=0;i<n;i++)
      cin>>something[i].second>>something[i].first;
  	sort(something.begin(),something.end());
  	int sum=0; bool f = true;
  	for(i=0;i<n;i++)
    {
      sum+=p[i].second();
      if(sum>p[i].first())
      {f=false;break;}
    }
  	cout<<(f?"Yes":"No")<<endl;
  	return 0;
}

Compiler output:
a.cc:3:9: error: 'pair' does not name a type
    3 | typedef pair<int, int> pair;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:7:22: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         int a,b,n,i; cin>>n;
      |                      ^~~
      |                      std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<pair> something[n];
      |         ^~~~~~
a.cc:8:9: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:8:16: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
    8 |         vector<pair> something[n];
      |                ^~~~
      |                std::pair
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_iterator.h:3013:12: note: 'std::pair' declared here
 3013 |     struct pair;
      |            ^~~~
a.cc:8:22: error: 'something' was not declared in this scope
    8 |         vector<pair> something[n];
      |                      ^~~~~~~~~
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(something.begin(),something.end());
      |         ^~~~
      |         short
a.cc:15:12: error: 'p' was not declared in this scope
   15 |       sum+=p[i].second();
      |            ^
a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |         cout<<(f?"Yes":"No")<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |         cout<<(f?"Yes":"No")<<endl;
      |                               ^~~~
      |                               std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~