criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.Comparator;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jaynil
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DMegalomania solver = new DMegalomania();
        solver.solve(1, in, out);
        out.close();
    }

    static class DMegalomania {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            ArrayList<Pair<Integer, Integer>> a = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                a.add(new Pair(in.nextInt(), in.nextInt()));
            }
            Collections.sort(a, new Comparator<Pair<Integer, Integer>>() {

                public int compare(Pair<Integer, Integer> o1, Pair<Integer, Integer> o2) {
                    return o1.getValue() - o2.getValue();
                }
            });
            long ans = 0;
            boolean yes = false;
            for (int i = 0; i < n; i++) {
                ans += a.get(i).getKey();
                if (ans > a.get(i).getValue()) {
                    yes = true;
                    break;
                }
            }
            if (yes) out.println("No");
            else out.println("Yes");
        }

    }

    static class Pair implements java.io.Serializable {
        K getKey();

        V getValue();

        Pair;

        String toString();

        int hashCode();

        boolean equals;

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}



Compiler output:
Main.java:64: error: <identifier> expected
        Pair;
            ^
1 error
Language: C++

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

t=0
flag=True
for i in range(n):
  j = sorted(n)[i]
  k = sorted(n)[i]
  if j>k-t:
    print('No')
    flag=False
    break
  else:
    t += j
if flag:
  print('Yes')

Compiler output:
a.cc:13:11: warning: multi-character character constant [-Wmultichar]
   13 |     print('No')
      |           ^~~~
a.cc:19:9: warning: multi-character character constant [-Wmultichar]
   19 |   print('Yes')
      |         ^~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

//in the name of god
//if you read this code please search about imam hussain
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

#define pb push_back
#define endl "\n";
#define migmig ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define read freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);

const int maxn=1e5+5;
const int mod=1e9+7;
const int inf=1e9;
const int del=728729;
int a[maxn],b[maxn];
int main(){
	migmig;
	int c=0;
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i]>>b[i];
	}
	for(int i=1;i<=1e9;i++){
		c++;
	}
	cout<<"Yes"l
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:30:15: error: unable to find string literal operator 'operator""l' with 'const char [4]', 'long unsigned int' arguments
   30 |         cout<<"Yes"l
      |               ^~~~~~
Language: C

#include<stdio.h>
#include<algorithm>
using namespace std;
struct Gcl
{
	long long num;
	long long shijian;
};
bool cmp(Gcl a,Gcl b){
	if(a.shijian==b.shijian){
		return a.num>b.num; 
	}else{
		return a.shijian<b.shijian;
	}
}struct Gcl s[200010]={};
int main()
{
	
	long long n,i,sum=0,leap=0;
	while(~scanf("%lld",&n)){
		for(i=0;i<n;i++){
			scanf("%lld%lld",&s[i].num,&s[i].shijian);
		}sort(s,s+n,cmp);
		for(i=0;i<n;i++){
			sum+=s[i].num;
			if(sum>s[i].shijian){
				leap=1;
				break;
			}
		}if(leap==1){
			printf("NO\n");
		}else{
			printf("YES\n");
		}leap=0;sum=0;
	}
} 

Compiler output:
main.c:2:9: fatal error: algorithm: No such file or directory
    2 | #include<algorithm>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
int n;
const long long maxn = 1e6;
struct Node{
	int ai,bi;
}node[maxn];
bool cmp(Node a,Node b)
{
	return a.b != b.b ? a.b < b.b : a.a < b.a;
}
using namespace std;
int main(void)
{
	scanf("%d",&n);
	for(int i = 1;i<=n;++i)
		scanf("%d %d",&node[i].ai,&node[i].bi);
	sort(node+1,node+1+n,cmp);
	int ans = 0;
	for(int i = 1;i<=n;++i)
	{
		if((ans + node[i].ai) <= node[i].bi)
			ans += node[i].ai;
		else{
			puts("NO");
			return 0;
		}
	}
	puts("Yes");
	return 0;
}

Compiler output:
a.cc: In function 'bool cmp(Node, Node)':
a.cc:11:18: error: 'struct Node' has no member named 'b'; did you mean 'bi'?
   11 |         return a.b != b.b ? a.b < b.b : a.a < b.a;
      |                  ^
      |                  bi
a.cc:11:25: error: 'struct Node' has no member named 'b'; did you mean 'bi'?
   11 |         return a.b != b.b ? a.b < b.b : a.a < b.a;
      |                         ^
      |                         bi
