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

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

using ll = long long;
const int MOD = 1000000007;
#ifdef LOCAL_ENV
    #define debug(var) std::cout<<#var" = "<<var<<std::endl
#else
    #define debug(var)
#endif
#define p(var)  std::cout<<var<<std::endl
#define PI (acos(-1))
#define rep(i, n)   for(int i=0, i##_length=(n); i< i##_length; ++i)
#define repeq(i, n) for(int i=1, i##_length=(n); i<=i##_length; ++i)
#define all(a) (a).begin(), (a).end()
#define pb push_back
inline double isnatural(double a) { return a>=0 && ceil(a)==floor(a); }
template<typename T> inline T gcd(T a, T b) { return b ? gcd(b,a%b) : a; }
template<typename T> inline T lcm(T a, T b) { return a / gcd(a,  b) * b; }
template<typename T1, typename T2>inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template<typename T1, typename T2>inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
template<typename T1, typename T2> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << ", " << p.second << ")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) {
	int len = v.size();
	for (int i = 0; i < len; ++i) {
		s << v[i]; if (i < len - 1) s << "\t";
	}
	return s;
}
template<typename T> ostream& operator<<(ostream& s, const vector< vector<T> >& vv) {
	int len = vv.size();
	for (int i = 0; i < len; ++i) {
		s << vv[i] << endl;
	}
	return s;
}
template<typename T1, typename T2> ostream& operator<<(ostream& s, const map<T1, T2>& m) {
	s << "{" << endl;
	for (typeof(m.begin()) itr = m.begin(); itr != m.end(); ++itr) {
		s << "\t" << (*itr).first << " : " << (*itr).second << endl;
	}
	s << "}" << endl;
	return s;
}

/*-----8<-----8<-----*/


int main(){
    string S;
    cin >> S;

	string a={S[5],S[6]};
  	int i=atoi(a);
  
  	if(i>4)p("TBD");
  	else p("Heisei");
  
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:54:20: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   54 |         int i=atoi(a);
      |                    ^
      |                    |
      |                    std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
using namespace std;
typedef long long ll;
typedef push_back pb;

#define FOR(i, s, e) for (int (i) = (s); (i) < (e); (i)++)

int msin() {
    int A, B, Q; cin >> A >> B >> Q;
    vector<ll> s, t;
    s.pb(-1e18); t.pb(-1e18);
    FOR(i, 0, A) {
        ll x;
        cin >> x;
        s.pb(x);
    }
    s.pb(-s[0]);
    FOR(i, 0, B) {
        ll x;
        cin >> x;
        t.pb(x);
    }
    t.pb(-t[0]);

    FOR(i, 0, Q) {
        int d; cin >> d;
        int r = lower_bound(s.begin(), s.end(), x[i]) - s.begin();
        int l = lower_bound(t.begin(), t.end(), x[i]) - t.begin();

        ll ans = 1e18;
        ans = min(ans, max(s[r], t[l]) - d);
        ans = min(ans, d - min(s[r - 1], t[l - 1]));
        ans = min(ans, 2*s[r] - t[l - 1] - d);
        ans = min(ans, 2*t[l] - s[r - 1] - d);
        ans = min(ans, -2*s[r - 1] + t[l] + d);
        ans = min(ans, -2*t[l - 1] + s[r] + d);
        printf("%lld\n", ans);
    }

}

Compiler output:
a.cc:6:9: error: 'push_back' does not name a type
    6 | typedef push_back pb;
      |         ^~~~~~~~~
a.cc: In function 'int msin()':
a.cc:13:7: error: 'class std::vector<long long int>' has no member named 'pb'
   13 |     s.pb(-1e18); t.pb(-1e18);
      |       ^~
a.cc:13:20: error: 'class std::vector<long long int>' has no member named 'pb'
   13 |     s.pb(-1e18); t.pb(-1e18);
      |                    ^~
a.cc:17:11: error: 'class std::vector<long long int>' has no member named 'pb'
   17 |         s.pb(x);
      |           ^~
a.cc:19:7: error: 'class std::vector<long long int>' has no member named 'pb'
   19 |     s.pb(-s[0]);
      |       ^~
a.cc:23:11: error: 'class std::vector<long long int>' has no member named 'pb'
   23 |         t.pb(x);
      |           ^~
a.cc:25:7: error: 'class std::vector<long long int>' has no member named 'pb'
   25 |     t.pb(-t[0]);
      |       ^~
a.cc:29:49: error: 'x' was not declared in this scope
   29 |         int r = lower_bound(s.begin(), s.end(), x[i]) - s.begin();
      |                                                 ^
a.cc:42:1: warning: no return statement in function returning non-void [-Wreturn-type]
   42 | }
      | ^
