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

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define print(x)cout<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
void main(){
  int m1,m2,d1,d2;
  cin >>m1>>d1>>m2>>d2;
  if(m1 != m2)cout<<1<<Endl;
  else cout<<0<<endl;
  
}

Compiler output:
a.cc:39:1: error: '::main' must return 'int'
   39 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:42:24: error: 'Endl' was not declared in this scope
   42 |   if(m1 != m2)cout<<1<<Endl;
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,s,n) for(ll i = (s); i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()



int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(18);
  
  string s;
  ll a, b, c, d;
  cin >> a>>b>>c>>d;
  
  //vector<ll> a(n);  rep(i, 0, n) cin >> a[i];
  
  //cout << n << "\n";
  
  cout << d==1 << "\n";

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   23 |   cout << d==1 << "\n";
      |              ~ ^~ ~~~~
      |              |    |
      |              int  const char [2]
Language: C++

int main(){
    int a='+' ;
    cout<<a<<endl;
    return 0;
}
これ⬆️を実行すると…うん
int main(){
    char c='P' ;
    cout<<(char)(c+1)<<endl;
    return 0;
}
これ⬆️を実行するとこのナゾ仕様の意味がわかると思う

Compiler output:
a.cc:6:1: error: extended character ⬆ is not valid in an identifier
    6 | これ⬆️を実行すると…うん
      | ^
a.cc:6:1: error: extended character … is not valid in an identifier
a.cc:12:1: error: extended character ⬆ is not valid in an identifier
   12 | これ⬆️を実行するとこのナゾ仕様の意味がわかると思う
      | ^
a.cc: In function 'int main()':
a.cc:3:5: error: 'cout' was not declared in this scope
    3 |     cout<<a<<endl;
      |     ^~~~
a.cc:3:14: error: 'endl' was not declared in this scope
    3 |     cout<<a<<endl;
      |              ^~~~
a.cc: At global scope:
a.cc:6:1: error: '\U00003053\U0000308c\U00002b06\U0000fe0f\U00003092\U00005b9f\U0000884c\U00003059\U0000308b\U00003068\U00002026\U00003046\U00003093' does not name a type
    6 | これ⬆️を実行すると…うん
      | ^~~~~~~~~~~~~~~~~~~~~~
a.cc:12:1: error: '\U00003053\U0000308c\U00002b06\U0000fe0f\U00003092\U00005b9f\U0000884c\U00003059\U0000308b\U00003068\U00003053\U0000306e\U000030ca\U000030be\U00004ed5\U000069d8\U0000306e\U0000610f\U00005473\U0000304c\U0000308f\U0000304b\U0000308b\U00003068\U0000601d\U00003046' does not name a type
   12 | これ⬆️を実行するとこのナゾ仕様の意味がわかると思う
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,N) for (ll i=0;i<N;i++)
#define REP(i,N) for (ll i=1;i<=N;i++)

ll N,M,A,B,C,ANS;
string S,T,U;
double n,m,a,b,c,ans;

