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

import java.util.Scanner;

public class CakeMain {
	private int x;//cake sum
	private int y;
	private int[] card;
	private int sum;
	Scanner in =new Scanner(System.in);
	public CakeMain(){
		
		x=in.nextInt();
		if (x==0){
			return;
		}
		
	}
	public static void main(String[] args){
		
		CakeMain ck=new CakeMain();
		ck.com();
		ck.rd();
		ck.run();
		
	}

	private void run() {
		// TODO ?????????????????????????????????????????????
		for(int i=0;i<y;i++){
			sum+=card[i];
		}
		System.out.println(sum/2);
	}
	private void com() {
		// TODO ?????????????????????????????????????????????
		y=x*(x-1)/2;
	}
	private void rd() {
		// TODO ?????????????????????????????????????????????
		card=new int[y];
		for(int i=0;i<y;i++){
			card[i]=in.nextInt();
		}
		
		
		
	}
}

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

import java.util.Scanner;

public class CakeMain {
	private int x;
	private int y;
	private int[] card;
	private int sum;
	Scanner in =new Scanner(System.in);
	public CakeMain(){
		
		x=in.nextInt();
		if (x==0){
			return;
		}
		
	}
	public static void main(String[] args){
		
		CakeMain ck=new CakeMain();
		ck.com();
		ck.rd();
		ck.run();
		
	}

	private void run() {
		
		for(int i=0;i<y;i++){
			sum+=card[i];
		}
		System.out.println(sum/2);
	}
	private void com() {
		
		y=x*(x-1)/2;
	}
	private void rd() {
		
		card=new int[y];
		for(int i=0;i<y;i++){
			card[i]=in.nextInt();
		}
		
		
		
	}
}

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

import java.util.Scanner;

class Main {
	private int x;
	private int y;
	private int[] card;
	private int sum;
	Scanner in =new Scanner(System.in);
	public CakeMain(){
		
		x=in.nextInt();
		if (x==0){
			return;
		}
		
	}
	public static void main(String[] args){
		
		CakeMain ck=new CakeMain();
		ck.com();
		ck.rd();
		ck.run();
		
	}

	private void run() {
		
		for(int i=0;i<y;i++){
			sum+=card[i];
		}
		System.out.println(sum/2);
	}
	private void com() {
		
		y=x*(x-1)/2;
	}
	private void rd() {
		
		card=new int[y];
		for(int i=0;i<y;i++){
			card[i]=in.nextInt();
		}
		
		
		
	}
}