Language: C++

Y,M,D = input().split("/")
hantei = True

if int(Y) <= 2019:
    if int(M) <= 4:
        if int(D) <= 30:
            print("Heisei")
            hantei = False

if hantei:
    print("TBD")



Compiler output:
a.cc:1:1: error: 'Y' does not name a type
    1 | Y,M,D = input().split("/")
      | ^
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
#define str string
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
int main(){
  int A,B,C,D;
  char k d;
  str N,N2;
  vector<int>K(3);
  cin>>A>>k>>B>>d>>C;
  if(B<=4)cout<<"Heisei"<<endl;
  else cout<<"TBD"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected initializer before 'd'
   10 |   char k d;
      |          ^
a.cc:13:11: error: 'k' was not declared in this scope
   13 |   cin>>A>>k>>B>>d>>C;
      |           ^
a.cc:13:17: error: 'd' was not declared in this scope
   13 |   cin>>A>>k>>B>>d>>C;
      |                 ^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
using namespace std;

#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}
#define pq_pair_tB priority_queue <pair<ll,ll>, vector<pair<ll,ll> > , greater<pair<ll,ll> > >
#define pq_pair_ts priority_queue <pair<ll,ll> > //第二成分の大きさが関係ない
template<typename X> bool exist(vector<X> vec, X item){return find(all(vec), item)!=vec.end();}
ll gcd(ll a, ll b){if(b==0)return a;return gcd(b,a%b);}
ll lcm(ll a, ll b){return a/gcd(a,b)*b;}
ll power(ll x, ll n){if(n == 0) return 1;return  (n%2)? x*power(x, n-1)%MOD : power(x*x%MOD, n/2);}

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

    stirng s;
    cin >> s;

    ll m = (s[5]-'0') *10 + (s[6]-'0');
    if(m <=4 ) cout << "Heisei" << endl;
    else cout << "TBD" << endl;

    //cout << fixed << setprecision(16) << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: 'stirng' was not declared in this scope
   34 |     stirng s;
      |     ^~~~~~
a.cc:35:12: error: 's' was not declared in this scope
   35 |     cin >> s;
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x,a,b,day;
  day=S.at(8)*10+S.at(9);
  string S;
  cin>>S;
  if(S.at(6)<=4&&day<30)cout<<"Heisei"<<endl;
  else cout<<"TBD"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'S' was not declared in this scope
    5 |   day=S.at(8)*10+S.at(9);
      |       ^
Language: C++

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

int main() {
  int a,b,c;
  strind d,e;
  cin >> a>>d>>b>>e>>c;

  if(b<4){cout <<"Heisei"<<endl;}
  else{cout<<"TBD";}
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'strind' was not declared in this scope; did you mean 'strtod'?
    6 |   strind d,e;
      |   ^~~~~~
      |   strtod
a.cc:7:13: error: 'd' was not declared in this scope
    7 |   cin >> a>>d>>b>>e>>c;
      |             ^
a.cc:7:19: error: 'e' was not declared in this scope
    7 |   cin >> a>>d>>b>>e>>c;
      |                   ^
Language: C

#include<stdio.h>

 int main(){
   int y, m, d;

   scanf("%d/%d/%d", &y, &m &d);
   if(y < 2019){
     printf("Heisei\n");
   }
   else if(y == 2019 && m <= 4){
     printf("Heisei\n");
   }
   else{
     printf("TBD\n");
   }
   return 0;
 }
 


Compiler output:
main.c: In function 'main':
main.c:6:29: error: invalid operands to binary & (have 'int *' and 'int')
    6 |    scanf("%d/%d/%d", &y, &m &d);
      |                          ~~ ^
      |                          |
      |                          int *
Language: C

#include <stdio.h>

int main(void)
{
  		int i;
  		char str[11],a[11]='2019/04/30';
  	
  		for(i=0; i<11; i++){
          if(str[i]<a[i]){
            printf("TBD");
          }else{
            printf("Heisei");
          }
        }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:36: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
    6 |                 char str[11],a[11]='2019/04/30';
      |                                    ^~~~~~~~~~~~
main.c:6:36: error: invalid initializer
Language: C++

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

int main(){
    string in;
    cin >> in;
    vector<string> s;
    int year = stoi(in.substr(0,4));
    int month = stoi(in.substr(5,2));
    int day = stoi(in.substr(8,2));
    bool hei = true;
    if(year > 2020){
        hei = false;
    }
    else if(year == 2019 && month > 4){
        hei = false;
    }
    if(hei){
        cout<< "Heisei"<<endl;
    }
    else{
        cout << "TBD" << endl;
    }
    return 0;
}#include <iostream>
#include <vector>
#include <string>
using namespace std;

int main(){
    string in;
    cin >> in;
    vector<string> s;
    int year = stoi(in.substr(0,4));
    int month = stoi(in.substr(5,2));
    int day = stoi(in.substr(8,2));
    bool hei = true;
    if(year > 2020){
        hei = false;
    }
    else if(year == 2019 && month > 4){
        hei = false;
    }
    if(hei){
        cout<< "Heisei"<<endl;
    }
    else{
        cout << "TBD" << endl;
    }
    return 0;
}

Compiler output:
a.cc:27:2: error: stray '#' in program
   27 | }#include <iostream>
      |  ^
a.cc:27:3: error: 'include' does not name a type
   27 | }#include <iostream>
      |   ^~~~~~~
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main(){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(){
      |     ^~~~
Language: Java

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;


public class Main1 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		
        // Date型変換
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        Date date1=null;
        Date date2=null;
		try {
			date1 = sdf.parse(S);
	        date2 = sdf.parse("2019/04/30");
		} catch (ParseException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
        if(date1.before(date2)) {
        	System.out.println("Heisei");
        }
        else {
            System.out.println("TBD");
        }
	}
}

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

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

int main() {
  
  int y,m,d;
  char c1,c2;
  cin >> y >> c1 >> m >> c2 >> d;
  
  if(m >= 5){
  cout << "TBD" <<endl;
  }
  else{
  cout << "Heisei" endl;
  }
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ';' before 'endl'
   14 |   cout << "Heisei" endl;
      |                   ^~~~~
      |                   ;
Language: C++

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

int main() {
  string S;
  int N;
  cin >> S;
  vector<string> S(10);

  if (S[5] >= 0 && S[6] >= 5){
  cout << "TBD" << endl;
  }
  else if (S[6] <5){
  cout << "Heisei" << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > S'
    8 |   vector<string> S(10);
      |                  ^
a.cc:5:10: note: previous declaration as 'std::string S'
    5 |   string S;
      |          ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  string S;
  int N;
  vector<string> S(10);
  for(int i=0;i<N;i++){
  cin >> S[i];
  }
  
  if (S[5] >= 0 && S[6] >= 5){
  cout << "TBD" << endl;
  }
  else if (S[6] <5){
  cout << "Heisei" << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > S'
    7 |   vector<string> S(10);
      |                  ^
a.cc:5:10: note: previous declaration as 'std::string S'
    5 |   string S;
      |          ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  string S;
  vector<string> S(10);
  for(int i=0;i<N;i++){
  cin >> S[i];
  }
  
  if (S[5] >= 0 && S[6] >= 5){
  cout << "TBD" << endl;
  }
  else if (S[6] <5){
  cout << "Heisei" << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > S'
    6 |   vector<string> S(10);
      |                  ^
a.cc:5:10: note: previous declaration as 'std::string S'
    5 |   string S;
      |          ^
a.cc:7:17: error: 'N' was not declared in this scope
    7 |   for(int i=0;i<N;i++){
      |                 ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  string S;
  vector<sring> S(10);
  for(i=0;i<N;i++){
  cin >> S[i];
  }
  
  if (S[5] >= 0 && S[6] >= 5){
  cout << "TBD" << endl;
  }
  else if (S[6] <5){
  cout << "Heisei" << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'sring' was not declared in this scope
    6 |   vector<sring> S(10);
      |          ^~~~~
a.cc:6:15: error: template argument 1 is invalid
    6 |   vector<sring> S(10);
      |               ^
a.cc:6:15: error: template argument 2 is invalid
a.cc:6:17: error: conflicting declaration 'int S'
    6 |   vector<sring> S(10);
      |                 ^
a.cc:5:10: note: previous declaration as 'std::string S'
    5 |   string S;
      |          ^
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<N;i++){
      |       ^
a.cc:7:13: error: 'N' was not declared in this scope
    7 |   for(i=0;i<N;i++){
      |             ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int yy,mm,dd;
  cin >> yy >> / >> mm >> dd;
  
  if (mm >= 5){
  cout << 'TBD' endl;
  }
  else (mm <=4){
  cout << 'Heisei' endl;


}


Compiler output:
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 |   cout << 'TBD' endl;
      |           ^~~~~
a.cc:12:11: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   12 |   cout << 'Heisei' endl;
      |           ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:16: error: expected primary-expression before '/' token
    6 |   cin >> yy >> / >> mm >> dd;
      |                ^
a.cc:6:18: error: expected primary-expression before '>>' token
    6 |   cin >> yy >> / >> mm >> dd;
      |                  ^~
a.cc:9:16: error: expected ';' before 'endl'
    9 |   cout << 'TBD' endl;
      |                ^~~~~
      |                ;
a.cc:11:16: error: expected ';' before '{' token
   11 |   else (mm <=4){
      |                ^
      |                ;
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include<stdio.h>

int main(void){
  int n,i;
  double x[256],b;
  char u[3];

  scanf("%d",&n);
  for(i=0;i++;i<n){
    scanf("%lf %s",&x,u);
    if(u[0]=='J'){
      b+=x;
    }else{
      x=x*380000.0;
      b+=x;
    }
  }
  printf("%lf",b);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:8: error: invalid operands to binary + (have 'double' and 'double *')
   12 |       b+=x;
      |        ^~~
      |          |
      |          double *
main.c:14:10: error: invalid operands to binary * (have 'double *' and 'double')
   14 |       x=x*380000.0;
      |         ~^
      |         |
      |         double *
main.c:15:8: error: invalid operands to binary + (have 'double' and 'double *')
   15 |       b+=x;
      |        ^~~
      |          |
      |          double *
Language: C

#include<stdio.h>

int main(void){
  int y,m,d;
  scanf("%d/%d/%d",&y,&m,&d);
  if(y<=2019){
      printf("Heisei");
    }else{
      if(m<=4){
        printf("Heisei");
      }else{
        printf("TBD");
            }
    }
  }

  return 0;
}

Compiler output:
main.c:17:3: error: expected identifier or '(' before 'return'
   17 |   return 0;
      |   ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
   18 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  	int S,m;
  	cin >> S;
  	m=(S[5]-'0')*10+S[6]-'0';
  	if (m<=4){
      cout << "Heisei";
    }
  	else{
      cout << "TBD";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: invalid types 'int[int]' for array subscript
    7 |         m=(S[5]-'0')*10+S[6]-'0';
      |             ^
a.cc:7:26: error: invalid types 'int[int]' for array subscript
    7 |         m=(S[5]-'0')*10+S[6]-'0';
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  	int S,m;
  	m=(S[5]-'0')*10+S[6]-'0';
  	if (m<=4){
      cout << "Heisei";
    }
  	else{
      cout << "TBD";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: invalid types 'int[int]' for array subscript
    6 |         m=(S[5]-'0')*10+S[6]-'0';
      |             ^
a.cc:6:26: error: invalid types 'int[int]' for array subscript
    6 |         m=(S[5]-'0')*10+S[6]-'0';
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  	int S,m;
  	m=(S[5]-'0')*10+S[6]-'0';
  	if (m<=4){
      cout "Heisei";
    }
  	else{
      cout << "TBD";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: invalid types 'int[int]' for array subscript
    6 |         m=(S[5]-'0')*10+S[6]-'0';
      |             ^
a.cc:6:26: error: invalid types 'int[int]' for array subscript
    6 |         m=(S[5]-'0')*10+S[6]-'0';
      |                          ^
a.cc:8:11: error: expected ';' before string constant
    8 |       cout "Heisei";
      |           ^~~~~~~~~
      |           ;
Language: C++

#include<stdio.h>

int main (void){
	char S[254],s[256]="2019/04/30",c[4]="1234";
	int v=0;
	scanf("%s",&S);
	if(S[5]=!s[5]){
		printf("TBD");
	}else{
	for( int i=0;i<=3;i++){
		
			if(S[6]==c[i]){
			printf("Heisei");
			break;
		
	
	}
		v++;
	}
	}
	if(v==4){
		printf("TBD");
	}
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:46: error: initializer-string for 'char [4]' is too long [-fpermissive]
    4 |         char S[254],s[256]="2019/04/30",c[4]="1234";
      |                                              ^~~~~~
Language: C++

#include<stdio.h>

int main (void){
	char S[254],s[256]="2019/04/30",c[4]="1234";
	int v=0;
	scanf("%s",&S);
	if(S[5]=!s[5]){
		printf("TBD");
	}else{
	for( int i=0;i<=3;i++){
		
			if(S[6]==c[i]){
			printf("Heisei");
			break;
		
	
	}
		v++;
	}
	}
	if(v==4){
		printf("TBD");
	}
		return 0;
	}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:46: error: initializer-string for 'char [4]' is too long [-fpermissive]
    4 |         char S[254],s[256]="2019/04/30",c[4]="1234";
      |                                              ^~~~~~
Language: C++

#include<stdio.h>

int main (void){
	char S[254],s[256]="2019/04/30",c;
	scanf("%s",&S);
	if(S[4]=!s[4]){
		printf("TBD");
	}else{
	for(int i=1;i>=4;i++){
		c=i;
		if(S[5]==c){
			printf("Heisei");
			break;
		}
	}
	}else{
		printf("TBD");
	}
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'else' without a previous 'if'
   16 |         }else{
      |          ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    
    //入力部
    string S;
    string T = "2019/04/30"; //平成最後の日
    cin >> S;

    //出力部
    for(int i=0;i<=9;i++){
        if(S[i] < T[i])break; //n文字目が`RE_WA`の方が大きいならループを抜ける
        if(S[i] > T[i]){
            cout << "TBD" << endl;
            return 0;
        } //n文字目が`RE_WA`の方が小さいなら"TBD"を返して処理を終了
    }
    cout << "Heisei" << endl;
    return 0

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

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bitset>
using namespace std;

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  char[10] D;
  for(int i = 0;i < 10;i++){
    	cin >> D[i];
  }
  int m = 10*(int)D[5] + (int)D[6];
  if(m > 4) cout << "TBD" << endl;
  else cout << "Heisei" << endl;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: expected identifier before numeric constant
    4 |   char[10] D;
      |        ^~
a.cc:4:8: error: expected ']' before numeric constant
    4 |   char[10] D;
      |        ^~
      |        ]
a.cc:4:7: error: structured binding declaration cannot have type 'char'
    4 |   char[10] D;
      |       ^
a.cc:4:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:4:7: error: empty structured binding declaration
a.cc:4:12: error: expected initializer before 'D'
    4 |   char[10] D;
      |            ^
a.cc:6:16: error: 'D' was not declared in this scope
    6 |         cin >> D[i];
      |                ^
a.cc:8:19: error: 'D' was not declared in this scope
    8 |   int m = 10*(int)D[5] + (int)D[6];
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int y,m,d;
  char a,b;
    cin >> y >> a >> m >> b >> d;
  if (m => 4){
    cout << "TBD" << endl;
  }
  else {
    cout << "Heisei" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before '>' token
    7 |   if (m => 4){
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int y,m,d;
  char a,b
    cin >> y >> a >> m >> b >> d;
  if (m <= 4){
    cout << "TBD" << endl;
  }
  else {
    cout << "Heisei" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> y >> a >> m >> b >> d;
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int y,m,d;
  char a,b
    cin >> y >> a >> m >> b >> d;
  if (m=<4){
    cout << "TBD" << endl;
  }
  else {
    cout << "Heisei" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> y >> a >> m >> b >> d;
      |     ^~~
a.cc:7:9: error: expected primary-expression before '<' token
    7 |   if (m=<4){
      |         ^
Language: C++

#include <iostream>
 using namespace std;
 int main(){
 int y, m, d;
 char c1, c2;
 cin >> y >> c1 >> m >> c2 >> d;
 cout << (m <= 4 ? "Heisei" : "TBD") << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:7:46: error: expected '}' at end of input
    7 |  cout << (m <= 4 ? "Heisei" : "TBD") << endl;
      |                                              ^
a.cc:3:12: note: to match this '{'
    3 |  int main(){
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
char a[10];
int k=0;
while (k<10) {
cin >> a[k];
k=k+1;
}
  
if (a[5]=='0' && a[6]<6) cout << "Heisei"<<endl;
else << "TED" <<endl;

//これでcinもうまいこといっているが、全てTEDになる
  //それはa[6]などが全て整数ではなく、文字として代入されているので
  //a[6]<6がうまいこといっていないと考えられる
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: expected primary-expression before '<<' token
   12 | else << "TED" <<endl;
      |      ^~
Language: C++

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

int main(){
	string s;
	cin >> s;
	if(s[5] == '1' || s[6] == '5' ||s[6] == '6' ||s[6] == '7' ||s[6] == '8' ||s[6] == '9' ||){
		cout << "TBD" << endl;
	}
	else if(s[6] == '4' && s[8] == '3' && s[9] == '1'){
		cout << "TBD" << endl;
	}
	else{
		cout << "Heisei" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:97: error: expected primary-expression before ')' token
    7 |         if(s[5] == '1' || s[6] == '5' ||s[6] == '6' ||s[6] == '7' ||s[6] == '8' ||s[6] == '9' ||){
      |                                                                                                 ^
Language: C

#include <stdio.h>

int main() {
	int y, m, d;
	scanf("%d/%d/%d\n", &y, &m, &d);
	if (y < 2019)printf("Heisei\n");
	else {
		if(y == 2019 && m < 4)printf("Heisei\n");
		else {
			if(y == 2019 && m == 4 && d < 30)printf("Heisei\n");
		}
	}
	else printf("TBD\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'else' without a previous 'if'
   13 |         else printf("TBD\n");
      |         ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <map>
#include <unordered_set>
#include <set>
#include <vector>
#include <cmath>
#include <string>
#include <queue>
#include <list>
#include <stack>
#include <ctime>
#include <random>
#include <bitset>
#include <cstring>
#define speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) 
#define ll long long
#define eps 1e-8
#define inf INT_MAX
using namespace std;

inline int FastI() {
	char c = ' ';
	int ans = 0;
	bool minus = 0;
	while (!isdigit(c)) {
		if (c == '-')
			minus = 1;
		c = _getc_nolock(stdin);
		if (!isdigit(c))
			minus = 0;
	}
	while (isdigit(c)) {
		ans *= 10ll;
		ans += c - '0';
		c = _getc_nolock(stdin);
	}
	return (minus ? -ans : ans);
}

int main() {
	speed;
	int a = FastI(), b = FastI(), c = FastI();
	cout << b * 31 + c;
	if (b * 31 + c <= 154)
		cout << "Heisei";
	else
		cout << "TBD";

}

Compiler output:
a.cc: In function 'int FastI()':
a.cc:30:21: error: '_getc_nolock' was not declared in this scope
   30 |                 c = _getc_nolock(stdin);
      |                     ^~~~~~~~~~~~
a.cc:37:21: error: '_getc_nolock' was not declared in this scope
   37 |                 c = _getc_nolock(stdin);
      |                     ^~~~~~~~~~~~
Language: C++

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


int main(){
  int y,m,d;
  char x,y;
  cin>>y>>x>>m>>y>>d;
  if(y<2019){
    cout << "Heisei" << endl;
    return 0;
  }
  if(y == 2019 && m<5){
    cout << "Heisei" << endl;
    return 0;
  }
  else cout <<"TBD"  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: conflicting declaration 'char y'
    7 |   char x,y;
      |          ^
a.cc:6:7: note: previous declaration as 'int y'
    6 |   int y,m,d;
      |       ^
Language: C++

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

int main() {
    int year, month, day;
    char c1, c2;
    cin >> year >> c1 >> month >> c2 >> day;
    if (month <= 4) {
        cout << "Heisei" << endl;
    } else
    {
        cout << "TBD" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin >> year >> c1 >> month >> c2 >> day;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |         cout << "Heisei" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |         cout << "Heisei" << endl;
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         cout << "TBD" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |         cout << "TBD" << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
    int year, month, day;
    char c1, c2;
    cin >> year >> c1 >> month >> c2 >> day;
    if (month <= 4) {
        cout << "Heisei" << endl
    } else
    {
        cout << "TBD" << endl;
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |     cin >> year >> c1 >> month >> c2 >> day;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |         cout << "Heisei" << endl
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |         cout << "Heisei" << endl
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         cout << "TBD" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |         cout << "TBD" << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
string s,t="2019/05";main(){std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}


Compiler output:
a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'?
    2 | string s,t="2019/05";main(){std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      | ^~~~~~
      | stdin
a.cc:2:22: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | string s,t="2019/05";main(){std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      |                      ^~~~
a.cc: In function 'int main()':
a.cc:2:39: error: 's' was not declared in this scope
    2 | string s,t="2019/05";main(){std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      |                                       ^
a.cc:2:55: error: 't' was not declared in this scope; did you mean 'tm'?
    2 | string s,t="2019/05";main(){std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      |                                                       ^
      |                                                       tm
Language: C++

#include<iostream>
main(){string s,t="2019/05";std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){string s,t="2019/05";std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:8: error: 'string' was not declared in this scope
    2 | main(){string s,t="2019/05";std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      |        ^~~~~~
a.cc:2:8: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:2:39: error: 's' was not declared in this scope
    2 | main(){string s,t="2019/05";std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      |                                       ^
a.cc:2:55: error: 't' was not declared in this scope; did you mean 'tm'?
    2 | main(){string s,t="2019/05";std::cin>>s;std::cout<<(s>t?"TBD":"Heisei");}
      |                                                       ^
      |                                                       tm
Language: C

#include <stdio.h>

int main()
{
    int y,m,d;
    scanf("%d/%d/%d",&y,&m,&d);
    if (y < 2019)
        printf("%s\n","Heisei");
    else if (y > 2019)
        printf("%s\n","TBD");
    else if (m => 4)
        printf("%s\n","TBD");
    else
        printf("%s\n","Heisei");
}
                           

Compiler output:
main.c: In function 'main':
main.c:11:17: error: expected expression before '>' token
   11 |     else if (m => 4)
      |                 ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  
  //年が2019より大きい場合：
  if(s.compare(0,4,"2019")>0)
    cout << "TBD";
   //年が2019より小さい場合：
  if(s.compare(0,4,"2019")<0)
    cout << "Heisei";
   //年が2019の場合：
  if(s.compare(0,4,"2019")==0){
    //月が4より大きい場合：
    if(s.compare(5,2,"04")>0)
      cout << "TBD";
    //月が4より小さい場合：
    if(s.compare(5,2,"04")<0)
      cout << "Heisei";
    //月が4の場合：
    if(s.compare(5,2,"04")==0){
      //日が30より大きい場合：
      if(s.compare(8,2,"30")>0)
        cout << "TBD";
      //日が30より小さい、もしくは同じ場合：
      if(s.compare(8,2,"30")<=0)
        cout << "Heisei"
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:25: error: expected ';' before '}' token
   29 |         cout << "Heisei"
      |                         ^
      |                         ;
   30 |     }
      |     ~
Language: Java

/** Still TBD
  *
  */
object Main extends App {
  final private val DELIMITER = "/"
  val input = io.StdIn.readLine.split(DELIMITER)
  val year = input(0).toInt
  val month = input(1).toInt
  val day = input(2).toInt

  if (year > 2019) println("TBD")
  else if (year == 2019 && month > 5) println("TBD")
  else if (year == 2019 && month == 4 && day > 30) println("TBD")
  else println("heisei")
}


Compiler output:
Main.java:4: error: class, interface, enum, or record expected
object Main extends App {
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
  final private val DELIMITER = "/"
                ^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: ';' expected
  final private val DELIMITER = "/"
                                   ^
3 errors
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
int y, m, d;
char c1, c2;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> y>>c1>>m>>c2>>d;
    if(m==4&&d>30)  cout <<"TBD"<< "\n";
    else if(m==4&&d=<30) cout <<"Heisei"<<"\n";
    else if(m>4) cout <<"TBD"<< "\n";
    else cout <<"Heisei"<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:21: error: expected primary-expression before '<' token
   29 |     else if(m==4&&d=<30) cout <<"Heisei"<<"\n";
      |                     ^
Language: Java

import java.text.*;
import java.util.*;

public class MainJ {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String a = sc.next();//A

        try {
            // 日付1を「A」に設定
            DateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
            Date date1 = sdf.parse(a);
            // 日付2を「2019/4/30」に設定
            Date date2 = sdf.parse("2019/04/30");

            // 2つの日付を比較し、結果によってメッセージを変えます
            int diff = date1.compareTo(date2);
            if (diff > 0) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }

        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
}


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

import java.text.*;
import java.util.*;

public class MainJ {
    public static void main(String[] args) {

        Locale.setDefault(Locale.JAPAN);
        Scanner sc = new Scanner(System.in);
        String a = sc.next();//A

        try {
            // 日付1を「A」に設定
            Date date1 = DateFormat.getDateInstance().parse(a);
            // 日付2を「2019/4/30」に設定
            Date date2 = DateFormat.getDateInstance().parse("2019/04/30");

            // 2つの日付を比較し、結果によってメッセージを変えます
            int diff = date1.compareTo(date2);
            if (diff > 0) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }

        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
}


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

int main()
{
  int y,m,d;
  cin >> y;
  cin.ignore();
  cin >> m;
  cin.ignore();
  cin >> d;
  if (y < 2019) cout << "Heisei" << endl;
  else if (y == 2019) {
    if (m < 4) cout << "Heisei" << endl;
    else if(m == 4) {
      if (d <= 30) cout << "Heisei" << endl;
    }
    else cout << "TBD" << endl;
  }
  else cout << "TBD" << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> y;
      |   ^~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |   if (y < 2019) cout << "Heisei" << endl;
      |                 ^~~~
a.cc:9:37: error: 'endl' was not declared in this scope
    9 |   if (y < 2019) cout << "Heisei" << endl;
      |                                     ^~~~
a.cc:11:16: error: 'cout' was not declared in this scope
   11 |     if (m < 4) cout << "Heisei" << endl;
      |                ^~~~
a.cc:11:36: error: 'endl' was not declared in this scope
   11 |     if (m < 4) cout << "Heisei" << endl;
      |                                    ^~~~
a.cc:13:20: error: 'cout' was not declared in this scope
   13 |       if (d <= 30) cout << "Heisei" << endl;
      |                    ^~~~
a.cc:13:40: error: 'endl' was not declared in this scope
   13 |       if (d <= 30) cout << "Heisei" << endl;
      |                                        ^~~~
a.cc:15:10: error: 'cout' was not declared in this scope
   15 |     else cout << "TBD" << endl;
      |          ^~~~
a.cc:15:27: error: 'endl' was not declared in this scope
   15 |     else cout << "TBD" << endl;
      |                           ^~~~
a.cc:17:8: error: 'cout' was not declared in this scope
   17 |   else cout << "TBD" << endl;
      |        ^~~~
a.cc:17:25: error: 'endl' was not declared in this scope
   17 |   else cout << "TBD" << endl;
      |                         ^~~~
Language: Java

import java.util.Scanner;
import java.util.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class StillTBD {
    public static void main(String[] args) {
        try { 
            Scanner scanner = new Scanner(System.in);
            String input_str = scanner.next();
            scanner.close();
            SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy/MM/dd");
            Date input_date = sdFormat.parse(input_str);
            Date standard_date = sdFormat.parse("2019/04/30");
            if (input_date.compareTo(standard_date) > 0) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }

    StillTBD() {
    }
}


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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

    public void Main() throws IOException {
        Scanner sc = new Scanner(System.in);
        int count = sc.nextInt();
        double x = 0.0;
        String u = "";
        double sum = 0;
        for (int i = 0; i < count; i++) {
            x = sc.nextDouble();
            u = sc.nextLine().trim();
            if (u.equals("JPY")) {
                sum += x;
            } else {
                x = x * 380000.0;
                sum += x;
            }
        }
        System.out.println(sum);

    }

Compiler output:
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
    public void Main() throws IOException {
           ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.*;
import java.text.*;

public class ABC119A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (S.compareTo("2019/04/30") > 0) {
            System.out.println("TBD");
        } else {
            System.out.println("Heisei");
        }
        try {
            Date date1 = DateFormat.getDateInstance().parse(S);
        }
        catch (ParseException e) {
        }
    }
}


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

import java.util.*;
import java.text.*;

public class ABC119A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (S.compareTo("2019/04/30") > 0) {
            System.out.println("TBD");
        } else {
            System.out.println("Heisei");
        }
        try {
            Date date1 = DateFormat.getDateInstance().parse(S);
        }
        catch (ParseException e) {
            System.out.println(e);
        }
    }
}


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

import java.util.*;
import java.text.*;

public class ABC119A {
    public static void main(String[] args) {
        try {
            Scanner sc = new Scanner(System.in);
            String S = sc.nextLine();
            Date date1 = DateFormat.getDateInstance().parse(S);
            if (S.compareTo("2019/04/30") > 0) {
                System.out.println("TBD");
            } else {
                System.out.println("Heisei");
            }
        }
        catch (ParseException e) {
            System.out.println(e);
        }
    }
}


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

import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import java.util.*;

public class Main {
    public static void main (String[] args) {

        try {
            Scanner sc = new Scanner(System.in);
            String a = sc.next();//A
            // 日付1を「A」に設定
            Date date1 = DateFormat.getDateInstance().parse(a);

            // 日付2を「2019/4/30」に設定
            Date date2 = DateFormat.getDateInstance().parse("2019/4/30");

            // 2つの日付を比較し、結果によってメッセージを変えます
            int diff = date1.compareTo(date2);
            if (diff < 0) {
                System.out.println("TBD");
            }
          	else {
                System.out.println("Heisei");

        } catch (ParseException e) {
            System.out.println(e);
        }
    }
}


Compiler output:
Main.java:26: error: 'catch' without 'try'
        } catch (ParseException e) {
          ^
Main.java:9: error: 'try' without 'catch', 'finally' or resource declarations
        try {
        ^
Main.java:30: error: reached end of file while parsing
}
 ^
3 errors
Language: Java

import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import java.util.*;

public class Main {
    public static void main (String[] args) {

        try {
            Scanner sc = new Scanner(System.in);
            String a = sc.next();//A
            // 日付1を「A」に設定
            Date date1 = DateFormat.getDateInstance().parse(a);

            // 日付2を「2019/4/30」に設定
            Date date2 = DateFormat.getDateInstance().parse("2019/4/30");

            // 2つの日付を比較し、結果によってメッセージを変えます
            int diff = date1.compareTo(date2);
            if (diff =< 0) {
                System.out.println("Heisei");
            } else if (diff > 0) {
                System.out.println("TBD");

        } catch (ParseException e) {
            System.out.println(e);
        }
    }
}


Compiler output:
Main.java:20: error: illegal start of type
            if (diff =< 0) {
                        ^
Main.java:20: error: ';' expected
            if (diff =< 0) {
                         ^
Main.java:22: error: 'else' without 'if'
            } else if (diff > 0) {
              ^
Main.java:25: error: 'catch' without 'try'
        } catch (ParseException e) {
          ^
Main.java:9: error: 'try' without 'catch', 'finally' or resource declarations
        try {
        ^
Main.java:29: error: reached end of file while parsing
}
 ^
6 errors