a.cc:11:31: error: 'struct Node' has no member named 'b'; did you mean 'bi'?
   11 |         return a.b != b.b ? a.b < b.b : a.a < b.a;
      |                               ^
      |                               bi
a.cc:11:37: error: 'struct Node' has no member named 'b'; did you mean 'bi'?
   11 |         return a.b != b.b ? a.b < b.b : a.a < b.a;
      |                                     ^
      |                                     bi
a.cc:11:43: error: 'struct Node' has no member named 'a'; did you mean 'ai'?
   11 |         return a.b != b.b ? a.b < b.b : a.a < b.a;
      |                                           ^
      |                                           ai
a.cc:11:49: error: 'struct Node' has no member named 'a'; did you mean 'ai'?
   11 |         return a.b != b.b ? a.b < b.b : a.a < b.a;
      |                                                 ^
      |                                                 ai
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repl(i,n) for(int64_t i=0;i<(int64_t)(n);i++)
#define MAX_N 10000000
#define ll int64_t
#define all(v) (v).begin(),(v).end()
#define P pair<int,int>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 'p' was not declared in this scope
   17 |         t+=p[i].second;
      |            ^
Language: Java

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

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		task[] t = new task[n];
		int now = 0; boolean flag = true;

		for(int i = 0; i < n; i++) {
			t[i] = new task(sc.nextInt(), sc.nextInt());
		}

		Arrays.sort(t, new Comparator<task>() {
			public int compare(task t1, task t2) {
				return t1.b - t2.b;
			}
		});

		for(int i= 0; i < n; i++) {
			now += t[i].a;
			if(now > t[i].b) {
				flag = false;
				break;
			}
		}

		System.out.println(flag ? "YES" : "NO");
		sc.close();

	}

	private static class task{
		int a; int b;
		task(int a, int b){
			this.a = a; this.b = b;
		}
	

Compiler output:
Main.java:41: error: reached end of file while parsing
		}
		 ^
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;

