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

import java.util.Scanner;

class Main {
    private int[] dice = new int[6];
    
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
    	Dice dice = new Dice();
    	
    	int n;
    	String dir;
    	
    	dice.left();
    	dice.left();
    	
    	while (true) {
    		for (int i = 0; i < 6; i++) {
        		dice.setDice(i, i + 1);
        	}
    		
    		n = scan.nextInt();
    		if (n == 0) break;
    		
    		for (int i = 0; i < n; i++) {
    			dir = scan.next();
    			if(dir.equals("north")) dice.noth();
    			else if (dir.equals("east")) dice.east();
    			else if (dir.equals("west")) dice.west();
    			else if (dir.equals("south")) dice.south();
    		}
    	System.out.println(dice.getDice(0));
    	}
    }

    Dice() {
    	
    }

    Dice(int[] val) {
    	for (int i = 0; i < this.dice.length; i++) {
			this.dice[i] = val[i];
		}
    }

    void setDice(int i, int val) {
    	this.dice[i] = val;
    }

    int getDice(int i) {
    	return this.dice[i];
    }

    int[] getDice() {
    	return this.dice;
    }

	int[] noth() {
		swap(0, 1, 5, 4);
		return this.dice;
	}

	int[] east() {
		swap(0, 3, 5, 2);
		return this.dice;
	}

	int[] west() {
		swap(0, 2, 5, 3);
		return this.dice;
	}

	int[] south() {
		swap(0, 4, 5, 1);
		return this.dice;
	}

	int[] right() {
		swap(1, 2, 4, 3);
		return this.dice;
	}

	int[] left() {
		swap(1, 3, 4, 2);
		return this.dice;
	}

	void swap(int n1, int n2, int n3, int n4) {
		int swap = this.dice[n1];
		this.dice[n1] = this.dice[n2];
		this.dice[n2] = this.dice[n3];
		this.dice[n3] = this.dice[n4];
		this.dice[n4] = swap;
	}

	void dicePrint() {
		int i;
		for (i = 0; i < this.dice.length - 1; i++) {
			System.out.print(this.dice[i] + ", ");
		}
	}
}

