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

 import java.io.*;
import java.util.*;
import java.lang.*;
import java.awt.*;
import java.awt.geom.*;
import java.math.*;
import java.text.*;
import java.math.BigInteger.*;
import java.util.Arrays; 

public class   Atcodertest
{
  BufferedReader in;
  StringTokenizer as;
  int nums[],nums2[];
  int[] nums1[];
  boolean con = true;
 
  ArrayList < Integer >  ar = new ArrayList < Integer >();
  ArrayList < Integer >  fi = new ArrayList < Integer >();
  Map<Integer,Integer > map = new HashMap<Integer, Integer>();
  public static void main (String[] args)
  {
    new Atcodertest  ();
  }
  
  public int GCD(int a, int b) {
    if (b==0) return a;
    return GCD(b,a%b);
  }
  
  
  
  
  
  public Atcodertest  ()
  {
    try
    {
      
      in = new BufferedReader (new InputStreamReader (System.in));
     String a = nextLine();
     int b = Integer.parseInt(a.substring(0,2));
     int c = Integer.parseInt(a.substring(2));
     if(b == 0 || c == 0)
       System.out.println("NA");
     else if(b <= 12 && c <= 12)
       System.out.println("AMBIGUOUS");
     else if(b <= 12)
       System.out.println("MMYY");
     else if(c <= 12)
       System.out.println("YYMM");
     else
       System.out.println("NA");
      
    }
    catch(IOException e)
    {

    }
  }
  
  
  
  
  
  
  
  String next () throws IOException
  {
    while (as == null || !as.hasMoreTokens ())
    {
      as = new StringTokenizer (in.readLine ().trim ());
    }
    
    
    return as.nextToken ();
  }
  
  
  