int main(){
    int N; cin >> N;
    vector<pair<int,int> A(N);

    rep(i,N){
        int A , B;
        cin >> A >> B;
        A[i] = make_pair(B,A);
    }

    sort(all(A));
    int time=0;
    bool jud = true;

    rep(i,N){
        time += A[i].second;
        if(time > A[i].first){
            jud = false;
        }
    }

    if(jud){
        cout << "Yes" << endl;
    }

    else{
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: template argument 1 is invalid
    8 |     vector<pair<int,int> A(N);
      |                             ^
a.cc:8:29: error: template argument 2 is invalid
a.cc:13:10: error: invalid types 'int[int]' for array subscript
   13 |         A[i] = make_pair(B,A);
      |          ^
a.cc:16:14: error: 'A' was not declared in this scope
   16 |     sort(all(A));
      |              ^
a.cc:16:10: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   16 |     sort(all(A));
      |          ^~~
      |          std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: C++

#include <bits/stdc++.h>
#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 tim = 0;
  rep(i,n){
    tim += p[i].second;
    if(t>p[i].first){
      puts("No");
      return 0;
    }
  }
  puts("Yes");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 't' was not declared in this scope
   15 |     if(t>p[i].first){
      |        ^
Language: C++

#include <bits/stdc++.h>
#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 tim = 0;
  rep(i,n){
    t += p[i].second;
    if(t>p[i].first){
      puts("No");
      return 0;
    }
  }
  puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 't' was not declared in this scope
   14 |     t += p[i].second;
      |     ^
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(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    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){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;

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

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

int N;
long long K;
vector<long long> a;
 
int main() {
    int N;
    cin >> N;
    int x,y;
    vector<pair<int, int> > v(N);
    for (int i = 0; i < N; i++){
        cin >> x >> y;
        v[i] = make_pair(y, x);
    }
    sort(v.begin(), v.end());
    
    long long sums = 0;
    for (int i = 0; i < N; i++)
    {
        sums += v[i].second;
//        cout << sums << ":" << v[i].first << endl;
        if(sums > v[i].first){
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
}

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

import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); List<Integer> a = new ArrayList<>(); List<Integer> b = new ArrayList<>(); //受け取る処理 for (int i = 0; i < n; i++) { a.add(s.nextInt()); b.add(s.nextInt()); } int sort=0; for(int i=0;i<n;i++){ for(int j=0;j<(n-i-1);j++){ if(b.get(i)>b.get(i+1)){ sort=b.get(i); b.set(i,b.get(i+1)); b.set(i+1,sort); sort=0; //ｂも同じように入れ替える sort=a.get(i); a.set(i,a.get(i+1)); a.set(i+1,sort); } } } //そもそも時間的に無理 int cnt=0; for(int i=0;i<n;i++){ cnt+=a.get(i); } if(cnt>b.get(n-1)||a.get(0)>b.get(0)) { System.out.print("No"); System.exit(0); } int cnt2=0; for(int i=0;i<n;i++){ cnt2+=a.get(i); if(cnt2>b.get(i)){ System.out.print("No"); System.exit(0); } } System.out.print("Yes"); } }


Compiler output:
Main.java:1: error: reached end of file while parsing
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); List<Integer> a = new ArrayList<>(); List<Integer> b = new ArrayList<>(); //?????? for (int i = 0; i < n; i++) { a.add(s.nextInt()); b.add(s.nextInt()); } int sort=0; for(int i=0;i<n;i++){ for(int j=0;j<(n-i-1);j++){ if(b.get(i)>b.get(i+1)){ sort=b.get(i); b.set(i,b.get(i+1)); b.set(i+1,sort); sort=0; //???????????? sort=a.get(i); a.set(i,a.get(i+1)); a.set(i+1,sort); } } } //?????????? int cnt=0; for(int i=0;i<n;i++){ cnt+=a.get(i); } if(cnt>b.get(n-1)||a.get(0)>b.get(0)) { System.out.print("No"); System.exit(0); } int cnt2=0; for(int i=0;i<n;i++){ cnt2+=a.get(i); if(cnt2>b.get(i)){ System.out.print("No"); System.exit(0); } } System.out.print("Yes"); } }
                                                                                                                                                                                                                   ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
  int n;cin>>n;
  vector<pair<int, int>> v(n);
  rep(i,n){
	int a,b;cin>>a>>b;
    v[i] = make_pair(b,a);
  }
  sort(all(v));
  long long ans=0;
  for(auto p:v) {
    if(ans > p.first) {
      puts("No");
      return 0;
    }
    ans += p.second;
  }
  puts("Yes");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   11 |   sort(all(v));
      |        ^~~
      |        std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
  int n;cin>>n;
  vector<pair<int, int>> v(n);
  rep(i,n){
	int a,b;cin>>a>>b;
    v[i] = make_pair(b,a);
  }
  sort(all(v));
  long long ans=0;
  for(auto p:v) {
    if(ans > v.first) {
      puts("No");
      return 0;
    }
    ans += v.second;
  }
  puts("Yes");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   11 |   sort(all(v));
      |        ^~~
      |        std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
a.cc:14:16: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
   14 |     if(ans > v.first) {
      |                ^~~~~
a.cc:18:14: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
   18 |     ans += v.second;
      |              ^~~~~~
Language: C++

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

using vi=vector<int>;
using vvi=vector<vector<int>>;

int main(){
  int n;cin>>n;
  bool x=true;
  vector<pair<(int,int)>>v(n);
  rep(i,n){
    int a,b;cin>>a>>b;
    v.at(i)=make_pair(b,a);
  }
  sort(v.begin(),v.end());
  int ans=0;
  rep(i,n){
    ans+=v.at(i).second;
    if(ans>v.at(i).first){
      x=false;
      continue;
    }
  }
  if(x)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: wrong number of template arguments (1, should be 2)
   11 |   vector<pair<(int,int)>>v(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:11:10: error: template argument 1 is invalid
   11 |   vector<pair<(int,int)>>v(n);
      |          ^~~~~~~~~~~~~
a.cc:11:10: error: template argument 2 is invalid
a.cc:11:23: error: expected unqualified-id before ')' token
   11 |   vector<pair<(int,int)>>v(n);
      |                       ^
a.cc:14:5: error: 'v' was not declared in this scope
   14 |     v.at(i)=make_pair(b,a);
      |     ^
a.cc:16:8: error: 'v' was not declared in this scope
   16 |   sort(v.begin(),v.end());
      |        ^
Language: C++

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

using vi=vector<int>;
using vvi=vector<vector<int>>;

int main(){
  int n;cin>>n;
  vector<pair<(int,int)>>v(n);
  rep(i,n){
    int a,b;cin>>a>>b;
    v.at(i)=make_pair(b,a);
  }
  sort(v.begin(),v.end());
  int ans=0;
  rep(i,n){
    ans+=v.at(i).second;
    if(ans<
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: wrong number of template arguments (1, should be 2)
   10 |   vector<pair<(int,int)>>v(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:10:10: error: template argument 1 is invalid
   10 |   vector<pair<(int,int)>>v(n);
      |          ^~~~~~~~~~~~~
a.cc:10:10: error: template argument 2 is invalid
a.cc:10:23: error: expected unqualified-id before ')' token
   10 |   vector<pair<(int,int)>>v(n);
      |                       ^
a.cc:13:5: error: 'v' was not declared in this scope
   13 |     v.at(i)=make_pair(b,a);
      |     ^
a.cc:15:8: error: 'v' was not declared in this scope
   15 |   sort(v.begin(),v.end());
      |        ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:19:12: error: expected ')' before '}' token
   19 |     if(ans<
      |       ~    ^
      |            )
   20 | }
      | ~           
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  
  int n;
  cin >> n;
  
  vector<pair<int , int>> cont(n);
  
  for(int i = 0 ; i < n ; i++){ 
    cin >> cont.at(i).second;
    cin >> cont.at(i).first;
  }
  
  sort(cont.begin() , cont.end());
  
  int64_t sum = 0;
  bool jad = false;
  
  for(int i = 0 ; i < n ; i++){
    
    if(sum + cont.at(i).second) > cont.at(i).first){
      break;
    }
    if(i == n-1){
      jad = true;
    }
    sum += cont.at(i).second;
  }
  
  if(jad){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:33: error: expected primary-expression before '>' token
   22 |     if(sum + cont.at(i).second) > cont.at(i).first){
      |                                 ^
Language: C++

N = int(input())
AB = []
for i in range(N):
    AB.append(list(map(int, input().split())))

AB.sort(key=lambda x:x[1])

time = 0
over_flag = False
for i in range(N):
    A, B = AB[i]
    time += A
    if time > B:
        over_flag = True
        break
if over_flag:
    print('No')
else:
    print('Yes')


Compiler output:
a.cc:17:11: warning: multi-character character constant [-Wmultichar]
   17 |     print('No')
      |           ^~~~
a.cc:19:11: warning: multi-character character constant [-Wmultichar]
   19 |     print('Yes')
      |           ^~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <string>
#include <map>

#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> > pairs(n);
    rep(i, n) {
        int a, b;
        cin >> a >> b;
        pairs[i] = make_pair(b, a);
    }
    sort(pairs.begin(), pairs.end());

    int total_time = 0;

    rep(i, n) {
        int time_limit = pairs[i].first;
        total_time += pairs[i].second;
        if (time_limit < total_time) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}

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

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

vector<pair<int,int> > v;
int main( ) {
	int n;
	int i;
	cin>>n;
	for(i=1;i<=n;i++) {
		int a, b;
		cin>>a>>b;
		v.push_back({b, a});
	}
	sort(v.begin(), v.end());
	int day = 0;
	bool ans =1;
	for(auto p:v) {
		//cout<<p.first<<" , "<<p.second<<"\n";
		int deadline = p.first;
		int dayTaken = p.second;
		if(day <= deadline) day+=dayTaken;
		else ans =0;
		//cout<<day<<", "<<ans<<"\n";
	}
	if(ans)
		cout<<"Yes\n";
	else
		cout<<"No\n";
	return 0;
}

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

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

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

int main(){
    int i=0;
cin >> n;

while(i<n){
    int a,b;
    cin >> a,b;
    tasks.emplace_back(b,a);
    i++;
}

sort(tasks.begin(), tasks.end());

int aa=0; int bb=0; int yy=0;
for(int p=0; p<n; p++){
aa += ab[p][0];
if(aa>ab[p][1]){
    yy++;
    break;
}
}

if(yy != 0) cout << "No" << endl;
else cout << "Yes" << endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'ab' was not declared in this scope; did you mean 'bb'?
   22 | aa += ab[p][0];
      |       ^~
      |       bb
Language: C++

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

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

int main(){
    int i=0;
cin >> n;

while(i<n){
    int a,b;
    cin >> a,b;
    tasks.emplace_back(b,a);
    i++;
}

sort(tasks.begin(), tasks.end());

ll aa=0; ll bb=0; int yy=0;
for(int p=0; p<n; p++){
aa += ab[p][0];
if(aa>ab[p][1]){
    yy++;
    break;
}
}

if(yy != 0) cout << "No" << endl;
else cout << "Yes" << endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:1: error: 'll' was not declared in this scope
   20 | ll aa=0; ll bb=0; int yy=0;
      | ^~
a.cc:20:12: error: expected ';' before 'bb'
   20 | ll aa=0; ll bb=0; int yy=0;
      |            ^~~
      |            ;
a.cc:22:1: error: 'aa' was not declared in this scope
   22 | aa += ab[p][0];
      | ^~
a.cc:22:7: error: 'ab' was not declared in this scope; did you mean 'abs'?
   22 | aa += ab[p][0];
      |       ^~
      |       abs
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <pair>
using namespace std;

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


Compiler output:
a.cc:4:10: fatal error: pair: No such file or directory
    4 | #include <pair>
      |          ^~~~~~
compilation terminated.
Language: C

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

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


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MAXN = 2*1e5+10;
const ll INF = 1e10;

ll n;
ll a[MAXN], b[MAXN];
P task[MAXN];

void solve() {
  for (int i=0;i<n;i++) {
    task[i] = P(b[i] - a[i], i);
  }
  sort(task, task+n);
  ll cur = 0;
  ll maxT = 0;
  for (int i=0;i<n;i++) {
    P p = task[i];
    if (cur > p.first && maxT - cur < a[p.second]) {
      cout << "No" << endl;
      return;
    }
    cur = cur + a[p.second];
    maxT = max(maxT, b[p.second]);
  }
  cout << "Yes" << endl;
}

int main() {
  cin >> n;
  for (int i=0;i<n;i++) {
    cin >> a[i] >> b[i];
  }
  solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |   sort(task, task+n);
      |   ^~~~
      |   short
Language: C++

30
384 8895
1725 9791
170 1024
4 11105
2 6
578 1815
702 3352
143 5141
1420 6980
24 1602
849 999
76 7586
85 5570
444 4991
719 11090
470 10708
1137 4547
455 9003
110 9901
15 8578
368 3692
104 1286
3 4
366 12143
7 6649
610 2374
152 7324
4 7042
292 11386
334 5720

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 30
      | ^~
Language: C++

#include <bits/stdc++.h>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>

#define rep_ui(k,n)      for(ui  i = (k); i < (n); ++i)
#define rep_si(k,n)      for(int i = (k); i < (n); ++i)
#define rep_ul(k,n)      for(ul  i = (k); i < (n); ++i)
#define rep_sl(k,n)      for(ll  i = (k); i < (n); ++i)
#define rep_ui_down(k,n) for(ui  i = (k); i > (n); --i)
#define rep_si_down(k,n) for(int i = (k); i > (n); --i)
#define rep_ul_down(k,n) for(ul  i = (k); i > (n); --i)
#define rep_sl_down(k,n) for(ll  i = (k); i > (n); --i)

#define rep_uj(k,n)      for(ui  j = (k); j < (n); ++j)
#define rep_sj(k,n)      for(int j = (k); j < (n); ++j)
#define rep_uj_down(k,n) for(ui  j = (k); j > (n); --j)
#define rep_sj_down(k,n) for(int j = (k); j > (n); --j)

#define rep(k,n)         rep_ui(k,n)

typedef uintmax_t    ull;
typedef intmax_t     ll;
typedef uint64_t     ul;
typedef uint32_t     ui;
typedef uint8_t      uc;

void solve(void)
{
  ui  N{}; std::cin >> N;
  typedef std::pair<ull, ull> Pair;
  std::vector<Pair> vc(N);
  rep(0, N)
    std::cin >> vc[i].second // A_i : 作業必要時間
             >> vc[i].first; // B_i : 作業目標時間

  auto ans = boost::accumulate(
    boost::partial_sum(
      boost::sort(vc),
      boost::begin(vc),
      [](Pair before, Pair current) {
        return Pair{ current.first, before.second + current.second };
      }),
    1U,
    [](auto ans, Pair p) {
      return ans & (p.first >= p.second);
    });

  std::cout << (ans ? "Yes" : "No") << "\n";

  return;
}

int main(void)
{
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);

  solve();

  return 0;
}


Compiler output:
a.cc:2:10: fatal error: boost/range/algorithm.hpp: No such file or directory
    2 | #include <boost/range/algorithm.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define pb              push_back
#define ll              long long
#define scd(a)          scanf("%d",&a)
#define mp(a,b)         make_pair(a,b)
#define scl(w)          scanf("%lld",&w)
#define scdd(a,b)       scanf("%d %d",&a,&b)
#define srt(a)          sort(a.begin(),a.end())
#define rsrt(a)         sort(a.rbegin(),a.rend())
#define scll(a,b)       scanf("%lld %lld",&a,&b)
///4direction ->        int del_x[]={-1,0,1,0},del_y[]={0,1,0,-1};
#define input(v,n)      for (int i=0;i<n;i++){int a;cin >> a;v.push_back(a);}
#define inputll(v,n)    for (ll i=0;i<n;i++){ll a;cin >> a;v.push_back(a);}
#define vii             vector < int >
#define vll             vector < ll >
#define pii             pair < int , int >
#define mk              make_pair
#define inf8            100000008

using namespace std;

vector < pll > vp;

int main()
{
    ll n , sum = 0 , mx = 0;
    scl(n);
    
    for (int i=0;i<n;i++){
        ll a,b;
        scll(a,b);
        
        mx = max(mx,b);
        sum+=a;
    }
    cout << (sum<=mx?"Yes":"No") << endl;
    
    return 0;
}


Compiler output:
a.cc:22:10: error: 'pll' was not declared in this scope; did you mean 'vll'?
   22 | vector < pll > vp;
      |          ^~~
      |          vll
a.cc:22:14: error: template argument 1 is invalid
   22 | vector < pll > vp;
      |              ^
a.cc:22:14: error: template argument 2 is invalid
Language: C++

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

template<class T> inline bool chmin(T &a, T b) { if(a > b){ a = b; return true; } return false; }
template<class T> inline bool chmax(T &a, T b) { if(a < b){ a = b; return true; } return false; }

//INT_MAX	2,147,483,647 = 2*1.0e9

int main(){
  int N;
  cin >> N;

  vector<pair<ll,  ll>> jobs(N);

  rep(i,N){
    ll a, b;
    cin >> a >> b;
    jobs[i] = make_pair(b,a);
  }
  sort(jobs.begin(),jobs.end());

  ll time = 0;
  bool answer = true;
  for(int i = 0; i < N; i++){
    pair<ll, ll> cb = jobs[i];
    time += cb.second;
    if(time > cb.first) answer = false;
  }

  if(answer) cout << "Yes" << endl;
  else cout << "No" << endl;

  return 0;
}



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

#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<iostream>
#include<algorithm>
#define for1(i,a,b) for(int i=a;i<=b;++i)
#define for2(i,a,b) for(int i=a;i>=b;--i)
using namespace std;
struct node{int time,end;}m[200001];
inline bool cmp(node x,node y){return x.end<y.end;}
int time;
int main(){
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	std::ios::sync_with_stdio(false);
	int n;
	cin>>n;
	for1(i,1,n) cin>>m[i].time>>m[i].end;
	sort(m+1,m+1+n,cmp);
	for1(i,1,n){
		time+=m[i].time;
		if(time>m[i].end) cout<<"No",exit(0);
	}
	cout<<"Yes";
	return 0;
}


Compiler output:
a.cc:12:5: error: 'int time' redeclared as different kind of entity
   12 | int time;
      |     ^~~~
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:5:
/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:22:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |                 time+=m[i].time;
      |                 ~~~~^~~~~~~~~~~
a.cc:22:21: error: assignment of read-only location 'time'
a.cc:23:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |                 if(time>m[i].end) cout<<"No",exit(0);
      |                    ~~~~^~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<iomanip>
#include<algorithm>
using namespace std;
const int MAXN=200005;
int n, time=0;
struct work{
	int l, l1;
};
work w[MAXN];
bool cmp(work a, work b)
{
	return a.l1<b.l1;
}
int main()
{
	cin>>n;
	for(int i=1; i<=n; i++)
		cin>>w[i].l>>w[i].l1;
	sort(w+1, w+n+1, cmp);
	for(int i=1; i<=n; i++)
	{
		time+=w[i].l;
		if(time>w[i].l1)
		{
			cout<<"No"<<endl;
			return 0;
		}
	}
	cout<<"Yes"<<endl;
	return 0;
}

Compiler output:
a.cc:7:8: error: 'int time' redeclared as different kind of entity
    7 | 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:24:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   24 |                 time+=w[i].l;
      |                 ~~~~^~~~~~~~
a.cc:24:21: error: assignment of read-only location 'time'
a.cc:25:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |                 if(time>w[i].l1)
      |                    ~~~~^~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<iomanip>
#include<algorithm>
using namespace std;
const int MAXN=2*1e5+5;
int n, time=0;
struct work{
	int l, l1;
};
work w[MAXN];
bool cmp(work a, work b)
{
	return a.l1<b.l1;
}
int main()
{
	cin>>n;
	for(int i=1; i<=n; i++)
		cin>>w[i].l>>w[i].l1;
	sort(w+1, w+n+1, cmp);
	for(int i=1; i<=n; i++)
	{
		time+=w[i].l;
		if(time>w[i].l1)
		{
			cout<<"No"<<endl;
			return 0;
		}
	}
	cout<<"Yes"<<endl;
	return 0;
}

Compiler output:
a.cc:7:8: error: 'int time' redeclared as different kind of entity
    7 | 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:24:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   24 |                 time+=w[i].l;
      |                 ~~~~^~~~~~~~
a.cc:24:21: error: assignment of read-only location 'time'
a.cc:25:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |                 if(time>w[i].l1)
      |                    ~~~~^~~~~~~~
Language: Java

import java.util.*;
class Main {
  public static int[] quicksort(int[] arr) {
    return quicksort(arr, 0, arr.length-1);
  }
  
  private int[] quicksort(int[] arr, int left, int right) {
    if (left <= right) {
      return;
    }
    int pivot = arr[(left+right)/2];
    int index = partition(arr, left, right, pivot);
    quicksort(arr, left, index-1);
    quicksort(arr, index, right);
  }
  
  public static int partition(int[] arr, int left, int right, int pivot) {
    while (left <= right) {
      while (arr[left] < pivot) {
        left++;
      }
      
      while (arr[right] > pivot) {
        right--;
      }
      
      if (left < right) {
        int temp;
        temp = arr[left];
        arr[left] = att[right];
        arr[right] = temp;
        
        left++;
        right--;
      }
    }
    return left;
  }
      
      
  
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    int[] a = new int[n];
    int[] b = new int[n];
    for (int i-0; i<n; i++) {
	  a[i] = Integer.parseInt(sc.next());
      b[i] = Integer.parseInt(sc.next());
    }
    int[] newB = quicksort(b);
    System.out.println(Arrays.toString(newB));
  }
}

Compiler output:
Main.java:47: error: ';' expected
    for (int i-0; i<n; i++) {
              ^
Main.java:47: error: not a statement
    for (int i-0; i<n; i++) {
                   ^
Main.java:47: error: ')' expected
    for (int i-0; i<n; i++) {
                     ^
Main.java:47: error: ';' expected
    for (int i-0; i<n; i++) {
                          ^
4 errors
Language: C++

#include <iostream>
#include <vector>
#include <queue>

#define NMAX 100000
#define MOD 1000000007
#define INF 2000000000

#define MIN(a, b) (a < b ? a : b)

using namespace std;

struct Job {
	int duration;
	int deadline;
};

int nJobs;
Job jobs[2 * NMAX];

bool crit(Job jobA, Job jobB)
{
	return jobA.deadline < jobB.deadline;
}

int main()
{
	cin >> nJobs;
	for (int i = 0; i < nJobs; i++)
		cin >> jobs[i].duration >> jobs[i].deadline;

	sort(jobs, jobs + nJobs, crit);
	int sum = 0;
	for (int i = 0; i < nJobs; i++)
	{
		sum += jobs[i].duration;
		if (sum > jobs[i].deadline)
		{
			cout << "No\n";
			return 0;
		}
	}
	cout << "Yes\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   32 |         sort(jobs, jobs + nJobs, crit);
      |         ^~~~
      |         short
Language: Java

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;

import objs.pair;


public class  Main{
    public static void main(String[] args) throws Exception{
    	MScanner sc = new MScanner(System.in);
        //MScanner sc = new MScanner("reduce.in");
        PrintWriter pw=new PrintWriter(System.out);
        //int n=sc.nextInt();
        //Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=sc.nextInt();
        int n=sc.nextInt();
        pair[]in=new pair[n];
        for(int i=0;i<n;i++) {
        	in[i]=new pair(sc.nextInt(),sc.nextInt());
        }
        Arrays.sort(in);
        int time=0;
        for(int i=0;i<n;i++) {
        	time+=in[i].t;
        	if(time>in[i].d) {
        		pw.println("No");pw.flush();return;
        	}
        }
        pw.println("Yes");
        pw.flush();
    }
    static class pair implements Comparable<pair>{
    	int t;int d;
    	pair(int x,int y){
    		t=x;d=y;
    	}
    	@Override
    	public int compareTo(pair o) {
    		if(d!=o.d) {
    			return d-o.d;
    		}
    		return t-o.t;
    	}
    	 
    	public boolean equals(pair o) {
    		if(this.compareTo(o)==0)return true;
    		return false;
    	}
    	public String toString() {
    		return "("+t+" "+d+")";
    	}
    }
    static StringBuilder tosb(int[]in) {
    	StringBuilder s=new StringBuilder();
    	for(int i=0;i<in.length;i++) {
    		s.append(in[i]+" ");
    	}
    	return s;
    }
    static StringBuilder tosb(long[]in) {
    	StringBuilder s=new StringBuilder();
    	for(int i=0;i<in.length;i++) {
    		s.append(in[i]+" ");
    	}
    	return s;
    }
    
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}

Compiler output:
Main.java:6: error: package objs does not exist
import objs.pair;
           ^
1 error
Language: C++

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

int n;
vector<pair<int,int>> task;
int main(){
  cin >> n;
  for(int i = 0; i< n; i++){
    int a, b;
    cin >> a >> b;
    task.emplace_back(b,a);
  }
  sort(task.first, task.second);
  int sum = 0;
  bool answer = true;
  for(auto v: task){
    sum += v.second;
    if(v.first < sum){
      answer = false;
      break;
    }
  }
  cout << (answer ? "Yes" : "No") << endl;
  return 0;
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
   16 |   sort(task.first, task.second);
      |             ^~~~~
a.cc:16:25: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
   16 |   sort(task.first, task.second);
      |                         ^~~~~~
Language: C++

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

int n;
vector<pair<int,int>> task;
int main(){
  cin >> n;
  for(int i = 0; i< n; i++){
    int a, b;
    cin >> a >> b;
    task.emplace_back(b,a);
  }
  sort(task.first, task.second);
  int sum = 0;
  bool answer = true;
  for(auto v: task){
    sum += v.second;
    if(v.first < sum){
      answer = false;
      break;
    }
  }
  cout << (answer ? "Yes" : "No") << endl;
  return 0;
}  


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<pair<int,int>> task;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> n;
      |   ^~~
a.cc:14:5: error: 'task' was not declared in this scope
   14 |     task.emplace_back(b,a);
      |     ^~~~
a.cc:16:8: error: 'task' was not declared in this scope
   16 |   sort(task.first, task.second);
      |        ^~~~
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   sort(task.first, task.second);
      |   ^~~~
      |   short
a.cc:26:3: error: 'cout' was not declared in this scope
   26 |   cout << (answer ? "Yes" : "No") << endl;
      |   ^~~~
a.cc:26:38: error: 'endl' was not declared in this scope
   26 |   cout << (answer ? "Yes" : "No") << endl;
      |                                      ^~~~
Language: C++

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

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


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<pair<int,int>> task;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> n;
      |   ^~~
a.cc:14:5: error: 'task' was not declared in this scope
   14 |     task.emplace_back(b,a);
      |     ^~~~
a.cc:16:8: error: 'task' was not declared in this scope
   16 |   sort(task.begin(), task.end());
      |        ^~~~
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   sort(task.begin(), task.end());
      |   ^~~~
      |   short
a.cc:26:3: error: 'cout' was not declared in this scope
   26 |   cout << (answer ? "Yes" : "No") << endl;
      |   ^~~~
a.cc:26:38: error: 'endl' was not declared in this scope
   26 |   cout << (answer ? "Yes" : "No") << endl;
      |                                      ^~~~
Language: C++

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

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<pair<int,int>> task;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> n;
      |   ^~~
a.cc:14:5: error: 'task' was not declared in this scope
   14 |     task.emplace_back(b,a);
      |     ^~~~
a.cc:16:8: error: 'task' was not declared in this scope
   16 |   sort(task.begin(), task.end());
      |        ^~~~
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   sort(task.begin(), task.end());
      |   ^~~~
      |   short
a.cc:26:3: error: 'cout' was not declared in this scope
   26 |   cout << (answer ? "Yes" : "No") << endl;
      |   ^~~~
a.cc:26:38: error: 'endl' was not declared in this scope
   26 |   cout << (answer ? "Yes" : "No") << endl;
      |                                      ^~~~
Language: C++

import scala.util.control.Breaks
object main extends App {
    val n = io.StdIn.readInt()
    val sc = new java.util.Scanner(System.in)
    val list = List.fill(n,2)(sc.nextInt)

    var time = 0
    var ans = 0
    val b = new Breaks

    b.breakable{
    for(i <- 0 until n){
        time += list.apply(i).apply(0)
        if(time <= list.apply(i).apply(1))
            ans = 0
        else { ans = 1
            b.break}
    }
    }
    if(ans == 0)
        println("Yes")
    else
        println("No")
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import scala.util.control.Breaks
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
b = sorted(a, key=lambda x: x[1])
judge = 0
flag = "Yes"
for j in range(n):
  judge += b[j][0]
  if(judge >  b[j][1]):
    print("No")
    flag = "No"
    break
    
if(flag == "Yes"):
  print("Yes")
  

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
n = int(input())
^
1 error