Compiler output:
Main.java:36: error: invalid method declaration; return type required
    Dice() {
    ^
Main.java:40: error: invalid method declaration; return type required
    Dice(int[] val) {
    ^
2 errors
Language: Java

import java.util.Scanner;

class Main {
    private int[] dice = new int[6];
    
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
    	Dice dice = new Dice();
    	
    	int n;
    	String dir;
    	
    	while (true) {
    		for (int i = 0; i < 6; i++) {
        		dice.setDice(i, i + 1);
        	}
    		
        	dice.left();
        	dice.left();
    		
    		n = scan.nextInt();
    		if (n == 0) break;
    		
    		for (int i = 0; i < n; i++) {
    			dir = scan.next();
    			if (dir.equals("north")) dice.noth();
    			else if (dir.equals("east")) dice.east();
    			else if (dir.equals("west")) dice.west();
    			else if (dir.equals("south")) dice.south();
    		}
    	System.out.println(dice.getDice(0));
    	}
    }

    Dice() {
    	
    };

    Dice(int[] val) {
    	for (int i = 0; i < this.dice.length; i++) {
			this.dice[i] = val[i];
		}
    }

    void setDice(int i, int val) {
    	this.dice[i] = val;
    }

    int getDice(int i) {
    	return this.dice[i];
    }

    int[] getDice() {
    	return this.dice;
    }

	int[] noth() {
		swap(0, 1, 5, 4);
		return this.dice;
	}

	int[] east() {
		swap(0, 3, 5, 2);
		return this.dice;
	}

	int[] west() {
		swap(0, 2, 5, 3);
		return this.dice;
	}

	int[] south() {
		swap(0, 4, 5, 1);
		return this.dice;
	}

	int[] right() {
		swap(1, 2, 4, 3);
		return this.dice;
	}

	int[] left() {
		swap(1, 3, 4, 2);
		return this.dice;
	}

	void swap(int n1, int n2, int n3, int n4) {
		int swap = this.dice[n1];
		this.dice[n1] = this.dice[n2];
		this.dice[n2] = this.dice[n3];
		this.dice[n3] = this.dice[n4];
		this.dice[n4] = swap;
	}

	void dicePrint() {
		int i;
		for (i = 0; i < this.dice.length - 1; i++) {
			System.out.print(this.dice[i] + ", ");
		}
	}
}

Compiler output:
Main.java:36: error: invalid method declaration; return type required
    Dice() {
    ^
Main.java:40: error: invalid method declaration; return type required
    Dice(int[] val) {
    ^
2 errors
Language: Java

import java.util.Scanner;

class Main {
	 public static void main(String[] args){
	        Scanner scan = new Scanner(System.in);
	        
	    	Dice dice = new Dice();
	    	
	    	int n;
	    	String dir;
	    	
	    	while (true) {
	    		for (int i = 0; i < 6; i++) {
	        		dice.setDice(i, i + 1);
	        	}
	    		
	        	dice.left();
	        	dice.left();
	    		
	    		n = scan.nextInt();
	    		if (n == 0) break;
	    		
	    		for (int i = 0; i < n; i++) {
	    			dir = scan.next();
	    			if (dir.equals("north")) dice.noth();
	    			else if (dir.equals("east")) dice.east();
	    			else if (dir.equals("west")) dice.west();
	    			else if (dir.equals("south")) dice.south();
	    		}
	    	System.out.println(dice.getDice(0));
	    	}
	    }
}

public class Dice {
    private int[] dice = new int[6];

    Dice() {
    	
    };

    Dice(int[] val) {
    	for (int i = 0; i < this.dice.length; i++) {
			this.dice[i] = val[i];
		}
    }

    void setDice(int i, int val) {
    	this.dice[i] = val;
    }

    int getDice(int i) {
    	return this.dice[i];
    }

    int[] getDice() {
    	return this.dice;
    }

	int[] noth() {
		swap(0, 1, 5, 4);
		return this.dice;
	}

	int[] east() {
		swap(0, 3, 5, 2);
		return this.dice;
	}

	int[] west() {
		swap(0, 2, 5, 3);
		return this.dice;
	}

	int[] south() {
		swap(0, 4, 5, 1);
		return this.dice;
	}

	int[] right() {
		swap(1, 2, 4, 3);
		return this.dice;
	}

	int[] left() {
		swap(1, 3, 4, 2);
		return this.dice;
	}

	void swap(int n1, int n2, int n3, int n4) {
		int swap = this.dice[n1];
		this.dice[n1] = this.dice[n2];
		this.dice[n2] = this.dice[n3];
		this.dice[n3] = this.dice[n4];
		this.dice[n4] = swap;
	}

	void dicePrint() {
		int i;
		for (i = 0; i < this.dice.length - 1; i++) {
			System.out.print(this.dice[i] + ", ");
		}
	}
}

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

#include <bits/stdc++.h>
 
using namespace std;
 
#define MAX 1000
#define INF 1e9
typedef pair<int,int> pii;
 
int H,W[MAX];
string s[MAX];
bool visited[MAX][80];
vector<pii> vec[10000];
const int dx[8] = {-1,0,0,1,-1,-1,1,1};
const int dy[8] = {0,-1,1,0,-1,1,-1,1};
 
bool inField(int x,int y){
    if(0 > y || y >= H){
	return false;
    }
    if(0 > W[y] || W[y] <= x){
	return false;
    }
    return true;
}
 
void dfs(int x,int y,int idx){
    if(s[y][x] != '*') return;
    s[y][x] = ' ';
    vec[idx].push_back(pii(x,y));
 
    for(int i = 0 ; i < 8 ; i++){
	int nx = x + dx[i];
	int ny = y + dy[i];
	if(!inField(nx,ny)) continue;
	dfs(nx,ny,idx);
    }
}
 
int getArea(vector<pii> &v){
    int px[4] = {INF,0,INF,0};
    int py[4] = {INF,INF,0,0};
    for(int i = 0 ; i < (int)v.size() ; i++){
	int x = v[i].first,y = v[i].second;
	if(y < py[0]){
	    px[0] = px[1] = x;
	    py[0] = py[1] = y;
	}else if(y == py[0]){
	    if(x < px[0]){
		px[0] = x;
	    }else if(px[1] < x){
		px[1] = x;
	    }
	}
	if(py[2] < y){
	    px[2] = px[3] = x;
	    py[2] = py[3] = y;
	}else if(py[2] == y){
	    if(x < px[2]){
		px[2] = x;
	    }else if(px[3] < x){
		px[3] = x;
	    }
	} 
    }
    return ((px[1]-px[0]+1)+(px[3]-px[2]+1))*(py[2]-py[0]+1)/2;
}
 
int main(){
    bool flg = false;
    while(cin >> H,H){
	if(flg){
	    cout << "----------" << endl;
	}
	flg = true;
	cin.ignore();
	for(int i = 0 ; i < 10000 ; i++){
	    vec[i].clear();
	}
	for(int i = 0 ; i < H ; i++){
	    getline(cin,s[i]);
	    W[i] = s[i].size();
	}
	int idx = 0;
	for(int i = 0 ; i < H ; i++){
	    for(int j = 0 ; j < W[i] ; j++){
		if(s[i][j] == '*'){
		    dfs(j,i,idx); idx++;
		}
	    }
	}
	map<int,int> cnt;
	for(int i = 0 ; i < idx ; i++){
	    int area = getArea(vec[i]);
	    cnt[area]++;
	}
	map<int,int>::iterator it;
	for(it = cnt.begin() ; it != cnt.end() ; ++it){
	    cout << it->first << " " << it->second << endl;
	}
    }
    return 0;
}

Compiler output:
a.cc: In function 'int getArea(std::vector<std::pair<int, int> >&)':
a.cc:6:13: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
    6 | #define INF 1e9
      |             ^~~
a.cc:40:18: note: in expansion of macro 'INF'
   40 |     int px[4] = {INF,0,INF,0};
      |                  ^~~
a.cc:6:13: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
    6 | #define INF 1e9
      |             ^~~
a.cc:40:24: note: in expansion of macro 'INF'
   40 |     int px[4] = {INF,0,INF,0};
      |                        ^~~
a.cc:6:13: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
    6 | #define INF 1e9
      |             ^~~
a.cc:41:18: note: in expansion of macro 'INF'
   41 |     int py[4] = {INF,INF,0,0};
      |                  ^~~
a.cc:6:13: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
    6 | #define INF 1e9
      |             ^~~
a.cc:41:22: note: in expansion of macro 'INF'
   41 |     int py[4] = {INF,INF,0,0};
      |                      ^~~
Language: C++

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

using namespace std;

int xdir[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int ydir[8] = {0, 1, 1, 1, 0, -1, -1, -1};

struct Pa{
  int area;
  int num;
};

bool comp(const Pa& p1, const Pa& p2)
{
  return p1.area < p2.area;
}

int p;
void func(char a[1001][81], int s, int t, int prm[5], int dx, int dy)
{
  a[s][t] = ' ';
  for(int i = 0; i < 8; i++){
    if(a[s+ydir[i]][t+xdir[i]] == '*'){
      if(dx == xdir[i] && dy == ydir[i]){
	prm[p]++;
      } else {
	p++;
      }
      func(a, s+ydir[i], t+xdir[i], prm, xdir[i], ydir[i]);
      break;
    }
  }

  return ;
}

int main()
{
  int prm[5], n;
  char a[1001][81], w;
  bool f = false;
 
  while(cin >> n && n){
    vector<Pa> vec;
    int v = 0;
    gets(a[0]);
    for(int i = 0; i < n; i++){
      cin.getline(a[i], sizeof(a[i]));
    }
    if(f){
      cout << "----------" << endl;
    }

    for(int i = 0; i < n; i++){
      for(int j = 0, l= strlen(a[i]); j < l; j++){
	if(a[i][j] == '*'){
	  p = 0;
	  fill(prm, prm+5, 2);
	  func(a, i, j, prm, 0, 0);
	  int s = (prm[1]+prm[3])*prm[2]/2;
	  f = true;
	  for(int k = 0; k < v; k++){
	    if(vec[k].area == s){
	      vec[k].num++;
	      f = false;
	      break;
	    }
	  }
	  if(f){
	    Pa par;
	    par.area = s;
	    par.num = 1;
	    vec.push_back(par);
	    v++;
	  }
	}
      }
    }

    sort(vec.begin(), vec.end(), comp);
    for(int i = 0; i < v; i++){
      cout << vec[i].area << " " << vec[i].num << endl;
    }

    f = true;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   49 |     gets(a[0]);
      |     ^~~~
      |     getw
Language: C++

#include<iostream>
#include<complex>
#include"geom.hpp"
using namespace geom;

using namespace std;

int main(){
  for(int t=1;;t++){
    P p[3];
    bool f=false;
    for(int i=0;i<3;i++){
      int x,y;
      cin>>x>>y;
      if(x==0)return 0;
      p[i]=P(x,y);
    }
    Polygon pg{P(0,0),P(0,10000),P(10000,10000),P(10000,0)};
    for(int i=1;i<=2;i++){
      P m=(p[0]+p[i])/2.;
      pg=cut(m,m+(p[i]-p[0])*P(0,1),pg);
    }
    cout.precision(9);
    cout<<t<<' '<<fixed<<area(pg)/1e8<<endl;
  }
}

Compiler output:
a.cc:3:9: fatal error: geom.hpp: No such file or directory
    3 | #include"geom.hpp"
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <complex>
#include <vector>

using namespace std;

const double EPS = 1e-7;
typedef complex<double> P;
typedef vector<P> G;

double cross(P a, P b) { return imag(conj(a)*b); }

// 多角形gの面積を求める
double polygonArea(G g){
	double res = 0.0;
	for(int i=0;i<g.size();i++)
		res += cross(g[i],g[(i+1)%g.size()]);
	return abs(0.5*res);
}

// 凸多角形gを，2点p, qを結ぶ線分で切断する
G convexCut(G g, P p, P q){
	G res;
	int n = g.size();
	for(int i=0;i<n;i++){
		P A(g[i]), B(g[(i+1)%n]);
		double p1 = cross(q-p,A-p);
		double p2 = cross(q-p,B-p);
		if(p1 > -EPS) res.push_back(A);
		if(p1*p2 < -EPS)
			res.push_back(A+cross(q-p,q-A)/cross(q-p,B-A)*(B-A));
	}
	return res;
}

int main(){
  int x[3], y[3];
  for(int test=1; ;test++){
    for(int i=0;i<3;i++) cin >> x[i] >> y[i];
    if(x[0]) break;
    G g;
    g.push_back(P(0,0));
    g.push_back(P(10000,0));
    g.push_back(P(10000,10000));
    g.push_back(P(0,10000));
    for(int i=1;i<3;i++){
      P a = P(x[0], y[0]);
      P b = P(x[i], y[i]);
      P mid = 0.5*(a+b);
      P dir = mid + P(0,1)*(b-a);
      g = convexCut(g, mid, dir);
    }
    printf("%d %.10lf\n", t, polygonArea(g));
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:27: error: 't' was not declared in this scope
   53 |     printf("%d %.10lf\n", t, polygonArea(g));
      |                           ^
Language: C++

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

#define REP(i, a, b) for(int i = (a); i < int(b); ++i)
#define rep(i, n) REP(i, 0, n)
#define ALL(x) begin(x), end(x)

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	constexpr int NUM = 128;
	constexpr int WIDTH = 72;

	bool first = true;
	string line;
	while(getline(cin, line)) {
		if(first) first = false;
		else cout << endl;

		string text = "";
		do {
			text += line;
		} while(getline(cin, line) && !line.empty());

		string keywords;
		getline(cin, keywords);
		cin.ignore();

		const int n = text.size();
		const int m = keywords.size();
		vector<int> idx(NUM, -1);

		rep(i, m) {
			idx[keywords[i]] = i;
		}

		int number_of_answer = 0;
		int shortest = n;
		pair<int, int> first_answer;
		vector<int> last(m, -1);

		rep(i, n) {
			if(idx[text[i]] != -1) {
				last[idx[text[i]]] = i;
				const int start = *min_element(ALL(last));

				if(start != -1) {
					const int len = i - start;
					if(len < shortest) {
						shortest = len;
						number_of_answer = 1;
						first_answer = make_pair(start, i + 1);
					}
					else if(len == shortest) {
						++number_of_answer;
					}
				}
			}
		}

		cout << number_of_answer << endl << endl;

		for(int i = first_answer.first; i < first_answer.second; i += WIDTH) {
			cout << text.substr(i, min({n, first_answer.second, i + WIDTH}) - i) << endl;
		}
	}

	return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:52: error: 'min_element' was not declared in this scope
   48 |                                 const int start = *min_element(ALL(last));
      |                                                    ^~~~~~~~~~~
a.cc:67:51: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   67 |                         cout << text.substr(i, min({n, first_answer.second, i + WIDTH}) - i) << endl;
      |                                                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

bool T[255];
int P[255];

vector<string> compute(string text, string key){

    vector<string> ans;
    int k = key.size();
    rep(i, 255) P[i] = -1;
    int l = text.size();
    int r = -1;

    rep(i, 255) T[i] = false;
    rep(i, k) T[key[i]] = true;

    rep(i, k){
	rep(j, text.size()){
	    if ( key[i] == text[j] ) { 
		P[key[i]] = j; 
		l = min(l, j);
		r = max(r, j);
		break; 
	    }
	}
    }
    rep(i, k) if ( P[key[i]] == -1 ) return ans;
    for ( int i = l; i <= r; i++ ){
	if ( T[text[i]] ){
	    if ( P[text[i]] < i ) P[ch] = i;
	}
    }

    ans.push_back(text.substr(l, r-l+1));

    for ( int i = r+1; i < text.size(); i++ ){
	char ch = text[i];
	if ( T[ch] ){
	    r = i;
	    P[ch] = i;
	    l = r;
	    rep(t, k){
		if ( T[key[t]] ){
		    l = min(l, P[key[t]]);
		}
	    }
	    string c = text.substr(l, r-l+1);
	    if ( ans[0].size() == c.size() ) ans.push_back(c);
	    else if ( ans[0].size() > c.size() ){
		ans.clear();
		ans.push_back(c);
	    }
	}
    }

    return ans;
}

main(){
    string text, line, key;
    while(1){
	text = "";
	while(1){
	    getline(cin, line);
	    if ( line.size() == 0 ) break;
	    text += line;
	}
	if ( text == "" ) break;
	getline(cin, key);
	getline(cin, line);
	vector<string> ans = compute(text, key);
	cout << ans.size() << endl;
	if ( ans.size() > 0 ){
	    cout << endl;
	    cout << ans[0]  << endl;
	}
	cout << endl;
    }
}

Compiler output:
a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > compute(std::string, std::string)':
a.cc:34:37: error: 'ch' was not declared in this scope
   34 |             if ( P[text[i]] < i ) P[ch] = i;
      |                                     ^~
a.cc: At global scope:
a.cc:63:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   63 | main(){
      | ^~~~
Language: C++

7

a

1

firstexampleistriv

7

nWWW.Alb

0

1

Wagner,Bach,Beethoven,Chopin,Brahms,Hindemith,Ives,Suk,Mozart,Stravinsky

1

CIIcharacterssuchas+,*,[,#,<,},_arenotexcludedinagivenstringasthisexampl
eillustratesbyitself.Youshouldnotforgetthem.Onemorefactyoushouldnoticeis
thatuppercaselettersandlowercaselettersaredistinguishedinthisproblem.Don
'tidentify"g"and"G",forexmaple.However,weareafraidthatthisexamplegivesyo
utoomuchhint!

1

ETAONRISHDLFCMUGYPWBVKXJQZ

Compiler output:
a.cc:21:26: error: stray '#' in program
   21 | CIIcharacterssuchas+,*,[,#,<,},_arenotexcludedinagivenstringasthisexampl
      |                          ^
a.cc:24:1: warning: missing terminating ' character
   24 | 'tidentify"g"and"G",forexmaple.However,weareafraidthatthisexamplegivesyo
      | ^
a.cc:24:1: error: missing terminating ' character
   24 | 'tidentify"g"and"G",forexmaple.However,weareafraidthatthisexamplegivesyo
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 7
      | ^
a.cc:21:30: error: expected declaration before '}' token
   21 | CIIcharacterssuchas+,*,[,#,<,},_arenotexcludedinagivenstringasthisexampl
      |                              ^
a.cc:21:31: error: expected unqualified-id before ',' token
   21 | CIIcharacterssuchas+,*,[,#,<,},_arenotexcludedinagivenstringasthisexampl
      |                               ^
a.cc:22:1: error: expected constructor, destructor, or type conversion before 'eillustratesbyitself'
   22 | eillustratesbyitself.Youshouldnotforgetthem.Onemorefactyoushouldnoticeis
      | ^~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
	string text,key,temp;
	for(;;)
	{
		text=key="";
		while(getline(cin,text)&&text.empty())
			;
		if(cin.eof())return 0;
		while(getline(cin,temp)&&!temp.empty())
			text+=temp;
		if(cin.eof())return 0;
		while(getline(cin,key)&&key.empty())
			;
		if(cin.eof())return 0;


		int minLen=1e9,minIndex=1e9,minCount=0;
		int i,head,tail;
		int kind=0,curKind;
		bool f[256]={};
		int a[256]={};
		for(i=0;i<key.size();++i)
			if(!f[key[i]]++)
				++kind;
		text+="\0";
		head=tail=curKind=0;
		for(;tail<text.size();)
		{
			for(; head<text.size(); ++head)
			{
				char c=text[head];
				if(f[c]&&!a[c]++)
				{
					if(++curKind==kind)
					{
						++head;
						break;
					}
				}
			}
			for(; tail<text.size(); ++tail)
			{
				char c=text[tail];
				if(f[c]&&!--a[c])
				{
					if(curKind--==kind)
					{
						if(minLen>head-tail)
						{
							minLen=head-tail;
							minIndex=tail;
							minCount=1;
						}
						else if(minLen==head-tail)
							++minCount;
						++tail;
						break;
					}
				}
			}
		}
		cout<<minCount<<endl<<endl;
		if(minLen!=1e9)
		{
			temp = text.substr(minIndex,minLen);
			for(i=0;i<temp.size();++i)
			{
				cout<<temp[i];
				if(i!=temp.size-1()&&i%72==71)cout<<endl;
			}
			cout<<endl<<endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:37: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   27 |                         if(!f[key[i]]++)
      |                             ~~~~~~~~^
a.cc:73:50: error: expression cannot be used as a function
   73 |                                 if(i!=temp.size-1()&&i%72==71)cout<<endl;
      |                                                 ~^~
Language: C++

//47
#include<iostream>
#include<sstream>
#include<string>
#include<map>
#include<algorithm>
#include<set>

using namespace std;

int main(){
  for(string si;getline(cin,si),si!="";){
    string s;
    do{
      s+=si;
      getline(cin,si);
    }while(si!="");
    string k;
    getline(cin,k);
    cin.ignore();
    map<char,int> m;
    int f=0,l=1<<30;
    int n=0;
    set<long long> st;
    for(int i=0;i<s.size();i++){
      if(f.find(s[i])){
	m[s[i]]=i;
      }
      if(m.size()!=k.size())continue;
      int cl=0,cf=1<<30;
      for(int j=0;j<k.size();j++){
	cl=max(cl,m[k[j]]);
	cf=min(cf,m[k[j]]);
      }
      if(!st.insert((long long)cl<<32|cf).second)continue;
      if(cl-cf<=l-f){
	if(cl-cf<l-f){
	  f=cf;
	  l=cl;
	  n=0;
	}
	n++;
      }
    }
    cout<<n<<endl<<endl;
    if(n){
      string t=s.substr(f,l-f+1);
      for(int i=0;i<t.size();i+=72){
	cout<<t.substr(i,72)<<endl;
      }
      cout<<endl;
    }
  }
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: request for member 'find' in 'f', which is of non-class type 'int'
   26 |       if(f.find(s[i])){
      |            ^~~~
Language: C++

#include<set>
#include<iostream>
#include<cmath>
#include<cstdio>
 
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define inf (1<<29)
 
using namespace std;
 
void compute(string text,string S)
{
  int nt = text.size(),nS = S.size();
  int mlen = inf;
  string ans;
  bool found[nS];
  int CNT = 0;
  int fpos[nS];
  rep(i,nS)found[i] = false;
 
  rep(i,nt)
    {
      bool update = false;
      int cnt = 0,mn,mx;
      mn = inf,mx = -inf;
      rep(j,nS)
	{
	  if(S[j] == text[i])
	    {
	      update = true;
	      found[j] = true;
	      fpos[j] = i;
	    }
	  if(found[j])
	    {
	      cnt++;
	      mn = min(mn,fpos[j]);
	      mx = max(mx,fpos[j]);
	    }
	}
      if(cnt == nS)
	{
	  int cost = mx - mn + 1;
	  if(cost < mlen)
	    {
	      mlen = cost;
	      ans = text.substr(mn,cost);
	      CNT = 1;
	    }
	  else if(cost == mlen && update)CNT++;	    
	}
    }
  cout << CNT << endl << endl;
  
  if(all.empty())return;

  rep(i,ans.size())
    if((i+1)%72 == 0 && i != 0)
      printf("%c\n",ans[i]);
    else
      printf("%c",ans[i]);
  if(ans.size()%72 != 0)puts("\n");
  else puts("");
}
 
int main()
{
  string blank;
  while(getline(cin,blank))
    {
      string text,S;
      text += blank;
      while(getline(cin,blank))
	{
	  if(blank.empty())break;
	  text += blank;
	}
      if(text.empty())goto Fin;
      while(getline(cin,blank))
	if(blank.empty())break;
	else S += blank;
      compute(text,S);
    }
 Fin:;
  return 0;
}

Compiler output:
a.cc: In function 'void compute(std::string, std::string)':
a.cc:56:6: error: 'all' was not declared in this scope
   56 |   if(all.empty())return;
      |      ^~~
Language: C++

#include <iostream>
#include <sstream>
#include <vector>
#include <map>
using namespace std;
 
struct S {
	string name;
	int parent;
	vector<int> child;
	S(string s, int p, vector<int> c) : name(s), parent(p), child(c){}
};
 
vector<S> G;
 
int main()
{
	int N, M;
	while (cin>>N>>M, N||M) {
		cin.ignore();
		
		map<string, int> list;
		
		int idx=0;
		
		vector<string> s(N);
		for (int i=0; i<N; i++) {
			getline(cin, s[i]);
		}
		
		for (int i=0; i<N; i++) {
			int count = 0;
			int p=0;
			
			while (s[i][p]==' ') {
				count++;
				p++;
			}
			
			string n = s[i].substr(p);
			if (count==0) {
				G.push_back(S(n, -1, vector<int>()));
				list[n] = idx++;
			} else {
				string parent;
				for (int j=i; i>=0; i--) {
					int cc=0;
					while (s[j][cc]==' ') cc++;
					if (cc==count-1)
						parent = s[j].substr(cc);
					
					G.push_back(S(n, list[parent], vector<int>());
					list[n] = idx++;
					G[list[parent]].cild.push_back(list[n]);
				}
			}
		}
		
		for (int z=0; z<M; z++) {
			string t; getline(cin, t);
			istringstream ss(t);
			vector<string> tt(6);
			for (int i=0; i<6; i++) 
				ss>>tt[i];
			
			string X = tt[0], Y = tt[5];
			
			bool ans=false;
			
			if (tt[3][0]=='c') {
				bool ok=false;
				for (int i=0; i<G[list[Y]].size(); i++) {	
					if (list[X] == G[list[Y]].child[i]) {
						ok = true;
						break;
					}
				}
				cout << (ok?"True":"False") << endl;
			} else if (tt[3][0]=='p') {
				if (list[X] == G[list[Y]].parent) {
					ans = true;
				}
			} else if (tt[3][0]=='s') {
				if (G[list[X]].parent == G[list[Y]].parent && G[list[X]].parent!=-1)
					ans = true;
			} else if (tt[3][0]=='d') {
				swap(X, Y);
				for (;;) {
					if (G[list[Y]].parent==-1) break;
				
				}
			} else if (tt[3][0]=='a') {
			
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:86: error: expected ')' before ';' token
   52 |                                         G.push_back(S(n, list[parent], vector<int>());
      |                                                    ~                                 ^
      |                                                                                      )
a.cc:54:57: error: '__gnu_cxx::__alloc_traits<std::allocator<S>, S>::value_type' {aka 'struct S'} has no member named 'cild'; did you mean 'child'?
   54 |                                         G[list[parent]].cild.push_back(list[n]);
      |                                                         ^~~~
      |                                                         child
a.cc:72:60: error: '__gnu_cxx::__alloc_traits<std::allocator<S>, S>::value_type' {aka 'struct S'} has no member named 'size'
   72 |                                 for (int i=0; i<G[list[Y]].size(); i++) {
      |                                                            ^~~~
Language: C++

6 5
John
 Robert
  Frank
  Andrew
 Nancy
  David
Robert is a child of John.
Robert is an ancestor of Andrew.
Robert is a sibling of Nancy.
Nancy is the parent of Frank.
John is a descendant of Andrew.
2 1
abc
 xyz
xyz is a child of abc.
0 0

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

#include<stdio.h>
#include<stdlib.h>
#include<queue>
#include<functional>
struct S{int x1,y1,x2,y2,c;}s,t;
struct C:std::binary_function<S,S,int>{int operator()(S a,S b){return a.c>b.c;}};
int main()
{
	int h,w,m[9][9],d[8][8][8][8],i,j,V=63,a[]={0,1,0,-1,0};
	while(scanf("%d%d",&w,&h),w)
	{
		for(i=0;i<h+2;++i)m[i][0]=m[i][w+1]=1;
		for(j=0;j<w+2;++j)m[0][j]=m[h+1][j]=1;
		for(i=1;i<=h;++i)for(j=1;j<=w;++j)
			if(scanf("%d",&m[i][j]),m[i][j]==4)m[s.y1=i][s.x1=j]=0;
			else if(m[i][j]==2)m[s.y2=i][s.x2=j]=0;
		memset(d,V,16384);
		s.c=0;
		std::priority_queue<S,std::vector<S>,C>q;
		q.push(s);
		d[s.y1][s.x1][s.y2][s.x2]=0;
		while(q.size())
		{
			s=q.top();q.pop();
			for(i=0;i<4;++i)
			{
				t=s;
				t.x1+=a[i];
				t.y1+=a[i+1];
				if(m[t.y1][t.x1]==1)continue;
				if(t.y1==t.y2&&t.x1==t.x2)
				{
					if(m[t.y2+a[i+1]][t.x2+a[i]]==1)continue;
					t.x2+=a[i];
					t.y2+=a[i+1];
					t.c++;
					if(m[t.y2][t.x2]==3)
					{
						printf("%d\n",t.c);
						goto E;
					}
				}
				if(d[t.y1][t.x1][t.y2][t.x2]<=t.c)continue;
				d[t.y1][t.x1][t.y2][t.x2]=t.c;
				q.push(t);
			}
		}
		puts("-1");
E:;
	}
	return 0;
}

Compiler output:
a.cc:6:15: warning: 'template<class _Arg1, class _Arg2, class _Result> struct std::binary_function' is deprecated [-Wdeprecated-declarations]
    6 | struct C:std::binary_function<S,S,int>{int operator()(S a,S b){return a.c>b.c;}};
      |               ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/refwrap.h:39,
                 from /usr/include/c++/14/deque:67,
                 from /usr/include/c++/14/queue:62,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_function.h:131:12: note: declared here
  131 |     struct binary_function
      |            ^~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:17:17: error: 'memset' was not declared in this scope
   17 |                 memset(d,V,16384);
      |                 ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<functional>
  +++ |+#include <cstring>
    5 | struct S{int x1,y1,x2,y2,c;}s,t;
Language: C++

//Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??

Compiler output:
a.cc:3:1: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      | ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |         ^
a.cc:3:15: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |               ^
a.cc:3:21: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                     ^
a.cc:3:26: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                          ^
a.cc:3:33: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                                 ^
a.cc:3:40: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                                        ^
a.cc:3:47: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                                               ^
a.cc:3:54: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                                                      ^
a.cc:3:61: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                                                             ^
a.cc:3:68: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                                                                    ^
a.cc:3:75: error: extended character 」 is not valid in an identifier
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      |                                                                           ^
a.cc:3:1: error: '\U000030c6\U0000300d\U000030c4' does not name a type
    3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
      | ^~~~~~
Language: C++

#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;

struct Point{
	double x,y;
};

int N,M;

Point point[40];
double dp[40][41][40];

double calc(int start,int last,int next){
	//if(memo[start][last][next] != 0.0)return memo[start][last][next];

	return fabs((point[start].x*point[last].y-point[start].y*point[last].x)+
											(point[last].x*point[next].y-point[last].y*point[next].x) +
											(point[next].x*point[start].y-point[next].y*point[start].x))/2;
}

void func(){

	double tmp;

	for(int i = 0; i < N; i++){
		scanf("%lf",&tmp);
		point[i].x = cos(tmp*2.0*M_PI);
		point[i].y = sin(tmp*2.0*M_PI);
	}

	for(int a = 0; a < 40; a++){
		for(int b = 0; b <= 40; b++){
			for(int c = 0; c < 40; c++)dp[a][b][c] = 0.0;
		}
	}

	for(int a = 0; a < 40; a++){
		for(int b = 0; b < 40; b++){
			for(int c = 0; c < 40; c++){
				memo[a][b][c] = 0.0;
			}
		}
	}

	double ans = 0.0;

	for(int start = 0; start < N; start++){
		for(int count = 2; count < M; count++){
			for(int last = start+1; last < N; last++){
				for(int next = last+1; next < N; next++){
					dp[start][next][count+1] = max(dp[start][next][count+1],dp[start][last][count]+calc(start,last,next));

					if(count+1 == M)ans = max(ans,dp[start][next][count+1]);
				}
			}
		}
	}
	printf("%.10lf\n",ans);
}

int main(){

	while(true){
		scanf("%d %d",&N,&M);
		if(N == 0 && M == 0)break;

		func();
	}

	return 0;
}

Compiler output:
a.cc: In function 'void func()':
a.cc:56:33: error: 'memo' was not declared in this scope
   56 |                                 memo[a][b][c] = 0.0;
      |                                 ^~~~
Language: Java

import java.util.Scanner;
public class AOJ1224 {
	void run(){
		int[] f1 = new int[54];
		for(int i=0;i<54;i++)f1[i]=i*i*i;
		int[] f2 = new int[96];
		for(int i=0;i<96;i++)f2[i]=i*(i+1)*(i+2)/6;
		Scanner sc = new Scanner(System.in);
		for(;;){
			int n = sc.nextInt();
			if(n==0)break;
			int max = 0;
			for(int i=0;i<54;i++){
				for(int j=0;j<96;j++){
					if(f1[i]+f2[j]<=n)max=Math.max(max, f1[i]+f2[j]);
					System.out.println(max);
				}
			}
		}
	}
	
	public static void main(String[] args) {
		new AOJ1224().run();
	}
}


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

public class AOJ1224{
	void run(String num){
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		for(Integer i=0;i<54;i++){
			for(Intgeter j=0;j<96;j++){
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
			}
		}
		System.out.println(max);
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		for(Integer i=0;;i++){
			if(args[i].equals(0)) break;
			else app.run(args[i]);
		}
	}
}


Compiler output:
Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
       ^
Main.java:8: error: cannot find symbol
			for(Intgeter j=0;j<96;j++){
			    ^
  symbol:   class Intgeter
  location: class AOJ1224
Main.java:9: error: bad operand types for binary operator '<='
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
				              ^
  first type:  int
  second type: String
Main.java:9: error: cannot find symbol
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
				                     ^
  symbol:   variable max
  location: class AOJ1224
Main.java:9: error: cannot find symbol
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
				                                  ^
  symbol:   variable max
  location: class AOJ1224
Main.java:12: error: cannot find symbol
		System.out.println(max);
		                   ^
  symbol:   variable max
  location: class AOJ1224
6 errors
Language: Java

public class AOJ1224{
	void run(String num){
		int max=0;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		for(Integer i=0;i<54;i++){
			for(Intgeter j=0;j<96;j++){
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
			}
		}
		System.out.println(max);
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		for(Integer i=0;;i++){
			if(args[i].equals(0)) break;
			else app.run(args[i]);
		}
	}
}


Compiler output:
Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
       ^
Main.java:9: error: cannot find symbol
			for(Intgeter j=0;j<96;j++){
			    ^
  symbol:   class Intgeter
  location: class AOJ1224
Main.java:10: error: bad operand types for binary operator '<='
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
				              ^
  first type:  int
  second type: String
3 errors
Language: Java

public class AOJ1224{
	void run(String num){
		int max=0;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
			}
		}
		System.out.println(max);
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		for(Integer i=0;;i++){
			if(args[i].equals(0)) break;
			else app.run(args[i]);
		}
	}
}


Compiler output:
Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
       ^
Main.java:10: error: bad operand types for binary operator '<='
				if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
				              ^
  first type:  int
  second type: String
2 errors
Language: Java

public class AOJ1224{
	void run(String num){
		int max=0;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				if((f1[i]+f2[j])<=num) max=Math.max(max,f1[i]+f2[j]);
			}
		}
		System.out.println(max);
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		for(Integer i=0;;i++){
			if(args[i].equals(0)) break;
			else app.run(args[i]);
		}
	}
}


Compiler output:
Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
       ^
Main.java:10: error: bad operand types for binary operator '<='
				if((f1[i]+f2[j])<=num) max=Math.max(max,f1[i]+f2[j]);
				                ^
  first type:  int
  second type: String
2 errors
Language: Java

public class AOJ1224{
	void run(String num){
		int max=0,tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<=num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		for(Integer i=0;;i++){
			if(args[i].equals(0)) break;
			else app.run(args[i]);
		}
	}
}


Compiler output:
Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
       ^
Main.java:11: error: bad operand types for binary operator '<='
				if(tiaojian<=num) max=Math.max(max,tiaojian);
				           ^
  first type:  int
  second type: String
2 errors
Language: Java

class AOJ1224{
	void run(String num){
		int max=0,tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<=num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		for(Integer i=0;;i++){
			if(args[i].equals(0)) break;
			else app.run(args[i]);
		}
	}
}


Compiler output:
Main.java:11: error: bad operand types for binary operator '<='
				if(tiaojian<=num) max=Math.max(max,tiaojian);
				           ^
  first type:  int
  second type: String
1 error
Language: Java

class AOJ1224{
	void run(String num){
		int max=0,tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		for(Integer i=0;;i++){
			if(args[i].equals(0)) break;
			else app.run(args[i]);
		}
	}
}


Compiler output:
Main.java:11: error: bad operand types for binary operator '<'
				if(tiaojian<num) max=Math.max(max,tiaojian);
				           ^
  first type:  int
  second type: String
1 error
Language: Java

import java.util.Scanner;
class AOJ1224{
	void run(){
		int tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		Scanner n = new Scanner(System.in);
		for(;;){
		int num = sc.nextInt();
		if (num.euals(0)) break;
		int max=0;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<=num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
		}
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		app.run();
	}
}


Compiler output:
Main.java:11: error: cannot find symbol
		int num = sc.nextInt();
		          ^
  symbol:   variable sc
  location: class AOJ1224
Main.java:12: error: int cannot be dereferenced
		if (num.euals(0)) break;
		       ^
2 errors
Language: Java

import java.util.Scanner;
class AOJ1224{
	void run(){
		int tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		Scanner n = new Scanner(System.in);
		for(;;){
		int num = n.nextInt();
		if (num.euqls(0)) break;
		int max=0;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<=num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
		}
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		app.run();
	}
}


Compiler output:
Main.java:12: error: int cannot be dereferenced
		if (num.euqls(0)) break;
		       ^
1 error
Language: Java

import java.util.Scanner;
class AOJ1224{
	void run(){
		int tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
		Scanner n = new Scanner(System.in);
		for(;;){
		int num = n.nextInt();
		if (num.equals(0)) break;
		int max=0;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<=num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
		}
	}

	public static void mian(String[] args){
		AOJ1224 app = new AOJ1224();
		app.run();
	}
}


Compiler output:
Main.java:12: error: int cannot be dereferenced
		if (num.equals(0)) break;
		       ^
1 error
Language: Java

import java.util.Scanner;
public class AOJ1224{
	void run(){
		int tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<96;i++) f2[i] = i*(i+1)*(i+2)/6;
		Scanner n = new Scanner(System.in);
		for(;;){
		Integer num = n.nextInt();
		// System.out.println(num);
		if (num.equals(0)) break;
		int max=0;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<=num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
		}
	}

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



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

class AOJ1224{
	void run(){
		int tiaojian;
		Integer[] f1=new Integer[54];
		for(int i=0;i<54;i++) f1[i] = i*i*i;
		Integer[] f2=new Integer[96];
		for(int i=0;i<96;i++) f2[i] = i*(i+1)*(i+2)/6;
		Scanner n = new Scanner(System.in);
		for(;;){
		Integer num = n.nextInt();
		// System.out.println(num);
		if (num.equals(0)) break;
		int max=0;
		for(Integer i=0;i<54;i++){
			for(Integer j=0;j<96;j++){
				tiaojian=f1[i]+f2[j];
				if(tiaojian<=num) max=Math.max(max,tiaojian);
			}
		}
		System.out.println(max);
		}
	}

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



Compiler output:
Main.java:8: error: cannot find symbol
		Scanner n = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class AOJ1224
Main.java:8: error: cannot find symbol
		Scanner n = new Scanner(System.in);
		                ^
  symbol:   class Scanner
  location: class AOJ1224
2 errors
Language: C++

#include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
__128int a[160000],n;
int main(){
  r(j,1e9){
    int t=j*j*j;
    if(t>=160000)break;
    a[t]++;
    r(i,1e9){
      int p=i*(i+1)*(i+2)/6;
      if(p<160000)a[p]++;
      else break;
      if(p+t<160000)a[p+t]++;
    }
  }
  r(i,160000){
    if(a[i])a[i]=i;
    else a[i]=a[i-1];
  }
  while(cin>>n,n) cout<<a[n]<<endl;
}

Compiler output:
a.cc:4:1: error: '__128int' does not name a type
    4 | __128int a[160000],n;
      | ^~~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'a' was not declared in this scope
    9 |     a[t]++;
      |     ^
a.cc:18:8: error: 'a' was not declared in this scope
   18 |     if(a[i])a[i]=i;
      |        ^
a.cc:21:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   21 |   while(cin>>n,n) cout<<a[n]<<endl;
      |              ^
      |              yn
a.cc:21:25: error: 'a' was not declared in this scope
   21 |   while(cin>>n,n) cout<<a[n]<<endl;
      |                         ^