int main() {
	cin>>A>>B>>C>>D;
  cout<<(A==C?0:1)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'D' was not declared in this scope
   12 |         cin>>A>>B>>C>>D;
      |                       ^
Language: C++

BEGIN{
}
$1==$3{
	ans = 0
}
$1!=$3{
	ans = 1
}
END{
	print ans
}

Compiler output:
a.cc:1:1: error: 'BEGIN' does not name a type
    1 | BEGIN{
      | ^~~~~
a.cc:3:1: error: '$1' does not name a type
    3 | $1==$3{
      | ^~
a.cc:6:1: error: '$1' does not name a type
    6 | $1!=$3{
      | ^~
a.cc:9:1: error: 'END' does not name a type
    9 | END{
      | ^~~
Language: C++

//int a = stoi(c); 文字列をintへ
//小文字から大文字
//transform(a.begin(), a.end(), a.begin(), ::toupper);
//途中の出力をそのまま残さない
//数値計算 個数以外はdouble
//map<キー,値> p は辞書。p[キー] = 値
//map 全探索
//auto begin = p.begin(), end = p.end();
//for (auto it = begin; it != end; it++) {}
//mapのキー：it->first mapのバリュー：it->second
//絶対値 abs()
//入力は空白で切れる
//大文字判定 isupper(文字) 小文字判定 islower(文字)
//do{}while(next_permutation(ALL(配列)))
//while(N)で回すとき、Nはコピーを作っておく
//小文字に対応する文字コード：S[i] - 'a'
//文字コード→小文字：(char)(数字+'a')
//グラフの距離:隣接行列で扱う
//等価なものに変換する思考
//bool型　初期値はTrue
//島渡りの問題：中間ノードに着目
//配列はvector<>を使う：意味わからないエラーがなくなる。
//背反な事象にちゃんとわける
//チェックリストはマップを使う
//数が大きい時の比較はstring型で行う
//全て0になったか調べたい->0になるたびにcntする
//またはかかつか
//例外処理は最初にする
#include <bits/stdc++.h>
#define rep(i,N) for(int i = 0; i < N;i++)
#define ALL(a) (a).begin(),(a).end()
#define ll long long int
using namespace std;

//円周率
const double PI = 3.14159265358979323846;
//割るやつ
const ll M = (pow(10, 9) + 7);

// K進数でのNの桁数
ll dig(ll N, ll K) {
	ll dig = 0;
	while (N) {
		dig++;
		N /= K;
	}
	return dig;
}
// a,bの最大公約数
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a%b);
}

ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}

//nC2の計算
ll C(ll N) {
	return N * (N - 1) / 2;
}

//階乗計算
ll f(ll n) {
	if (n == 0 || n == 1) return 1;
	else return (n * f(n - 1)) % M;
}

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

	if (abs(c - d) != 1) cout << 1 << endl;
	else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:18: error: expected unqualified-id before ',' token
   72 |         ll a, b, , c, d; cin >> a >> b >> c >> d;
      |                  ^
Language: C

#include <stdio.h>

int main (void)
{
 int m1[3],m2[3];

scanf("%d %d",m1);
scanf("%d %d",m2);

printf("%d",if(m1[0]==m2[0]));

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:13: error: expected expression before 'if'
   10 | printf("%d",if(m1[0]==m2[0]));
      |             ^~
Language: C++

#include<iostream>
using namespace std;
int a,b,c,d;
int main(){
cin>>a>>b>>c>>d;
if(a+1=c)cout<<1<<endl;
else cout<<0<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: lvalue required as left operand of assignment
    6 | if(a+1=c)cout<<1<<endl;
      |    ~^~
Language: C++

#include<iostream>
using namespace std;
int a,b,c,d;
int main(){
cin>>a>>b>>c>>d;
if(a+1=c)cout<<1<<endl;
else cout<<0<,endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: lvalue required as left operand of assignment
    6 | if(a+1=c)cout<<1<<endl;
      |    ~^~
a.cc:7:14: error: expected primary-expression before ',' token
    7 | else cout<<0<,endl;
      |              ^
Language: C++

#include <iosteam>
#include <stdlib.h>

using namespace std;

int main(){
  int m1,m2,d1,d2;
  cin >> m1 >> d1 >> m2 >> d2;
  if(m1 == m2){
    cout << 0 << endl;
    return 0;
  }
  cout << 1 << endl;
  return 0;
}

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

#include <iostream>

using namespace std;

int main(){
    int m1;
    int m2;
    int d1;
    int d2;
    cin >> m1 >> d1;
    cin >> m2 >> d2;
    if(d2 == 1){
        cout << "1" << endl;
    }
    else{
        cout << "0" << endl;
}

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

#include "bits/stdc++.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P,ll> Pll;
typedef pair<P,P> PP;
#define rep(i,a,n) for(ll i = a;i < n;i++)
#define repr(i,a,n) for(ll i = n-1;i >= a;i--)
#define LINF (ll)1e17
#define INF (int)1e9
#define MOD (ll)1e9+7
#define sMOD 1e5
#define fs first
#define sc second

ll gcd(ll a,ll b){
	if(!b) return a;
	return gcd(b,a%b);
	
}

signed main(){
	ll a,b,c,d;
	cin >> a >> b >> c >> d;
	cout << a != c << endl;
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: invalid operands of types 'll' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   26 |         cout << a != c << endl;
      |                      ~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b,c,d;
    cin>>a>>b>>c>>d;。
    if(d==1) cout<<1;
    else cout<<0;
    return 0;
}

Compiler output:
a.cc:5:21: error: extended character 。 is not valid in an identifier
    5 |     cin>>a>>b>>c>>d;。
      |                     ^
a.cc: In function 'int main()':
a.cc:5:21: error: '\U00003002' was not declared in this scope
    5 |     cin>>a>>b>>c>>d;。
      |                     ^~
a.cc:7:5: error: 'else' without a previous 'if'
    7 |     else cout<<0;
      |     ^~~~
Language: C++

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

int main() {
   int M1,D1,M2,D2;
   cin >> M1 >> D1;
   cin >> M2 >> D2;
   if(M1 != M2){
     cout << 1 << endl;
   }
   else{
     cout << 0 << emdl;
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'emdl' was not declared in this scope
   12 |      cout << 0 << emdl;
      |                   ^~~~
Language: C

#include<stdio.h>
int main(){
    int m1,d1;
    int m2,d2;
    
    scanf("%d %d",&m1,&d1);
    scanf("%d %d",&m2,&d2);
    
    if(m1 == m2) printf("1\n");
    else printf("0\n");
    return 0;
}
#include<stdio.h>
int main(){
    int m1,d1;
    int m2,d2;
    
    scanf("%d %d",&m1,&d1);
    scanf("%d %d",&m2,&d2);
    
    if(m1 == m2) printf("0\n");
    else printf("1\n");
    return 0;
}
提出情報


Compiler output:
main.c:14:5: error: redefinition of 'main'
   14 | int main(){
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int()'
    2 | int main(){
      |     ^~~~
main.c:25:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   25 | 提出情報
      | ^~~~~~~~
Language: C++

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

int main() {
    int m1,d1,m2,d2;
    cin >> m1 >> d1 >> m2 >> d2;
    if(d2 == d1+1){
        cout << 0l
    }
    else{
        cout << 1;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before '}' token
    8 |         cout << 0l
      |                   ^
      |                   ;
    9 |     }
      |     ~
Language: C++

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

int main() {
  int m1, m2, d1, d2;
  cin >> m1 >> d1;
  cin >> m2 >> d2;

  cout << m1 != m2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << m1 != m2 << endl;
      |                 ~~~^~~~~~~
Language: C++

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

int main()
{
  int m,d;
  cin >> m >> d;
  inf p,q;
  cin >> p >> q;
  if(m==p)
    cout << 0 << endl;
  else
    cout << 1 << endl;
  exit(0)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'inf' was not declared in this scope; did you mean 'ynf'?
    9 |   inf p,q;
      |   ^~~
      |   ynf
a.cc:10:10: error: 'p' was not declared in this scope
   10 |   cin >> p >> q;
      |          ^
a.cc:10:15: error: 'q' was not declared in this scope
   10 |   cin >> p >> q;
      |               ^
a.cc:15:10: error: expected ';' before '}' token
   15 |   exit(0)
      |          ^
      |          ;
   16 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  int N, D, N, A;
  cin >> M >> D >> N >> A;
  if(N != M)cout << 1 << endl;
  else cout << 0 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: redeclaration of 'int N'
    4 |   int N, D, N, A;
      |             ^
a.cc:4:7: note: 'int N' previously declared here
    4 |   int N, D, N, A;
      |       ^
a.cc:5:10: error: 'M' was not declared in this scope
    5 |   cin >> M >> D >> N >> A;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b,c;

int main(){
	cin>>a>>b>>c;
  cout<<a(!=c);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before '!=' token
    7 |   cout<<a(!=c);
      |           ^~
a.cc:7:14: error: 'a' cannot be used as a function
    7 |   cout<<a(!=c);
      |              ^
Language: C++

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

int main() {
	int a, b;
	cin >> a >> b;
	cin >> a >> b;
  　if (b == 1) {
		cout << 1 <<endl; 
   	} else {
		cout << 0 <<endl;
    }
}


Compiler output:
a.cc:8:3: error: extended character 　 is not valid in an identifier
    8 |   　if (b == 1) {
      |   ^
a.cc: In function 'int main()':
a.cc:8:3: error: '\U00003000if' was not declared in this scope
    8 |   　if (b == 1) {
      |   ^~~~
a.cc:10:11: error: 'else' without a previous 'if'
   10 |         } else {
      |           ^~~~
Language: C++

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

int main() {
	int m1, m2, d1, d2;
	cin >> m1 >> d1 >> m2 >> d;
	if (m1 != m2) puts("1");
	else puts("0");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: 'd' was not declared in this scope; did you mean 'd2'?
    6 |         cin >> m1 >> d1 >> m2 >> d;
      |                                  ^
      |                                  d2
Language: Java

import java.util.Scanner;

public static class Main {
    public static int main(String[] args) {
        String[][] month_and_day = {
            {"1", "31"},
            {"2", "28"},
            {"3", "31"},
            {"4", "30"},
            {"5", "31"},
            {"6", "30"},
            {"7", "31"},
            {"8", "31"},
            {"9", "30"},
            {"10", "31"},
            {"11", "30"},
            {"12", "31"}
        };

        String[] m1d1;
        String[] m2d2;
        int ret = 0;

        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        m1d1 = str.split(" ");

        str = scan.nextLine();
        m2d2 = str.split(" ");

        for (int i = 0; i < month_and_day.length; i++) {
            if (m1d1[0].equals(month_and_day[i][0]) && m1d1[1].equals(month_and_day[i][1])) {
                if (m2d2[0].equals(month_and_day[i + 1][0]) && m2d2[1].equals(month_and_day[i + 1][1])) {
                    ret = 1;
                    break;
                }
            }
        }

        return ret;

    }
}

Compiler output:
Main.java:3: error: modifier static not allowed here
public static class Main {
              ^
1 error
Language: Java

import java.util.Scanner;

public static class Main {
    public static void main(String[] args) {
        String[][] month_and_day = {
            {"1", "31"},
            {"2", "28"},
            {"3", "31"},
            {"4", "30"},
            {"5", "31"},
            {"6", "30"},
            {"7", "31"},
            {"8", "31"},
            {"9", "30"},
            {"10", "31"},
            {"11", "30"},
            {"12", "31"}
        };

        String[] m1d1;
        String[] m2d2;
        int ret = 0;

        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        m1d1 = str.split(' ');

        str = scan.nextLine();
        m2d2 = str.split(' ');

        for (int i = 0; i < month_and_day.length; i++) {
            if (m1d1[0].equals(month_and_day[i][0]) && m1d1[1].equals(month_and_day[i][1])) {
                if (m2d2[0].equals(month_and_day[i + 1][0]) && m2d2[1].equals(month_and_day[i + 1][1])) {
                    ret = 1;
                    break;
                }
            }
        }

        return ret;

    }
}

Compiler output:
Main.java:3: error: modifier static not allowed here
public static class Main {
              ^
Main.java:26: error: incompatible types: char cannot be converted to String
        m1d1 = str.split(' ');
                         ^
Main.java:29: error: incompatible types: char cannot be converted to String
        m2d2 = str.split(' ');
                         ^
Main.java:40: error: incompatible types: unexpected return value
        return ret;
               ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a[2][2];
  for(int i-0;i<2;i++)
  {
    for(int j=0;j<2;j++)
    {
      cin>>a[i][j];
    }
  }
  if(a[0][0]==1)
  {
    if(a[0][1]==31)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==2)
  {
    if(a[0][1]==28)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==3)
  {
    if(a[0][1]==31)
      cout<<"1";
    else
      cout<<"0";
  }
   if(a[0][0]==4)
  {
    if(a[0][1]==30)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==5)
  {
    if(a[0][1]==31)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==6)
  {
    if(a[0][1]==30)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==7)
  {
    if(a[0][1]==31)
      cout<<"1";
    else
      cout<<"0";
  }
 else  if(a[0][0]==8)
  {
    if(a[0][1]==31)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==9)
  {
    if(a[0][1]==30)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==10)
  {
    if(a[0][1]==31)
      cout<<"1";
    else
      cout<<"0";
  }
 else  if(a[0][0]==11)
  {
    if(a[0][1]==30)
      cout<<"1";
    else
      cout<<"0";
  }
  else if(a[0][0]==12)
  {
    if(a[0][1]==31)
      cout<<"1";
    else
      cout<<"0";
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before '-' token
    6 |   for(int i-0;i<2;i++)
      |            ^
      |            ;
a.cc:6:18: error: expected ')' before ';' token
    6 |   for(int i-0;i<2;i++)
      |      ~           ^
      |                  )
a.cc:6:19: error: 'i' was not declared in this scope
    6 |   for(int i-0;i<2;i++)
      |                   ^
a.cc:96:4: error: expected '}' at end of input
   96 |   }
      |    ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<iostream>
usimg namespace std;
int main(){
	int M1,D1,M2,D2;
	cin>>M1>>D1>>M2>>D2;
  	if(M1==M2)
		cout<<0;
  	else
      	cout<<1;
}

Compiler output:
a.cc:2:1: error: 'usimg' does not name a type
    2 | usimg namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>M1>>D1>>M2>>D2;
      |         ^~~
      |         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:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                 cout<<0;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout<<1;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main(){
  int a; cin>>a>>a>>a>>a;
  if(a==1)cout<<1<<endl;
  else cout<<0<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected '}' at end of input
    7 |   else cout<<0<<endl;
      |                      ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

Scanner sc = new Scanner(System.in);
int n = sc.nextInt()
  System.println(n);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner sc = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:2: error: ';' expected
int n = sc.nextInt()
                    ^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define pi acos(-1.0)
// 21837
string gen()
{
    return to_string(i);

}
int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int t,m1,d1,m2,d2;
    cin>>m1>>d1;
    cin>>m2>>d2;

    if(d2==1)
        cout<<1<<endl;
    else
        cout<<0<<endl;

    return 0;
}



Compiler output:
a.cc: In function 'std::string gen()':
a.cc:8:22: error: 'i' was not declared in this scope; did you mean 'pi'?
    8 |     return to_string(i);
      |                      ^
      |                      pi
Language: C++

#include <iostream>

int main(void) {
  int m1,d1,m2,d2;
  cin >> m1 >> d1 >> m2 >> d2;
  if(m1!=m2) {
    cout << "1" << endl;
  }else {
    cout << "0" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> m1 >> d1 >> m2 >> d2;
      |   ^~~
      |   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:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << "1" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     cout << "1" << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << "0" << 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:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout << "0" << 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 <bits/stdc++.h>
    using namespace std;
     
    int main() {    	
		int M1,D1,M2,D2;
    	cin >> M1 >> D1 >> M2 >>D2;
    	
    	if (M1 == M2){
    		cout << 1 << endl;
    	}
    	else {
    		cout << 0 << endl;
    	
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected '}' at end of input
   14 |     }
      |      ^
a.cc:4:16: note: to match this '{'
    4 |     int main() {
      |                ^
Language: C++

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

int main(){
  int M1, D1, M2, M2, D2;
  cin >> M1 >> D1;
  cin >> M2 >> D2;
  
  if ( M1 == M2 ){
    cout << 0 << endl;
  }
  else{
    cout <<1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: redeclaration of 'int M2'
    5 |   int M1, D1, M2, M2, D2;
      |                   ^~
a.cc:5:15: note: 'int M2' previously declared here
    5 |   int M1, D1, M2, M2, D2;
      |               ^~
Language: Java

public class Main{
	
	public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);	
      	int m1 = sc.nextInt();
      	int d1 = sc.nextInt();
      	int m2= sc.nextInt();
      	int d2 = sc.nextInt();
      if(m1==m2)
        System.out.println("0");
      else if(d2-d1<0)
        System.out.println("1");
    
    }
}

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

public class Main{
	
	public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);	
      	int m1 = sc.nextInt();
      	int d1 = sc.nextInt();
      	int m2= sc.nextInt();
      	int d2 = sc.nextInt();
      if(m1==m2)
        System.out.println("0");
      else if(d2-d1<0)
        System.out.println("1");
    
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main{
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
int main(){
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  if(d==1){
    cout<<1;
  }
  else cout<<0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>a>>b>>c>>d;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout<<1;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   else cout<<0;
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <fstream> //ofstream
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int m1,m2,d1,d2;


void solve(){
        if(m1!=m2&&d1+1!=d2) {
                cout<<1<<endl;
        }else{
                cout<<0<<endl;
        }
}

int main(){
        cin>>m1>>d1>>m2>>d2;

        solve();
        return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream> // cout, endl, cin
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
 
public class Main {
  
    private static final int MAX_INPUT_LIMIT_COUNT = 2;
 
    private static final int YEAR = 2019;
 
    private static final int ARR_INDEX_MONTH = 0;
    private static final int ARR_INDEX_DAY = 1;
  
  public static void main(String[] args) {
    
    List<String> inputList = null;
    
 		try {
          List<String> inputList = readInputList();
        } catch(IOException e) {
          e.printStackTrace();
          return;
        }
        
 
        byte maxDayFlag = 0;
 
        int[] arr = readYearAndMonth(inputList.get(0));
 
        Calendar cal = convertCalender(arr);
        if (cal.getActualMaximum(Calendar.DAY_OF_MONTH) == arr[ARR_INDEX_DAY])
            maxDayFlag = 1;
 
        System.out.println(maxDayFlag);
  }
 
    private static List<String> readInputList() throws IOException {
 
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
 
            List<String> inputList = new ArrayList<>();
 
            for (int i = 0; i < MAX_INPUT_LIMIT_COUNT; i++) {
                inputList.add(br.readLine());
            }
 
            return inputList;
    }
 
    private static int[] readYearAndMonth(String inputStr) {
        int[] yearAndMonthArr = new int[2];
        String[] strArr = inputStr.split("\\s");
 
        yearAndMonthArr[ARR_INDEX_MONTH] = Integer.valueOf(strArr[ARR_INDEX_MONTH]);
        yearAndMonthArr[ARR_INDEX_DAY] = Integer.valueOf(strArr[ARR_INDEX_DAY]);
 
        return yearAndMonthArr;
    }
 
    private static Calendar convertCalender(int[] yearAndMonthArr) {
        return new Calendar.Builder()
                .setLenient(true)
                .set(Calendar.YEAR, YEAR)
                .set(Calendar.MONTH, yearAndMonthArr[ARR_INDEX_MONTH] - 1)
                .set(Calendar.DAY_OF_MONTH, yearAndMonthArr[ARR_INDEX_DAY])
                .build();
    }
 
}

Compiler output:
Main.java:22: error: variable inputList is already defined in method main(String[])
          List<String> inputList = readInputList();
                       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
 
public class Main {
  
    private static final int MAX_INPUT_LIMIT_COUNT = 2;
 
    private static final int YEAR = 2019;
 
    private static final int ARR_INDEX_MONTH = 0;
    private static final int ARR_INDEX_DAY = 1;
  
  public static void main(String[] args) {
    
 		try {
          List<String> inputList = readInputList();
        } catch(IOException e) {
          e.printStackTrace();
        }
        
 
        byte maxDayFlag = 0;
 
        int[] arr = readYearAndMonth(inputList.get(0));
 
        Calendar cal = convertCalender(arr);
        if (cal.getActualMaximum(Calendar.DAY_OF_MONTH) == arr[ARR_INDEX_DAY])
            maxDayFlag = 1;
 
        System.out.println(maxDayFlag);
  }
 
    private static List<String> readInputList() throws IOException {
 
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
 
            List<String> inputList = new ArrayList<>();
 
            for (int i = 0; i < MAX_INPUT_LIMIT_COUNT; i++) {
                inputList.add(br.readLine());
            }
 
            return inputList;
    }
 
    private static int[] readYearAndMonth(String inputStr) {
        int[] yearAndMonthArr = new int[2];
        String[] strArr = inputStr.split("\\s");
 
        yearAndMonthArr[ARR_INDEX_MONTH] = Integer.valueOf(strArr[ARR_INDEX_MONTH]);
        yearAndMonthArr[ARR_INDEX_DAY] = Integer.valueOf(strArr[ARR_INDEX_DAY]);
 
        return yearAndMonthArr;
    }
 
    private static Calendar convertCalender(int[] yearAndMonthArr) {
        return new Calendar.Builder()
                .setLenient(true)
                .set(Calendar.YEAR, YEAR)
                .set(Calendar.MONTH, yearAndMonthArr[ARR_INDEX_MONTH] - 1)
                .set(Calendar.DAY_OF_MONTH, yearAndMonthArr[ARR_INDEX_DAY])
                .build();
    }
 
}

Compiler output:
Main.java:28: error: cannot find symbol
        int[] arr = readYearAndMonth(inputList.get(0));
                                     ^
  symbol:   variable inputList
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
 
public class Main {
  
    private static final int MAX_INPUT_LIMIT_COUNT = 2;
 
    private static final int YEAR = 2019;
 
    private static final int ARR_INDEX_MONTH = 0;
    private static final int ARR_INDEX_DAY = 1;
  
  public static void main(String[] args) {
 
        List<String> inputList = readInputList();
 
        byte maxDayFlag = 0;
 
        int[] arr = readYearAndMonth(inputList.get(0));
 
        Calendar cal = convertCalender(arr);
        if (cal.getActualMaximum(Calendar.DAY_OF_MONTH) == arr[ARR_INDEX_DAY])
            maxDayFlag = 1;
 
        System.out.println(maxDayFlag);
  }
 
    private static List<String> readInputList() throws IOException {
 
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
 
            List<String> inputList = new ArrayList<>();
 
            for (int i = 0; i < MAX_INPUT_LIMIT_COUNT; i++) {
                inputList.add(br.readLine());
            }
 
            return inputList;
    }
 
    private static int[] readYearAndMonth(String inputStr) {
        int[] yearAndMonthArr = new int[2];
        String[] strArr = inputStr.split("\\s");
 
        yearAndMonthArr[ARR_INDEX_MONTH] = Integer.valueOf(strArr[ARR_INDEX_MONTH]);
        yearAndMonthArr[ARR_INDEX_DAY] = Integer.valueOf(strArr[ARR_INDEX_DAY]);
 
        return yearAndMonthArr;
    }
 
    private static Calendar convertCalender(int[] yearAndMonthArr) {
        return new Calendar.Builder()
                .setLenient(true)
                .set(Calendar.YEAR, YEAR)
                .set(Calendar.MONTH, yearAndMonthArr[ARR_INDEX_MONTH] - 1)
                .set(Calendar.DAY_OF_MONTH, yearAndMonthArr[ARR_INDEX_DAY])
                .build();
    }
 
}

Compiler output:
Main.java:19: error: unreported exception IOException; must be caught or declared to be thrown
        List<String> inputList = readInputList();
                                              ^
1 error
Language: C++

#include<iostream>
#include<vector>

int main()
{
 	int m1, d1, m2, d2;
  
  	cin << m1 << d1 << m2 << d2;
  
  	if(m1 != m2)
      cout << '1';
  	else
      cout << '0';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin << m1 << d1 << m2 << d2;
      |         ^~~
      |         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:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |       cout << '1';
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |       cout << '0';
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdlib.h>
#include <cmath>
#include <numeric>
#include <functional>
#include <stack>
#include <map>


int main() {
	long long a, b, c, d;

	std::cin >> a >> b >> c >> d;

	if (b > d) {
		std::cout << 1 << std::endl;
	}
	else {
		std::cout << 0 << std::endl
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:44: error: expected ';' before '}' token
   22 |                 std::cout << 0 << std::endl
      |                                            ^
      |                                            ;
   23 |         }
      |         ~
Language: C++

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

int main() {
  int m,n,a;
  cin >> m >> n;
  a = 0;
  switch (m) {
    case 2:
      if(n == 28) 
        a = 1;
      break;
    case 4:
    case 6:
    case 9:
    case 11:
      if(n == 30) 
        a = 1;
      break;
    
    default:
      if(n == 31) 
        a = 1;
      break;
  cout << a << endl;
}

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

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

int main() {
  int m,n,a;
  cin >> m >> n;
  a = 0;
  switch (m) {
    case 2:
      if(n == 28) a = 1;
      break;
    case 4:
    case 6:
    case 9:
    case 11:
      if(n == 30) a = 1;
      break;
    
    default:
      if(n == 31) a = 1;
      break;
  cout << a << endl;
}

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

#include<stdio.h>
int main(void)
{
    int m1,m2,d1,d2;

  scanf("%d %d",&m1,&m2;
  scanf("%d %d",&d1,&d2;
//  printf("flag1\n");
  if(d2-d1==1)printf("0\n");
  else printf("1\n");

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:24: error: expected ')' before ';' token
    6 |   scanf("%d %d",&m1,&m2;
      |        ~               ^
      |                        )
main.c:13:1: error: expected declaration or statement at end of input
   13 | }
      | ^
Language: C

#include <stdio.h>
int main() {
	int m1, d1,m2,d2;
	scanf_s("%d\n", &m1);
	scanf_s("%d\n", &d1);
	scanf_s("%d\n", &m2);
	scanf_s("%d\n", &d2);
	if (d2 = 1) printf("%d\n", 1);
	else printf("%d\n", 0);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |         scanf_s("%d\n", &m1);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>

using namespace std;

int main() {
  int M1, D1, M2, D2;
  cin >> M1 >> D1;
  cin >> M2 >> D2;  
  M1 != M2 ? cout << 1 << endl; : cout << 0 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: expected ':' before ';' token
    9 |   M1 != M2 ? cout << 1 << endl; : cout << 0 << endl;
      |                               ^
      |                               :
a.cc:9:31: error: expected primary-expression before ';' token
a.cc:9:33: error: expected primary-expression before ':' token
    9 |   M1 != M2 ? cout << 1 << endl; : cout << 0 << endl;
      |                                 ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
using namespace std; 
typedef long long lint;
vector <string> vec[];

int main(){
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	if(a!=c)cout<<"1";
	else
	{
		cout<<"0";
	}
	

	return 0;
}


Compiler output:
a.cc:5:17: error: array size missing in 'vec'
    5 | vector <string> vec[];
      |                 ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  int a.b.c.d;
  cin >> a>>b>>c>>d;
  if(a != c){
    cout << 1 << endl;
  }else{
    cout << 0 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected initializer before '.' token
    6 |   int a.b.c.d;
      |        ^
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a>>b>>c>>d;
      |          ^
a.cc:7:13: error: 'b' was not declared in this scope
    7 |   cin >> a>>b>>c>>d;
      |             ^
a.cc:7:16: error: 'c' was not declared in this scope
    7 |   cin >> a>>b>>c>>d;
      |                ^
a.cc:7:19: error: 'd' was not declared in this scope
    7 |   cin >> a>>b>>c>>d;
      |                   ^
Language: C++

//   _/                _/                 _/_/_/   _/
//_/_/_/_/   _/_/   _/_/_/_/   _/_/    _/       _/_/
// _/     _/    _/   _/     _/    _/  _/_/_/     _/
//_/     _/    _/   _/     _/    _/  _/    _/   _/
// _/_/   _/_/       _/_/   _/_/      _/_/     _/
#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
const double pi=acos(-1);
int main() {
  cin.tie(0),cout.tie(0);
  ios::sync_with_stdio(false);
  int m,n,k,a,b,c,d,J[1005][1005]={},O[1005][1005]={},I[1005][1005]={};
  char c[1005][1005]={};
  cin >> m >> n >> k;
  for(int i=1 i<=m; i++) {
    for(int j=1 j<=n; j++) {
      cin >> c[i][j];
      if(c[i][j]=='J') {
        J[i][j]=1;
      }
      else if(c[i][j]=='O') {
        O[i][j]=1;
      }
      else {
        I[i][j]=1;
      }
    }
  }
  for(int i=1; i<=m; i++) {
    for(int j=1; j<=n; j++) {
      J[i][j]+=J[i-1][j]+J[i][j-1];
    }
  }
  for(int i=1; i<=m; i++) {
    for(int j=1; j<=n; j++) {
      O[i][j]+=O[i-1][j]+O[i][j-1];
    }
  }
  for(int i=1; i<=m; i++) {
    for(int j=1; j<=n; j++) {
      I[i][j]+=I[i-1][j]+I[i][j-1];
    }
  }
  for(int i=0; i<k; i++) {
    cin >> a >> b >> c >> d;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:8: error: conflicting declaration 'char c [1005][1005]'
   22 |   char c[1005][1005]={};
      |        ^
a.cc:21:17: note: previous declaration as 'int c'
   21 |   int m,n,k,a,b,c,d,J[1005][1005]={},O[1005][1005]={},I[1005][1005]={};
      |                 ^
a.cc:24:14: error: expected ';' before 'i'
   24 |   for(int i=1 i<=m; i++) {
      |              ^~
      |              ;
a.cc:25:16: error: expected ';' before 'j'
   25 |     for(int j=1 j<=n; j++) {
      |                ^~
      |                ;
a.cc:26:15: error: invalid types 'int[int]' for array subscript
   26 |       cin >> c[i][j];
      |               ^
a.cc:27:11: error: invalid types 'int[int]' for array subscript
   27 |       if(c[i][j]=='J') {
      |           ^
a.cc:30:16: error: invalid types 'int[int]' for array subscript
   30 |       else if(c[i][j]=='O') {
      |                ^
a.cc:56:2: error: expected '}' at end of input
   56 | }
      |  ^
a.cc:18:12: note: to match this '{'
   18 | int main() {
      |            ^
Language: Java

import java.util.Scanner;
class Main{
    public stsatic void main(String[] args){
        Scanner sc = new Scanner(System.in);

        //入力を受け取る
        int M1 = sc.nextInt();
        int D1 = sc.nextInt();
        int M2 = sc.nextInt();
        int D2 = sc.nextInt();

        answer(M1,M2);

        public static void answer(int A, int B){
            if(A==B){
                System.out.println(1);
            }else{
                Sytsem.out.println(0);
            }
        }
}

Compiler output:
Main.java:3: error: <identifier> expected
    public stsatic void main(String[] args){
                  ^
Main.java:14: error: illegal start of expression
        public static void answer(int A, int B){
        ^
2 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;
 
int main() {
	ll a, b, c, d;
	cin >> a >> b >> c >> d;
	cout << (d == 1 ? 1 : 0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'll' was not declared in this scope
    6 |         ll a, b, c, d;
      |         ^~
a.cc:7:16: error: 'a' was not declared in this scope
    7 |         cin >> a >> b >> c >> d;
      |                ^
a.cc:7:21: error: 'b' was not declared in this scope
    7 |         cin >> a >> b >> c >> d;
      |                     ^
a.cc:7:26: error: 'c' was not declared in this scope
    7 |         cin >> a >> b >> c >> d;
      |                          ^
a.cc:7:31: error: 'd' was not declared in this scope
    7 |         cin >> a >> b >> c >> d;
      |                               ^
Language: C++

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

int main(){
    int m1,d1,m2,d2;
    cin >> m1 >> d1 >> m2 >> d2;
    if(m2==m1+1 and d2=1){
        cout << 1 <<  endl;
    } else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: lvalue required as left operand of assignment
   10 |     if(m2==m1+1 and d2=1){
      |        ~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
int main(){
  int m1,d1;
  cin>>m1>>d1;
  int m2,d2;
  cin>>m2>>d2;
  if(d2==1)cout<<1;
  else
    cout<<0;
 return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>m1>>d1;
      |   ^~~
      |   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:7:12: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(d2==1)cout<<1;
      |            ^~~~
      |            std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<0;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>
using UL = unsigned;
using LL = long long;
using ULL = unsigned long long;
#define rep(i, n) for(int i = 0; i < (n); i++)
void Solve(){
  UL m1,n1;cin >> m1 >> n1;
  UL m2,n2;cin >> m2 >> n2;
  if(m1 != m2) cout << 1 << endl;
  else cout << 0 << endl;
}
int main(){ Solve(); return 0; }

Compiler output:
a.cc: In function 'void Solve()':
a.cc:7:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   UL m1,n1;cin >> m1 >> n1;
      |            ^~~
      |            std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:9:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   if(m1 != m2) cout << 1 << endl;
      |                ^~~~
      |                std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   if(m1 != m2) cout << 1 << endl;
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   else cout << 0 << 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:10:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   else cout << 0 << endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;

public class main {

	public static void main(String[] args) {

		Scanner  first= new Scanner (System.in);
		String M1 = first.next();

		Scanner  second= new Scanner (System.in);
		String M2 = second.next();

		System.out.println(M1+M2);

		if(M1.equals(M2)) {
			System.out.println("0");
		}else{
			System.out.println("1");
		}
	}

}

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