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

#include <stdio.h>
#include <algorithm>
int p[8], c[8] = { 1, 4, 1, 4, 1, 2, 1, 2 };
int main() {
	while(~scanf("%d%d%d%d%d%d%d%d", &p[0], &p[1], &p[2], &p[3], &p[4], &p[5], &p[6], &p[7])) {
		int ret = 999999999;
		for(int i = 0; i < 8; i++) {
			int res = 0;
			for(int j = i; j < i + 8; j++) res += max(p[j - i] - c[j % 8], 0);
			ret = min(ret, res);
		}
		printf("%d\n", ret);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:63: error: 'max' was not declared in this scope; did you mean 'std::max'?
    9 |                         for(int j = i; j < i + 8; j++) res += max(p[j - i] - c[j % 8], 0);
      |                                                               ^~~
      |                                                               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)
      |     ^~~
a.cc:10:31: error: 'min' was not declared in this scope; did you mean 'std::min'?
   10 |                         ret = min(ret, res);
      |                               ^~~
      |                               std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

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

int mery[8] = { 4,1,4,1,2,1,2,1 };
void kaiten() {
	int a = mery[0];
	for (int b = 0; b < 7; b++)mery[b] = mery[b + 1];
	mery[7] = a;
}
int k() {
	int b = 0;
	for (int a : mery) {
		b = b * 10 + a;
	}
	return b;
}
signed main() {
	int a[8];
	while (cin >> a[0]) {
		for (int b = 1; b < 8; b++)cin >> a[b];
		int MIN = INT_MAX;
		int o = 0;
		for (int c = 0; c < 8; c++) {
			kaiten();
			int e = 0;
			for (int d = 0; d < 8; d++) {
				if (a[d] > mery[d])e += a[d] - mery[d];
			}
			if (e < MIN) {
				MIN = e;
				o = k();
			}
			if (e == MIN) {
				o = min(o, k());
			}
		}
		string p = to_string(o);
		for (int q = 0; q < 8; q++) {
			if (q)cout << " ";
			cout << p[q];
		}
		cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:27: error: 'INT_MAX' was not declared in this scope
   25 |                 int MIN = INT_MAX;
      |                           ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    5 | #include<map>
  +++ |+#include <climits>
    6 | using namespace std;
Language: C++

int main()
{
  int a[] = {1,2,1,2,1,4,1,4};
  int p[8],i=0;
  while(cin >> p[(i++)%8])
  {
    if(i%8==0)
    {
      int ans=0, md = 1e5, dist;
      REP(j,8)
      {
        dist = 0;
        REP(k,8) dist+=(p[k]>a[(k+j)%8])?p[k]-a[(k+j)%8]:0;
        if(dist == md)
        {
          int s1=0, s2=0;
          for(int k=0,d=1e7;k<8;k++,d/=10)
          {
            s1 += d*a[(k+ans)%8];
            s2 += d*a[(k+j)%8];
          }
          if(s2 < s1) ans = j;
        }
        if(dist < md)
        {
          md = dist;
          ans = j;
        }
      }
      REP(j,8) printf("%d%s",a[(j+ans)%8],j==7?"\n":" ");
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |   while(cin >> p[(i++)%8])
      |         ^~~
a.cc:10:11: error: 'j' was not declared in this scope
   10 |       REP(j,8)
      |           ^
a.cc:10:7: error: 'REP' was not declared in this scope
   10 |       REP(j,8)
      |       ^~~
Language: C++

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

#define N 8
static const int cap[N] = {4, 1, 4, 1, 2, 1, 2, 1};

int main(){
    int Q[N];
    while( cin >> Q[0] ){
	for ( int i = 1; i < N; i++ ) cin >> Q[i];

	int min = INT_MAX;
	int minv = INT_MAX;
	int start;

	for ( int s = 0; s < N; s++ ){
	    int sum = 0;
	    for ( int i = 0; i < N; i++ ){
		int rem = Q[i] - cap[(i+s)%N];
		if ( rem > 0 ) sum += rem;
	    }
	    int value = 0;
	    int p = 1;
	    for ( int i= N-1; i >= 0; i-- ){
		value += p * cap[(i+s)%N];
		p *= 10;
	    }

	    if ( sum == min ) {
		if ( value < minv ){
		    min = sum;
		    minv = value;
		    start = s;
		}
	    } else if ( sum < min ){
		min = sum;
		minv = value;
		start = s;
	    }
	}

	int j = 0;
	for ( int i = start; i < N + start; i++ ){
	    if ( j ) cout << " ";
	    cout << cap[i%N];
	    j++;
	}
	cout << endl;
    }
}

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

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

#define N 8
static const int cap[N] = {4, 1, 4, 1, 2, 1, 2, 1};

int main(){
    int Q[N];
    while( cin >> Q[0] ){
	for ( int i = 1; i < N; i++ ) cin >> Q[i];

	int min = INT_MAX;
	int minv = INT_MAX;
	int start;

	for ( int s = 0; s < N; s++ ){
	    int sum = 0;
	    for ( int i = 0; i < N; i++ ){
		int rem = Q[i] - cap[(i+s)%N];
		if ( rem > 0 ) sum += rem;
	    }
	    int value = 0;
	    int p = 1;
	    for ( int i= N-1; i >= 0; i-- ){
		value += p * cap[(i+s)%N];
		p *= 10;
	    }

	    if ( sum == min ) {
		if ( value < minv ){
		    min = sum;
		    minv = value;
		    start = s;
		}
	    } else if ( sum < min ){
		min = sum;
		minv = value;
		start = s;
	    }
	}

	int j = 0;
	for ( int i = start; i < N + start; i++ ){
	    if ( j ) cout << " ";
	    cout << cap[i%N];
	    j++;
	}
	cout << endl;
    }
}

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

#include <iostream>

using namespace std;

int main() {

  int p[8];
  int c[8];

  int temp[8]={4,1,4,1,2,1,2,1};
  int men[8];
  int min_men;
  int ans[8];
  long int v[8];
  long int v_men;

  int idx;
  int answer;

  while(cin >> p[0] >> p[1] >> p[2] >> p[3] >> p[4] >> p[5] >> p[6] >> p[7]) {

    for(int i=0;i<8;i++) {

      for(int j=0;j<8;j++) {

	c[(j+i)%8]=temp[j];

      }

      men[i]=0;

      for(int j=0;j<8;j++) {

	men[i]+=max((p[j]-c[j]),0);

      }

      //for(int j=0;j<8;j++) cout << c[j] << " ";

      //cout << endl;

    }
    
    min_men=100000;
    
    for(int j=0;j<8;j++) {

      min_men=min(men[j],min_men);

    }

    idx=0;
    
    for(int j=0;j<8;j++) ans[j]=-1;

    for(int j=0;j<8;j++) {

      if(men[j]==min_men) {

	ans[idx]=j;
	
	idx++;

      }

    }
    //for(int j=0;j<idx;j++) cout << ans[j] << " ";
    //cout << endl;
    for(int j=0;j<8;j++) v[j]=100000000;
      
    for(int j=0;j<8;j++) {

      for(int k=0;k<idx;k++) {

	if(j==ans[k]) {

	  v[j]=10000000*temp[(j+0)%8]+1000000*temp[(j+1)%8]+100000*temp[(j+2)%8]+10000*temp[(j+3)%8]+1000*temp[(j+4)%8]+100*temp[(j+5)%8]+10*temp[(j+6)%8]+temp[(j+7)%8];

	}

      }

    }
    //for(int j=0;j<8;j++) cout << v[j] << " ";
    //cout << endl;
    v_men=100000000;
    
    for(int j=0;j<8;j++) {

      if(v_men>v[j]) {

	v_men=v[j];
	answer=j;
	//cout << v_men << " " << j << endl;
      }

    }

    /cout << answer << endl;

    //for(int i=0;i<8;i++) cout << temp[i] << " ";
    //cout << endl;
      
    for(int i=0;i<8;i++) {

      c[(i+answer)%8]=temp[i];

    }

    for(int i=0;i<8;i++) {

      if(i==0) cout << c[i];

      else cout << " " << c[i];

    }
    
    cout << endl;
    
  }

  return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:99:5: error: expected primary-expression before '/' token
   99 |     /cout << answer << endl;
      |     ^
Language: C++


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<map>
#include<cstdlib>
#include<deque>
using namespace std;
int Jenny[8]={4,1,4,1,2,1,2,1};
vector<int>keys;
vector<int>value;

void t_sort(){
	for(int y=0;y<keys.size()-1;y++)
		for(int x=0;x<keys.size()-1;x++)
			if(value[x]>=value[x+1])
				if(value[x]==value[x+1]&&keys[x]>keys[x+1])
					int t=keys[x]; keys[x]=keys[x+1]; keys[x+1]=t;
				}else{
					int t=value[x]; value[x]=value[x+1]; value[x+1]=t;
					int tk=keys[x]; keys[x]=keys[x+1]; keys[x+1]=tk;
				}
}

string IntToString(int t){
	char cc[100];
	sprintf(cc,"%d",t);
	string ret=cc;
	return ret;
}

int main(){
	int p[8];
	while(cin>>p[0]>>p[1]>>p[2]>>p[3]>>p[4]>>p[5]>>p[6]>>p[7]){
		keys.clear(); value.clear();
		for(int i=0;i<8;i++){
			string tmp="";
			int cost=0;
			for(int x=0;x<8;x++){
				int j_p=x+i>7?(x+i)-8:x+i;
				int t=p[x]-Jenny[j_p];
				tmp+=IntToString(Jenny[j_p]);
				cost+=(t>0?t:0);
			}
			keys.push_back(atoi(tmp.c_str()));
			value.push_back(cost);
		}
		t_sort();
		string res=IntToString(keys[0]);
		for(int x=0;x<res.size();x++){
			cout<<res[x];
			if(x==res.size()-1) cout<<endl;
			else cout<<" ";
		}
	}
}

Compiler output:
a.cc: In function 'void t_sort()':
a.cc:21:61: error: 'x' was not declared in this scope
   21 |                                         int t=keys[x]; keys[x]=keys[x+1]; keys[x+1]=t;
      |                                                             ^
a.cc:21:85: error: 't' was not declared in this scope; did you mean 'tm'?
   21 |                                         int t=keys[x]; keys[x]=keys[x+1]; keys[x+1]=t;
      |                                                                                     ^
      |                                                                                     tm
a.cc: At global scope:
a.cc:22:34: error: expected unqualified-id before 'else'
   22 |                                 }else{
      |                                  ^~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

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

// calc num of passengers
int calc(vector<int> passengers, string s){
	int remain = 0;
	int n;
	for (int i = 0; i < 8; i++) {
		n = passengers[i] - (s[i] - '0');
		n = (n < 0) ? 0 :  n;
		remain += n;
	}
	return remain;
}

// convert string to int if there are same best answers
int getNum(string s, int location){
	return atoi(s.substr(location, 8).c_str());
}

int main(){
	vector<int> passengers;
	int p[8];
	int ans_remain;
	int ans_location;
	int tmp;
	string s = "4121214141212141";
	while (cin >> p[0] >> p[1] >> p[2] >> p[3] >> p[4] >> p[5] >> p[6] >> p[7]) {
		ans_remain = INT_MAX;
		ans_location = -1;
		passengers.clear();
		for (int i = 0; i < 8; i++) {
			passengers.push_back(p[i]);
		}
		for (int i = 0; i < 8; i++) {
			tmp = calc(passengers, s.substr(i, 8)); 
			if(ans_remain > tmp){ // find new best answer
				ans_remain = tmp;
				ans_location = i;
			}else if (ans_remain == tmp) { // same answer
				if (getNum(s, ans_location) > getNum(s, i)) {
					ans_remain = tmp;
					ans_location = i;
				}
			}
		}
		// print ans
		for (int i = 0; i < 7; i++) {
			cout << s[ans_location+i] << " ";
		}
		cout << s[ans_location+7] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:30: error: 'INT_MAX' was not declared in this scope
   33 |                 ans_remain = INT_MAX;
      |                              ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    5 | #include <vector>
  +++ |+#include <climits>
    6 | using namespace std;
Language: C++

#include <iostream>
using namespace std;

int ArrayToInt(const int* arry, int ofs){
	int result;
	result = arry[ofs]*10000000
			+ arry[ofs+1]*1000000
			+ arry[ofs+2]*100000
			+ arry[ofs+3]*10000
			+ arry[ofs+4]*1000
			+ arry[ofs+5]*100
			+ arry[ofs+6]*10
			+ arry[ofs+7];
	return result;
}
 
//0082
int main(){
	const int merry[15] = {1,2,1,2,1,4,1,4,1,2,1,2,1,4,1};
	int human[8] = {0};
	int remain[8] = {0};

	while(1){
		for(int i=0; i<8; ++i){
			cin >> human[i];
			if(cin.eof())break;
		}

		int min_remain = INT_MAX;
		for(int start=0; start<8; ++start){
			for(int i=0; i<8; ++i){
				int t = human[i] - merry[start+i];
				if(t>0){
					remain[start] += t;
				}
			}
			min_remain = ((min_remain < remain[start]) ? min_remain : remain[start]);
		}

		int x;
		int prev = INT_MAX;
		for(int i=0; i<8; ++i){
			if(remain[i] == min_remain){
				int t = ArrayToInt(merry, i);
				if(prev > t){
					prev = t;
					x = i;
				}
			}
		}

		cout << merry[x+0] << " " 
			<< merry[x+1] << " "
			<< merry[x+2] << " "
			<< merry[x+3] << " "
			<< merry[x+4] << " "
			<< merry[x+5] << " "
			<< merry[x+6] << " "
			<< merry[x+7] << endl;

	}
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:34: error: 'INT_MAX' was not declared in this scope
   29 |                 int min_remain = INT_MAX;
      |                                  ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: Java

import java.util.*;

public class AOJ0083{

     static long getHash(int y,int m,int o){
	return (long)(y*10000+m*100+o);
    }


    public static void main(String[] args){
	int Y,M,O;
	Scanner in = new Scanner(System.in);
	long premeiji = getHash(1868,9,7);
	long meiji_u = getHash(1868,9,8),meiji_b = getHash(1912,7,29);
	long taisho_u = getHash(1912,7,30),taisho_b = getHash(1926,12,24);
	long showa_u = getHash(1926,12,25),showa_b = getHash(1989,1,7);
	long heisei = getHash(1989,1,8);


	while(in.hasNext()){
	    Y = in.nextInt();
	    M = in.nextInt();
	    O = in.nextInt();
	    long input = getHash(Y,M,O);
	    if(input <= premeiji)System.out.println("pre-meiji");
	    else if(meiji_u <= input && input <= meiji_b)System.out.println("meiji " + (Y-1867) + " " + M + " " + O);
	    else if(taisho_u <= input && input <= taisho_b)System.out.println("taisho " + (Y-1911) + " " + M + " " + O);
	    else if(showa_u <= input && input <= showa_b)System.out.println("showa " + (Y-1925) + " " + M + " " + O);
	    else if(heisei <= input)System.out.println("heisei " + (Y-1988) + " " + M + " " + O);
	}

    }

}

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

#include<stdio.h>
#include<string.h>
??
int y[9], m[9], d[9], i;
char s[9][20];
??
int main(){
?? ?? strcat(s[0],"pre-meiji");
?? ?? y[1] = 1868; m[1] =  9; d[1] =  8; strcat(s[1], "meiji");
?? ?? y[2] = 1912; m[2] =  7; d[2] = 30; strcat(s[2], "taisho");
?? ?? y[3] = 1926; m[3] = 12; d[3] = 25; strcat(s[3], "showa");
?? ?? y[4] = 1989; m[4] =  1; d[4] =  8; strcat(s[4], "heisei");
?? ?? while (scanf("%d%d%d", &y[0], &m[0], &d[0]) != EOF) {
?? ?? ?? ?? for(i = 4; i >= 0; i--) {
?? ?? ?? ?? ?? ?? if (i == 0) {
				printf("%s\n", s[0]);
				break;
			} else if (y[0]>y[i]) {
?? ?? ?? ?? ?? ?? ?? ?? printf("%s %d %d %d\n", s[i], y[0] - y[i] + 1, m[0], d[0]);
?? ?? ?? ?? ?? ?? ?? ?? break;
?? ?? ?? ?? ?? ?? } else if (y[0] == y[i]) {
?? ?? ?? ?? ?? ?? ?? ?? if (m[0] > m[i]) {
					printf("%s %d %d %d\n", s[i], y[0] - y[i] + 1, m[0], d[0]);
					break;
?? ?? ?? ?? ?? ?? ?? ?? } else if (m[0] == m[i] && d[0] >= d[i]) {
					printf("%s %d %d %d\n", s[i], y[0] - y[i] + 1, m[0], d[0]);
					break;
				}
?? ?? ?? ?? ?? ?? }
?? ?? ?? ?? }
?? ?? }
?? ?? return 0;
}

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
main.c:6:1: error: expected identifier or '(' before '?' token
    6 | ??
      | ^
Language: C++

#include<stdio.h>

void era_transform(int year, int month, int day);

int main(void)
{
 int year, month, day;
 while(scanf("%d %d %d", &year, &month, &day) != EOF) {
 era_transform(year, month, day);
 }
 return 0;
}

void era_transform(int year, int month, int day)
{
 int date_number = year * 10000 + month * 100 + day;
 int meiji_number = 1868 * 10000 + 9 * 100 + 8;
 int taisho_number = 1912 * 10000 + 7 * 100 + 30;
 int showa_number = 1926 * 10000 + 12 * 100 + 25;
 int heisei_number = 1989 * 10000 + 1 * 100 + 8;
 if (date_number < meiji_number) {
     printf("pre-meiji");
 } else if (date_number < taisho_number) {
     printf("meiji %d %d %d\n", year - 1867, month, day);
 } else if (date_number < showa_number) {
     printf("taisho %d %d %d\n", year - 1911, month, day);
 } else if (date_number < heisei_number) {
     printf("showa %d %d %d\n", year - 1925, month, day);
 } else {
　　　printf("heisei %d %d %d\n", year - 1988, month, day);
 }
}

Compiler output:
a.cc:30:1: error: extended character 　 is not valid in an identifier
   30 | 　　　printf("heisei %d %d %d\n", year - 1988, month, day);
      | ^
a.cc:30:1: error: extended character 　 is not valid in an identifier
a.cc:30:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'void era_transform(int, int, int)':
a.cc:30:1: error: '\U00003000\U00003000\U00003000printf' was not declared in this scope
   30 | 　　　printf("heisei %d %d %d\n", year - 1988, month, day);
      | ^~~~~~~~~~~~
Language: C++

#include<stdio.h>

void era_transform(int year, int month, int day);

int main(void)
{
 int year, month, day;
 while(scanf("%d %d %d", &year, &month, &day) != EOF) {
 era_transform(year, month, day);
 }
 return 0;
}

void era_transform(int year, int month, int day)
{
 int date_number = year * 10000 + month * 100 + day;
 int meiji_number = 1868 * 10000 + 9 * 100 + 8;
 int taisho_number = 1912 * 10000 + 7 * 100 + 30;
 int showa_number = 1926 * 10000 + 12 * 100 + 25;
 int heisei_number = 1989 * 10000 + 1 * 100 + 8;
 if (date_number < meiji_number) {
     printf("pre-meiji\n");
 } else if (date_number < taisho_number) {
     printf("meiji %d %d %d\n", year - 1867, month, day);
 } else if (date_number < showa_number) {
     printf("taisho %d %d %d\n", year - 1911, month, day);
 } else if (date_number < heisei_number) {
     printf("showa %d %d %d\n", year - 1925, month, day);
 } else {
　　　printf("heisei %d %d %d\n", year - 1988, month, day);
 }
}

Compiler output:
a.cc:30:1: error: extended character 　 is not valid in an identifier
   30 | 　　　printf("heisei %d %d %d\n", year - 1988, month, day);
      | ^
a.cc:30:1: error: extended character 　 is not valid in an identifier
a.cc:30:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'void era_transform(int, int, int)':
a.cc:30:1: error: '\U00003000\U00003000\U00003000printf' was not declared in this scope
   30 | 　　　printf("heisei %d %d %d\n", year - 1988, month, day);
      | ^~~~~~~~~~~~
Language: C++

#include<stdio.h>
 
void era_transform(int year, int month, int day);
 
int main(void)
{
    int year, month, day;
    while (scanf("%d %d %d", &year, &month, &day) != EOF {
         era_transform(year, month, day);
    }
    return 0;
}
 
void era_transform(int year, int month, int day)
{
    int date_number = year * 10000 + month * 100 + day;
    int meiji_number = 1868 * 10000 + 9 * 100 + 8;
    int taisho_number = 1912 * 10000 + 7 * 100 + 30;
    int showa_number = 1926 * 10000 + 12 * 100 + 25;
    int heisei_number = 1989 * 10000 + 1 * 100 + 8;
    if (date_number < meiji_number) {
        printf("pre-meiji\n");
    } else if (date_number < taisho_number) {
        printf("meiji %d %d %d\n", year - 1867, month, day);
    } else if (date_number < showa_number) {
        printf("taisho %d %d %d\n", year - 1911, month, day);
    } else if (date_number < heisei_number) {
        printf("showa %d %d %d\n", year - 1925, month, day);
    } else {
        printf("heisei %d %d %d\n", year - 1988, month, day);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:58: error: expected ')' before '{' token
    8 |     while (scanf("%d %d %d", &year, &month, &day) != EOF {
      |           ~                                              ^
Language: C++

#include<stdio.h>

int main(){
int x,y,z;
int n1=0,m1=0;

while(scanf("%d %d %d"<&x,&y,&z)!=EOF){
n1=10000*x+100y+z;
if(n1>=19890108)printf("heisei ");
else if(n1>=19261225)printf("showa ");
else if(n1>=19120730)printf("taisho ");
else if(n1>=18680908)printf("meiji ");
else if(n1<18680908)printf("pre-meiji");

if(n1>=18680908)printf("%d %d %d\n",x,y,z);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: comparison between distinct pointer types 'const char*' and 'int*' lacks a cast
    7 | while(scanf("%d %d %d"<&x,&y,&z)!=EOF){
      |             ~~~~~~~~~~^~~
a.cc:7:23: error: cannot convert 'bool' to 'const char*'
    7 | while(scanf("%d %d %d"<&x,&y,&z)!=EOF){
      |             ~~~~~~~~~~^~~
      |                       |
      |                       bool
In file included from a.cc:1:
/usr/include/stdio.h:428:42: note:   initializing argument 1 of 'int scanf(const char*, ...)'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:8:12: error: unable to find numeric literal operator 'operator""y'
    8 | n1=10000*x+100y+z;
      |            ^~~~
Language: C++

#include <stdio.h>

int main(void)
{
    int y, m, d;
    while(1){
        
        scanf("%d %d %d", &y, &m, &d);
        if((y <= 1868)||(y == 1868 && m <= 9)||(y == 1868 && m == 9 && d < 8){
            printf("pre-meiji %d %d %d\n", y+1-1868, m, d);
        }else if((y <= 1912)||(y == 1912 && m <= 7)||(y == 1912 && m == 7 && d < 30){
            printf("meiji %d %d %d\n", y+1-1912, m, d);
        }else if((y <= 1926)||(y == 1926 && m <= 12)||(y == 1926 && m == 12 && d < 15){
            printf("taisho %d %d %d\n", y+1-1926, m, d);
        }else if((y <= 1989)||(y == 1989 && m <= 1)||(y == 1989 && m == 1 && d < 8){
            printf("showa %d %d %d\n", y+1-1989, m, d);
        }else{
    }
    return 0;
}
        
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:78: error: expected ')' before '{' token
    9 |         if((y <= 1868)||(y == 1868 && m <= 9)||(y == 1868 && m == 9 && d < 8){
      |           ~                                                                  ^
      |                                                                              )
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <stdio.h>

int main(void)
{
    int y, m, d;
    while(1){
        
        scanf("%d %d %d", &y, &m, &d);
        if((y <= 1868)||(y == 1868 && m <= 9)||(y == 1868 && m == 9 && d < 8)){
            printf("pre-meiji");
        }else if((y <= 1912)||(y == 1912 && m <= 7)||(y == 1912 && m == 7 && d < 30){
            printf("meiji %d %d %d\n", y+1-1868, m, d);
        }else if((y <= 1926)||(y == 1926 && m <= 12)||(y == 1926 && m == 12 && d < 15){
            printf("taisho %d %d %d\n", y+1-1912, m, d);
        }else if((y <= 1989)||(y == 1989 && m <= 1)||(y == 1989 && m == 1 && d < 8){
            printf("showa %d %d %d\n", y+1-1926, m, d);
        }else{
            printf("heisei %d %d %d\n", y+1-1989, m, d);
        }
    }
    return 0;
}
        
    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:85: error: expected ')' before '{' token
   11 |         }else if((y <= 1912)||(y == 1912 && m <= 7)||(y == 1912 && m == 7 && d < 30){
      |                 ~                                                                   ^
      |                                                                                     )
a.cc:20:5: error: expected primary-expression before '}' token
   20 |     }
      |     ^
Language: C++

#include <stdio.h>
#include <stdbool.h>
 
int judge(int32_t ye, int32_t mo, int32_t da)
{
    int32_t sum = 10000 * ye + 100 * mo + da;
    if (sum < 18680908) {
            printf("pre-meiji\n");
    } else if (sum < 19120730) {
            printf("meiji %d %d %d\n", x - 1867, y, z);
    } else if (sum < 19261225) {
            printf("taisho %d %d %d\n", x - 1911, y, z);
    } else if (sum < 19890108) {
            printf("showa %d %d %d\n", x - 1925, y, z);
    } else {
            printf("heisei %d %d %d\n", x - 1988, y, z);
    }
}
    
    
void main(void)
{
    int32_t ye, mo, da;
    while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {        
        judge(ye, mo, da);
    }
}

Compiler output:
a.cc:4:11: error: 'int32_t' was not declared in this scope
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |           ^~~~~~~
a.cc:3:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <stdbool.h>
  +++ |+#include <cstdint>
    3 | 
a.cc:4:23: error: 'int32_t' was not declared in this scope
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |                       ^~~~~~~
a.cc:4:23: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:4:35: error: 'int32_t' was not declared in this scope
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |                                   ^~~~~~~
a.cc:4:35: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:4:45: error: expression list treated as compound expression in initializer [-fpermissive]
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |                                             ^
a.cc:21:1: error: '::main' must return 'int'
   21 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:23:5: error: 'int32_t' was not declared in this scope
   23 |     int32_t ye, mo, da;
      |     ^~~~~~~
a.cc:23:5: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:24:30: error: 'ye' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                              ^~
a.cc:24:35: error: 'mo' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                                   ^~
a.cc:24:40: error: 'da' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                                        ^~
a.cc:25:14: error: 'judge' cannot be used as a function
   25 |         judge(ye, mo, da);
      |         ~~~~~^~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <stdbool.h>
 
int judge(int32_t ye, int32_t mo, int32_t da)
{
    int32_t sum = 10000 * ye + 100 * mo + da;
    if (sum < 18680908) {
            printf("pre-meiji\n");
    } else if (sum < 19120730) {
            printf("meiji %d %d %d\n", x - 1867, y, z);
    } else if (sum < 19261225) {
            printf("taisho %d %d %d\n", x - 1911, y, z);
    } else if (sum < 19890108) {
            printf("showa %d %d %d\n", x - 1925, y, z);
    } else {
            printf("heisei %d %d %d\n", x - 1988, y, z);
    }
}
    
    
void main(void)
{
    int32_t ye, mo, da;
    while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {   
        scanf ("%d%d%d", &ye, &mo, &da);
        judge(ye, mo, da);
    }
}

Compiler output:
a.cc:4:11: error: 'int32_t' was not declared in this scope
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |           ^~~~~~~
a.cc:3:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <stdbool.h>
  +++ |+#include <cstdint>
    3 | 
a.cc:4:23: error: 'int32_t' was not declared in this scope
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |                       ^~~~~~~
a.cc:4:23: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:4:35: error: 'int32_t' was not declared in this scope
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |                                   ^~~~~~~
a.cc:4:35: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:4:45: error: expression list treated as compound expression in initializer [-fpermissive]
    4 | int judge(int32_t ye, int32_t mo, int32_t da)
      |                                             ^
a.cc:21:1: error: '::main' must return 'int'
   21 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:23:5: error: 'int32_t' was not declared in this scope
   23 |     int32_t ye, mo, da;
      |     ^~~~~~~
a.cc:23:5: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:24:30: error: 'ye' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                              ^~
a.cc:24:35: error: 'mo' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                                   ^~
a.cc:24:40: error: 'da' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                                        ^~
a.cc:26:14: error: 'judge' cannot be used as a function
   26 |         judge(ye, mo, da);
      |         ~~~~~^~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <stdbool.h>
 
void judge(int32_t ye, int32_t mo, int32_t da)
{
    int32_t sum = 10000 * ye + 100 * mo + da;
    if (sum < 18680908) {
        printf("pre-meiji\n");
    } else if (sum < 19120730) {
        printf("meiji %d %d %d\n", x - 1867, y, z);
    } else if (sum < 19261225) {
        printf("taisho %d %d %d\n", x - 1911, y, z);
    } else if (sum < 19890108) {
        printf("showa %d %d %d\n", x - 1925, y, z);
    } else {
        printf("heisei %d %d %d\n", x - 1988, y, z);
    }
}
    
    
void main(void)
{
    int32_t ye, mo, da;
    while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {   
        scanf ("%d%d%d", &ye, &mo, &da);
        judge(ye, mo, da);
    }
}

Compiler output:
a.cc:4:6: error: variable or field 'judge' declared void
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |      ^~~~~
a.cc:4:12: error: 'int32_t' was not declared in this scope
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |            ^~~~~~~
a.cc:3:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <stdbool.h>
  +++ |+#include <cstdint>
    3 | 
a.cc:4:24: error: 'int32_t' was not declared in this scope
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |                        ^~~~~~~
a.cc:4:24: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:4:36: error: 'int32_t' was not declared in this scope
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |                                    ^~~~~~~
a.cc:4:36: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:21:1: error: '::main' must return 'int'
   21 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:23:5: error: 'int32_t' was not declared in this scope
   23 |     int32_t ye, mo, da;
      |     ^~~~~~~
a.cc:23:5: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:24:30: error: 'ye' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                              ^~
a.cc:24:35: error: 'mo' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                                   ^~
a.cc:24:40: error: 'da' was not declared in this scope
   24 |     while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {
      |                                        ^~
a.cc:26:9: error: 'judge' was not declared in this scope
   26 |         judge(ye, mo, da);
      |         ^~~~~
Language: C++

#include <stdio.h>
#include <stdbool.h>
 
void judge(int32_t ye, int32_t mo, int32_t da)
{
    int32_t sum = 10000 * ye + 100 * mo + da;
    if (sum < 18680908) {
        printf("pre-meiji\n");
    } else if (sum < 19120730) {
        printf("meiji %d %d %d\n", x - 1867, y, z);
    } else if (sum < 19261225) {
        printf("taisho %d %d %d\n", x - 1911, y, z);
    } else if (sum < 19890108) {
        printf("showa %d %d %d\n", x - 1925, y, z);
    } else {
        printf("heisei %d %d %d\n", x - 1988, y, z);
    }
}
    
    
void main(void)
{
    int32_t ye, mo, da;
    scanf ("%d%d%d", &ye, &mo, &da);
    while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {   
        judge(ye, mo, da);
    }
}

Compiler output:
a.cc:4:6: error: variable or field 'judge' declared void
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |      ^~~~~
a.cc:4:12: error: 'int32_t' was not declared in this scope
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |            ^~~~~~~
a.cc:3:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <stdbool.h>
  +++ |+#include <cstdint>
    3 | 
a.cc:4:24: error: 'int32_t' was not declared in this scope
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |                        ^~~~~~~
a.cc:4:24: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:4:36: error: 'int32_t' was not declared in this scope
    4 | void judge(int32_t ye, int32_t mo, int32_t da)
      |                                    ^~~~~~~
a.cc:4:36: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:21:1: error: '::main' must return 'int'
   21 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:23:5: error: 'int32_t' was not declared in this scope
   23 |     int32_t ye, mo, da;
      |     ^~~~~~~
a.cc:23:5: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:24:23: error: 'ye' was not declared in this scope
   24 |     scanf ("%d%d%d", &ye, &mo, &da);
      |                       ^~
a.cc:24:28: error: 'mo' was not declared in this scope
   24 |     scanf ("%d%d%d", &ye, &mo, &da);
      |                            ^~
a.cc:24:33: error: 'da' was not declared in this scope
   24 |     scanf ("%d%d%d", &ye, &mo, &da);
      |                                 ^~
a.cc:26:9: error: 'judge' was not declared in this scope
   26 |         judge(ye, mo, da);
      |         ^~~~~
Language: C++

#include <stdio.h>
#include <stdbool.h>
 
void judge(int ye, int mo, int da)
{
    int sum = 10000 * ye + 100 * mo + da;
    if (sum < 18680908) {
        printf("pre-meiji\n");
    } else if (sum < 19120730) {
        printf("meiji %d %d %d\n", x - 1867, y, z);
    } else if (sum < 19261225) {
        printf("taisho %d %d %d\n", x - 1911, y, z);
    } else if (sum < 19890108) {
        printf("showa %d %d %d\n", x - 1925, y, z);
    } else {
        printf("heisei %d %d %d\n", x - 1988, y, z);
    }
}
    
    
void main(void)
{
    int ye, mo, da;
    scanf ("%d%d%d", &ye, &mo, &da);
    while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {   
        judge(ye, mo, da);
    }
}

Compiler output:
a.cc: In function 'void judge(int, int, int)':
a.cc:10:36: error: 'x' was not declared in this scope
   10 |         printf("meiji %d %d %d\n", x - 1867, y, z);
      |                                    ^
a.cc:10:46: error: 'y' was not declared in this scope; did you mean 'ye'?
   10 |         printf("meiji %d %d %d\n", x - 1867, y, z);
      |                                              ^
      |                                              ye
a.cc:10:49: error: 'z' was not declared in this scope
   10 |         printf("meiji %d %d %d\n", x - 1867, y, z);
      |                                                 ^
a.cc:12:37: error: 'x' was not declared in this scope
   12 |         printf("taisho %d %d %d\n", x - 1911, y, z);
      |                                     ^
a.cc:12:47: error: 'y' was not declared in this scope; did you mean 'ye'?
   12 |         printf("taisho %d %d %d\n", x - 1911, y, z);
      |                                               ^
      |                                               ye
a.cc:12:50: error: 'z' was not declared in this scope
   12 |         printf("taisho %d %d %d\n", x - 1911, y, z);
      |                                                  ^
a.cc:14:36: error: 'x' was not declared in this scope
   14 |         printf("showa %d %d %d\n", x - 1925, y, z);
      |                                    ^
a.cc:14:46: error: 'y' was not declared in this scope; did you mean 'ye'?
   14 |         printf("showa %d %d %d\n", x - 1925, y, z);
      |                                              ^
      |                                              ye
a.cc:14:49: error: 'z' was not declared in this scope
   14 |         printf("showa %d %d %d\n", x - 1925, y, z);
      |                                                 ^
a.cc:16:37: error: 'x' was not declared in this scope
   16 |         printf("heisei %d %d %d\n", x - 1988, y, z);
      |                                     ^
a.cc:16:47: error: 'y' was not declared in this scope; did you mean 'ye'?
   16 |         printf("heisei %d %d %d\n", x - 1988, y, z);
      |                                               ^
      |                                               ye
a.cc:16:50: error: 'z' was not declared in this scope
   16 |         printf("heisei %d %d %d\n", x - 1988, y, z);
      |                                                  ^
a.cc: At global scope:
a.cc:21:1: error: '::main' must return 'int'
   21 | void main(void)
      | ^~~~
Language: C++

#include <stdio.h>
#include <stdbool.h>
 
void judge(int ye, int mo, int da)
{
    int sum = 10000 * ye + 100 * mo + da;
    if (sum < 18680908) {
        printf("pre-meiji\n");
    } else if (sum < 19120730) {
        printf("meiji %d %d %d\n", ye - 1867, mo, da);
    } else if (sum < 19261225) {
        printf("taisho %d %d %d\n", ye - 1911, mo, da);
    } else if (sum < 19890108) {
        printf("showa %d %d %d\n", ye - 1925, mo, da);
    } else {
        printf("heisei %d %d %d\n", ye - 1988, mo, da);
    }
}
    
    
void main(void)
{
    int ye, mo, da;
    scanf ("%d%d%d", &ye, &mo, &da);
    while (scanf ("%d%d%d", &ye, &mo, &da) != EOF) {   
        judge(ye, mo, da);
    }
}

Compiler output:
a.cc:21:1: error: '::main' must return 'int'
   21 | void main(void)
      | ^~~~
Language: C++

#include <stdio.h>
int Y, M, D;
bool is_leap(int y) {
	return i % 400 == 0 || (i % 4 == 0 && i % 100 != 0);
}
int count(int y, int m, int d) {
	int ret = 0;
	for(int i = 1; i < y; i++) {
		if(is_leap(i)) ret += 366;
		else ret += 365;
	}
	for(int i = 1; i < m; i++) {
		if(i == 2) ret += (is_leap(y) ? 29 : 28);
		else if(i == 4 || i == 6 || i == 9 || i == 11) ret += 30;
		else ret += 31;
	}
	return ret + d;
}
int main() {
	while(~scanf("%d%d%d", &Y, &M, &D)) {
		if(count(Y, M, D) >= count(1989,  1,  8)) printf("heisei %d %d %d\n", Y - 1988, M, D);
		if(count(Y, M, D) >= count(1926, 12, 25)) printf("heisei %d %d %d\n", Y - 1925, M, D);
		if(count(Y, M, D) >= count(1912,  7, 30)) printf("heisei %d %d %d\n", Y - 1911, M, D);
		if(count(Y, M, D) >= count(1868,  9,  8)) printf("heisei %d %d %d\n", Y - 1867, M, D);
		else printf("pre-meiji\n");
	}
}

Compiler output:
a.cc: In function 'bool is_leap(int)':
a.cc:4:16: error: 'i' was not declared in this scope
    4 |         return i % 400 == 0 || (i % 4 == 0 && i % 100 != 0);
      |                ^
Language: C++

<?php
           
              
			while(fscanf(STDIN, "%d%d%d", $a, $b, $c)){
                if(($a >= 1989 && $b >= 1 && $c >= 8) || ($a >= 1989 && $b >= 2) || ($a >= 1990)) {
                    $a -= 1988;
                    print("heisei $a $b $c\n");
                }
                else{
                    if(($a >= 1926 && $b >= 12 && $c >= 25) || ($a >= 1927)){
                        $a -= 1925;
                        print("showa $a $b $c\n");
                    }
                    else{
                        if(($a >= 1912 && $b >= 7 && $c >= 30) || ($a >= 1912 && $b >= 8) || ($a >= 1913)){
                            $a -= 1911;
                            print("taisho $a $b $c\n");
                        }
                        else{
                            if(($a >= 1868 && $b >= 9 && $c >= 8) || ($a >= 1868 && $b >= 10) || ($a >= 1869)){
                                $a -= 1867;
                                print("meiji $a $b $c\n");
                            }
                            else{
                                print("pre-meiji\n");
                            }
                        }
                    }
                }
        
            }
            
           
		?>

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:34:17: error: expected unqualified-id before '?' token
   34 |                 ?>
      |                 ^
Language: C++

	<?php
           
              
			while(fscanf(STDIN, "%d%d%d", $a, $b, $c)){
                if(($a >= 1989 && $b >= 1 && $c >= 8) || ($a >= 1989 && $b >= 2) || ($a >= 1990)) {
                    $a -= 1988;
                    print("heisei $a $b $c\n");
                }
                else{
                    if(($a >= 1926 && $b >= 12 && $c >= 25) || ($a >= 1927)){
                        $a -= 1925;
                        print("showa $a $b $c\n");
                    }
                    else{
                        if(($a >= 1912 && $b >= 7 && $c >= 30) || ($a >= 1912 && $b >= 8) || ($a >= 1913)){
                            $a -= 1911;
                            print("taisho $a $b $c\n");
                        }
                        else{
                            if(($a >= 1868 && $b >= 9 && $c >= 8) || ($a >= 1868 && $b >= 10) || ($a >= 1869)){
                                $a -= 1867;
                                print("meiji $a $b $c\n");
                            }
                            else{
                                print("pre-meiji\n");
                            }
                        }
                    }
                }
        
            }
            
           
		?>

Compiler output:
a.cc:1:9: error: expected unqualified-id before '<' token
    1 |         <?php
      |         ^
a.cc:34:17: error: expected unqualified-id before '?' token
   34 |                 ?>
      |                 ^
Language: C++

    int y,m,d,now;
    while(cin>>y>>m>>d)
    {
        now = y*10000+m*100+d;
        if(now<m_lb){cout << "pre-meiji"<<endl;continue;}
        if(now<t_lb){cout << "meiji "<<y-1867 << " " <<m<<" "<< d<<endl; continue;}
        if(now<s_lb){cout << "taisho "<<y-1911 << " " <<m<<" "<< d<<endl; continue;}
        if(now<h_lb){cout << "showa "<<y-1925 << " " <<m<<" "<< d<<endl; continue;}
        cout << "heisei "<<y-1988 << " " <<m<<" "<< d<<endl; continue;

    }

    return 0;
}

Compiler output:
a.cc:2:5: error: expected unqualified-id before 'while'
    2 |     while(cin>>y>>m>>d)
      |     ^~~~~
a.cc:13:5: error: expected unqualified-id before 'return'
   13 |     return 0;
      |     ^~~~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: Java

public class Main{
	Scanner sc = new Scanner(System.in);
 
	public static void main(String[] args) {
		new Main();	
	}
 
	public Main() {
		new Base().doIt();
	}
	class Base{
		String[] STR(String a){
			String[] sp1 = a.split("[, .]");
			
			
			return sp1;
		}
		/*
		class Data{
			int x;
			double y;
			public Data(int n,double m) {
				this.x = n;
				this.y = m;
			}
		}
		*/
		void doIt(){
			//整数入力
			String n = sc.next();
			//少数入力
			double m = sc.nextDouble();
			System.out.println(STR(n));
			//
			
		}
	}
}

Compiler output:
Main.java:2: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:2: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main{
    Scanner in = new Scanner(System.in);

    void solve(){
        List<String> list = Arrays.asList(in.nextLine().replaceAll(",|\\."," ").split("[ ]+"));
        System.out.println(String.join(" ", list.stream().filter(s -> 2 < s.length() && s.length() < 7).collect(Collectors.toList())));
    }
    public static void main(String[] args){
        new Main().solve();    
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        System.out.println(String.join(" ", list.stream().filter(s -> 2 < s.length() && s.length() < 7).collect(Collectors.toList())));
                                                                                                                ^
  symbol:   variable Collectors
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public static void main(String[] args) {
    try(Scanner sc = new Scanner(System.in)) {
        while(sc.hasNextLine()){
            String line=sc.nextLine();
            String[] tokens = line.split(“[,. ]“);
            ArrayList<String> list = new ArrayList<>();
            for(String t: tokens) {
                if(t.length() >= 3 && t.length() <= 6) {
                    list.add(t);
                }
            }
            System.out.println(String.join(” “, list.toArray(new String[0])));
        }
    }
}


Compiler output:
Main.java:6: error: illegal character: '\u201c'
            String[] tokens = line.split(?[,. ]?);
                                         ^
Main.java:6: error: illegal character: '\u201c'
            String[] tokens = line.split(?[,. ]?);
                                               ^
Main.java:13: error: illegal character: '\u201d'
            System.out.println(String.join(? ?, list.toArray(new String[0])));
                                           ^
Main.java:13: error: illegal character: '\u201c'
            System.out.println(String.join(? ?, list.toArray(new String[0])));
                                             ^
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:13: error: ';' expected
            System.out.println(String.join(? ?, list.toArray(new String[0])));
                                                                           ^
6 errors
Language: Java

mport java.util.*;
public class Main {
   public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
	       String[] ary = sc.nextLine().split("[ ,\\.]");
	       int i =0;
	       for(String o : ary) {
		   if(i==0)
		       i=1;
		   else
		       System.out.print(" ");
		   System.out.print(o);
	       }
	       System.out.println();
   }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

mport java.util.*;
public class Main {
   public static void main(String[] args) {
       Scanner sc = new Scanner(System.in);
	       String[] ary = sc.nextLine().split("[ ,\\.]");
	       int i=0,j;
	       for(String o : ary) {
		   j=o.length();
		   if(j>2&&j<7){
		   if(i==0)
		       i=1;
		   else
		       System.out.print(" ");
		   System.out.print(o);
		   }
	       }
	       System.out.println();
   }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

mport java.io.*;
public class Main {
   public static void main(String[] args) throws IOException{
       BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
       String tmp = br.readLine();
       int cnt = 0;
       String[] ans = new String[1024];
       char[] s = tmp.toCharArray();
       for(int i=0;i<s.length;i++){
           if(s[i] == ',' || s[i] == '.')  s[i]= ' ';
       }
       tmp = String.valueOf(s);
       String[] data = tmp.split(" ");
       for(int i=0;i<data.length;i++){
           if(data[i].length() > 2 && data[i].length() < 7) {
               ans[cnt] = data[i];
               cnt++;
           }
       }
       for(int i=0;i<cnt;i++){
          if(i == cnt-1) System.out.println(ans[i]);
          else System.out.print(ans[i] + " ");
       }
   }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.io.*;
^
1 error