criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <algorithm>
#include <cstring>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;

using pll = pair<ll, ll>;
bool cmp(pll a, pll b) { return a.second < b.second; }  //比較関数

int n;
vector<pll> v;
int main() {
  cin >> n;
  v.resize(n);
  rep(i, n) cin >> v[i].first >> v[i].second;
  sort(v.begin(), v.end(), cmp);

  bool ok = true;
  ll sum = 0;
  rep(i, n) {
    sum += v[i].first();
    if (sum > v[i].second) ok = false;
  }
  cout << (ok ? "Yes" : "No");

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:22: error: expression cannot be used as a function
   25 |     sum += v[i].first();
      |            ~~~~~~~~~~^~
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <string>
#include <cstring>
#include <numeric>
#include <iomanip>
#include <fstream>
using namespace std;
long long mod=1e9+7;
//
int main(){
	int n;
	vector<pair<long long,long long> > c;
	cin>>n;
	for(int i=0;i<n;i++){
		long long a,b;
		cin>>a>>b;
		c.push_back(make_pair(b,a));
	}
	sort(c.begin(),c.end());
	long long now=0;
	for(int i=0;i<n;i++){
		if(now+c[i].second>c[i].first){
			cout<<"No"<<endl;
			returm 0;
		}else{
			now+=c[i].second;
		}
	}
	cout<<"Yes"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:25: error: 'returm' was not declared in this scope
   32 |                         returm 0;
      |                         ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
typedef pair<ll,ll> P;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;cin>>n;
  priority_queue<P,vector<P>,greater<P>> pq;
　rep(i,n){
　    int s,t;cin>>s>>t;
　    pq.push(make_pair(t,-s));
　}
　int cnt=0,tot=0;
　while(!pq.empty()){
　    P k=pq.top();pq.pop();
　    if(tot!=k.first){
　        cnt+=k.first-tot;
　        tot=k.first;
　    }
　    cnt+=k.second;
　    if(cnt<0){
　        cout<<"No"<<endl;
　        return 0;
　    }
　}
　cout<<"Yes"<<endl;
  return 0;
  }


Compiler output:
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　rep(i,n){
      | ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　    int s,t;cin>>s>>t;
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　    pq.push(make_pair(t,-s));
      | ^
a.cc:15:1: error: extended character 　 is not valid in an identifier
   15 | 　}
      | ^
a.cc:16:1: error: extended character 　 is not valid in an identifier
   16 | 　int cnt=0,tot=0;
      | ^
a.cc:17:1: error: extended character 　 is not valid in an identifier
   17 | 　while(!pq.empty()){
      | ^
a.cc:18:1: error: extended character 　 is not valid in an identifier
   18 | 　    P k=pq.top();pq.pop();
      | ^
a.cc:19:1: error: extended character 　 is not valid in an identifier
   19 | 　    if(tot!=k.first){
      | ^
a.cc:20:1: error: extended character 　 is not valid in an identifier
   20 | 　        cnt+=k.first-tot;
      | ^
a.cc:21:1: error: extended character 　 is not valid in an identifier
   21 | 　        tot=k.first;
      | ^
a.cc:22:1: error: extended character 　 is not valid in an identifier
   22 | 　    }
      | ^
a.cc:23:1: error: extended character 　 is not valid in an identifier
   23 | 　    cnt+=k.second;
      | ^
a.cc:24:1: error: extended character 　 is not valid in an identifier
   24 | 　    if(cnt<0){
      | ^
a.cc:25:1: error: extended character 　 is not valid in an identifier
   25 | 　        cout<<"No"<<endl;
      | ^
a.cc:26:1: error: extended character 　 is not valid in an identifier
   26 | 　        return 0;
      | ^
a.cc:27:1: error: extended character 　 is not valid in an identifier
   27 | 　    }
      | ^
a.cc:28:1: error: extended character 　 is not valid in an identifier
   28 | 　}
      | ^
a.cc:29:1: error: extended character 　 is not valid in an identifier
   29 | 　cout<<"Yes"<<endl;
      | ^
a.cc: In function 'int main()':
a.cc:12:7: error: 'i' was not declared in this scope
   12 | 　rep(i,n){
      |       ^
a.cc:12:1: error: '\U00003000rep' was not declared in this scope
   12 | 　rep(i,n){
      | ^~~~~
a.cc:16:1: error: '\U00003000int' was not declared in this scope
   16 | 　int cnt=0,tot=0;
      | ^~~~~
a.cc:17:1: error: '\U00003000while' was not declared in this scope
   17 | 　while(!pq.empty()){
      | ^~~~~~~
a.cc:29:1: error: '\U00003000cout' was not declared in this scope
   29 | 　cout<<"Yes"<<endl;
      | ^~~~~~
Language: Java

import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private int a;
    private int b;
    public Data(int a, int b) {
        this.a = a;
        this.b = b;
    }
    public int getA() {
        return a;
    }
    public int getB() {
        return b;
    }
}
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int [] in = new int [a];
        int [] in2 = new int [a];
        int t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public int compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(d[i].getB()<t){s="No";break;
                                         }
                             else{t+=d[i].getA();}
                            }        
		System.out.println(s);
	}
}


