Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
using namespace std;
const int N=250005;
inline LL read(){
    char c=getchar();LL x=0,f=1;
    while(c<'0'||c>'9'){if(c=='-')f=-1; c=getchar();}
    while(c>='0'&&c<='9'){x=x*10+c-'0'; c=getchar();}
    return x*f;
}
LL n,t=0,ans=0;
struct data{
    LL t1,t2;
    bool operator <(const data &r)const{return t2<r.t2;}
}a[N];
priority_queue<LL> q;
int main(){
    n=read();
    for(int i=1;i<=n;i++){a[i].t1=read();a[i].t2=read();}
    sort(a+1,a+1+n);
    for(int i=1;i<=n;i++){
        if(t+a[i].t1<=a[i].t2){
            ans++;
            t+=a[i].t1;
            q.push(a[i].t1);
        }else{
            int mx=q.top();
            if(a[i].t1<mx){
                q.pop();
                q.push(a[i].t1);
                t=t-mx+a[i].t1;
            }
        }    
    }
	if(ans==n)
		puts("Yes");
	else puts("No");
}

Compiler output:
a.cc:7:8: error: 'LL' does not name a type
    7 | inline LL read(){
      |        ^~
a.cc:13:1: error: 'LL' does not name a type
   13 | LL n,t=0,ans=0;
      | ^~
a.cc:15:5: error: 'LL' does not name a type
   15 |     LL t1,t2;
      |     ^~
a.cc: In member function 'bool data::operator<(const data&) const':
a.cc:16:48: error: 't2' was not declared in this scope; did you mean 'tm'?
   16 |     bool operator <(const data &r)const{return t2<r.t2;}
      |                                                ^~
      |                                                tm
a.cc:16:53: error: 'const struct data' has no member named 't2'
   16 |     bool operator <(const data &r)const{return t2<r.t2;}
      |                                                     ^~
a.cc: At global scope:
a.cc:18:16: error: 'LL' was not declared in this scope
   18 | priority_queue<LL> q;
      |                ^~
a.cc:18:18: error: template argument 1 is invalid
   18 | priority_queue<LL> q;
      |                  ^
a.cc:18:18: error: template argument 2 is invalid
a.cc:18:18: error: template argument 3 is invalid
a.cc: In function 'int main()':
a.cc:20:5: error: 'n' was not declared in this scope
   20 |     n=read();
      |     ^
a.cc:20:7: error: 'read' was not declared in this scope; did you mean 'fread'?
   20 |     n=read();
      |       ^~~~
      |       fread
a.cc:21:32: error: 'struct data' has no member named 't1'
   21 |     for(int i=1;i<=n;i++){a[i].t1=read();a[i].t2=read();}
      |                                ^~
a.cc:21:47: error: 'struct data' has no member named 't2'
   21 |     for(int i=1;i<=n;i++){a[i].t1=read();a[i].t2=read();}
      |                                               ^~
a.cc:24:12: error: 't' was not declared in this scope
   24 |         if(t+a[i].t1<=a[i].t2){
      |            ^
a.cc:24:19: error: 'struct data' has no member named 't1'
   24 |         if(t+a[i].t1<=a[i].t2){
      |                   ^~
a.cc:24:28: error: 'struct data' has no member named 't2'
   24 |         if(t+a[i].t1<=a[i].t2){
      |                            ^~
a.cc:25:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |             ans++;
      |             ^~~
      |             abs
a.cc:26:21: error: 'struct data' has no member named 't1'
   26 |             t+=a[i].t1;
      |                     ^~
a.cc:27:15: error: request for member 'push' in 'q', which is of non-class type 'int'
   27 |             q.push(a[i].t1);
      |               ^~~~
a.cc:27:25: error: 'struct data' has no member named 't1'
   27 |             q.push(a[i].t1);
      |                         ^~
a.cc:29:22: error: request for member 'top' in 'q', which is of non-class type 'int'
   29 |             int mx=q.top();
      |                      ^~~
a.cc:30:21: error: 'struct data' has no member named 't1'
   30 |             if(a[i].t1<mx){
      |                     ^~
a.cc:31:19: error: request for member 'pop' in 'q', which is of non-class type 'int'
   31 |                 q.pop();
      |                   ^~~
a.cc:32:19: error: request for member 'push' in 'q', which is of non-class type 'int'
   32 |                 q.push(a[i].t1);
      |                   ^~~~
a.cc:32:29: error: 'struct data' has no member named 't1'
   32 |                 q.push(a[i].t1);
      |                             ^~
a.cc:33:29: error: 'struct data' has no member named 't1'
   33 |                 t=t-mx+a[i].t1;
      |                             ^~
a.cc:37:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |         if(ans==n)
      |            ^~~
      |            abs