  long nextLong () throws IOException
  {
    return Long.parseLong (next ());
  }
  
  
  int nextInt () throws IOException
  {
    return Integer.parseInt (next ());
  }
  
  
  double nextDouble () throws IOException
  {
    return Double.parseDouble (next ());
  }
  
  
  String nextLine () throws IOException
  {
    return in.readLine ().trim ();
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  cin >> a;
  
  int b, c;
  b = a/100;
  c = a%100;
 
  if ( 1 <= b && b <= 12 ) {
    if ( 1 <= c && c <= 12 ) {
      cout << "AMBIGUOUS" << endl;
    }
    else {
    cout << "MMYY" << endl;
    } 
  }
  else if ( 1 <= c && c <= 12 ) {
    cout << "YYMM" << endl;
  }
  else {
    cout << "NA" << endl;
  }


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int num;
  cin>>num;
  
  int num1=num/100;
  int num2=num%100;
  
  int flag1=0;
  int flag2=0;
  
  if(num1>=01 && num1<=12 && num2>=1)
    flag1=1;
  
  if(num2>=01 && num2<=12 && num1>=1)
    flag2=1;
  
  if(flag1 && flag2)
    cout<<"AMBIGUOUS"<<endl;
  else
    if(flag1==0 && flag2==1)
    cout<<"YYMM"<<endl;
  else
    if(flag1==1 && flag2==0
       cout<<"MMYY"<<endl;
    else
       cout<<"NA<<endl;
}

Compiler output:
a.cc:29:14: warning: missing terminating " character
   29 |        cout<<"NA<<endl;
      |              ^
a.cc:29:14: error: missing terminating " character
   29 |        cout<<"NA<<endl;
      |              ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:26:28: error: expected ';' before 'cout'
   26 |     if(flag1==1 && flag2==0
      |                            ^
      |                            ;
   27 |        cout<<"MMYY"<<endl;
      |        ~~~~                 
a.cc:28:5: error: expected primary-expression before 'else'
   28 |     else
      |     ^~~~
a.cc:27:27: error: expected ')' before 'else'
   27 |        cout<<"MMYY"<<endl;
      |                           ^
      |                           )
   28 |     else
      |     ~~~~                   
a.cc:26:7: note: to match this '('
   26 |     if(flag1==1 && flag2==0
      |       ^
a.cc:30:1: error: expected primary-expression before '}' token
   30 | }
      | ^
Language: C++

#pragma GCC optimize("O3")

#include "bits/stdc++.h"

using namespace std;

typedef long long ll;
typedef pair<int, int> pi;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for(int i = 0; i < (a); ++i)
#define pb push_back
#define sz size
#define f first
#define s second

int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int S;

    cin >> S:

    int first = S / 100;
    int second = S - (S / 100) * 100;

    if (first > 12 && second > 12)
        cout << "NA";
    else if (first > 12 && second <= 12)
        cout << "YYMM";
    else if (first <= 12 && second > 12)
        cout << "MMYY";
    else
        cout << "AMBIGUOUS";


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected ';' before ':' token
   25 |     cin >> S:
      |             ^
      |             ;
a.cc:30:9: error: 'first' was not declared in this scope
   30 |     if (first > 12 && second > 12)
      |         ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int S;
    cin >> S;
    int head = S/100,tail = S%100;
    bool YYMM=(1<=tail&&tail<=12);
    bool MMYY=(1<=head&&head<=12);
    if (YYMM){
        if(MMYY){
            puts("AMBIGUOUS");
        }
        else{
            puts("YYMM");
        }
    }
    else{
        if(MMYY){
            puts("MMYY");
        }
        else{
            puts("NA");
        }
    }

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int s;
  int l=s/100;'
  int r=s%100;
  if(1<=l && l<=12)
  {
    if(1<=r && r<=12)
      cout<<"AMBIGUOUS";
      else 
        cout<<"MMYY";
  }
  else
  {
    if(1<=r && r<=12)
      cout<<"YYMM";
    else 
      cout<<"NA";
  }
}
     

Compiler output:
a.cc:6:15: warning: missing terminating ' character
    6 |   int l=s/100;'
      |               ^
a.cc:6:15: error: missing terminating ' character
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int s,low1=01,low2=00,high1=12,high2=99;
  cin>>s;
  if(low1<(s[0]&&s[1])<high1 && low2<(s[2]&&s[3])<high2)
    cout<<"MMYY";
  else if(low1<(s[2]&&s[3])<high1 && low2<(s[0]&&s[1])<high2)
    cout<<"YYMM";
  else if(low1||low2<(s[0]&&s[1])<high1||high2)
    cout<<"AMBIGUOUS";
  else 
    cout<<"NA";
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: invalid types 'int[int]' for array subscript
    7 |   if(low1<(s[0]&&s[1])<high1 && low2<(s[2]&&s[3])<high2)
      |             ^
a.cc:7:19: error: invalid types 'int[int]' for array subscript
    7 |   if(low1<(s[0]&&s[1])<high1 && low2<(s[2]&&s[3])<high2)
      |                   ^
a.cc:7:40: error: invalid types 'int[int]' for array subscript
    7 |   if(low1<(s[0]&&s[1])<high1 && low2<(s[2]&&s[3])<high2)
      |                                        ^
a.cc:7:46: error: invalid types 'int[int]' for array subscript
    7 |   if(low1<(s[0]&&s[1])<high1 && low2<(s[2]&&s[3])<high2)
      |                                              ^
a.cc:9:18: error: invalid types 'int[int]' for array subscript
    9 |   else if(low1<(s[2]&&s[3])<high1 && low2<(s[0]&&s[1])<high2)
      |                  ^
a.cc:9:24: error: invalid types 'int[int]' for array subscript
    9 |   else if(low1<(s[2]&&s[3])<high1 && low2<(s[0]&&s[1])<high2)
      |                        ^
a.cc:9:45: error: invalid types 'int[int]' for array subscript
    9 |   else if(low1<(s[2]&&s[3])<high1 && low2<(s[0]&&s[1])<high2)
      |                                             ^
a.cc:9:51: error: invalid types 'int[int]' for array subscript
    9 |   else if(low1<(s[2]&&s[3])<high1 && low2<(s[0]&&s[1])<high2)
      |                                                   ^
a.cc:11:24: error: invalid types 'int[int]' for array subscript
   11 |   else if(low1||low2<(s[0]&&s[1])<high1||high2)
      |                        ^
a.cc:11:30: error: invalid types 'int[int]' for array subscript
   11 |   else if(low1||low2<(s[0]&&s[1])<high1||high2)
      |                              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int S,L,R;
  in>>S;
  L=S/100;
  R=S%100;
  if(L>=1&&L<=12){
    if(R>=1&&R<=12)cout<<"AMBIGUOUS"<<endl;
    else cout<<"MMYY"<<endl;
  }else{
    if(R>=1&&R<=12)cout<<"YYMM"<<endl;
    else cout<<"MA"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'in' was not declared in this scope; did you mean 'yn'?
    5 |   in>>S;
      |   ^~
      |   yn
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
string S="ABCD";
  for(int i=0;i<S.size();i++){
    cin>>S.at(i);
  }
  if(S.at(0)*10+S.at(1)<=12){
    if(S.at(2)*10+S.at(3)<=12){
      cout<<"ANBIGUOUS"<<endl;
    else{
      cout<<"MMYY"<<endl;
    }
    }
    if(S.at(2)*10+S.at(3)>12){
      if(S.at(0)*10+S.at(1)<=12){
        cout<<"YYMM"<<endl;
      }
      else{
        cout<<"NA"<<endl;
      }
    }
  }
  
        
      
      

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected '}' before 'else'
   12 |     else{
      |     ^~~~
a.cc:10:31: note: to match this '{'
   10 |     if(S.at(2)*10+S.at(3)<=12){
      |                               ^
Language: C++

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

const long long N = 1e6 + 17;
ll cnt, ans, lnt, n, l1, x, y, a[N];
pair<ll,ll>pr[N];
vector<ll>v,v2,v3;
map<ll,ll>mp;
bool used[N];
vector<string>sv;

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    char c1, c2 ,c3 , c4;
    cin >> c1 >> c2 >> c3 >> c4;
    if(c3 == '0')
    {
        t2 = false;
    }
    if(c1 == '1' and c2 != '1' and c2 != '2' and c2 != '0')
    {
        t2 = false;
    }
    if(c1 == '0')
    {
        t1 = false;
    }
    if(c3 == '1' and c4 != '1' and c4 != '2' and c4 != '3')
    {
        t1 = false;
    }
    if(t1 == true and t2 == false)
    {
        cout << "YYMM";
    }
    if(t1 == false and t2 == true)
    {
        cout << "MMYY";
    }
    if(t1 == true and t2 == true)   
    {
        cout << "AMBIGUOUS";
    }
    if(t1 == false and t2 == false)
    {
        cout << "NA";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 't2' was not declared in this scope; did you mean 'c2'?
   22 |         t2 = false;
      |         ^~
      |         c2
a.cc:26:9: error: 't2' was not declared in this scope; did you mean 'c2'?
   26 |         t2 = false;
      |         ^~
      |         c2
a.cc:30:9: error: 't1' was not declared in this scope; did you mean 'c1'?
   30 |         t1 = false;
      |         ^~
      |         c1
a.cc:34:9: error: 't1' was not declared in this scope; did you mean 'c1'?
   34 |         t1 = false;
      |         ^~
      |         c1
a.cc:36:8: error: 't1' was not declared in this scope; did you mean 'c1'?
   36 |     if(t1 == true and t2 == false)
      |        ^~
      |        c1
a.cc:36:23: error: 't2' was not declared in this scope; did you mean 'c2'?
   36 |     if(t1 == true and t2 == false)
      |                       ^~
      |                       c2
a.cc:40:8: error: 't1' was not declared in this scope; did you mean 'c1'?
   40 |     if(t1 == false and t2 == true)
      |        ^~
      |        c1
a.cc:40:24: error: 't2' was not declared in this scope; did you mean 'c2'?
   40 |     if(t1 == false and t2 == true)
      |                        ^~
      |                        c2
a.cc:44:8: error: 't1' was not declared in this scope; did you mean 'c1'?
   44 |     if(t1 == true and t2 == true)
      |        ^~
      |        c1
a.cc:44:23: error: 't2' was not declared in this scope; did you mean 'c2'?
   44 |     if(t1 == true and t2 == true)
      |                       ^~
      |                       c2
a.cc:48:8: error: 't1' was not declared in this scope; did you mean 'c1'?
   48 |     if(t1 == false and t2 == false)
      |        ^~
      |        c1
a.cc:48:24: error: 't2' was not declared in this scope; did you mean 'c2'?
   48 |     if(t1 == false and t2 == false)
      |                        ^~
      |                        c2
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n;cin>>n;
  top=n/100;
  bot=n-top*100;
  
  if(top!=0&&top<=12){
    if(bot!=0&&bot<=12){
      cout<<"AMBIGUOUS"<<endl;
    }else{
      cout<<"MMYY"<<endl;
    }
  }else{
    if(bot!=0&&bot<=12){
      cout<<"YYMM"<<endl;
    }else{
      cout<<"NA"<<endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'top' was not declared in this scope
    6 |   top=n/100;
      |   ^~~
a.cc:7:3: error: 'bot' was not declared in this scope
    7 |   bot=n-top*100;
      |   ^~~
Language: C++

#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdlib>
#include <utility>
#include <cstdio>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <map>

using ll = long long;
using itn = int;
using namespace std;


int main() {
	int s;
	cin >> s;
	int p = s / 100;
	int q = s % 100;
	if (p <= 12 && p > 0) {
		if (q <= 12 && q > 0) {
			cout << "AMBITIOUS" << endl;
		}
		else if{
			cout << "MMYY";
		}
	}
	if (p > 12 || p == 0) {
		if (q <= 12 && q > 0) {
			cout << "YYMM" << endl;
		}
		else if{
			cout << "NA" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:24: error: expected '(' before '{' token
   30 |                 else if{
      |                        ^
      |                        (
a.cc:38:24: error: expected '(' before '{' token
   38 |                 else if{
      |                        ^
      |                        (
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <map>

using namespace std;

int main()
{
    int S;
    cin >> S;
    int Left = S / 100;
    int Right = S % 100;
    if(1 <= Left && Left <= 12){
       if(1 <= Right && Right <= 12) cout << "AMBIGUOUS" << endl;
       else cout << "MMYY" << endl;
    }
    else
    {
       if(1<=Right && Right<=12) cout << "YYMM" << endl;
       else cout << "NA" << endl;
    }

    }
}

Compiler output:
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include <stdio.h>

typedef unsigned char   u1;
typedef unsigned short  u2;
typedef unsigned long   u4;
typedef signed char     s1;
typedef signed short    s2;
typedef signed long     s4;

#define IN_SIZE 4U
#define OUT_SIZE 10U

int main (void)
{
    u2 u2In;
    u2 u2Upper, u2Lower;
    const unsigned char *strOut;

    scanf("%d", &u2In);
    u2Upper = u2In / 100U;
    u2Lower = u2In - u2Upper * 100U;

    if (0U < u2Upper && u2Upper < 13U)
    {
        // MMYY?
        if (0U < u2Lower && u2Lower < 13U)
        {
            strOut = "AMBIGUOUS";
        }
        else
        {
            strOut = "MMYY";
        }
    }
    else
    {
        // YYMM?
        if (0U < u2Lower && u2Lower < 13U)
        {
            strOut = "YYMM";
        }
        else
        {
            strOut = "NA";
        }
    }

    printf("%s\n", strOut);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: invalid conversion from 'const char*' to 'const unsigned char*' [-fpermissive]
   28 |             strOut = "AMBIGUOUS";
      |                      ^~~~~~~~~~~
      |                      |
      |                      const char*
a.cc:32:22: error: invalid conversion from 'const char*' to 'const unsigned char*' [-fpermissive]
   32 |             strOut = "MMYY";
      |                      ^~~~~~
      |                      |
      |                      const char*
a.cc:40:22: error: invalid conversion from 'const char*' to 'const unsigned char*' [-fpermissive]
   40 |             strOut = "YYMM";
      |                      ^~~~~~
      |                      |
      |                      const char*
a.cc:44:22: error: invalid conversion from 'const char*' to 'const unsigned char*' [-fpermissive]
   44 |             strOut = "NA";
      |                      ^~~~
      |                      |
      |                      const char*
Language: C++

#include <stdio.h>

typedef unsigned char   u1;
typedef unsigned short  u2;
typedef unsigned long   u4;
typedef signed char     s1;
typedef signed short    s2;
typedef signed long     s4;

#define IN_SIZE 4U
#define OUT_SIZE 10U

int main (void)
{
    u2 u2In;
    u2 u2Upper, u2Lower;
    unsigned char *strOut;

    scanf("%d", &u2In);
    u2Upper = u2In / 100U;
    u2Lower = u2In - u2Upper * 100U;

    if (0U < u2Upper && u2Upper < 13U)
    {
        // MMYY?
        if (0U < u2Lower && u2Lower < 13U)
        {
            strOut = "AMBIGUOUS";
        }
        else
        {
            strOut = "MMYY";
        }
    }
    else
    {
        // YYMM?
        if (0U < u2Lower && u2Lower < 13U)
        {
            strOut = "YYMM";
        }
        else
        {
            strOut = "NA";
        }
    }

    printf("%s\n", strOut);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: invalid conversion from 'const char*' to 'unsigned char*' [-fpermissive]
   28 |             strOut = "AMBIGUOUS";
      |                      ^~~~~~~~~~~
      |                      |
      |                      const char*
a.cc:32:22: error: invalid conversion from 'const char*' to 'unsigned char*' [-fpermissive]
   32 |             strOut = "MMYY";
      |                      ^~~~~~
      |                      |
      |                      const char*
a.cc:40:22: error: invalid conversion from 'const char*' to 'unsigned char*' [-fpermissive]
   40 |             strOut = "YYMM";
      |                      ^~~~~~
      |                      |
      |                      const char*
a.cc:44:22: error: invalid conversion from 'const char*' to 'unsigned char*' [-fpermissive]
   44 |             strOut = "NA";
      |                      ^~~~
      |                      |
      |                      const char*
Language: C++


#include <bits/stdc++.h>
using namespace std;
int main(){
  int S;
  cin >> S;

  if (S / 100 <= 12 && S % 100 <= 12) cout << "AMBIGUOS"
  else if(S / 100 <= 12 && S % 100 > 12) cout << "MMYY"
  else if(S / 100 > 12 && S % 100 <= 12) cout << "YYMM"
  else cout << "NA";
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:57: error: expected ';' before 'else'
    8 |   if (S / 100 <= 12 && S % 100 <= 12) cout << "AMBIGUOS"
      |                                                         ^
      |                                                         ;
    9 |   else if(S / 100 <= 12 && S % 100 > 12) cout << "MMYY"
      |   ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int s;
  scanf("%d",&a);
  int L=a/100;
  int R=a%100;
  if(1<=L && L<=12){
      if(1<=R && R<=12){
        cout << "AMBIGUOUS" << endl;
      }else{
        cout << "MMYY" << endl;
      }
  }
  else if(1<=R && R<=12){
    cout << "YYMM" << endl;
  }else{
    cout << "NA" << endl;
  }
  return 0;
}
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'a' was not declared in this scope
    5 |   scanf("%d",&a);
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
  cin>>s;
  int x=s[0]-'0';
  int y=s[1]-'0';
  int n=10*x+y;
  int a=s[0]-'0';
  int b=s[1]-'0';
  int c=10*x+y;
  if(n<=12&&n>0)
  {
    	if(c>=12&&c>0)
          	cout<<"AMBIGUOUS";
    	else if(c==0)
          	cout<<"NA";
    	else
          	cout<<"MMYY";
  }
	else if(n==0)
      	cout<<"NA";
  else
  {
	if(c>=12&&c>0)
      	cout<<"YYMM";
    else if(c==0)
      	cout<<"NA";
    else
      	cout<<"NA";
  }

  }
  
}

Compiler output:
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  bool p1=false;
  bool p2=false;

  if(n/1000==1 && n/100<3){
    p2=true;
    if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
      p1=true;
    }else if(n/10==0){
      p1=true;
    }

  }else if(n/1000==0){
     p2=true;
     if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
        p1=true;
     }else   if(n/10==0){
       p1=true;
    }
  }


 if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
   p1=true;
 }else if(n/10==0){
   p1=true;
 }

 if(p1==true && p2=true){
     cout << "AMBIGUOUS"<<endl;
 }else if (p1==false && p2==true){
     cout <<"MMYY"<<endl;
 }else if(p1==true && p2==false){
  cout << "YYMM"<< endl;
  }else{
  cout << "NA"<< endl;
  }
 
  
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:14: error: lvalue required as left operand of assignment
   37 |  if(p1==true && p2=true){
      |     ~~~~~~~~~^~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  int A = (s[0] - '0')*10 + (s[1] - '0');
  int B = (s[2] - '0')*10 + (s[3] - '0');
  bool YYMM = (1<= B && B <= 12);
  bool MMYY = (1<= A && A <= 12);
  if (YYMM) {
	if (MMYY) {
      cout << "AMBIGUOUS" << endl;
    } else {
      cout << "YYMM" << endl;
    }
  } else {
	if (MMYY) {
      cout << "MMYY" << endl;
    } else {
      cout << "NA" << endl;
    }
  }
    

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

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

int main(){
  int n;
  cin >> n;
  bool p1=false;
  bool p2=false;

  if(n/1000==1 && n/100<3){
    p2=true;
    if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
      p1=true;
    }else if(n/10==0){
      p1=true;
    }

  }else if(n/1000==0){
     p2=true;
     if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
        p1=true;
     }else   if(n/10==0){
       p1=true;
    }
  }


 if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
   p1=true;
 }else if(n/10==0){
   p1=true;
 }

 if(p1==true && p2=true){
     cout << "AMBIGUOUS"<<endl;
 }else if (p1==false && p2=true){
     cout <<"MMYY"<<endl;
 }else if(p1==true && p2=false){
  cout << "YYMM"<< endl;
  }else{
  cout << "NA"<< endl;
  }
 
  
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:14: error: lvalue required as left operand of assignment
   37 |  if(p1==true && p2=true){
      |     ~~~~~~~~~^~~~~
a.cc:39:22: error: lvalue required as left operand of assignment
   39 |  }else if (p1==false && p2=true){
      |            ~~~~~~~~~~^~~~~
a.cc:41:20: error: lvalue required as left operand of assignment
   41 |  }else if(p1==true && p2=false){
      |           ~~~~~~~~~^~~~~
Language: Java

//package atcoder;
import java.util.*;

public class B_126_B {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		int n=Integer.parseInt(s.substring(0,2));
		int m=Integer.parseInt(s.substring(2));
		if(n>=1&&n<=12)
		{
			if(m>=1&&m<=12)
			{
				System.out.println("AMBIGUOUS");
			}
			else
			{
				System.out.println("MMYY");
			}
		}
		else
		{
			if(m>=1&&m<=12)
			{
				System.out.println("YYMM");
			}
			else
			{
				System.out.println("NA");
			}
		}

	}

}


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

import java.util.*;
import java.lang.*;
public class Main2 {
  public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String b = sc.next();

      String c = b.substring(0,2);
      Integer d = Integer.valueOf(c);
      String e = b.substring(2,4);

      Integer f = Integer.valueOf(e);
      if(d >= 1 && d <=12 && f >=1 && f <=12){
          System.out.println("AMBIGUOUS");
      }
      if((d >= 1 && d <=12 ) && (f ==0 || f >12)){
          System.out.println("YYMM");
      }
      if((d ==0 || d >12) && (f>=1 && f <= 12)){
          System.out.println("MMYY");
      }
      if((d ==0 || d >12) && (f ==0 || f >12)){
          System.out.println("NA");
      }

//      b =
//      ArrayList<Integer> array = new ArrayList<Integer>();
//      array.add(b[0]);
//      array.add(b[1]);
//
//      int b = sc.nextInt();

  }
}


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

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

int main(){
    string s;
    bool flag1, flag2;
    flag = 1;
    flag1 = flag2 = 0;
    cin >> s;
    int y = stoi(s);
    if(y % 100 <= 12 && y % 100 >= 1) flag2 = 1;
    if(y / 100 <= 12 && y / 100 >= 1) flag1 = 1;
    
    if(flag1 == 1 && flag2 == 1) cout << "AMBIGUOUS" << endl;
    else if(flag1 == 0 && flag2 == 1) cout << "YYMM" << endl;
    else if(flag1 == 1 && flag2 == 0) cout << "MMYY" << endl;
    else cout << "NA" << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'flag' was not declared in this scope; did you mean 'flag2'?
    7 |     flag = 1;
      |     ^~~~
      |     flag2
Language: C

#include <stdio.h>

int main(){
  int S; scanf("%d", &S);
  int L = S / 100;
  int R = S % 100;

  if(L >= 1 && L <= 12){
    if(R >= 1 && R <= 12){
      printf("AMBIGUOUS");
      else printf("MMYY");
    }
  }
  else{
    if(R >= 1 && R <= 12){
      printf("YYMM");
      else printf("NA");
    }
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:7: error: expected '}' before 'else'
   11 |       else printf("MMYY");
      |       ^~~~
main.c: At top level:
main.c:14:3: error: expected identifier or '(' before 'else'
   14 |   else{
      |   ^~~~
main.c:20:3: error: expected identifier or '(' before 'return'
   20 |   return 0;
      |   ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  bool p1=false;
  bool p2=false;

  if(n/1000==1 && n/100<3){
    p2=true;
    if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
      p1=true;
    }else if(n/10==0){
      p1=true;
    }

  }else if(n/1000==0){
     p2=true;
     if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){
        p1=true;
     }else   if(n/10==0){
       p1=true;
    }
  }


 if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){   p1=true;
}else if(n/10==0){
  p1=true;
}

 if(p1==ture && p2=true){
     cout << "AMBIGUOUS"<<endl;
 }else if (p1==false && p2=true){
     cout <<"MMYY"<<endl;
 }else if(p1==true && p2=false){
  cout << "YYMM"<< endl;
}else{
cout << "NA"<< endl;
}
 
  
 
}

Compiler output:
a.cc:31:53: error: extended character   is not valid in an identifier
   31 |  if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){   p1=true;
      |                                                     ^
a.cc: In function 'int main()':
a.cc:31:53: error: '\U00002028' was not declared in this scope
   31 |  if(n/10==1 && n-(n/1000*1000+n/100*100+n/10*10)<3){   p1=true;
      |                                                     ^
a.cc:36:9: error: 'ture' was not declared in this scope
   36 |  if(p1==ture && p2=true){
      |         ^~~~
a.cc:38:22: error: lvalue required as left operand of assignment
   38 |  }else if (p1==false && p2=true){
      |            ~~~~~~~~~~^~~~~
a.cc:40:20: error: lvalue required as left operand of assignment
   40 |  }else if(p1==true && p2=false){
      |           ~~~~~~~~~^~~~~
Language: Java

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		String first = str.substring(0, 2);
		String second = str.substring(2, 4);
		
		if(first.matches("[1-12]") && second.matches("[1-12]")) System.out.println("AMBIGUOUS");
		else if(second.matches("[1-12]")) System.out.println("YYMM");
		else if(first.matches("[1-12]")) System.out.println("MMYY");
		else System.out.println("NA");
		//System.out.println(second);
	}

Compiler output:
Main.java:13: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include<stdio.h>
int main()
{
  int a[4],i;
  for(i=0;i<4;i++){
 scanf("%d",&a[i]);
  }
  if(0<a[0]*10+a[1]<=12){
if

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '(' at end of input
    9 | if
      |   ^
      |   (
a.cc:9:3: error: expected '}' at end of input
a.cc:8:25: note: to match this '{'
    8 |   if(0<a[0]*10+a[1]<=12){
      |                         ^
a.cc:9:3: error: expected '}' at end of input
    9 | if
      |   ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <vector>
int main() {
	array<int> s;
	int a, b;
	for (int i = 0; i < 4; i++) {
		cin >> s.at(i);
	}
	a = s.at(0) * 10 + s.at(1);
	b= s.at(2) * 10 + s.at(3);


	if (a == 0) {
		if (1 <= b && b <= 12) {
			cout << "YYMM" << endl;
		}
		else {
			cout << "NA" << endl;
		}
	}


	if (1 <= a && a <= 12) {
		if (b == 0) {
			cout << "MMYY" << endl;
		}
		else if (1 <= b && b <= 12) {
			cout << "AMBIGUOUS" << endl;
		}
		else {
			cout << "MMYY" << endl;
		}
	}


	if (13 <= a && a <= 99) {
		if (1 <= b && b <= 12) {
			cout << "YYMM" << endl;
	    }
		else {
			cout << "NA" << endl;
		}
	}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: wrong number of template arguments (1, should be 2)
    6 |         array<int> s;
      |                  ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:99:12: note: provided for 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:9:26: error: request for member 'at' in 's', which is of non-class type 'int'
    9 |                 cin >> s.at(i);
      |                          ^~
a.cc:11:15: error: request for member 'at' in 's', which is of non-class type 'int'
   11 |         a = s.at(0) * 10 + s.at(1);
      |               ^~
a.cc:11:30: error: request for member 'at' in 's', which is of non-class type 'int'
   11 |         a = s.at(0) * 10 + s.at(1);
      |                              ^~
a.cc:12:14: error: request for member 'at' in 's', which is of non-class type 'int'
   12 |         b= s.at(2) * 10 + s.at(3);
      |              ^~
a.cc:12:29: error: request for member 'at' in 's', which is of non-class type 'int'
   12 |         b= s.at(2) * 10 + s.at(3);
      |                             ^~
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main(){
  char *S;
  cin >> S;
  string s0= S[0];
   string s1= S[1];
   string s2= S[2];
   string s3= S[3];
  
  string c01 = s0+s1;
  string c23 = s2+s3;
  
  int i01 = stoi(c01);
  int i23 = stoi(c23);
  
  if(i01 >= 1 && i01 <=12 && i23 >= 1 && i23 <=12) {
    cout << "AMBIGUOUS" << endl;
  }else if(i01 >= 0 && i23 >= 1 && i23 <=12) {
    cout << "YYMM" << endl;
  }else if( i01 >= 1 && i01 <=12 && i23 >= 0) {
    cout << "MMYY" << endl;
  }else{
    cout << "NA" << endl;
  }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string s0= S[0];
      |              ~~~^
a.cc:9:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |    string s1= S[1];
      |               ~~~^
a.cc:10:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |    string s2= S[2];
      |               ~~~^
a.cc:11:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |    string s3= S[3];
      |               ~~~^
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<iostream>
#include<string>
#include<cstdlib>
using namespace std;
int main(void)
{
	string num;
	int i;
	cin >> num;
	if (num[0] == '0' && num[1] == '0')
	{
		cout << "NA" << endl;
	}
	else if (num[2] == '0' && num[3] == '0')
	{
		cout << "NA" << endl;
	}
	else if (num[0] >= '1'&&num[1] > '2'&&num[2] >= '1'&&num[3] > '2'])
	{
		cout << "NA" << endl;
	}
	else if (num[0] <= '1'&&num[1]<'3' && num[2] <= '1'&&num[3]<'3')
	{
		cout << "AMBIGUOUS" << endl;
	}
	else if (num[0] >= '1' && num[1] > '2')
	{
		cout << "YYMM" << endl;
	}

	else if ( num[2] >= '1' && num[3] > '2')
	{
		cout << "MMYY" << endl;
	}



	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:74: error: expected ')' before ']' token
   22 |         else if (num[0] >= '1'&&num[1] > '2'&&num[2] >= '1'&&num[3] > '2'])
      |                 ~                                                        ^
      |                                                                          )
a.cc:22:74: error: expected primary-expression before ']' token
Language: C

#include <stdio.h>

int main() {
	char S[5];
	int i[4];
	scanf("%s",S);
	i[0] = S[0] - '0';
	i[1] = S[1] - '0';
	i[2] = S[2] - '0';
	i[3] = S[3] - '0';

	int i1, i2;
	i1 = i[0] * 10 + i[1];
	i2 = i[2] * 10 + i[3];

	//最初の文字を調べる
	if (i1 > 12 && i1 <= 19) {	//YYMM可能性
		if (i2 > 0 && i2 <= 12) {
			printf("YYMM\n");
		}
		else {
			printf("NA\n");
		}
	}
	else if ((i1 > 0 && i1 <= 12)) {	//MMYY可能性
		if (i2 > 0 && i2 <= 12) {
			printf("AMBIGUOUS\n");
		}
		else if (i2 == 0) {
			printf("MMYY\n");
		}
		else if (i2 > 12 && i2 <= 19) {
			printf("MMYY\n");
		}else{
          printf("NA\n");
	}
	else if(i1 == 0){	//YYMM可能性
		if (i2 > 0 && i2 <= 12) {
			printf("YYMM\n");

		}
		else {
			printf("NA\n");
		}
	}
	else {
		printf("NA\n");
	}


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:37:9: error: expected '}' before 'else'
   37 |         else if(i1 == 0){       //YYMM可能性
      |         ^~~~
Language: C++

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

int main(){
    string s;
    cin >> s;
    
    int first, second;
    bool YY = false, MM = false;
    first = (s[0]-'0')*10+(s[1]-'0');
    second = (s[2]-'0')*10+(s[3]-'0');

    if(first > 12 || first == 0){
        YY = true;
        if(second >= 1 && second <= 12)
            YY = true;
            MM = false;
        else{
            YY = false;
            MM = false;
        }
    }
    else if(first <= 12 && first >= 1){
        YY = true;
        MM = true;
        if(second >= 1 && second <= 12){

        }
        else if(second > 12 || second == 0){
            YY = false;
            MM = true;
        }
    }
    else {
        YY = false;
        MM = false;
    }

    if(YY && MM){
        cout << "AMBIGUOUS";
    }
    else if(YY && !MM){
        cout << "YYMM";
    }
    else if(!YY && MM){
        cout << "MMYY";
    }
    else cout << "NA";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: expected '}' before 'else'
   18 |         else{
      |         ^~~~
a.cc:13:33: note: to match this '{'
   13 |     if(first > 12 || first == 0){
      |                                 ^
a.cc: At global scope:
a.cc:23:5: error: expected unqualified-id before 'else'
   23 |     else if(first <= 12 && first >= 1){
      |     ^~~~
a.cc:34:5: error: expected unqualified-id before 'else'
   34 |     else {
      |     ^~~~
a.cc:39:5: error: expected unqualified-id before 'if'
   39 |     if(YY && MM){
      |     ^~
a.cc:42:5: error: expected unqualified-id before 'else'
   42 |     else if(YY && !MM){
      |     ^~~~
a.cc:45:5: error: expected unqualified-id before 'else'
   45 |     else if(!YY && MM){
      |     ^~~~
a.cc:48:5: error: expected unqualified-id before 'else'
   48 |     else cout << "NA";
      |     ^~~~
a.cc:49:5: error: expected unqualified-id before 'return'
   49 |     return 0;
      |     ^~~~~~
a.cc:50:1: error: expected declaration before '}' token
   50 | }
      | ^
Language: C

#include <stdio.h>

int main() {
	char S[5];
	int i[4];
	scanf("%s",S);
	i[0] = S[0] - '0';
	i[1] = S[1] - '0';
	i[2] = S[2] - '0';
	i[3] = S[3] - '0';

	int i1, i2;
	i1 = i[0] * 10 + i[1];
	i2 = i[2] * 10 + i[3];

	//最初の文字を調べる
	if (i1 > 12 && i1 <= 19) {	//YYMM可能性
		if (i2 > 0 && i2 <= 12) {
			printf("YYMM\n");
		}
		else {
			printf("NA\n");
		}
	}
	else if ((i1 > 0 && i1 <= 12)) {	//MMYY可能性
		if (i2 > 0 && i2 <= 12) {
			printf("AMBIGUOUS\n");
		}
		else if (i2 == 0) {
			printf("MMYY\n");
		}
		else if (i2 > 12 && i2 <= 19) {
			printf("MMYY\n");
		}else{
          printf("NA\n")
	}
	else if(i1 == 0){	//YYMM可能性
		if (i2 > 0 && i2 <= 12) {
			printf("YYMM\n");

		}
		else {
			printf("NA\n");
		}
	}
	else {
		printf("NA\n");
	}


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:35:25: error: expected ';' before '}' token
   35 |           printf("NA\n")
      |                         ^
      |                         ;
   36 |         }
      |         ~                
main.c:37:9: error: expected '}' before 'else'
   37 |         else if(i1 == 0){       //YYMM可能性
      |         ^~~~
Language: C++

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

int main(){
  int S;
  cin>>S;
  int B=S/100;
  int A=S-S/100;
  if(B!=0&&A!=0){
    if(B>12&&A<13){
      cout<<"YYMM"<<endl;
    }
    if(B<13&&A>12){
      cout<<"MMYY"<<endl;
    }
    if(B<13&&A<13){
      cout<<"AMBIGUOUS"<<endl;
    }
  }
  if(B=0&&A=0){
    cout<<"NA"<<endl;
  }
  else if(B==0&&A<13){
    cout<<"YYMM"<<endl;
  }
  else if(B<13&&A==0){
    cout<<"MMYY"<<endl;
  }
  if(B>12&&A==0){
    cout<<"NA"<<endl;
  }
  if(B==0&&A>12){
    cout<<"NA"<<endl;
  }
  if(B>12&&A>12){
    cout<<"NA"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: lvalue required as left operand of assignment
   20 |   if(B=0&&A=0){
      |        ~^~~
Language: C

#include <stdio.h>
#include <stdlib.h>

int main() {
	char s[4];
	scanf("%s", s);
	
	int num = (int)s;

	printf("a = %d b = %d\n", a, b);

	if (num / 100 > 12 && num % 100 > 12) {
		printf("NA\n");
	}
	else if (num % 100 == 0) {
		printf("NA\n");
	}
	else if (num / 100 > 12) {
		printf("YYMM\n");
	}
	else if (num % 100 > 12) {
		printf("MMYY\n");
	}
	else {
		printf("AMBIGUOUS\n");
	}

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    8 |         int num = (int)s;
      |                   ^
main.c:10:35: error: 'a' undeclared (first use in this function)
   10 |         printf("a = %d b = %d\n", a, b);
      |                                   ^
main.c:10:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:38: error: 'b' undeclared (first use in this function)
   10 |         printf("a = %d b = %d\n", a, b);
      |                                      ^
Language: C

#include <stdio.h>

int main() {
	while (true)
	{
		char S[5];
		int i[4];
		scanf("%s",S);
		i[0] = S[0] - '0';
		i[1] = S[1] - '0';
		i[2] = S[2] - '0';
		i[3] = S[3] - '0';

		int i1, i2;
		i1 = i[0] * 10 + i[1];
		i2 = i[2] * 10 + i[3];

		//最初の文字を調べる
		if (i1 > 12 && i1 <= 19) {	//YYMM可能性
			if (i2 > 0 && i2 <= 12) {
				printf("YYMM\n");
			}
			else {
				printf("NA\n");
			}
		}
		else if ((i1 > 0 && i1 <= 12)) {	//MMYY可能性
			if (i2 > 0 && i2 <= 12) {
				printf("AMBIGUOUS\n");
			}
			else if (i2 == 0) {
				printf("MMYY\n");
			}
			else if (i2 > 12 && i2 <= 19) {
				printf("MMYY\n");
			}
			else {
				printf("NA\n");
			}
		}
		else if(i1 == 0){	//YYMM可能性
			if (i2 > 0 && i2 <= 12) {
				printf("YYMM\n");

			}
			else {
				printf("NA\n");
			}
		}
		else {
			printf("NA\n");
		}
	}
	


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:16: error: 'true' undeclared (first use in this function)
    4 |         while (true)
      |                ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:4:16: note: each undeclared identifier is reported only once for each function it appears in
    4 |         while (true)
      |                ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main(){
  string S;
  cin >> S;
  string s0= S[0];
   string s1= S[1];
   string s2= S[2];
   string s3= S[3];
  
  string c01 = s0+s1;
  string c23 = s2+s3;
  
  int i01 = stoi(c01);
  int i23 = stoi(c23);
  
  if(i01 >= 1 && i01 <=12 && i23 >= 1 && i23 <=12) {
    cout << "AMBIGUOUS" << endl;
  }else if(i01 >= 0 && i23 >= 1 && i23 <=12) {
    cout << "YYMM" << endl;
  }else if( i01 >= 1 && i01 <=12 && i23 >= 0) {
    cout << "MMYY" << endl;
  }else{
    cout << "NA" << endl;
  }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string s0= S[0];
      |                 ^
a.cc:9:18: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |    string s1= S[1];
      |                  ^
a.cc:10:18: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |    string s2= S[2];
      |                  ^
a.cc:11:18: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |    string s3= S[3];
      |                  ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
 
int main(){
  string S;
  cin >> S;
  string s0= s[0];
   string s1= s[1];
   string s2= s[2];
   string s3= s[3];
  
  string c01 = s0+s1;
  string c23 = s2+s3;
  
  int i01 = stoi(c01);
  int i23 = stoi(c23);
  
  if(i01 >= 1 && i01 <=12 && i23 >= 1 && i23 <=12) {
    cout << "AMBIGUOUS" << endl;
  }else if(i01 >= 0 && i23 >= 1 && i23 <=12) {
    cout << "YYMM" << endl;
  }else if( i01 >= 1 && i01 <=12 && i23 >= 0) {
    cout << "MMYY" << endl;
  }else{
    cout << "NA" << endl;
  }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 's' was not declared in this scope
    8 |   string s0= s[0];
      |              ^
Language: C++

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

int main(){
    int S,a1,a2,b;
    cin >> S;

    a1 = S - 1300;
    a2 = S - 100;
    b = S % 100;

    if(b == 0){
        if(a1 >= 0){
            cout << "NA" << endl;
        }
        else{
            cout << "MMYY" <<endl;
        }
    }
    else{
        if(a2 < 0){
            if(b > 12){
                cout << "NA" <<endl;
            }
            else{
                cout << "YYMM" <<endl;
            }
        }
        else if(a1 < 0){
            if(b < 13){
                cout << "AMBIGOUS" <<endl;
            }
            else{
                cout << "MMYY" <<endl;
            }
        }
}

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

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

int main() {
    int s[4];
    for(int i=0; i<4; i++){
        cin >> s[i];
    }

    if(12 => s[0]*10+s[1] && 0!= s[0]*10+s[1]){
        if(12 => s[2]*10+s[3] && 0!= s[2]*10+s[3]){
            cout << "AMBIGUOUS" << endl;
        }else cout << "MMYY" << endl;
    }
    else if((12 => s[2]*10+s[3] && 0!= s[2]*10+s[3]){
        cout << "YYMM" << endl;
    }else cout << "NA" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected primary-expression before '>' token
   10 |     if(12 => s[0]*10+s[1] && 0!= s[0]*10+s[1]){
      |            ^
a.cc:11:16: error: expected primary-expression before '>' token
   11 |         if(12 => s[2]*10+s[3] && 0!= s[2]*10+s[3]){
      |                ^
a.cc:15:18: error: expected primary-expression before '>' token
   15 |     else if((12 => s[2]*10+s[3] && 0!= s[2]*10+s[3]){
      |                  ^
a.cc:17:6: error: expected primary-expression before 'else'
   17 |     }else cout << "NA" << endl;
      |      ^~~~
a.cc:17:6: error: expected ')' before 'else'
   17 |     }else cout << "NA" << endl;
      |      ^~~~
      |      )
a.cc:15:12: note: to match this '('
   15 |     else if((12 => s[2]*10+s[3] && 0!= s[2]*10+s[3]){
      |            ^
Language: C++

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

int main (void){
    int i, j, k;
    string S, tmp1, tmp2, ans; cin >> S;
    tmp1 = "00";
    tmp2 = "00";

    for(i = 0; i < 2; i++){
        tmp1.at(i) = S.at(i);
        tmp2.at(i) = S.at(i+2);
    }
    
    j = atoi(tmp1.c_str());
    k = atoi(tmp2.c_str());

    if(k >= 1 && k <= 12 && j >= 1 && j <= 12) {
        ans = "AMBIGUOUS";
    }else if(k > 12 && j >=1 && j <= 12) {
        ans = "MMYY";
    }else if(k >= 1 && k <= 12 && j > 12) {
        ans = "YYMM";
    }else{
        ans = "NA"
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: expected ';' before '}' token
   25 |         ans = "NA"
      |                   ^
      |                   ;
   26 |     }
      |     ~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner stdle = new Scanner(System.in);
		// 整数の入力
		int a = stdle.nextInt();
        int front = a/100;
        int back = a%100;

        if(front == 0 || back == 0){
            NA();
            break;
        }

        int flagF = 0;
        int flagB = 0;
        
        


        if(front > 12){
            flagF = 1;
        }
        if(back > 12){
            flagB = 1;
        }

        if(flagF == 1 && flagB == 1){
            NA();
        }

        if(flagF == 0 && flagB == 0){
            AMBIGUOUS();
        }

        if(flagF == 1 && flagB == 0){
            YYMM();
        }

        if(flagF == 0 && flagB == 1){
            MMYY();
        }

    }
    
    public static void YYMM(){
        System.out.println("YYMM");
    }
    public static void MMYY(){
        System.out.println("MMYY");
    }
    public static void AMBIGUOUS(){
        System.out.println("AMBIGUOUS");
    }
    public static void NA(){
        System.out.println("NA");
    }
}

Compiler output:
Main.java:12: error: break outside switch or loop
            break;
            ^
1 error
Language: C

#include <stdio.h>
int main(){
int a[4];
  int count,count2,anscount;
  for(int i=0; i<4; i++){
    scanf("%d",&a[i]);
  }
  count = a[0]*10+a[1];
  count2 = a[2]*10+a[3];
  
 
   if(count && count2 <=12){
    printf("AMBIGUOUS");
     break;
  }else if(count <= 12){
    printf("MMYY");
   } else if(count2 <= 12){
    printf("YYMM");
   }
  return 0;
}

  
    
  
  
  
  
  

Compiler output:
main.c: In function 'main':
main.c:14:6: error: break statement not within loop or switch
   14 |      break;
      |      ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int S[4];
  for(int i=0;i<4;i++){
  	cin >> S[i];
  }
  if((S[0]>1&&S[1]>2&&S[2]>1&&S[3]>2)||(S[0]==0&&S[1]==0)||(S[2]==0&&S[3]==0))){
  	cout << "NA";
  }
  else{
    if(S[0]>1&&S[1]>2){
      cout << "YYMM";
    }
    if(S[2]>1&&S[3]>2){
      cout << "MMYY";
    }
    else{
      cout << "AMBIGUOUS";
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:79: error: expected primary-expression before ')' token
    8 |   if((S[0]>1&&S[1]>2&&S[2]>1&&S[3]>2)||(S[0]==0&&S[1]==0)||(S[2]==0&&S[3]==0))){
      |                                                                               ^