Compiler output:
Main.java:26: error: incompatible types: possible lossy conversion from long to int
                             in[i] = sc.nextLong();
                                                ^
Main.java:27: error: incompatible types: possible lossy conversion from long to int
                             in2[i] = sc.nextLong()-in[i];
                                                   ^
2 errors
Language: Java

import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(d[i].getB()<t){s="No";break;
                                         }
                             else{t+=d[i].getA();}
                            }        
		System.out.println(s);
	}
}


Compiler output:
Main.java:32: error: <anonymous Main$1> is not abstract and does not override abstract method compare(Data,Data) in Comparator
        Arrays.sort(d, new Comparator<Data>() {
                                              ^
Main.java:33: error: compare(Data,Data) in <anonymous Main$1> cannot implement compare(T,T) in Comparator
            public long compare(Data d1, Data d2) {
                        ^
  return type long is not compatible with int
  where T is a type-variable:
    T extends Object declared in interface Comparator
2 errors
Language: Java

import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}


Compiler output:
Main.java:19: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:19: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:31: error: <anonymous Main$1> is not abstract and does not override abstract method compare(Data,Data) in Comparator
        Arrays.sort(d, new Comparator<Data>() {
                                              ^
Main.java:32: error: compare(Data,Data) in <anonymous Main$1> cannot implement compare(T,T) in Comparator
            public long compare(Data d1, Data d2) {
                        ^
  return type long is not compatible with int
  where T is a type-variable:
    T extends Object declared in interface Comparator
4 errors
Language: Java

import java.util.*;
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}


Compiler output:
Main.java:32: error: <anonymous Main$1> is not abstract and does not override abstract method compare(Data,Data) in Comparator
        Arrays.sort(d, new Comparator<Data>() {
                                              ^
Main.java:33: error: compare(Data,Data) in <anonymous Main$1> cannot implement compare(T,T) in Comparator
            public long compare(Data d1, Data d2) {
                        ^
  return type long is not compatible with int
  where T is a type-variable:
    T extends Object declared in interface Comparator
2 errors
Language: Java

import java.util.*;]
import java.util.Arrays;
import java.util.Comparator;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
import java.util.*;]
                   ^
Main.java:3: error: class, interface, enum, or record expected
import java.util.Comparator;
^
2 errors
Language: Java

 import java.util.*;
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}

Compiler output:
Main.java:30: error: <anonymous Main$1> is not abstract and does not override abstract method compare(Data,Data) in Comparator
        Arrays.sort(d, new Comparator<Data>() {
                                              ^
Main.java:31: error: compare(Data,Data) in <anonymous Main$1> cannot implement compare(T,T) in Comparator
            public long compare(Data d1, Data d2) {
                        ^
  return type long is not compatible with int
  where T is a type-variable:
    T extends Object declared in interface Comparator
2 errors
Language: Java

 import java.util.*;
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public long getA() {
        return a;
    }
    public long getB() {
        return b;
    }
}


Compiler output:
Main.java:16: error: <anonymous Main$1> is not abstract and does not override abstract method compare(Data,Data) in Comparator
        Arrays.sort(d, new Comparator<Data>() {
                                              ^
Main.java:17: error: compare(Data,Data) in <anonymous Main$1> cannot implement compare(T,T) in Comparator
            public long compare(Data d1, Data d2) {
                        ^
  return type long is not compatible with int
  where T is a type-variable:
    T extends Object declared in interface Comparator
2 errors
Language: Java

 import java.util.*;
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public int getA() {
        return a;
    }
    public int getB() {
        return b;
    }
}

Compiler output:
Main.java:16: error: <anonymous Main$1> is not abstract and does not override abstract method compare(Data,Data) in Comparator
        Arrays.sort(d, new Comparator<Data>() {
                                              ^
Main.java:17: error: compare(Data,Data) in <anonymous Main$1> cannot implement compare(T,T) in Comparator
            public long compare(Data d1, Data d2) {
                        ^
  return type long is not compatible with int
  where T is a type-variable:
    T extends Object declared in interface Comparator
Main.java:37: error: incompatible types: possible lossy conversion from long to int
        return a;
               ^
Main.java:40: error: incompatible types: possible lossy conversion from long to int
        return b;
               ^
4 errors
Language: Java

 import java.util.*;
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
        });
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public int getA() {
        return a;
    }
    public int getB() {
        return b;
    }


Compiler output:
Main.java:41: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

 import java.util.*;
public class Main {    
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Data [] d = new Data [a];
         for(int i=0;i<a;i++){d[i] = new Data(in[i],in2[i]);                            
                             }
        Arrays.sort(d, new Comparator<Data>() {
            public long compare(Data d1, Data d2) {
                return d1.getB() - d2.getB();
            }
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}
class Data{
    private long a;
    private long b;
    public Data(long a, long b) {
        this.a = a;
        this.b = b;
    }
    public int getA() {
        return a;
    }
    public int getB() {
        return b;
    }

Compiler output:
Main.java:21: error: illegal start of type
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
        ^
Main.java:21: error: > or ',' expected
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                       ^
Main.java:21: error: <identifier> expected
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                         ^
Main.java:25: error: <identifier> expected
		System.out.println(s);
		                  ^
Main.java:25: error: <identifier> expected
		System.out.println(s);
		                    ^
Main.java:26: error: ')' or ',' expected
	}
	 ^
Main.java:40: error: reached end of file while parsing
    }
     ^
7 errors
Language: Java

 import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		long [] in = new long [a];
        long [] in2 = new long [a];
        long t = 0;
        for(int i=0;i<a;i++){
                             in[i] = sc.nextLong();
                             in2[i] = sc.nextLong()-in[i];
                            }
        Arrays.sort(in2,in);
		String s = "Yes";        
        for(int i=0;i<a;i++){if(in2[i]<t){s="No";break;
                                         }
                             else{t+=in2[i];}
                            }        
		System.out.println(s);
	}
}


Compiler output:
Main.java:13: error: no suitable method found for sort(long[],long[])
        Arrays.sort(in2,in);
              ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (argument mismatch; long[] cannot be converted to Comparator<? super T#1>))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

import heapq
n = int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
sortedab = sorted(ab, key=lambda x:x[1])
cleartime = [0]*n
cleartime[0] = sortedab[0][0]
flag = True
for i in range(n):
    cleartime[i] = cleartime[i-1] + sortedab[i][0]
    if cleartime[i] <= sortedab[i][1]:
        continue
    else:
        flag = False
        break
if flag:
    print("Yes")
else:
    print("No")
#print(sortedab)
#print(cleartime)


Compiler output:
a.cc:19:2: error: invalid preprocessing directive #print
   19 | #print(sortedab)
      |  ^~~~~
a.cc:20:2: error: invalid preprocessing directive #print
   20 | #print(cleartime)
      |  ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import heapq
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
using namespace std;
using p = pair<int,int>;

int main() {
  int n;
  cin >> n;
  vector<P>table(n);
  
  for (int i = 0; i < n; i++) {
    int a,b;
    cin >> a >> b;
    table.at(i) = make_pair(b,a);
  }
  sort(table.begin(),table.end());
  
  bool ok = true;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += table.at(i).second;
    if (sum > table.at(i).first) {
      ok = false;
      break;
    }
  }
  cout << (ok ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'P' was not declared in this scope
    8 |   vector<P>table(n);
      |          ^
a.cc:8:11: error: template argument 1 is invalid
    8 |   vector<P>table(n);
      |           ^
a.cc:8:11: error: template argument 2 is invalid
a.cc:13:11: error: request for member 'at' in 'table', which is of non-class type 'int'
   13 |     table.at(i) = make_pair(b,a);
      |           ^~
a.cc:15:14: error: request for member 'begin' in 'table', which is of non-class type 'int'
   15 |   sort(table.begin(),table.end());
      |              ^~~~~
a.cc:15:28: error: request for member 'end' in 'table', which is of non-class type 'int'
   15 |   sort(table.begin(),table.end());
      |                            ^~~
a.cc:20:18: error: request for member 'at' in 'table', which is of non-class type 'int'
   20 |     sum += table.at(i).second;
      |                  ^~
a.cc:21:21: error: request for member 'at' in 'table', which is of non-class type 'int'
   21 |     if (sum > table.at(i).first) {
      |                     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i = 0;i<n;i++)
using ll = long long;
using P = pair<ll,ll>;

int main(){
  ll n;cin>>n;
  vector<P> v(n);
  rep(i,n){
    cin>>v.at(i).second>>v.at(i).first;
  }
  sort(v.begin(),v.end());
  bool ok = true;
  if (v.at(0).second > v.at(0).fist){
    ok = false;
  }
  rep(i,n-1){
    if(v.at(i).second + v.at(i+1).second <= v.at(i+1).first){
      v.at(i+1).second += v.at(i).second;
    }
    else{
      ok = false;
    }
  }
  if (ok){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'struct std::pair<long long int, long long int>'} has no member named 'fist'; did you mean 'first'?
   15 |   if (v.at(0).second > v.at(0).fist){
      |                                ^~~~
      |                                first
Language: C++

#include <iostream>
#include <vector>
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
    int n;
    cin >> n;
    vector<pair<int, int>> a(n);
    rep(i, 0, n){
        cin >> a[i].second >> a[i].first;
    }
    sort(a.begin(), a.end());
    ll heap = 0;
    rep(i, 0, n){
        heap += a[i].second;
        if(heap > a[i].first){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |     sort(a.begin(), a.end());
      |     ^~~~
      |     short
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using P = pair<int,int>;

int main() {
    int n;
    cin >> n;
    vector<P> p(n);
    rep(i,n) cin >> p[i].second >> p[i].first;
    sort(p.begin(),p.end());
    ll t = 0;
    rep(i,n) {
        t += p[i].second;
        if (t > p[i].first) {
            puts("No");
            return 0;
        }
    }
    puts("Yes")
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'll' was not declared in this scope
   12 |     ll t = 0;
      |     ^~
a.cc:14:9: error: 't' was not declared in this scope
   14 |         t += p[i].second;
      |         ^
a.cc:20:16: error: expected ';' before 'return'
   20 |     puts("Yes")
      |                ^
      |                ;
   21 |     return 0;
      |     ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define vector2(a,b,c) vector<vector<int>> a(b/*縦！w*/,vector<int>(c/*横！w*/))
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
struct edge{int from,to,cost;};
signed main(){
  int a;
  cin>>a;
  vector<P> b(a);
  rep(i,a)
    cin>>b[i].second>>b[i].first;
  sort(all(b));
  int a=0;
  bool ans=1;
  rep(i,a){
  a+=b[i].second;
    if(b[i].first<a)
      ans=0;
  }
  if(ans)
    cout<<"Yes"<<endl;
  else
    cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:7: error: redeclaration of 'long long int a'
   25 |   int a=0;
      |       ^
a.cc:19:7: note: 'long long int a' previously declared here
   19 |   int a;
      |       ^
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define int long long
#define inf 1000000007
#define LINF 1000000000000000007LL
#define ll long long
using namespace std;
signed main(){
	int n;
	cin>>n;
	vector< pair<int,int> > jobs;
	for(int i=0;i<n;i++){
		int a,b;
		cin>>a>>b;
		jobs.pb( mp(b,a) );
	}
	sort( jobs.begin(), jobs.end() );
	int su = 0;
	for(int i=0;i<n;i++){
		su += jobs.second;
		if( su > jobs.first ){
			cout<<"No"<<endl;
			return 0;
		}
	}
	cout<<"Yes"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'second'
   21 |                 su += jobs.second;
      |                            ^~~~~~
a.cc:22:31: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'first'
   22 |                 if( su > jobs.first ){
      |                               ^~~~~
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        final int N = sc.nextInt();

        Work[] works = new Work[N];
        for (int i = 0; i < N; i++) {
            final int A = Integer.valueOf(sc.next());
            final int B = Integer.valueOf(sc.next());
            works[i] = new ABC131_D().new Work(A, B);
        }

        boolean finished = true;
        int workTime = 0;

        Arrays.sort(works);

        for (Work work : works) {
            workTime += work.a;
            if (workTime > work.b) {
                finished = false;
                break;
            }
        }
        
        System.out.println(finished ? "Yes" : "No");
    }

    private class Work implements Comparable<Work> {
        public int a;
        public int b;

        public Work(int a, int b) {
            this.a = a;
            this.b = b;
        }

        @Override
        public int compareTo(Work o) {
            return b - o.b;
        }

        public String toString() {
            return "a: " + a + ", b: " + b;
        }
    }
}


Compiler output:
Main.java:15: error: cannot find symbol
            works[i] = new ABC131_D().new Work(A, B);
                           ^
  symbol:   class ABC131_D
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

int main(){
  int n;  cin >> n;
  vector<P> p(n);  rep(i,n) cin >> p[i].second >> p[i].first;
  sort(p.begin(), p.end());
  ll t += 0;
  rep(i,n){
    t += p[i].second;
    if(t > p[i].first){
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected initializer before '+=' token
   11 |   ll t += 0;
      |        ^~
a.cc:13:5: error: 't' was not declared in this scope
   13 |     t += p[i].second;
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define l long long
int main()
{
  int n;
  cin>>n;
  l a,b;
  vector<pair<l,l> > p;
  for(int i=0;i<n;i++)
  {
    cin>>a>>b;
    p.push_back({b,a});
  }
  l sum=0;
  int flag=0;
  sort(p.begin(),p.end());
  for(int i=0;i<n;i++)
  {
    sum+=p[i].second;
    if(sum>p[i].first)
      flag=1;
  }
  if(flag==1)
    cout<<"No"<<endl;
  else
    cout<<"Yes"<<endl;
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: expected '}' at end of input
   28 |   return 0;
      |            ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

//
//  main.cpp
//  ATcode131
//
//  Created by didi on 2020/1/16.
//  Copyright © 2020年 didi. All rights reserved.
//

#include <iostream>
#include <map>
#include <vector>
#include <set>
using namespace std;

int main(int argc, const char * argv[]) {
    int N;
    cin >> N;
    vector<pair<int, int>> A;
    int a = 0, b = 0;
    for (int i = 0; i < N; ++i) {
        cin >> a >> b;
        A.push_back({a, b});
    }
    sort(A.begin(), A.end(), [](const pair<int, int>& pr1, const pair<int, int>& pr2) {
        return pr1.second < pr2.second || (pr1.second == pr2.second && pr1.first < pr2.first);
    });
    int p = 0;
    for (auto& v: A) {
        p += v.first;
        if (p > v.second) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   24 |     sort(A.begin(), A.end(), [](const pair<int, int>& pr1, const pair<int, int>& pr2) {
      |     ^~~~
      |     short
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(ll (i)=0; i<(n); ++(i))
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n,a,b;cin>>n;
  bool is_possible=true;
  map<ll,ll> m;
  rep(i,n) {
    cin>>a>>b;m[b]+=a;
    if(a[i]>b[i]) is_possible=false;
  }
  if(is_possible) {
    ll sum=0;
    for(auto itr=m.begin();itr!=m.end();++itr) {
      if(itr->first<itr->second) is_possible=false;
      else {
        sum+=itr->second;
        if(itr->first<sum) is_possible=false;
      }
    }
  }
  print(is_possible?"Yes":"No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: invalid types 'long long int[long long int]' for array subscript
   15 |     if(a[i]>b[i]) is_possible=false;
      |         ^
a.cc:15:14: error: invalid types 'long long int[long long int]' for array subscript
   15 |     if(a[i]>b[i]) is_possible=false;
      |              ^
Language: C++

n = int(input())
ab = [0] * n
for i in range(n):
    ab[i] = list(map(int, input().split()))

ab = sorted(ab, key=lambda x: x[1])


time = 0
for i in ab:
    time += i[0]
    if time > i[1]:
        print("No")
        exit()

print("Yes")

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  long long n;
  cin>>n;
  vector<pair<long long, long long>> ba(n);
  
  for(int i=0; i<n; i++) {
    long long a b; cin>>a>>b;
  	ba.at(i).first=b;
    ba.at(i).second=a;
  }
  
  sort(ba.begin(), ba.end());
  long long sum=0;
  
  for(int i=0; i<n; i++) {
    sum += ba.at(i).second;
    if(sum > ba.at(i).first) {
    	cout << "No" <<endl;
    	return 0;
    }
  }
  cout << "Yes" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected initializer before 'b'
   10 |     long long a b; cin>>a>>b;
      |                 ^
a.cc:10:25: error: 'a' was not declared in this scope
   10 |     long long a b; cin>>a>>b;
      |                         ^
a.cc:10:28: error: 'b' was not declared in this scope
   10 |     long long a b; cin>>a>>b;
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  long long n;
  cin>>n;
  vector<pair<long long>> ba(n);
  
  for(int i=0; i<n; i++) {
    long long a b; cin>>a>>b;
  	ba.at(i).first=b;
    ba.at(i).second=a;
  }
  
  sort(ba.begin(), ba.end());
  long long sum=0;
  
  for(int i=0; i<n; i++) {
    sum += ba.at(i).second;
    if(sum > ba.at(i).first) {
    	cout << "No" <<endl;
    	return 0;
    }
  }
  cout << "Yes" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: wrong number of template arguments (1, should be 2)
    7 |   vector<pair<long long>> ba(n);
      |                    ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:7:24: error: template argument 1 is invalid
    7 |   vector<pair<long long>> ba(n);
      |                        ^~
a.cc:7:24: error: template argument 2 is invalid
a.cc:10:17: error: expected initializer before 'b'
   10 |     long long a b; cin>>a>>b;
      |                 ^
a.cc:10:25: error: 'a' was not declared in this scope
   10 |     long long a b; cin>>a>>b;
      |                         ^
a.cc:10:28: error: 'b' was not declared in this scope
   10 |     long long a b; cin>>a>>b;
      |                            ^
a.cc:11:12: error: request for member 'at' in 'ba', which is of non-class type 'int'
   11 |         ba.at(i).first=b;
      |            ^~
a.cc:12:8: error: request for member 'at' in 'ba', which is of non-class type 'int'
   12 |     ba.at(i).second=a;
      |        ^~
a.cc:15:11: error: request for member 'begin' in 'ba', which is of non-class type 'int'
   15 |   sort(ba.begin(), ba.end());
      |           ^~~~~
a.cc:15:23: error: request for member 'end' in 'ba', which is of non-class type 'int'
   15 |   sort(ba.begin(), ba.end());
      |                       ^~~
a.cc:19:15: error: request for member 'at' in 'ba', which is of non-class type 'int'
   19 |     sum += ba.at(i).second;
      |               ^~
a.cc:20:17: error: request for member 'at' in 'ba', which is of non-class type 'int'
   20 |     if(sum > ba.at(i).first) {
      |                 ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  long long n; cin >> n;
  vector<pair<long long>> ba(n);
  for(int i = 0; i < n; i++){
    long long a, b; cin >> a >> b;
    ba.at(i).first = b;
    ba.at(i).second = a;
  }
  sort(ba.begin(), ba.end());
  long long sum = 0;
  for(int i = 0; i < n; i++){
    sum += ba.at(i).second;
    if(ba.at(i).first > sum){
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: wrong number of template arguments (1, should be 2)
    6 |   vector<pair<long long>> ba(n);
      |                    ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:6:24: error: template argument 1 is invalid
    6 |   vector<pair<long long>> ba(n);
      |                        ^~
a.cc:6:24: error: template argument 2 is invalid
a.cc:9:8: error: request for member 'at' in 'ba', which is of non-class type 'int'
    9 |     ba.at(i).first = b;
      |        ^~
a.cc:10:8: error: request for member 'at' in 'ba', which is of non-class type 'int'
   10 |     ba.at(i).second = a;
      |        ^~
a.cc:12:11: error: request for member 'begin' in 'ba', which is of non-class type 'int'
   12 |   sort(ba.begin(), ba.end());
      |           ^~~~~
a.cc:12:23: error: request for member 'end' in 'ba', which is of non-class type 'int'
   12 |   sort(ba.begin(), ba.end());
      |                       ^~~
a.cc:15:15: error: request for member 'at' in 'ba', which is of non-class type 'int'
   15 |     sum += ba.at(i).second;
      |               ^~
a.cc:16:11: error: request for member 'at' in 'ba', which is of non-class type 'int'
   16 |     if(ba.at(i).first > sum){
      |           ^~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;


bool compair(pair<long long , long long> a, pair <long long , long long > b) {
    return a.second < b.second;
}

int N;

vector<pair<long long , long long>> v;

int main() {
    cin >> N;
   
    for (int i = 0; i < N; ++i) cin >> v[i].first >> v[i].second;
  
    sort(v.begin(), v.end(), compare);

    bool ok = true;
    long long sum = 0;
    for (int i = 0; i < N; ++i) {
        sum += v[i].first;
        if (sum > v[i].second) ok = false;
    }
    if (ok) cout << "Yes" << endl;
    else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:30: error: 'compare' was not declared in this scope; did you mean 'compair'?
   20 |     sort(v.begin(), v.end(), compare);
      |                              ^~~~~~~
      |                              compair
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<pair<int,int>> p(n);
  rep(i,n) cin >> p[i].second >> p[i].first;
  sort(p.begin(),p.end());
  ll s = 0;
  rep(i,n){
    ll s += p[i].second;
    if(p[i].first>s){
      puts("No");
      return 0;
    }
  }
  puts("Yes");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: expected initializer before '+=' token
   16 |     ll s += p[i].second;
      |          ^~
Language: C++

#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
#include <array>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<double> VD;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<VD> VVD;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
using Graph=vector<vector<int>>;
using edge= struct{int to;ll cost;};


template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

int n;
vector<pair<int,int>> tasks;

int main(){
  cin>>n;
  REP(i,n){
    int a,b;
    cin>>a>>b;
    tasks.emplace_back(b,a);


  sort(tasks.begin(),tasks.end());
  int sum=0;
  bool isyes =true;
  for(auto v:tasks){
    sum+=v.second;
    if(sum>v.first){
      isyse=false;
      break;
    }
  }
  cout<<(isyes?"Yes":"No")<<endl;
  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:7: error: 'isyse' was not declared in this scope; did you mean 'isyes'?
   56 |       isyse=false;
      |       ^~~~~
      |       isyes
a.cc:63:2: error: expected '}' at end of input
   63 | }
      |  ^
a.cc:42:11: note: to match this '{'
   42 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  long a[n];
  long b[n];
  int i;
  vector<pair<int,int>> p(n);
  for(i=0;i<n;i++){
    cin >> a[i] >> b[i];
    p[i] = make_pair(b[i],a[i]);
  }
  sort(p.begin(),p.end());
  long curTime = 0;
  int chk = 1;
  for(i=0;i<n;i++){
    if(chk == 0)break;
    curTime += p[i].second;
    if(curTime > p[i].first) chk = 0;
  }

  if(chk == 0)cout << "No";
  else cout << "Yes;"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected ';' before '}' token
   24 |   else cout << "Yes;"
      |                      ^
      |                      ;
   25 | }
      | ~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>


using namespace std;

#define MAX 300000
vector<long> A, B;
int N,time = 0;
string ans = "Yes";

int main()
{
	cin >> N;
	for (int i = 0; i < N; i++)
	{
		int l, m;
		cin >> l >> m;
		A.push_back(l);
		B.push_back(m);
	}
	while (B.size() > 0)
	{
		auto minitr = min_element(B.begin(), B.end());
		int min_index = distance(B.begin(), minitr);

		time += A[min_index];
		if (time <= B[min_index])
		{
			B.erase(minitr);
			A.erase(A.begin() + min_index);
		}
		else {
			ans = "No";
			break;
		}
	//	cout << B.size() << endl;
	}
	cout << ans;
}


Compiler output:
a.cc:10:7: error: 'int time' redeclared as different kind of entity
   10 | int N,time = 0;
      |       ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:28:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   28 |                 time += A[min_index];
a.cc:28:22: error: assignment of read-only location 'time'
a.cc:29:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                 if (time <= B[min_index])