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

#include<stdio.h>
#include<queue.h>
int main(){
	queue<int> q;
	int w,h,f[484],i,j,d[]={22,0,-1,0,1,0,-22},a,b,t,x,z;
	char p[15];
	for(;scanf("%d%d ",&h,&w),h;){
		for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;
		for(i=1;i<=h;i++){
			for(j=1;j<=w;j++){
				f[x=i*22+j]=-1;
				switch(getchar()){
					case'#':--f[x];break;
					case'A':a=x;break;
					case'B':b=x;break;
				}
			}
			f[i*22]=f[i*22-~w]=-9;
			getchar();
		}
		
		f[a]=t=0;
		q.push(0);
		for(q.push(a);q.size()>1;){
			a=q.front();
			q.pop();
			if(a){
				for(i=0;i<7;i+=2)
					if(f[x=a+d[i]]==-1)
						f[x]=t,
						q.push(x);
			else
				++t,q.push(0);
		}
		q.pop();
		scanf("%s",p);
		for(a=t=0;!a;){
			x=b;
			z=0;
			for(i=0;!a&&p[i];i++){
				t++;
				f[j=b+d[p[i]-'2']]>-3?b=j:0;
				f[b]>=0&&t>=f[b]?a=b:0;
				f[b]>=0&&++z;
			}
			!z&!a&!p[i]&b==x&f[b]<0&&--a;
		}
		printf(a<0?"impossible\n":"%d %d %d\n",t,a/22-1,a%22-1);
	}
}

Compiler output:
a.cc:2:9: fatal error: queue.h: No such file or directory
    2 | #include<queue.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<queue>
int main(){
	std::queue<int> q;
	int w,h,f[484],i,j,d[]={22,0,-1,0,1,0,-22},a,b,t,x,z;
	char p[15];
	for(;scanf("%d%d ",&h,&w),h;){
		for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;
		for(i=1;i<=h;i++){
			for(j=1;j<=w;j++){
				f[x=i*22+j]=-1;
				switch(getchar()){
					case'#':--f[x];break;
					case'A':a=x;break;
					case'B':b=x;break;
				}
			}
			f[i*22]=f[i*22-~w]=-9;
			getchar();
		}
		
		f[a]=t=0;
		q.push(0);
		for(q.push(a);q.size()>1;){
			a=q.front();
			q.pop();
			if(a){
				for(i=0;i<7;i+=2)
					if(f[x=a+d[i]]==-1)
						f[x]=t,
						q.push(x);
			else
				++t,q.push(0);
		}
		q.pop();
		scanf("%s",p);
		for(a=t=0;!a;){
			x=b;
			z=0;
			for(i=0;!a&&p[i];i++){
				t++;
				f[j=b+d[p[i]-'2']]>-3?b=j:0;
				f[b]>=0&&t>=f[b]?a=b:0;
				f[b]>=0&&++z;
			}
			!z&!a&!p[i]&b==x&f[b]<0&&--a;
		}
		printf(a<0?"impossible\n":"%d %d %d\n",t,a/22-1,a%22-1);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:2: error: expected '}' at end of input
   50 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#import<stdio.h>
#import<queue.h>
int main(){
	queue<int> q;
	int w,h,f[484],i,j,d[]={22,0,-1,0,1,0,-22},a,b,t,x,z;
	char p[15];
	for(;scanf("%d%d ",&h,&w),h;){
		for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;
		for(i=1;i<=h;i++){
			for(j=1;j<=w;j++){
				f[x=i*22+j]=-1;
				switch(getchar()){
					case'#':--f[x];break;
					case'A':a=x;break;
					case'B':b=x;break;
				}
			}
			f[i*22]=f[i*22-~w]=-9;
			getchar();
		}
		
		f[a]=t=0;
		q.push(0);
		for(q.push(a);q.size()>1;){
			a=q.front();
			q.pop();
			if(a){
				for(i=0;i<7;i+=2)
					if(f[x=a+d[i]]==-1)
						f[x]=t,
						q.push(x);
					else
						++t,q.push(0);
			}
		}
		q.pop();
		scanf("%s",p);
		for(a=t=0;!a;){
			x=b;
			z=0;
			for(i=0;!a&&p[i];i++){
				t++;
				f[j=b+d[p[i]-'2']]>-3?b=j:0;
				f[b]>=0&&t>=f[b]?a=b:0;
				f[b]>=0&&++z;
			}
			!z&!a&!p[i]&b==x&f[b]<0&&--a;
		}
		printf(a<0?"impossible\n":"%d %d %d\n",t,a/22-1,a%22-1);
	}
}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<stdio.h>
      |  ^~~~~~
a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    2 | #import<queue.h>
      |  ^~~~~~
a.cc:2:8: fatal error: queue.h: No such file or directory
    2 | #import<queue.h>
      |        ^~~~~~~~~
compilation terminated.
Language: C++

#import<stdio.h>
#import<queue>
int main(){std::queue<int>q;int w,h,f[484],i,j,a,b,t,x,z;char p[15];for(;scanf("%d%d ",&h,&w),h;){for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;for(i=1;i<=h;i++){for(j=1;j<=w;j++)f[x=i*22+j]=-1,z=getchar(),z-35?z>65?b=x:z>64?a=x:1:--f[x];f[i*22]=f[i*22-~w]=-9;getchar();}f[a]=t=0;q.push(0);for(q.push(a);a=q.front(),q.size()>1;q.pop())if(!a)++t,q.push(0);else for(i=4;i--;)if(f[x=a+" 57L"[i]-54]==-1)f[x]=t,q.push(x);q.pop();scanf("%s",p);for(a=t=0;!a;){x=b;z=0;for(i=0;!a&&p[i];f[b]>=0&&++z){++t,f[j=b-54+"L65676 "[p[i++]-50]]>-3?b=j:0,f[b]>=0&t>=f[b]?a=b:0;!z&!a&!p[i]&b==x&f[b]<0&&--a;}printf(a<0?"impossible\n":"%d %d %d\n",t,a/22-1,a%22-1);}}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<stdio.h>
      |  ^~~~~~
a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    2 | #import<queue>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:3:639: error: expected '}' at end of input
    3 | int main(){std::queue<int>q;int w,h,f[484],i,j,a,b,t,x,z;char p[15];for(;scanf("%d%d ",&h,&w),h;){for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;for(i=1;i<=h;i++){for(j=1;j<=w;j++)f[x=i*22+j]=-1,z=getchar(),z-35?z>65?b=x:z>64?a=x:1:--f[x];f[i*22]=f[i*22-~w]=-9;getchar();}f[a]=t=0;q.push(0);for(q.push(a);a=q.front(),q.size()>1;q.pop())if(!a)++t,q.push(0);else for(i=4;i--;)if(f[x=a+" 57L"[i]-54]==-1)f[x]=t,q.push(x);q.pop();scanf("%s",p);for(a=t=0;!a;){x=b;z=0;for(i=0;!a&&p[i];f[b]>=0&&++z){++t,f[j=b-54+"L65676 "[p[i++]-50]]>-3?b=j:0,f[b]>=0&t>=f[b]?a=b:0;!z&!a&!p[i]&b==x&f[b]<0&&--a;}printf(a<0?"impossible\n":"%d %d %d\n",t,a/22-1,a%22-1);}}
      |           ~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^
Language: C++

#include<iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#define all(c) c.begin(),c.end()
#define pb push_back
#define INF 10000000
using namespace std;
typedef pair<int,int> P;
int w,h;
vector<string> s;
P d[10];
int antime;
P q;
map<int,int> mp;
string op;
int dp[20][20][20][20][100];
bool in(P n){
	if(n.second>=0&&n.second<w&&n.first>=0&&n.first<h)
		return true;
	return false;
}
void f(int cnt){
	cout<<cnt<<endl;
	f(cnt+1);
}
int ans;
int ret(P a,P b,int time){
	//cout<<time<<endl;
	
	if(a==b){
		if(antime>time){
			antime=time;
			q.first=a.first;
			q.second=a.second;
		}
		//cout<<a.first<<" "<<a.second<<endl;
		//cout<<time<<endl;
		return time;
	}
	if(100<time)
	return INF;
	
	if(dp[a.first][a.second][b.first][b.second][time]!=-1)
		return dp[a.first][a.second][b.first][b.second][time];
	
	int ans=INF;
	P na,nb;
	
	nb.first=b.first+d[op[time%op.size()]-'0'].first;
	nb.second=b.second+d[op[time%op.size()]-'0'].second;
	
	if(!in(nb))
		nb=b;
	for(int i=0;i<5;i++){
		na.first=a.first+d[mp[i]].first;
		na.second=a.second+d[mp[i]].second;
		
		if(in(na)&&s[na.first][na.second]!='#'){
			//<<"-------"<<endl;
			ans=min(ans,ret(na,nb,time+1));
		}/*(time%op.size()))*/
	}
	return dp[a.first][a.second][b.first][b.second][time]=ans;
}
int main(){
	d[5]=P(0,0);d[8]=P(-1,0);d[6]=P(0,1);d[4]=P(0,-1);d[2]=P(1,0);
	mp[0]=5;mp[1]=8;mp[2]=6;mp[3]=4;mp[4]=2;
	while(cin>>h>>w,h||w){
		s.clear();
		P a,b;
		antime=INF;
		memset(dp,-1,sizeof(dp));
		for(int i=0;i<h;i++){
			string t;
			cin>>t;
			s.pb(t);
			for(int j=0;j<t.size();j++){
				if(t[j]=='A'){
					a.first=i;a.second=j;
				}else if(t[j]=='B'){
					b.first=i;b.second=j;
				}
			}
		}cin>>op;
		ret(a,b,0);
		if(antime!=INF)
			cout<<antime<<  " "<<q.first<<" "<<q.second<<endl;
		else
		cout<<"impossible"<<endl;
		//f(0);
		
		//cout<<<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:17: error: 'memset' was not declared in this scope
   74 |                 memset(dp,-1,sizeof(dp));
      |                 ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include<algorithm>
  +++ |+#include <cstring>
    6 | #define all(c) c.begin(),c.end()
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n, ne[11], a[11][11], res, t;
	
	while(cin>>n && n){
		res = INT_MAX;
		for(int i = 0; i < n; i++){
			for(int j = 0; j < n; j++){
				cin >> a[i][j];
			}
		}
		
		for(int i = 0; i < n; i++){
			for(int j = i+1; j < n; j++){
				a[i][j] = a[j][i] = max(a[i][j], a[j][i]);
			}
			ne[i] = i;
		}
		
		do {
			t = 0;
			for(int i = 0; i < n-1 && t < res; i++){
				t += a[ne[i]][ne[i+1]];
			}
			res = min(res, t);
		} while(next_permutation(ne, ne+n));
		
		cout << res << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'INT_MAX' was not declared in this scope
   11 |                 res = INT_MAX;
      |                       ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <algorithm>
  +++ |+#include <climits>
    3 |
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
	int n, ne[11], a[11][11], res, t;
	
	while(cin>>n && n){
		res = INT_MAX;
		for(int i = 0; i < n; i++){
			for(int j = 0; j < n; j++){
				cin >> a[i][j];
			}
		}
		
		for(int i = 0; i < n; i++){
			for(int j = i+1; j < n; j++){
				a[i][j] = a[j][i] = max(a[i][j], a[j][i]);
			}
			ne[i] = i;
		}
		
		do {
			t = 0;
			for(int i = 0; i < n-1 && t < res; i++){
				t += a[ne[i]][ne[i+1]];
			}
			res = min(res, t);
		} while(next_permutation(ne, ne+n));
		
		cout << res << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'INT_MAX' was not declared in this scope
   12 |                 res = INT_MAX;
      |                       ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 |
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int n, ne[11], a[11][11], res, t;
	
	while(cin>>n && n){
		res = INT_MAX;
		for(int i = 0; i < n; i++){
			for(int j = 0; j < n; j++){
				cin >> a[i][j];
			}
			ne[i] = i;
		}
		
		do {
			t = 0;
			for(int i = 0; i < n-1 && t < res; i++){
				t += max(a[ne[i]][ne[i+1]], a[ne[i+1]][ne[i]]);
			}
			res = min(res, t);
		} while(next_permutation(ne, ne+n));
		
		cout << res << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'INT_MAX' was not declared in this scope
   11 |                 res = INT_MAX;
      |                       ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <algorithm>
  +++ |+#include <climits>
    3 |
Language: C++

#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int dfs(vector<vector<int> >& a, bitset<10>& bs, vector<int>& pos, int& minX)
{
    int n = a.size();
    int m = bs.count();
    int maxX = *(max_element(pos.begin(), pos.end()));
    if(n == m)
        return minX = min(minX, maxX);
    if(maxX + (n-m) >= minX)
        return INT_MAX;

    int ret = INT_MAX;
    for(int i=0; i<n; ++i){
        if(bs[i])
            continue;
        int tmp = 0;
        for(int j=0; j<n; ++j){
            if(bs[j])
                tmp = max(tmp, pos[j] + a[i][j]);
        }
        bs[i] = true;
        pos[i] = tmp;
        ret = min(ret, dfs(a, bs, pos, minX));
        ois[i] = 0;
        bs[i] = false;
    }
    return ret;
}

int solve(vector<vector<int> >& a)
{
    int n = a.size();
    bitset<10> bs(0);
    vector<int> pos(n, 0);
    int minX = INT_MAX;
    return dfs(a, bs, pos, minX);
}

int main()
{
    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;

        vector<vector<int> > a(n, vector<int>(n, 0));
        for(int i=0; i<n; ++i){
            for(int j=0; j<n; ++j){
                int tmp;
                cin >> tmp;
                a[i][j] = a[j][i] = max(a[i][j], max(a[j][i], tmp));
            }
        }
        cout << solve(a) << endl;
    }
}

Compiler output:
a.cc: In function 'int dfs(std::vector<std::vector<int> >&, std::bitset<10>&, std::vector<int>&, int&)':
a.cc:41:9: error: 'ois' was not declared in this scope
   41 |         ois[i] = 0;
      |         ^~~
Language: Java

import java.util.Scanner;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int f = 0;
        int i = 0;
        for(;;){
            int n = sc.nextInt();
            if(n==0){
                System.exit(0);
            }else{
                int p[] = new int[n]; 
                p[0]= sc.nextInt();
                for(i=1;i<n;i++){
                    p[i] = sc.nextInt();
                    if((p[i-1]+1)==p[i]){
                    }else{
                        if(p[f]==p[i-1]){
                            System.out.print(p[i-1]+" ");
                            f=i;
                        }else{
                            System.out.print(p[z]+"-"+p[i-1]+" ");
                            f=i;
                        }
                    }
                }
                if(a[f]==a[i-1]){
                    System.out.print(a[i-1]);
                }else{
                    System.out.print(a[z]+"-"+a[i-1]);
                }
                    System.out.print("\n");
                f=0;
            }
        }
    }
 
}

Compiler output:
Main.java:24: error: cannot find symbol
                            System.out.print(p[z]+"-"+p[i-1]+" ");
                                               ^
  symbol:   variable z
  location: class Main
Main.java:29: error: cannot find symbol
                if(a[f]==a[i-1]){
                   ^
  symbol:   variable a
  location: class Main
Main.java:29: error: cannot find symbol
                if(a[f]==a[i-1]){
                         ^
  symbol:   variable a
  location: class Main
Main.java:30: error: cannot find symbol
                    System.out.print(a[i-1]);
                                     ^
  symbol:   variable a
  location: class Main
Main.java:32: error: cannot find symbol
                    System.out.print(a[z]+"-"+a[i-1]);
                                     ^
  symbol:   variable a
  location: class Main
Main.java:32: error: cannot find symbol
                    System.out.print(a[z]+"-"+a[i-1]);
                                       ^
  symbol:   variable z
  location: class Main
Main.java:32: error: cannot find symbol
                    System.out.print(a[z]+"-"+a[i-1]);
                                              ^
  symbol:   variable a
  location: class Main
7 errors
Language: Java

import java.util.Scanner;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int f = 0;
        int i = 0;
        for(;;){
            int n = sc.nextInt();
            if(n==0){
                System.exit(0);
            }else{
                int p[] = new int[n]; 
                p[0]= sc.nextInt();
                for(i=1;i<n;i++){
                    p[i] = sc.nextInt();
                    if((p[i-1]+1)==p[i]){
                    }else{
                        if(p[f]==p[i-1]){
                            System.out.print(p[i-1]+" ");
                            f=i;
                        }else{
                            System.out.print(p[f]+"-"+p[i-1]+" ");
                            f=i;
                        }
                    }
                }
                if(a[f]==a[i-1]){
                    System.out.print(a[i-1]);
                }else{
                    System.out.print(a[f]+"-"+a[i-1]);
                }
                    System.out.print("\n");
                f=0;
            }
        }
    }
 
}

Compiler output:
Main.java:29: error: cannot find symbol
                if(a[f]==a[i-1]){
                   ^
  symbol:   variable a
  location: class Main
Main.java:29: error: cannot find symbol
                if(a[f]==a[i-1]){
                         ^
  symbol:   variable a
  location: class Main
Main.java:30: error: cannot find symbol
                    System.out.print(a[i-1]);
                                     ^
  symbol:   variable a
  location: class Main
Main.java:32: error: cannot find symbol
                    System.out.print(a[f]+"-"+a[i-1]);
                                     ^
  symbol:   variable a
  location: class Main
Main.java:32: error: cannot find symbol
                    System.out.print(a[f]+"-"+a[i-1]);
                                              ^
  symbol:   variable a
  location: class Main
5 errors
Language: Java

import java.util.Scanner;

public class Main {

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

		for(int k=0;k<10000000;k++){
			n=sc.nextInt();
			if(n==0){
				break;
			}
			int p[] = new int[n];
			for(i=0;i<n;i++){
				p[i]=sc.nextInt();
			}
			for(i=0;i<n;i++){
				if(i==0){
					if(n==1){
					System.out.print(p[0]+"\n");
					}else{
						System.out.print(p[0]);
					}
					}
				}else if(i==n-1){
					if(p[i]-1==p[i-1]){
						System.out.print("-"+p[i]+"\n");
					}else{
						System.out.print(" "+p[i]+"\n");
					}
				}else{
					if(p[i]-1!=p[i-1]){
						System.out.print(" "+p[i]);
					}
					if(p[i]-1==p[i-1]&&p[i]+1!=p[i+1]){
						System.out.print("-"+p[i]);
					}
				}
			}
		}
	}
}

Compiler output:
Main.java:26: error: 'else' without 'if'
				}else if(i==n-1){
				 ^
Main.java:43: error: class, interface, enum, or record expected
}
^
2 errors
Language: C

#include <stdio.h>

int main(void){
	int n,t,a[100];
	while(1){
		scanf("%d",&n);
		if(n==0){
			return 0;
		}
		for(t=0;t<n;t++){
			scanf("%d",&a[t]);
		}
		if(n==1){
			printf("%d\n",a[0]);
		}
		else{
			printf("%d",a[0]);
			for(t=1;t<n-1;t++){
				if((a[t-1]+1!=a[t])&&(a[t]+1==a[t+1])){
					printf(" %d",a[t]);
				}
				if((a[t-1]+1!=a[t])&&(a[t]+1!=a[t+1])){
					printf(" %d",a[t]);
				}
				if((a[t-1]+1==a[t])&&(a[t]+1!=a[t+1])){
					printf("-%d",a[t]);
				}
			}
			if(a[n-2]+==a[n-1]){
				printf("-%d\n",a[n-1]);
			}
			else{
				printf(" %d\n",a[n-1]);
			}
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:29:36: error: expected expression before '=' token
   29 |                         if(a[n-2]+==a[n-1]){
      |                                    ^
Language: C

main(n,p,i,a[51]){for(;~scanf("%d",&n),n;){for(a[n]=p=i=0;i<n;i++)scanf("%d",a+i);for(i=1;i<=n;i++)if(a[i-1]-a[i]+1)printf(i-p-1?n-i?"%d-%d ":"%d-%d\n":n-i?"%d ":"%d\n",a[p],a[i-1]),p=i;}exit(0);}

Compiler output:
main.c:1:13: error: expected ')' before '[' token
    1 | main(n,p,i,a[51]){for(;~scanf("%d",&n),n;){for(a[n]=p=i=0;i<n;i++)scanf("%d",a+i);for(i=1;i<=n;i++)if(a[i-1]-a[i]+1)printf(i-p-1?n-i?"%d-%d ":"%d-%d\n":n-i?"%d ":"%d\n",a[p],a[i-1]),p=i;}exit(0);}
      |             ^
      |             )
Language: C

#include<string.h>
#include<stdio.h>

int main(){
int up;//??????
bool b[10000][51];
	int c=-1;
	int i2;
	int itizi;
	int i;	
	int con;//?¶??????????
	int saisyo[10000];
	for(i=0;c==-1;i++){
		scanf("%d",&up);
		if(up==0){c=i;break;}
		scanf("%d",&itizi);
		saisyo[i]=itizi;
		b[i][itizi]=true;	
		for(i2=1;i2<up;i2++){
			scanf("%d",&itizi);
			b[i][itizi]=true;
		}
	}
	
	for(i=0;i<c;i++){
		con=-1;
		for(i2=1;i2<=50;i2++){
			if(con==-1&&b[i][i2]==true){
				con=i2;
			}	
			else if(b[i][i2]==true){}
			else if(con!=-1&&b[i][i2]!=true){
				if(con==saisyo[i])printf("%d-%d",con,i2-1);
				else printf(" %d-%d",con,i2-1);
				con=-1;	
			}
		}
		printf("\n");
	}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: unknown type name 'bool'
    6 | bool b[10000][51];
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:18:29: error: 'true' undeclared (first use in this function)
   18 |                 b[i][itizi]=true;
      |                             ^~~~
main.c:18:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:18:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
int up;//??????
bool b[100000][51];
	int c=-1;
	int i2;
	int itizi;
	int i;	
	int con;//?¶??????????
	int saisyo[100000];
	for(i=0;c==-1;i++){
		scanf("%d",&up);
		if(up==0){c=i;break;}
		scanf("%d",&itizi);
		saisyo[i]=itizi;
		b[i][itizi]=true;	
		for(i2=1;i2<up;i2++){
			scanf("%d",&itizi);
			b[i][itizi]=true;
		}
	}
	
	for(i=0;i<c;i++){
		con=-1;
		for(i2=1;i2<=50;i2++){
			if(con==-1&&b[i][i2]==true){
				con=i2;
			}	
			else if(b[i][i2]==true){}
			else if(con!=-1&&b[i][i2]!=true){
				if(con==saisyo[i])printf("%d-%d",con,i2-1);
				else printf(" %d-%d",con,i2-1);
				con=-1;	
			}
		}
		printf("\n");
	}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
    5 | bool b[100000][51];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:17:29: error: 'true' undeclared (first use in this function)
   17 |                 b[i][itizi]=true;
      |                             ^~~~
main.c:17:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:17:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
int up;//??????
bool b[1000000][51];
	int c=-1;
	int i2;
	int itizi;
	int i;	
	int con;//?¶??????????
	int saisyo[1000000];
	for(i=0;c==-1;i++){
		scanf("%d",&up);
		if(up==0){c=i;break;}
		scanf("%d",&itizi);
		saisyo[i]=itizi;
		b[i][itizi]=true;	
		for(i2=1;i2<up;i2++){
			scanf("%d",&itizi);
			b[i][itizi]=true;
		}
	}
	
	for(i=0;i<c;i++){
		con=-1;
		for(i2=1;i2<=50;i2++){
			if(con==-1&&b[i][i2]==true){
				con=i2;
			}	
			else if(b[i][i2]==true){}
			else if(con!=-1&&b[i][i2]!=true){
				if(con==saisyo[i])printf("%d-%d",con,i2-1);
				else printf(" %d-%d",con,i2-1);
				con=-1;	
			}
		}
		printf("\n");
	}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
    5 | bool b[1000000][51];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:17:29: error: 'true' undeclared (first use in this function)
   17 |                 b[i][itizi]=true;
      |                             ^~~~
main.c:17:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:17:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
int up;//??????
bool b[10000000][51];
	int c=-1;
	int i2;
	int itizi;
	int i;	
	int con;//?¶??????????
	int saisyo[10000000];
	for(i=0;c==-1;i++){
		scanf("%d",&up);
		if(up==0){c=i;break;}
		scanf("%d",&itizi);
		saisyo[i]=itizi;
		b[i][itizi]=true;	
		for(i2=1;i2<up;i2++){
			scanf("%d",&itizi);
			b[i][itizi]=true;
		}
	}
	
	for(i=0;i<c;i++){
		con=-1;
		for(i2=1;i2<=50;i2++){
			if(con==-1&&b[i][i2]==true){
				con=i2;
			}	
			else if(b[i][i2]==true){}
			else if(con!=-1&&b[i][i2]!=true){
				if(con==saisyo[i])printf("%d-%d",con,i2-1);
				else printf(" %d-%d",con,i2-1);
				con=-1;	
			}
		}
		printf("\n");
	}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
    5 | bool b[10000000][51];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:17:29: error: 'true' undeclared (first use in this function)
   17 |                 b[i][itizi]=true;
      |                             ^~~~
main.c:17:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:17:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
int up;//??????
bool b[100000][52];
	int c=-1;
	int i2;
	int itizi;
	int i;	
	int con;//?¶??????????
	int saisyo[100000];
	for(i=0;c==-1;i++){
		scanf("%d",&up);
		if(up==0){c=i;break;}
		scanf("%d",&itizi);
		saisyo[i]=itizi;
		b[i][itizi]=true;	
		for(i2=1;i2<up;i2++){
			scanf("%d",&itizi);
			b[i][itizi]=true;
		}
	}
	
	for(i=0;i<c;i++){
		con=-1;
		for(i2=1;i2<=50;i2++){
			if(con==-1&&b[i][i2]==true){
				con=i2;
			}	
			else if(b[i][i2]==true){}
			else if(con!=-1&&b[i][i2]!=true){
				if(con==saisyo[i])printf("%d-%d",con,i2-1);
				else printf(" %d-%d",con,i2-1);
				con=-1;	
			}
		}
		printf("\n");
	}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
    5 | bool b[100000][52];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:17:29: error: 'true' undeclared (first use in this function)
   17 |                 b[i][itizi]=true;
      |                             ^~~~
main.c:17:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:17:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
int up;//??????
bool b[10000][1000];
	int c=-1;
	int i2;
	int itizi;
	int i;	
	int con;//?¶??????????
	int saisyo[10000];
	for(i=0;c==-1;i++){
		scanf("%d",&up);
		if(up==0){c=i;break;}
		scanf("%d",&itizi);
		saisyo[i]=itizi;
		b[i][itizi]=true;	
		for(i2=1;i2<up;i2++){
			scanf("%d",&itizi);
			b[i][itizi]=true;
		}
	}
	
	for(i=0;i<c;i++){
		con=-1;
		for(i2=1;i2<=1000;i2++){
			if(con==-1&&b[i][i2]==true){
				con=i2;
			}
			else if(b[i][i2]==true){}
			else if(con!=-1&&b[i][i2]!=true){
				if(con==saisyo[i]){
					if(con==i2-1){printf("%d",con);}
					else {printf("%d-%d",con,i2-1);}
			    }
				else {
					if(con==i2-1){printf(" %d",con);}
				    else {printf(" %d-%d",con,i2-1);}
				}
				con=-1;
			}
		}
		printf("\n");
	}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
    5 | bool b[10000][1000];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:17:29: error: 'true' undeclared (first use in this function)
   17 |                 b[i][itizi]=true;
      |                             ^~~~
main.c:17:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:17:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

n,p,i,a[50];
main(){
	while(~scanf("%d", &n),n) {
		for(i=0;i<n;i++)scanf("%d",&a[i]);p=0;
		for(i=1;i<n;i++){
			if(a[i-1]+1!=a[i]) {
				if(i-p-1)printf("%d-%d ",a[p],a[i-1]);
				else printf("%d ",a[p]);
				p=i;
			}
		}
		if(n-p-1)printf("%d-%d\n",a[p],a[n-1]);
		else printf("%d\n",a[p]);
	}
}

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,p,i,a[50];
      | ^
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:29: error: 'n' was not declared in this scope
    3 |         while(~scanf("%d", &n),n) {
      |                             ^
a.cc:3:16: error: 'scanf' was not declared in this scope
    3 |         while(~scanf("%d", &n),n) {
      |                ^~~~~
a.cc:4:21: error: 'i' was not declared in this scope
    4 |                 for(i=0;i<n;i++)scanf("%d",&a[i]);p=0;
      |                     ^
a.cc:4:45: error: 'a' was not declared in this scope
    4 |                 for(i=0;i<n;i++)scanf("%d",&a[i]);p=0;
      |                                             ^
a.cc:4:51: error: 'p' was not declared in this scope
    4 |                 for(i=0;i<n;i++)scanf("%d",&a[i]);p=0;
      |                                                   ^
a.cc:5:21: error: 'i' was not declared in this scope
    5 |                 for(i=1;i<n;i++){
      |                     ^
a.cc:6:28: error: 'a' was not declared in this scope
    6 |                         if(a[i-1]+1!=a[i]) {
      |                            ^
a.cc:7:42: error: 'printf' was not declared in this scope
    7 |                                 if(i-p-1)printf("%d-%d ",a[p],a[i-1]);
      |                                          ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | n,p,i,a[50];
a.cc:8:38: error: 'printf' was not declared in this scope
    8 |                                 else printf("%d ",a[p]);
      |                                      ^~~~~~
a.cc:8:38: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:12:43: error: 'a' was not declared in this scope
   12 |                 if(n-p-1)printf("%d-%d\n",a[p],a[n-1]);
      |                                           ^
a.cc:12:26: error: 'printf' was not declared in this scope
   12 |                 if(n-p-1)printf("%d-%d\n",a[p],a[n-1]);
      |                          ^~~~~~
a.cc:12:26: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:36: error: 'a' was not declared in this scope
   13 |                 else printf("%d\n",a[p]);
      |                                    ^
a.cc:13:22: error: 'printf' was not declared in this scope
   13 |                 else printf("%d\n",a[p]);
      |                      ^~~~~~
a.cc:13:22: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
    int n,a,p;
    while(cin>>n,n){
        vector<int>v;
        for(int i=0;i<n;i++){
            cin>>a;
            v.push_back(a);
        }
        sort(v.begin(),v.end());
        p=v[0];
        cout<<p<<"-";
        for(int i=1;i<n-1;i++)
            if(v[i]-p>1)
                cout<<p<<" "<<v[i]<<"-";
            else
                p++;
        cout<<v[n-1]<<endl;
    }
}

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

#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
int N = 50;
signed main() {
	int n;
	while (cin >> n, n) {
		vector<int>v(n); rep(i, 0, n)cin >> v[i];
		vector<bool>vf(N, false); rep(i, 0, n)vf[v[i]] = true;
		bool f(false),first(true);
		dumpc(vf);
		rep(i, 0, N) {
			if (vf[i]) {
				if (f == false) {
					if (first)first = false;
					else cout << " ";

					cout << i << "-";
					f = true;
				}
			}
			else {
				if (f == true) {
					cout << i - 1;
					f = false;
				}
			}
		}
		cout << endl;

	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:50: error: cannot bind non-const lvalue reference of type 'std::_Bit_reference&' to an rvalue of type 'std::_Bit_iterator::reference'
    8 | #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
      |                                                  ^
a.cc:22:17: note: in expansion of macro 'dumpc'
   22 |                 dumpc(vf);
      |                 ^~~~~
Language: C++

g#include <iostream>

using namespace std;

const int INF = 1 << 28;

int main() {
    int n;
    while (cin >> n, n != 0) {
		int page[n+1];
		for (int i = 0; i < n; i++) cin >> page[i];
		page[n] = INF;
		int from_idx = 0;
		for (int i = 1; i <= n; i++) {
			if (page[i] != page[i-1] + 1) {
				if (i-1 == from_idx) {
					cout << ' ' << page[i-1];
				} else {
					cout << ' ' << page[from_idx] << '-' << page[i-1];
				}
				from_idx = i;
			}
		}
		cout << endl;
    }
    return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | g#include <iostream>
      |  ^
a.cc:1:1: error: 'g' does not name a type
    1 | g#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:9:12: error: 'cin' was not declared in this scope
    9 |     while (cin >> n, n != 0) {
      |            ^~~
a.cc:17:41: error: 'cout' was not declared in this scope
   17 |                                         cout << ' ' << page[i-1];
      |                                         ^~~~
a.cc:19:41: error: 'cout' was not declared in this scope
   19 |                                         cout << ' ' << page[from_idx] << '-' << page[i-1];
      |                                         ^~~~
a.cc:24:17: error: 'cout' was not declared in this scope
   24 |                 cout << endl;
      |                 ^~~~
a.cc:24:25: error: 'endl' was not declared in this scope
   24 |                 cout << endl;
      |                         ^~~~
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        a: while(true){
            int N = sc.nextInt();
            if(N==0)break;
            TreeMap<Integer, Integer> map = new TreeMap<>();
            for(int i=0;i<N;i++){
                int a = sc.nextInt();
                int b = sc.nextInt();
                if(map.get(b)!=null){
                	map.put(b,a+map.get(b));
                }else{
                	map.put(b, a);
                }
            }
            int c=0;
            for (Entry<Integer, Integer> m : map.entrySet()) {
                c+=m.getValue();
                if(c>m.getKey()){
                    System.out.println("No");
                    continue a;
                }
            }
            System.out.println("Yes");
        }
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
            TreeMap<Integer, Integer> map = new TreeMap<>();
            ^
  symbol:   class TreeMap
  location: class Main
Main.java:7: error: cannot find symbol
            TreeMap<Integer, Integer> map = new TreeMap<>();
                                                ^
  symbol:   class TreeMap
  location: class Main
Main.java:18: error: cannot find symbol
            for (Entry<Integer, Integer> m : map.entrySet()) {
                 ^
  symbol:   class Entry
  location: class Main
5 errors
Language: Java

import java.awt.Point;
import java.util.*;
public class Main {

		public static int [] t ={0,1,2,3,5,7,8,9};
        public static void main(String[] args) throws java.io.IOException{
            Scanner scan = new Scanner(System.in);
            while(true){
            	int n = scan.nextInt();
            	if(n==0)break;
            	Point [] p =new Point[n];
            	for(int i=0;i<n;i++){
            		p[i] = new Point(scan.nextInt(),scan.nextInt());
            	}
            	Arrays.sort(p,new DataComparator());
            	
            	long sum=0;
            	boolean flag = true;
            	for(int i=0;i<n;i++){
            		if(sum+p[i].x<=p[i].y){
            			sum+=p[i].x;
            		}
            		else flag=false;
            		
            	}
            	System.out.println(flag?"Yes":"No");
            	
            }
        }
        
}
class unlocked DataComparator implements java.util.Comparator{
	public int compare(Object o1, Object o2) {
        Point p1 = (Point) o1;
        Point p2 = (Point) o2;
        return p1.y - p2.y;
      }
	 }

Compiler output:
Main.java:32: error: '{' expected
class unlocked DataComparator implements java.util.Comparator{
              ^
1 error
Language: Java

import java.util.*;

public class AOJ_1052{
    class Island implements Comparable{
        public int weight;
        public int limit;
        public Island(int weight, int limit){
            this.weight = weight;
            this.limit = limit;
        }
        public int compareTo(Object other){
            Island is = (Island)other;
            return this.limit - is.limit;
        }
    }
    void run(){
        Scanner sc = new Scanner(System.in);
        while(true){
            int n = sc.nextInt();
            if(n == 0){
                break;
            }
            Island[] islands = new Island[n];
            for(int i = 0; i < n; i++){
                islands[i] = new Island(sc.nextInt(), sc.nextInt());
            }
            /*
            for(int i = 0; i < n; i++){
                System.out.println(i + ": " + islands[i].weight + " " + islands[i].limit);
            }
            */
            Arrays.sort(islands);
            boolean ans = true;
            int sum = 0;
            for(Island is: islands){
                sum += is.weight;
                if(is.limit < sum){
                    ans = false;
                    break;
                }
            }
            System.out.println(ans?"Yes":"No");
        }
        
    }

    public static void main(String[] args){
        new AOJ_1052().run();
    }
}

Compiler output:
Main.java:3: error: class AOJ_1052 is public, should be declared in a file named AOJ_1052.java
public class AOJ_1052{
       ^
1 error
Language: Java

import java.util.Scanner;

public class AOJ1052 {
    void run() {
        Scanner sc = new Scanner(System.in);
        int n;
        while (true) {
            n = sc.nextInt();
            if (n == 0) break;

            int total = 0;
            int max = 0;
            for (int i = 0; i < n; i++) {
                total += sc.nextInt();
                max = Math.max(max, sc.nextInt());
            }

            if (total <= max)
                System.out.println("Yes");
            else
                System.out.println("No");


        }
    }

    public static void main(String[] args) {
        new AOJ1052().run();
    }
}

Compiler output:
Main.java:3: error: class AOJ1052 is public, should be declared in a file named AOJ1052.java
public class AOJ1052 {
       ^
1 error
Language: C

#include<vector>
#include<list>
#include<map>
#include<set>
#include<deque>
#include<queue>
#include<stack>
#include<bitset>
#include<algorithm>
#include<functional>
#include<numeric>
#include<utility>
#include<iostream>
#include<sstream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cctype>
#include<string>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<climits>
#include<complex>
#define sz(x) (int)((x).size())
#define rep(i,n) for (int i=0;i<n;i++)
#define mp make_pair
#define pb push_back
#define all(x) x.begin(),x.end()
#define clr(x) memset((x),0,sizeof(x))
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef vector<pii> vpi;
pair<int,int>a[222];
int main()
{
	int i,j,k,n;
	while (scanf("%d",&n)!=EOF,n)
	{
		int b=0;
		for (i=0;i<n;i++)
		{
			scanf("%d%d",&a[i].second,&a[i].first);
		}
		sort(a,a+n);
		for (i=0;i<n;i++)
		{
			b+=a[i].second;
			if (a[i].first<b)break;
		}
		puts(i==n?"Yes":"No");			
	}
	return 0;
}
		
		
		

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

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

using namespace std;

int main()
{
	int n;
	int a, b;
	int i;
	int g = 0;
	vector<pair<int, int>> v;

	while (1) {
		scanf("%d", &n);
		if (n == 0) break;
		for (i = 0; i < n; i++) {
			scanf("%d%d", &a, &b);
			v.push_back(make_pair(b, a));
		}
		sort(begin(v), end(v));
		for (i = 0; i < n; i++) {
			g += v[i].second;
			if (g > v[i].first) break; 
		}
		if (i == n) 
			printf("Yse\n"); 
		else 
			printf("No\n");
	}


	return (0);
}

Compiler output:
a.cc:4:2: error: extended character 　 is not valid in an identifier
    4 | #include　<vector>
      |  ^
a.cc:4:2: error: invalid preprocessing directive #include\U00003000
    4 | #include　<vector>
      |  ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:9: error: 'vector' was not declared in this scope
   14 |         vector<pair<int, int>> v;
      |         ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | #include　<vector>
a.cc:14:29: error: expected primary-expression before '>' token
   14 |         vector<pair<int, int>> v;
      |                             ^~
a.cc:14:32: error: 'v' was not declared in this scope
   14 |         vector<pair<int, int>> v;
      |                                ^
Language: C++

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

using namespace std;

int main(){
	while(1){
		int n;
		cin>>n;
		if(n==0)return;
		vector<pair <int,int>>v;
		for(int i=0;i<n;i++){
			int a,b;
			cin>>a>>b;
			v.push_back(make_pair(b,a));
		}
		sort(begin(v),end(v));
		int w=0;
		for(int i=0;i<n;i++){
			w+=v[i].second;
			if(w>v[i].first){
				cout<<"No"<<endl;
				goto next;
			}
		}
		cout<<"Yes"<<endl;
		next:;
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |                 if(n==0)return;
      |                         ^~~~~~
Language: C++

#include <iostream>
#include <utility>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)

pair<int, int> p[25];
int main() {
	while (true) {
		int n;
		cin >> n;
		if (n == 0) break;
		REP(i, n) cin >> p[i].second >> p[i].first;
		sort(p, p + n);

		long long total = 0;
		REP(i, n) {
			total += p[i].second;
			if (total > p[i].first) {
				cout << "No" << endl;
				break;
			}
			if (i == n - 1) cout << "Yes" << endl;
		}
	}
}

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

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

int main(){
  int n;
  while(cin >> n, n){
    vector<pll> a(n);
    rep(i,n)cin >> a[i].second >> a[i].first;
    sort(all(a));

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:35: error: no matching function for call to 'end()'
    3 | #define all(a) (a).begin(),(a),end()
      |                                ~~~^~
a.cc:13:10: note: in expansion of macro 'all'
   13 |     sort(all(a));
      |          ^~~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided
Language: C++

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

int main(){
    int n;
    while(cin>>n,n){
        vector<pair<int,int> >vec;
        for(int i=0;i<n;i++){
            int a,b;
            cin>>a>>b;
            vec.push_back(make_pair(b, a));
        }
        sort(vec.begin(),vec.end());
        int all=0;
        bool o=true;
        for(int i=0;i<vec.size();i++){
            all+=vec[i].second;
            if(all>vec[i].first){
                o=false;
                cout<<"No"<<endl;
                break;
            }
        }
        if(o)cout<<"Yes"<<endl;
    }
}

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

#include <iostream>
#include <map>
#include <stdio.h>

using namespace std;
int n;//??????
int b;
int c;
int po=0;
int i;
int i2;
int d=-1;
bool dame[100000];
map<int,int>name;
int po;

int main(){
	for(i=0;i<100000;i++){
			dame[i]=false;
	}
for(i2=0;d==-1;i2++){
		po=0;
		scanf("%d",&n);
		if(n==0){
			d=i2;
			break;
		}
	    for(i=0;i<n;i++){
			scanf("%d %d",&b,&c);
		  name.insert(map<int,int>::value_type(c,b));
	    }
map<int,int>::iterator it=name.begin();
while(it!=name.end()&&dame[i2]!=true){
			po+=(*it).second;
			if((*it).first<po){
			dame[i2]=true;
			}
			++it;
	    }
	name.clear();
}
	
	for(i=0;i<d;i++){
		if(dame[i]==true)cout<<"No\n";
	    else cout<<"Yes\n";
	}
return 0;
}

Compiler output:
a.cc:15:5: error: redefinition of 'int po'
   15 | int po;
      |     ^~
a.cc:9:5: note: 'int po' previously defined here
    9 | int po=0;
      |     ^~