Compiler output:
Main.java:9: error: invalid method declaration; return type required
	public CakeMain(){
	       ^
1 error
Language: Java

import java.util.Scanner;

class Main {
	private int x;
	private int y;
	private int[] card;
	private int sum;
	Scanner in =new Scanner(System.in);
	public CakeMain(){
		
		x=in.nextInt();
		if (x==0){
			return;
		}
		
	}
	public static void main(String[] args){
		
		CakeMain ck=new Main();
		ck.com();
		ck.rd();
		ck.run();
		
	}

	private void run() {
		
		for(int i=0;i<y;i++){
			sum+=card[i];
		}
		System.out.println(sum/2);
	}
	private void com() {
		
		y=x*(x-1)/2;
	}
	private void rd() {
		
		card=new int[y];
		for(int i=0;i<y;i++){
			card[i]=in.nextInt();
		}
		
		
		
	}
}

Compiler output:
Main.java:9: error: invalid method declaration; return type required
	public CakeMain(){
	       ^
1 error
Language: Java

import java.util.Scanner;

class Main {
	private int x;
	private int y;
	private int[] card;
	private int sum;
	Scanner in =new Scanner(System.in);
	public Main(){
		
		x=in.nextInt();
		if (x==0){
			return;
		}
		
	}
	public static void main(String[] args){
		
		CakeMain ck=new Main();
		ck.com();
		ck.rd();
		ck.run();
		
	}

	private void run() {
		
		for(int i=0;i<y;i++){
			sum+=card[i];
		}
		System.out.println(sum/2);
	}
	private void com() {
		
		y=x*(x-1)/2;
	}
	private void rd() {
		
		card=new int[y];
		for(int i=0;i<y;i++){
			card[i]=in.nextInt();
		}
		
		
		
	}
}

Compiler output:
Main.java:19: error: cannot find symbol
		CakeMain ck=new Main();
		^
  symbol:   class CakeMain
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main {
	private int x;//cake sum
	private int y;
	private int[] card;
	private int sum;
	private static int f=0;
	Scanner in =new Scanner(System.in);
	public Main(){
		
		x=in.nextInt();
		if (x==0){
			
			f=1;
			return;
		}
		
	}
	public static void main(String[] args){
		while(true){
		Main ck=new Main();
		if(f==1){
			return;
		}
		ck.com();
		if(f==2){
			f=0;
			continue();
		}
		ck.rd();
		ck.run();
		}
	}

	private void run() {
		// TODO ?????????????????????????????????????????????
		for(int i=0;i<y;i++){
			sum+=card[i];
		}
		System.out.println(sum/(x-1));
	}
	private void com() {
		// TODO ?????????????????????????????????????????????
		if(x==2){
			y=in.nextInt();
			System.out.println(2);
			f=2;
			return;
		}
		y=x*(x-1)/2;
	}
	private void rd() {
		// TODO ?????????????????????????????????????????????
		card=new int[y];
		for(int i=0;i<y;i++){
			card[i]=in.nextInt();
		}
		
		
		
	}
}

Compiler output:
Main.java:29: error: ';' expected
			continue();
			        ^
1 error
Language: C

#include <stdio.h>

int main (){
  int K,c,i,sum,;
  while (1){
    scanf("%d",&K);
    if (K==0)break;
    sum=0;
    for (i=0 ; i < (K*K-K)/2 ; i++){
      scanf("%d",&c);
      sum=sum+c;
    }
    printf("%d\n",sum/(K-1) );
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:17: error: expected identifier or '(' before ';' token
    4 |   int K,c,i,sum,;
      |                 ^
Language: C

#define _USE_MATH_DEFINES
#define INF 100000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>

using namespace std;

typedef long long ll;
typedef pair <int,int> P;

static const double EPS = 1e-8;

int main(){
	int K,c;
	while(~scanf("%d",&K)){
		if(K==0) break;
		int sum=0;
		for(int i=0;i<K*(K-1)/2;i++){
			int c;
			scanf("%d",&c);
			sum += c;
		}

		printf("%d\n",sum/(K-1));
	}
}

Compiler output:
main.c:3:10: fatal error: iostream: No such file or directory
    3 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>

using namespace std;
int sum,i,a,n;
int main(){
    while (scanf("%d",&n),n){
        sum=0;
        for (i=1;i<=(n-1)*n/2;i++){
            scanf("%d",&a);
            sum+=a;
        }
        sum=sum/(n-1);
        printf("%d\n",sum);
    }
    return 0;
}

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

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>

using namespace std;

int n,a[100100];

int main(){
    while(scanf("%d",&n)==1){
        if(n==0) break;
        int sum=0;
        for(int i=1;i<=(n*(n-1))/2;i++){
                 scanf("%d",&a[i]);
                 sum+=a[i];
                 }
        sum/=n-1;
        printf("%d\n",sum);
        }
    return 0;
}

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

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

int main() {
    int K;
     int m;
   while(cin >> K){
    if (K == 0){
        break
    }
    else{
    for(int i=0;i<K;++i){
        cin >> c
        m += c;
    }
    }
    int r;
    r = m/(K-1);
    cout << r << endl;
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before '}' token
   10 |         break
      |              ^
      |              ;
   11 |     }
      |     ~         
a.cc:14:16: error: 'c' was not declared in this scope
   14 |         cin >> c
      |                ^
Language: C++

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

int main() {
    int K;
     int m;
   while(cin >> K){
    if (K == 0){
        break
    }
    else{
    for(int i=0;i<K;++i){
        cin >> c
        m += c;
    }
    }
   }
    int r;
    r = m/(K-1);
    cout << r << endl;
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before '}' token
   10 |         break
      |              ^
      |              ;
   11 |     }
      |     ~         
a.cc:14:16: error: 'c' was not declared in this scope
   14 |         cin >> c
      |                ^
a.cc: At global scope:
a.cc:23:5: error: expected unqualified-id before 'return'
   23 |     return 0;
      |     ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

int main() {
    int K;
     int m;
   while(cin >> K){
    if (K == 0){
        break;
    }
    else{
    for(int i=0;i<K;++i){
        cin >> c;
        m += c;
    }
    }
    int r;
    r = m/(K-1);
    cout << r << endl;
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'c' was not declared in this scope
   14 |         cin >> c;
      |                ^
Language: C++

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

int main() {
    int K;
     int m;
   while(cin >> K){
    if (K == 0){
        break;
    }
    else{
    for(int i=0;i<K;++i){
        cin >> c;
        m += c;
    }
    }
   }
    int r;
    r = m/(K-1);
    cout << r << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'c' was not declared in this scope
   14 |         cin >> c;
      |                ^
Language: C++

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

int main() {
    int K;
     int m;
   while(cin >> K){
    if (K == 0){
        break;
    }
    else{
    for(int i=0;i<K(K-1)/2;++i){
        int c;
        cin >> c;
        m += c;
    }
    }
   }
    int r;
    r = m/(K-1);
    cout << r << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'K' cannot be used as a function
   13 |     for(int i=0;i<K(K-1)/2;++i){
      |                   ~^~~~~
Language: C++

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

int main() {
    int K;
     int m;
   while(cin >> K){
    if (K == 0){
        break;
    }
    else{
    for(int i=0;i<K(K-1)/2;++i){
        int c;
        cin >> c;
        m += c;
    }
    }
    int r;
    r = m/(K-1);
    cout << r << endl;
   }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'K' cannot be used as a function
   13 |     for(int i=0;i<K(K-1)/2;++i){
      |                   ~^~~~~
Language: C++

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

int main() {
    int K;
   while(cin >> K){
    if (K == 0){
        break;
    }
    else{
         int m;
    for(int i=0;i<K*(K-1)/2;++i){
        int c;
        cin >> c;
        m += c;
    }
    } 
    int r;
    r = m/(K-1);
    cout << r << endl;
   }
   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'm' was not declared in this scope
   20 |     r = m/(K-1);
      |         ^
Language: C++

int main() {
    int K;
   while(cin >> K){
    if (K == 0){
        break;
    }
    else{
         int m;
    for(int i=0;i<K*(K-1)/2;++i){
        int c;
        cin >> c;
        m += c;
    }  
    int r;
    r = m/(K-1);
    cout << r << endl;
    } 
  
   }
   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:10: error: 'cin' was not declared in this scope
    3 |    while(cin >> K){
      |          ^~~
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout << r << endl;
      |     ^~~~
a.cc:16:18: error: 'endl' was not declared in this scope
   16 |     cout << r << endl;
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int k,c[100];
  long long long all;

  while(cin >>k && k!=0){
    all=0;

    for(int i=0;i<k*(k-1)/2;i++){
      cin>>c[i];
      all+=c[i];}

    cout << all/(k-1)<<endl;}
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: 'long long long' is too long for GCC
    5 |   long long long all;
      |             ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
int k;
while(cin >> k, k) {
int sum;
sum = 0;
for(int i = 0; i < k; i++) {
int a;
cin >> a;
sum += a;
}
cout << a / (k-1) << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'a' was not declared in this scope
   14 | cout << a / (k-1) << endl;
      |         ^
Language: C++

#include <iostream>
using namespace std;
 
int main() {
int k;
while(cin >> k, k) {
int sum;
sum = 0;
for(int i = 0; i < k*(k-1)/2; i++) {
int a;
cin >> a;
sum += a;
}
cout << a / (k-1) << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'a' was not declared in this scope
   14 | cout << a / (k-1) << endl;
      |         ^
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
	while(1){
		int n;
		cin>>n;
		if(n==0)break;
		int ans=0,a;
		for (int i = 0; i < n * (n - 1) / 2; i++) {
				cin>>a;
				ans += ;
		}
		cout<<ans/(n-1);
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: expected primary-expression before ';' token
   13 |                                 ans += ;
      |                                        ^
Language: C++

#include <iostream>
uding namespace std;

int main() {
  int n;
  int num = 0;
  int w = 0;
  while(cin >> n && n) {
    for(int i = 0; i < n*(n-1)/2; i++) {
      cin >> num;
      w += num;
    }
    cout << w /(n-1) << endl;
  }

  return 0;
}

Compiler output:
a.cc:2:1: error: 'uding' does not name a type
    2 | uding namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   while(cin >> n && n) {
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout << w /(n-1) << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |     cout << w /(n-1) << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
  int k;

  cin >> k;

  if(k == 0)
    {
      break;
    }

  for(int i = 0;i < k*(k-1)/2;k++)
    {
      cin >> kazu;

      sum += kazu;
    }

  cout << sum/(k-1) << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: break statement not within loop or switch
   12 |       break;
      |       ^~~~~
a.cc:17:14: error: 'kazu' was not declared in this scope
   17 |       cin >> kazu;
      |              ^~~~
a.cc:19:7: error: 'sum' was not declared in this scope
   19 |       sum += kazu;
      |       ^~~
a.cc:22:11: error: 'sum' was not declared in this scope
   22 |   cout << sum/(k-1) << endl;
      |           ^~~
Language: C++

#include <iostream>

using namespace std;

int main(){
  
  while(1)
{
  int k;
  int sum=0;
  
  cin >> k;

  if(k == 0)
    {
      break;
    }

  for(int i = 0;i < k*(k-1)/2;k++)
    {
      cin >> kazu;

      sum += kazu;
    }

  cout << sum/(k-1) << endl;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: 'kazu' was not declared in this scope
   21 |       cin >> kazu;
      |              ^~~~
Language: C++

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

int main() {
  int K;
  vector<int> c;

  while(1) {
    int sum	= 0;
    cin >> K;
    if(K == 0)
      break;
    for(int i = 0; i < K*(K-1)/2; i++) {
      int C;
      cin >> C;
      sum += C;
      c.push_back(C);
    }

    cout << sum/(K-1) << endl;
  }

  return 0;
}


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

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

int main(){
  int k,sum;
  int a[101];
  sum=0;k=0;
  for(int i=0;i<101;i++){
    a[i] =0;
  }
  while(1){
    cin  >> k;
    
    if(k == 0)break;

    for(int i=0;i<k-1;i++){
      cin >> a[i]; 
  }
    for(int i=0;i<k-1;i++){
      sum += a[i]
    }

    sum = sum / (k - 1);

    cout << sum << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: expected ';' before '}' token
   20 |       sum += a[i]
      |                  ^
      |                  ;
   21 |     }
      |     ~             
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>

using namespace std;

int main(void){
  int k,c,sum,i;

  while(1){
    sum=0;
    cin >> k;

    if(k==0)break;

    for(i=0;i<(k*(k-1))/2;i++){
      cin>>c;
      sum+=c;

  }

  
    else cout << sum/(k-1)<<endl;
}


  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'else' without a previous 'if'
   21 |     else cout << sum/(k-1)<<endl;
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	while(1){
　　　　　　　　　int k,c,sum=0;
		cin>>k;
		if(k==0)break;
		for(int i=0;i<k*(k-1)/2;i++){
			cin>>c;
			sum+=c;
		}
		cout<<sum/(k-1)<<endl;
	}
    return 0;
}

Compiler output:
a.cc:5:1: error: extended character 　 is not valid in an identifier
    5 | 　　　　　　　　　int k,c,sum=0;
      | ^
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc:5:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:5:1: error: '\U00003000\U00003000\U00003000\U00003000\U00003000\U00003000\U00003000\U00003000\U00003000int' was not declared in this scope
    5 | 　　　　　　　　　int k,c,sum=0;
      | ^~~~~~~~~~~~~~~~~~~~~
a.cc:6:22: error: 'k' was not declared in this scope
    6 |                 cin>>k;
      |                      ^
a.cc:9:30: error: 'c' was not declared in this scope
    9 |                         cin>>c;
      |                              ^
a.cc:10:25: error: 'sum' was not declared in this scope
   10 |                         sum+=c;
      |                         ^~~
a.cc:12:23: error: 'sum' was not declared in this scope
   12 |                 cout<<sum/(k-1)<<endl;
      |                       ^~~
Language: C++

include <iostream>
using namespace std;

int main(){
  int k;
  while(cin >> k,k){
    int ans = 0;
    for(int i=0;i<k*(k-1)/2;i++){
      int tmp;
      cin >> tmp;
      ans += tmp;
    }
    cout << ans/(k-1) << endl;
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |   while(cin >> k,k){
      |         ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout << ans/(k-1) << endl;
      |     ^~~~
a.cc:13:26: error: 'endl' was not declared in this scope
   13 |     cout << ans/(k-1) << endl;
      |                          ^~~~
Language: Java


class AOJ1028 {
	static final int[] c = { 1, 5, 10, 50, 100, 500 };

	public void run() {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int P = sc.nextInt();
			if (P == 0)
				return;
			int[] N = new int[6];
			for (int i = 0; i < 6; i++)
				N[i] = sc.nextInt();
			int min = 10000;
			loop: for (int k = 0; k < 1 << 6; k++) {
				int n = 0;
				int p = P;
				for (int i = 5; i >= 0; i--)
					if (((1 << i) & k) == 0) {
						int dn = max((p - 1) / c[i] + 1, 0);
						if (p < 0 && i < 5 && (-p) % c[i + 1] / c[i] > 0) {
							dn = c[i + 1] / c[i] - (-p) % c[i + 1] / c[i];
							if (dn > N[i])
								continue loop;
						}
						dn = min(dn, N[i]);
						n += dn;
						p -= dn * c[i];
					}
				if (p > 0)
					continue;
				p = -p;
				for (int i = 5; i >= 0; i--) {
					n += p / c[i];
					p %= c[i];
				}
				min = min(min, n);
			}
			System.out.println(min);
		}
	}
}

public class Main {
	public static void main(String... args) {
		new AOJ1028().run();
	}

	public static void debug(Object... os) {
		System.err.println(java.util.Arrays.deepToString(os));
	}
}

class Scanner {
	final java.util.Scanner sc;

	public double nextDouble() {
		return Double.parseDouble(sc.next());
	}

	public Scanner(java.io.InputStream is) {
		this.sc = new java.util.Scanner(is);
	}

	public boolean hasNext() {
		return sc.hasNext();
	}

	public String next() {
		return sc.next();
	}

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

	public String nextLine() {
		return sc.nextLine();
	}

	public long nextLong() {
		return Long.parseLong(sc.next());
	}
}

Compiler output:
Main.java:20: error: cannot find symbol
						int dn = max((p - 1) / c[i] + 1, 0);
						         ^
  symbol:   method max(int,int)
  location: class AOJ1028
Main.java:26: error: cannot find symbol
						dn = min(dn, N[i]);
						     ^
  symbol:   method min(int,int)
  location: class AOJ1028
Main.java:37: error: cannot find symbol
				min = min(min, n);
				      ^
  symbol:   method min(int,int)
  location: class AOJ1028
3 errors
Language: C++

x#include <stdlib.h>
#include <limits.h>
#include <iostream>
using namespace std;

int COIN_TYPE_NUM = 6;
int coin_price[] = {1, 5, 10, 50, 100, 500};

int coin_payment(int p, int* coin_num);
int change_num(int p);
int pay(int p, int* coin_num);
int main(){
	int p;
	int* coin_num = (int*)malloc(COIN_TYPE_NUM * sizeof(int));

	while(true){
		cin >> p;
		for(int i = 0; i < COIN_TYPE_NUM; ++i){
			cin >> coin_num[i];
		}
		if(p == 0) break;
		int ideal_payment = coin_payment(p, coin_num);
		cout << ideal_payment << endl;
	}
	return 0;
}

int coin_payment(int p, int* coin_num){
	int min_coin_num = INT_MAX;
	int max_payment = 0;
	for(int coin_type = COIN_TYPE_NUM-1; coin_type >= 0; coin_type--){
		max_payment += coin_num[coin_type]*coin_price[coin_type];
	}
	for(int i = p; i < max_payment; ++i){
		int pay_num = pay(i, coin_num);
		if(pay_num == -1) continue;
		pay_num += change_num(i-p);
		if(pay_num < min_coin_num) min_coin_num = pay_num;
	}

	return min_coin_num;
}


int change_num(int p){
	int retval = 0;
	for(int coin_type = COIN_TYPE_NUM-1; coin_type >= 0; coin_type--){
		int p_num = p / coin_price[coin_type];
		p -= p_num*coin_price[coin_type];
		retval += p_num;
		if(p == 0) return retval;
	}
	return retval;
}

int pay(int p, int* coin_num){
	int retval = 0;
	for(int coin_type = COIN_TYPE_NUM-1; coin_type >= 0; coin_type--){
		int p_num = p / coin_price[coin_type];
		if(p_num > coin_num[coin_type]) p_num = coin_num[coin_type];
		p -= p_num*coin_price[coin_type];
		retval += p_num;
		if(p == 0) return retval;
	}
	return -1;

}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | x#include <stdlib.h>
      |  ^
a.cc:1:1: error: 'x' does not name a type
    1 | x#include <stdlib.h>
      | ^
Language: C++

#include <iostream>

using namespace std;

int ans = 0;
int lest[6];
int sum[6];
int coin[6] = {500, 100, 50, 10, 5, 1};

void search(int cur, int P, int num, int pos){
//	cout << cur << " " << P << " " << num << " " << pos << endl;
	if(num > ans) return ;
	if(pos == 5){
		if(cur < P){
			if(lest[5]>=P-cur){
				num += P-cur;
				cur = P;
			} else {
				return ;
			}
		}
		int l = cur-P;
		for(int i=0;i<6;i++){
			num += l/coin[i];
			l %= coin[i];
		}
		ans = min(ans, num);
		return ;
	}
	int next = cur;
	for(int i=max(0, min(lest[pos], (P-cur)/coin[pos]-1));i<=lest[pos];i++){
		next = cur + i*coin[pos];
		if(next+sum[pos] < P) continue;
		if(num == 4 && num + i + (P-next) >= ans) continue;
		if(num + i >= ans) break;
		search(next, P, num+i, pos+1);
		if(next >= P) break; 
	}
}

int main(){
	int P;
	while(cin >> P, P){
		for(int i=5;i>=0;i--) cin >> lest[i];
		sum[5] = 0;
		for(int i=4;i>=0;i--)
			sum[i] = sum[i+1]+lest[i+1]*coin[i+1];
		ans = 1000000000;
		search(0, P, 0, 0);
		cout << ans << endl;
	}
}

int main(){
	int P;
	while(cin >> P, P){
		for(int i=5;i>=0;i--) cin >> lest[i];
		sum[5] = 0;
		for(int i=4;i>=0;i--)
			sum[i] = sum[i+1]+lest[i+1]*coin[i+1];
		ans = 1000000000;
		search(0, P, 0, 0);
		cout << ans << endl;
	}
}

Compiler output:
a.cc:54:5: error: redefinition of 'int main()'
   54 | int main(){
      |     ^~~~
a.cc:41:5: note: 'int main()' previously defined here
   41 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
 
int value[6] = {1, 5, 10, 50, 100, 500};
int ns[6];
int p;
 
#define INF (1<<28)
 
int count_coins(int n) {
    int cnt = 0;
    for (int i = 5; i >= 0; i--) {
        int c = n / value[i];
        n -= c * value[i];
        cnt += c;
        if (n == 0) break;
    }
    return cnt;
}
 
int solve(int index, int rem) { 
    if (rem == 0) return 0;
    if (rem < 0) return count_coins(-rem);
    if (index < 0) return INF;
    int min_pay = INF;
 
    int s = rem / value[index];
    if (s < ns[index]) {
        min_pay = min(solve(index-1, rem-value[index]*s) + s,
                      solve(index-1, rem-value[index]*(s+1)) + s + 1);
        return min_pay;
    }
    return solve(index-1, rem-value[index]*ns[index]) + ns[index];
}
 
int main() {
    while (cin >> p) {
        if (p == 0) break;
        for (int i = 0; i < 6; i++) 
            cin >> ns[i];
        
        int min_total = INF;
        for (int i = 0; i <= 500; i++) {
            if (can_make(p+i)) {
                min_total = min(min_total, solve(5, p+i) + count_coins(i));
            }
        }
        cout << min_total << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:17: error: 'can_make' was not declared in this scope
   45 |             if (can_make(p+i)) {
      |                 ^~~~~~~~
Language: Java

package fill_nosubmit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class AOJ10_29 
{
	public static void main(String[] args) 
	{
		Scanner in=new Scanner(System.in);
		for(;;)
		{
			int n=in.nextInt();
			int m=in.nextInt();
			if((n|m)==0)
				return;
			int t=n+m;
			ArrayList<Integer> L=new ArrayList<Integer>();
			for(int i=0;i<t;i++)
				L.add(in.nextInt());
			Collections.sort(L);
			int max;
			if(t==1)
				max=L.get(0);
			else
				max=0;
			for(int i=0;i<t-1;i++)
			{
				int tmp=L.get(i+1)-L.get(i);
				if(max<tmp)
					max=tmp;
			}
			System.out.println(max);
		}
	}
}

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

#include <stdio.h>
int main(void)
{
  int n, m, x, i, j, t[2000000];

  while(1)
    {
      i=0;
      t[1999999]=0;
      x=0;
      scanf("%d %d", &n, &m);

      if(n == 0 && m == 0) break;

      for(i = 0; i < n+m; i++)
	{
	  scanf("%d", &t[i]);
	}
      
      for(i = 0; i < m; i++)
	{
	  scanf("%d", &tr[i]);
	}

      for(i = 0; i < n; i++)
	{
	  for(j = i+1; j < n; j++)
	    {
	      if(t[i] < t[j])
		{
		  x = t[i];
		  t[i] = t[j];
		  t[j] = x;
		}
	    }
	}

      
      printf("%d\n", t[0]);
      
    }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:24: error: 'tr' undeclared (first use in this function); did you mean 't'?
   22 |           scanf("%d", &tr[i]);
      |                        ^~
      |                        t
main.c:22:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#define _USE_MATH_DEFINES
#define INF 100000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>

using namespace std;

typedef long long ll;
typedef pair <int,int> P;

static const double EPS = 1e-8;

int main(){
	int n,m;
	while(~scanf("%d %d",&n,&m)){
		if(n==m && m==0) break;

		vector<int> elapsedTime;
		elapsedTime.push_back(0);

		for(int i=0;i<n;i++){
			int t;
			scanf("%d",&t);
			elapsedTime.push_back(t);
		}
		for(int i=0;i<m;i++){
			int t;
			scanf("%d",&t);
			elapsedTime.push_back(t);
		}

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

		int diff=0;
		for(int i=0;i+1<elapsedTime.size();i++){
			diff = max(diff,abs(elapsedTime[i+1]-elapsedTime[i]));
		}

		printf("%d\n",diff);
	}
}

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


#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()


int main(void){
  int m, n ;
  while(cin >> m >> n , m + n ){
    vi ans(m+n+1);
    rep(i,n+m)cin>>t[i];
    t[n+m]=0;
    sort(all(t));
    int md = 0;
    rep(i,n+m)md = max(md,t[i+1]-t[i]);
    cout << md << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:20: error: 't' was not declared in this scope
   26 |     rep(i,n+m)cin>>t[i];
      |                    ^
a.cc:27:5: error: 't' was not declared in this scope
   27 |     t[n+m]=0;
      |     ^
Language: C++

#include <stdio.h>
 
int main(){
  int n, m, tl[10001], tr[10001], i, j, k, befor, maxnum;
 
  while(1){
    scanf_s("%d %d", &n, &m);
    if(n==0 && m==0) break;

    for(i=0;i<n;i++){
      scanf_s("%d", &tl[i]);
    }
    tl[i]=1000001;
 
    for(i=0;i<m;i++){
      scanf_s("%d", &tr[i]);
    }
    tr[i]=1000001;

	j=0;
	k=0;
	maxnum=-1;
	befor=0;
	for(i=0;i<n+m+1;i++){
		if(tl[j]>=tr[k]){
			if(maxnum<tl[j]-befor){
				maxnum = tl[j] - befor;
			}
			befor=tl[j];
			j++;
		}
		else if(tl[j]<tr[k]){
			if(maxnum<tr[k]-befor){
				maxnum = tr[k] - befor;
			}
			befor=tr[k];
			k++;
		}
		if(tl[j]==tr[k]){
			i++;
			k++;
		}
	}
    printf("%d\n", maxnum);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |     scanf_s("%d %d", &n, &m);
      |     ^~~~~~~
      |     scanf
Language: C++

/* Traffic Analysis */

#include <stdio.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>


#define	STRNUM	4096
#define	DELIM	" "
#define CMAX	10000

void main( int argc, char *argv[] )
{
	// ?????¨?????°??????
	char wStrA[STRNUM] = "";
	char *tok;
	char *ctx;
	int n, m, tl, tr;

	std::vector<int> wVec;
	std::vector<int> rVec;


	while( gets_s( wStrA, STRNUM ) != NULL ){
		// ????????°??°?????????
		tok = strtok_s( wStrA, DELIM, &ctx );
		n = atoi( tok );
		while( tok != NULL ){
			m = atoi( tok );
			tok = strtok_s( NULL, DELIM, &ctx );
		}
		// ????????°??°?????±???0????????????
		if( n==0 && m==0 ){
			break;
		}
		// ?????????????????????
		if( n != 0 ){
			// ?¬?????????????????????????
			gets_s( wStrA, STRNUM );
			tok = strtok_s( wStrA, DELIM, &ctx );
			while( tok != NULL ){
				tl = atoi( tok );
				wVec.push_back( tl );
				tok = strtok_s( NULL, DELIM, &ctx );
			}
		}
		if( m != 0 ){
			// ?¬?????????????????????????
			gets_s( wStrA, STRNUM );
			tok = strtok_s( wStrA, DELIM, &ctx );
			while( tok != NULL ){
				tr = atoi( tok );
				wVec.push_back( tr );
				tok = strtok_s( NULL, DELIM, &ctx );
			}
		}
		// ?????§??????????????????
		if( wVec.size() == 1 ){
			rVec.push_back( wVec[0] );
			wVec.erase( wVec.begin(), wVec.end() );
			continue;
		}
		std::sort( wVec.begin(), wVec.end() );
		int rtmp = wVec[0];
		for( int ii=0; ii<((int)wVec.size() - 1); ii++){
			if( rtmp < (wVec[ii+1] - wVec[ii]) ){
				rtmp = wVec[ii+1] - wVec[ii];
			}
		}
		// ???????????????????????????????´?
		rVec.push_back( rtmp );
		wVec.erase( wVec.begin(), wVec.end() );
	}
	for( int ii=0; ii<(int)rVec.size(); ii++ ){
		std::cout << rVec[ii] << std::endl;
	}

	return;
}

Compiler output:
a.cc:15:1: error: '::main' must return 'int'
   15 | void main( int argc, char *argv[] )
      | ^~~~
a.cc: In function 'int main(int, char**)':
a.cc:27:16: error: 'gets_s' was not declared in this scope
   27 |         while( gets_s( wStrA, STRNUM ) != NULL ){
      |                ^~~~~~
a.cc:29:23: error: 'strtok_s' was not declared in this scope; did you mean 'strtok_r'?
   29 |                 tok = strtok_s( wStrA, DELIM, &ctx );
      |                       ^~~~~~~~
      |                       strtok_r
a.cc:81:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   81 |         return;
      |         ^~~~~~
Language: C++

/* Traffic Analysis */

#include <stdio.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>


#define	STRNUM	4096
#define	DELIM	" "
#define CMAX	10000

int main( int argc, char *argv[] )
{
	// ?????¨?????°??????
	char wStrA[STRNUM] = "";
	char *tok;
	char *ctx;
	int n, m, tl, tr;

	std::vector<int> wVec;
	std::vector<int> rVec;


	while( gets_s( wStrA, STRNUM ) != NULL ){
		// ????????°??°?????????
		tok = strtok_s( wStrA, DELIM, &ctx );
		n = atoi( tok );
		while( tok != NULL ){
			m = atoi( tok );
			tok = strtok_s( NULL, DELIM, &ctx );
		}
		// ????????°??°?????±???0????????????
		if( n==0 && m==0 ){
			break;
		}
		// ?????????????????????
		if( n != 0 ){
			// ?¬?????????????????????????
			gets_s( wStrA, STRNUM );
			tok = strtok_s( wStrA, DELIM, &ctx );
			while( tok != NULL ){
				tl = atoi( tok );
				wVec.push_back( tl );
				tok = strtok_s( NULL, DELIM, &ctx );
			}
		}
		if( m != 0 ){
			// ?¬?????????????????????????
			gets_s( wStrA, STRNUM );
			tok = strtok_s( wStrA, DELIM, &ctx );
			while( tok != NULL ){
				tr = atoi( tok );
				wVec.push_back( tr );
				tok = strtok_s( NULL, DELIM, &ctx );
			}
		}
		// ?????§??????????????????
		if( wVec.size() == 1 ){
			rVec.push_back( wVec[0] );
			wVec.erase( wVec.begin(), wVec.end() );
			continue;
		}
		std::sort( wVec.begin(), wVec.end() );
		int rtmp = wVec[0];
		for( int ii=0; ii<((int)wVec.size() - 1); ii++){
			if( rtmp < (wVec[ii+1] - wVec[ii]) ){
				rtmp = wVec[ii+1] - wVec[ii];
			}
		}
		// ???????????????????????????????´?
		rVec.push_back( rtmp );
		wVec.erase( wVec.begin(), wVec.end() );
	}
	for( int ii=0; ii<(int)rVec.size(); ii++ ){
		std::cout << rVec[ii] << std::endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:27:16: error: 'gets_s' was not declared in this scope
   27 |         while( gets_s( wStrA, STRNUM ) != NULL ){
      |                ^~~~~~
a.cc:29:23: error: 'strtok_s' was not declared in this scope; did you mean 'strtok_r'?
   29 |                 tok = strtok_s( wStrA, DELIM, &ctx );
      |                       ^~~~~~~~
      |                       strtok_r
Language: C++

/* Traffic Analysis */

#include <stdio.h>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>


#define	STRNUM	4096
#define	DELIM	" "
#define CMAX	10000

int main( int argc, char **argv )
{
	// ?????¨?????°??????
	char wStrA[STRNUM] = "";
	char *tok;
	char *ctx;
	int n, m, tl, tr;

	std::vector<int> wVec;
	std::vector<int> rVec;


	while( gets( wStrA, STRNUM ) != NULL ){
		// ????????°??°?????????
		tok = strtok( wStrA, DELIM );
		n = atoi( tok );
		while( tok != NULL ){
			m = atoi( tok );
			tok = strtok( NULL, DELIM );
		}
		// ????????°??°?????±???0????????????
		if( n==0 && m==0 ){
			break;
		}
		// ?????????????????????
		if( n != 0 ){
			// ?¬?????????????????????????
			gets( wStrA, STRNUM );
			tok = strtok( wStrA, DELIM );
			while( tok != NULL ){
				tl = atoi( tok );
				wVec.push_back( tl );
				tok = strtok( NULL, DELIM );
			}
		}
		if( m != 0 ){
			// ?¬?????????????????????????
			gets( wStrA, STRNUM );
			tok = strtok( wStrA, DELIM );
			while( tok != NULL ){
				tr = atoi( tok );
				wVec.push_back( tr );
				tok = strtok( NULL, DELIM );
			}
		}
		// ?????§??????????????????
		if( wVec.size() == 1 ){
			rVec.push_back( wVec[0] );
			wVec.erase( wVec.begin(), wVec.end() );
			continue;
		}
		std::sort( wVec.begin(), wVec.end() );
		int rtmp = wVec[0];
		for( int ii=0; ii<((int)wVec.size() - 1); ii++){
			if( rtmp < (wVec[ii+1] - wVec[ii]) ){
				rtmp = wVec[ii+1] - wVec[ii];
			}
		}
		// ???????????????????????????????´?
		rVec.push_back( rtmp );
		wVec.erase( wVec.begin(), wVec.end() );
	}
	for( int ii=0; ii<(int)rVec.size(); ii++ ){
		std::cout << rVec[ii] << std::endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:27:16: error: 'gets' was not declared in this scope; did you mean 'getw'?
   27 |         while( gets( wStrA, STRNUM ) != NULL ){
      |                ^~~~
      |                getw
Language: C++

using namespace std;

#define MAX 10001

main(){
    int n, m, L[MAX], R[MAX], C[MAX*2], i, j, k;
    while( cin >> n >> m ){
	if ( n == 0 && m == 0 ) break;
	for ( i = 0; i < n; i++ ) cin >> L[i];
	for ( i = 0; i < m; i++ ) cin >> R[i];
	L[n] = R[m] = 1000001;
	i = j = k = 0;
	while( k < n + m ) {
	    C[k++] = (L[i] <= R[j]) ? L[i++] : R[j++];
	}
	int maxv = C[0];
	for ( int i = 1; i < n+m; i++ ){
	    maxv = max( maxv, C[i] - C[i-1] );
	}
	cout << maxv << endl;
    }
}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:12: error: 'cin' was not declared in this scope
    7 |     while( cin >> n >> m ){
      |            ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:18:20: error: 'max' was not declared in this scope; did you mean 'maxv'?
   18 |             maxv = max( maxv, C[i] - C[i-1] );
      |                    ^~~
      |                    maxv
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout << maxv << endl;
      |         ^~~~
a.cc:20:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:25: error: 'endl' was not declared in this scope
   20 |         cout << maxv << endl;
      |                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<set>
#include<iostream>
int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:60: error: 'set' was not declared in this scope
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                            ^~~
a.cc:3:60: note: suggested alternatives:
In file included from /usr/include/c++/14/set:63,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:96:11: note:   'std::set'
   96 |     class set
      |           ^~~
/usr/include/c++/14/set:87:13: note:   'std::pmr::set'
   87 |       using set = std::set<_Key, _Cmp, polymorphic_allocator<_Key>>;
      |             ^~~
a.cc:3:64: error: expected primary-expression before 'int'
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                                ^~~
a.cc:3:77: error: 'p' was not declared in this scope
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                                             ^
a.cc:3:133: error: expected primary-expression before 'int'
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                                                                                                     ^~~
a.cc:3:154: error: 'a' was not declared in this scope
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                                                                                                                          ^
Language: C++

#include<set>
#include<iostream>
int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;std::set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);std::set<int>::iteratorツ　a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}

Compiler output:
a.cc:3:149: error: extended character 　 is not valid in an identifier
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;std::set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);std::set<int>::iteratorツ　a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                                                                                                                     ^
a.cc: In function 'int main()':
a.cc:3:149: error: 'iterator\U000030c4\U00003000a' is not a member of 'std::set<int>'
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;std::set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);std::set<int>::iteratorツ　a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                                                                                                                     ^~~~~~~~~~~~~
a.cc:3:167: error: 'a' was not declared in this scope
    3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;std::set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);std::set<int>::iteratorツ　a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
      |                                                                                                                                                                       ^
Language: C++

#include<iostream>

using namespace std;

int main(void){
  int n,m,max,i,x;

  while(1){
    cin >> n >> m;
    for(i=0;i<n+m;i++){
      cin >> x;
      max= (i==0)?x:(max<x-max)?x-max:;
}
    cout << max << endl;
}

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: expected primary-expression before ';' token
   12 |       max= (i==0)?x:(max<x-max)?x-max:;
      |                                       ^
Language: C++

#include <iostream>

using namespace std;

int max(int a, int b)
{
	if( a > b )
		return a;
	else
		return b;
}

int main()
{
	int n, m, i, j, k;
	int out; 
	int tl[100];
	int tr[100];
	int tmerge[200];

	while( cin >> n >> m , (n||m) )
	{
		memset( tl, 0, sizeof(tl));
		memset( tr, 0, sizeof(tr));
		memset( tmerge, 0, sizeof(tmerge));
		out = 0;

		for( i = 1; i <= n; i++)
		{
			cin >> tl[i];
		}
		for( j = 1; j <= m; j++)
		{
			cin >> tr[j];
		}

		i = 1; j = 1; k = 2;
		tmerge[1] = 0;

		while( k <= n+m+1 )
		{
			if( tl[i] < tr[j] && i <= n )
			{
				tmerge[k] = tl[i];
				i++;
			}
			else
			{
				tmerge[k] = tr[j];
				j++;
			}
			k++;
		}

		for( i = 1; i <= n+m+1; i++)
		{
			cout << tmerge[i] << endl;
		}

		for( i = 1; i <= m+n+1; i++)
		{
			tmerge[i] = tmerge[i+1] - tmerge[i];
		}

		for( i = 1; i <= m+n+1; i++)
		{
			out = max(out, tmerge[i]);
		}

		cout << out <<endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'memset' was not declared in this scope
   23 |                 memset( tl, 0, sizeof(tl));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

using namespace std;

int max(int a, int b)
{
	if( a > b )
		return a;
	else
		return b;
}

int main()
{
	int n, m, i, j, k;
	int out; 
	int tl[10000];
	int tr[10000];
	int tmerge[20000];

	while( cin >> n >> m , (n||m) )
	{
		memset( tl, 0, sizeof(tl));
		memset( tr, 0, sizeof(tr));
		memset( tmerge, 0, sizeof(tmerge));
		out = 0;

		for( i = 1; i <= n; i++)
		{
			cin >> tl[i];
		}
		for( j = 1; j <= m; j++)
		{
			cin >> tr[j];
		}

		i = 1; j = 1; k = 2;
		tmerge[1] = 0;

		while( k <= n+m+1 )
		{
			if( tl[i] < tr[j] && i <= n )
			{
				tmerge[k] = tl[i];
				i++;
			}
			else
			{
				tmerge[k] = tr[j];
				j++;
			}
			k++;
		}

/*
		for( i = 1; i <= n+m+1; i++)
		{
			cout << tmerge[i] << endl;
		}
*/

		for( i = 1; i <= m+n+1; i++)
		{
			tmerge[i] = tmerge[i+1] - tmerge[i];
		}

		for( i = 1; i <= m+n+1; i++)
		{
			out = max(out, tmerge[i]);
		}

		cout << out <<endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'memset' was not declared in this scope
   23 |                 memset( tl, 0, sizeof(tl));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#import<cstdio>
#import<algorithm>
int main(){
	for(int n,m,f,i;scanf("%d%d",&n,&m),n|m;printf("%d\n",f)){
		int a[200010]={0};
		for(i=0;i<n+m;i++)
			scanf("%d"a+i);
		std::sort(a,a+n+m+1);
		f=0;
		for(i=1;i<n+m+1;i++)
			f=max(f,a[i]+a[i-1]);
	}
}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<cstdio>
      |  ^~~~~~
a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    2 | #import<algorithm>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:7:31: error: unable to find string literal operator 'operator""a' with 'const char [3]', 'long unsigned int' arguments
    7 |                         scanf("%d"a+i);
      |                               ^~~~~
a.cc:11:27: error: 'max' was not declared in this scope; did you mean 'std::max'?
   11 |                         f=max(f,a[i]+a[i-1]);
      |                           ^~~
      |                           std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~