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

#include <bits/stdc++.h>
#define MOD 1000000007
using namespace std;
typedef long long ll;

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


int first=(s[0]-'0')*10+(s[1]-'0');
int second=(s[2]-'0')*10+(s[3]-'0');



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

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: error: 'fisrt' was not declared in this scope; did you mean 'first'?
   19 | else if(second>12&&(first>0&&fisrt<=12))
      |                              ^~~~~
      |                              first
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<stdio.h>
#include<map>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ll long long
#define sort(s) sort(s.begin(),s.end())
#define r(s) reverse(s.begin(),s.end())
#define please return
constexpr auto AC = 0;
using namespace std;
int main() {
	int a;
	string s;
	cin >> a ;
	if (a / 100 > 12||a==0) {
		if (a % 100 > 12)s = "NA";
		else s = "YYMM";
	}
	else {
		if (a % 100 > 12||a==0)s = "MMYY";
		else s = "AMBIGUOUS";
	}
	cout << s << endl;1
	

		please AC;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:28: error: expected ';' before 'return'
   27 |         cout << s << endl;1
      |                            ^
      |                            ;
Language: C++

#include<stdio.h>
int main() {
	int S, FH, SH;
	scanf_s("%d", &S);
	FH = S / 100;
	SH = S % 100;
	if (FH < 13 && SH < 13 && FH > 0 && SH > 0) {
		printf("AMBIGUOUS\n");
	}
	else if (0 < FH && FH< 13) {
		printf("MMYY\n");
	}
	else if (0 < SH && SH<13) {
		printf("YYMM\n");
	}
	else {
		printf("NA\n");
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    4 |         scanf_s("%d", &S);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<stdio.h>
int main (){

  int S,FH,PH;
   scanf("%d",&S);
  FH = S / 100;
  SH = S % 100;
  if (0 < FH < 13 &&  0 < SH < 13){
    printf("AMBIGUOUS\n");
  } else if (0 < FH < 13){
    printf("MMYY\n");
  } else if (0 < SH < 13){
    printf("YYMM\n");
  } else {
    printf("NA\n");
  }
  return 0 ;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'SH' was not declared in this scope; did you mean 'PH'?
    7 |   SH = S % 100;
      |   ^~
      |   PH
Language: C++

#include<stdio.h>
int main (){

  int S,FH,PH;
   scanf("%d",&S);
  FH = S / 100;
  PH = S % 100;
  if (0 < PH < 13 &&  0 < FH < 13){
    printf("AMBIGUOUS\n");
  } else if (0 < PH < 13){
    printf("MMYY\n");
  } else if (0 < FH < 13){
    printf("YYMM\n");
  } else {
    printf("NA\n");
  }
  retrn 0 ;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'retrn' was not declared in this scope
   17 |   retrn 0 ;
      |   ^~~~~
Language: C++

#include<stdio.h>
#include<cstdlib> 
int main (){
  char S[4] = {0};
  scanf("%s",&S);
  int FH,PH;
  PH = std::atoi(S[2])*10 + std::atoi(S[3]);
  FH = std::atoi(S[0])*10 + std::atoi(S[1]);
  if (0 < PH < 13 &&  0 < FH < 13){
    printf("AMBIGUOUS\n");
  } else if (0 < PH < 13){
    printf("MMYY\n");
  } else if (0 < FH < 13){
    printf("YYMM\n");
  } else {
    printf("NA\n");
  }
  retrn 0 ;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |   PH = std::atoi(S[2])*10 + std::atoi(S[3]);
      |                  ~~~^
      |                     |
      |                     char
In file included from /usr/include/c++/14/cstdlib:79,
                 from a.cc:2:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:7:42: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |   PH = std::atoi(S[2])*10 + std::atoi(S[3]);
      |                                       ~~~^
      |                                          |
      |                                          char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:8:21: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |   FH = std::atoi(S[0])*10 + std::atoi(S[1]);
      |                  ~~~^
      |                     |
      |                     char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:8:42: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |   FH = std::atoi(S[0])*10 + std::atoi(S[1]);
      |                                       ~~~^
      |                                          |
      |                                          char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:18:3: error: 'retrn' was not declared in this scope
   18 |   retrn 0 ;
      |   ^~~~~
Language: C++

#include<stdio.h>
int main (){
  char S[4] = {0};
  scanf("%s",&S);
  int FH,PH;
  PH = atoi(S[2])*10 + atoi(S[3]);
  FH = atoi(S[0])*10 + atoi(S[1]);
  if (0 < PH < 13 &&  0 < FH < 13){
    printf("AMBIGUOUS\n");
  } else if (0 < PH < 13){
    printf("MMYY\n");
  } else if (0 < FH < 13){
    printf("YYMM\n");
  } else {
    printf("NA\n");
  }
  retrn 0 ;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'atoi' was not declared in this scope
    6 |   PH = atoi(S[2])*10 + atoi(S[3]);
      |        ^~~~
a.cc:17:3: error: 'retrn' was not declared in this scope
   17 |   retrn 0 ;
      |   ^~~~~
Language: C++

import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        
        String strf = s.substring(0,2);
        String strb = s.substring(2); 
        
        int sf = Integer.parseInt(strf);
        int sb = Integer.parseInt(strb);
        
        String ans = "NA";
        
        if(1 <= sf && sf <= 12 && 1 <= sb && sb <= 12){
            ans = "AMBIGUOUS";
        }else if(1 <= sf && sf <= 12){
            ans = "MMYY";
        }else if(1 <= sb && sb <= 12){
            ans = "YYMM";    
        }
        System.out.println(ans);  
       
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
    string f, se;
    f.push_back(s.at(0));
    f.push_back(s.at(1));
    se.push_back(s.at(2));
    se.push_back(s.at(3));

    if (("13" <= f || f == "00") && "01" <= se && se <= "12")
        puts("YYMM");
    else if (("13" <= se || se == "00") && "01" <= f && f <= "12")
        puts("MMYY");
    else if ("01" <= se && se <= "12"g && "01" <= f && f <= "12")
        puts("AMBIGUOUS");
    else 
        puts("NA");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: unable to find string literal operator 'operator""g' with 'const char [3]', 'long unsigned int' arguments
   19 |     else if ("01" <= se && se <= "12"g && "01" <= f && f <= "12")
      |                                  ^~~~~
Language: C++

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

int main() {

  vector<int> S(2);
  cin >> S.at(0);
  S.at(1) = S.at(0)%100;
  S.at(0) /= 100;
  
  if(0<S.at(0) && S.at(0)<13){
    if(0<S.at(1)&& S.at(1)<13){ 
      cout << "AMBIGUOUS" << endl;
    }else{
      cout << "MMYY" <<endl;
    }
    
  }else{
    if(0<S.at(1)&&S.at(1)<13){
      cout << "YYMM" << endl;
    }else{
      cout << "NA" << endl;
    }
  }
 

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

#include<iostream>
using namespace std;
int main(){
  int i;
  string s;
  cin>>s;
  for(i=0;i<4;i++){
    s[i]=s[i]-'0';
  }
  int a=s[0]*10+s[1],b=s[2]*10+s[3];
  
  if((a>0 and a<=12)&&(b>0 and b<=12){
    cout<<"AMBIGUOUS";
  }
  else if(a>0 and a<=12)
    cout<<"MMYY";
  else if(b>0 and b<=12)
    cout<<"YYMM";
  else
    cout<<"NA";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: expected ';' before '{' token
   12 |   if((a>0 and a<=12)&&(b>0 and b<=12){
      |                                      ^
      |                                      ;
a.cc:15:3: error: expected primary-expression before 'else'
   15 |   else if(a>0 and a<=12)
      |   ^~~~
a.cc:14:4: error: expected ')' before 'else'
   14 |   }
      |    ^
      |    )
   15 |   else if(a>0 and a<=12)
      |   ~~~~
a.cc:12:5: note: to match this '('
   12 |   if((a>0 and a<=12)&&(b>0 and b<=12){
      |     ^
Language: C++

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string s; cin >> s;
  vector<string> mm{"01","02","03","04","05","06","07","08","09","10","11","12"};
  string a = s.substr(0,2);
  string b = s.substr(2,2);
  bool is_mmyy = find(mm.begin(),mm.end(),a);
  bool is_yymm = find(mm.begin(),mm.end(),b);
  if (is_mmyy && !is_yymm) cout << "MMYY" << endl;
  else if (!is_mmyy && is_yymm) cout << "YYMM" << endl;
  else if (is_mmyy && is_yymm) cout << "AMBIGUOUS" << endl;
  else cout << "NA" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: cannot convert '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'bool' in initialization
   13 |   bool is_mmyy = find(mm.begin(),mm.end(),a);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >
a.cc:14:22: error: cannot convert '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'bool' in initialization
   14 |   bool is_yymm = find(mm.begin(),mm.end(),b);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >
Language: C++

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string s; cin >> s;
  vector<string> mm{"01","02","03","04","05","06","07","08","09","10","11","12"};
  string a = s[0]+s[1];
  string b = s[2]+s[3];
  bool is_mmyy = find(mm.begin(),mm.end(),a);
  bool is_yymm = find(mm.begin(),mm.end(),b);
  if (is_mmyy && !is_yymm) cout << "MMYY" << endl;
  else if (!is_mmyy && is_yymm) cout << "YYMM" << endl;
  else if (is_mmyy && is_yymm) cout << "AMBIGUOUS" << endl;
  else cout << "NA" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |   string a = s[0]+s[1];
a.cc:12:18: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   12 |   string b = s[2]+s[3];
a.cc:13:22: error: cannot convert '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'bool' in initialization
   13 |   bool is_mmyy = find(mm.begin(),mm.end(),a);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >
a.cc:14:22: error: cannot convert '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'bool' in initialization
   14 |   bool is_yymm = find(mm.begin(),mm.end(),b);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >
Language: C++

#include <iostream>
using namespace std;

int main() {
    string s;
    cin >> s;
    
    int s1 = stoi(s.substr(0, 2));
    int s2 = stoi(s.substr(2));

    if (s1 == 0 || s2 == 0) {
        cout << "NA\n";
    } else {
        if (s1 <= 12 && s2 <= 12) {
            cout << "AMBIGUOUS\n";
        } else if (s1 <= 12 && s2 > 12) {
            cout << "MMYY\n";
        }
        } else {}
            cout << "YYMM\n";
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'else' without a previous 'if'
   19 |         } else {}
      |           ^~~~
a.cc: At global scope:
a.cc:22:5: error: expected declaration before '}' token
   22 |     }
      |     ^
a.cc:23:5: error: expected unqualified-id before 'return'
   23 |     return 0;
      |     ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>> S;
      |     ^~~
a.cc:14:13: error: 'cout' was not declared in this scope
   14 |             cout<< "AMBIGUOUS"<<endl;
      |             ^~~~
a.cc:14:33: error: 'endl' was not declared in this scope
   14 |             cout<< "AMBIGUOUS"<<endl;
      |                                 ^~~~
a.cc:18:13: error: 'cout' was not declared in this scope
   18 |             cout << "MMYY"<<endl;
      |             ^~~~
a.cc:18:29: error: 'endl' was not declared in this scope
   18 |             cout << "MMYY"<<endl;
      |                             ^~~~
a.cc:26:13: error: 'cout' was not declared in this scope
   26 |             cout<< "YYMM"<<endl;
      |             ^~~~
a.cc:26:28: error: 'endl' was not declared in this scope
   26 |             cout<< "YYMM"<<endl;
      |                            ^~~~
a.cc:30:13: error: 'cout' was not declared in this scope
   30 |             cout << "NA" <<endl;
      |             ^~~~
a.cc:30:28: error: 'endl' was not declared in this scope
   30 |             cout << "NA" <<endl;
      |                            ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  string s1=substr(0,2);
  string s2=substr(2,2);
  int a=stoi(s1);
  int b=stoi(s2);
  if (a < 13 && b < 13 ) cout << "AMBIGUOUS" << endl;
  else if ( a < 13 && 0 < a) cout << "MMYY" << endl;
  else if (b < 13 && 0 < b) cout << "YYMM" << endl;
  else cout << "NA" << endl;
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'substr' was not declared in this scope; did you mean 'strstr'?
    6 |   string s1=substr(0,2);
      |             ^~~~~~
      |             strstr
Language: Java

package com.company;
import java.util.*;
public class Main {
    public static void main(String[] args) {
    	//task 1
//	    Scanner s = new Scanner(System.in);
//	    int n = s.nextInt(), m = s.nextInt() - 1;
//	    char[] cs = s.next().toCharArray();
//	    //A - a = -32
//	    cs[m] += ('a' - 'A');
//	    System.out.println(cs);

		//task2

		Scanner s = new Scanner((System.in));
		int n = s.nextInt();
		int fh = n / 100;
		int sh = n % 100;
		String out;


		System.out.println(isMonth(fh) ? isMonth(sh) ? "AMBIGUOUS " : "MMYY" : isMonth(sh) ? "YYMM" : "NA");

		System.out.println(out);

    }

    public static Boolean isMonth(int i){
    	return (1 <= i) && (i <= 12);
	}


}


Compiler output:
Main.java:24: error: variable out might not have been initialized
		System.out.println(out);
		                   ^
1 error
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define sz(x) ll(x.size())
using namespace std;

int main() {
  ll n1,n2;
  string s,ans;
  cin >> s;
  n1=atoi(s.substr(0,2)); n2=atoi(s.substr(2,2));
  if(n1<=12 && n1>=1){
  	if(n2<=12 && n2>=1) ans="AMBIGUOUS";
  	else ans="MMYY";
  }
  else if(n2<=12 && n2>=1) ans="YYMM";
  else ans="NA";
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: cannot convert 'std::__cxx11::basic_string<char>' to 'const char*'
   11 |   n1=atoi(s.substr(0,2)); n2=atoi(s.substr(2,2));
      |           ~~~~~~~~^~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:11:43: error: cannot convert 'std::__cxx11::basic_string<char>' to 'const char*'
   11 |   n1=atoi(s.substr(0,2)); n2=atoi(s.substr(2,2));
      |                                   ~~~~~~~~^~~~~
      |                                           |
      |                                           std::__cxx11::basic_string<char>
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define sz(x) ll(x.size())
using namespace std;

int main() {
  ll n1,n2;
  string s,s1,s2,ans;
  cin >> s;
  s1=s.substr(0,2); s2=s.substr(2,2);
  n1=(ll)s1; n2=(ll)s2;
  if(n1<=12 && n1>=1){
  	if(n2<=12 && n2>=1) ans="AMBIGUOUS";
  	else ans="MMYY";
  }
  else if(n2<=12 && n2>=1) ans="YYMM";
  else ans="NA";
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'll' {aka 'long long int'}
   12 |   n1=(ll)s1; n2=(ll)s2;
      |      ^~~~~~
a.cc:12:17: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'll' {aka 'long long int'}
   12 |   n1=(ll)s1; n2=(ll)s2;
      |                 ^~~~~~
Language: C

#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>

using namespace std;
int main(void){

  int n;
  cin >> n;
  int kami=n/100;//上二桁
  int simo=n-kami*100;//下二桁;
  //cout <<"kami0:"<< kami;

  //yymm
  if((kami==0&&(simo>=1&&simo<=12))||((kami>=13&&kami<=99)&&(simo>=1&&simo<=99))){
    cout << "YYMM";
  }
  else if((kami==0&&(simo>=13&&simo<=99))||(kami==0&&(simo==0))||((kami>=13&&kami<=99)&&simo==0)||(kami>=13&&kami<=99)&&(simo>=13&&simo<=99)){
    cout << "NA";
  }
  else if(((kami>=1&&kami<=12)&&(simo==0||(simo>=13&&simo<=99)))){
    cout <<"MMYY";
  }
  else if((kami>=1&&kami<=12)&&(simo>=1&&simo<=12)){
    cout<< "AMBIGUOUS";
  }

  return 0;
}


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

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

int main() {
  int N;
  cin>>N;
  int a=N/100;
  int b=(b-a)/100;
  if((0<a&&a<=12)&&(0<b&&b<=12)){
    
    cout<<"AMBIGUOUS"<<endl;
  }
  if((0<a&&a<=12)&&(0=b||b>12)){
    cout<<"YYMM"<<endl;
  }
  if((0<b&&b<=12)&&(0=a||a>12)){
    cout<<"MMYY"<<endl;
  }
  else{
    cout<<"NA"<<endl;
  }
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: lvalue required as left operand of assignment
   13 |   if((0<a&&a<=12)&&(0=b||b>12)){
      |                     ^
a.cc:16:21: error: lvalue required as left operand of assignment
   16 |   if((0<b&&b<=12)&&(0=a||a>12)){
      |                     ^
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String answer="";
    final String S=sc.next();
    char[] s=S.toCharArray();
    char[] sA={s[0],s[1]};
    char[] sB={s[2],s[3]};
    int a=Integer.parseInt(String.valueOf(sA));
    int b=Integer.parseInt(String.valueOf(sB));
    if(a==0{
      answer="NA";
    }else if(b==0){
      answer="NA";
    }else if(a<=12){
      if(b<=12){
        answer="AMBIGUOUS";
      }else{
        answer="MMYY";
      }
    }else{
      if(b<=12){
        answer="YYMM";
      }else{
        answer="NA";
      }
    }
    System.out.println(answer);
  }
}

Compiler output:
Main.java:13: error: ')' expected
    if(a==0{
           ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String answer="";
    final String S=sc.next();
    char[] s=S.toCharArray();
    int a=Integer.parseInt(String.valueOf({s[0],s[1]}));
    int b=Integer.parseInt(String.valueOf({s[2],s[3]}));
    if(a<=12){
      if(b<=12){
        answer="AMBIGUOUS";
      }else{
        answer="MMYY";
      }
    }else{
      if(b<=12){
        answer="YYMM";
      }else{
        answer="NA";
      }
    }
    System.out.println(answer);
  }
}

Compiler output:
Main.java:9: error: illegal start of expression
    int a=Integer.parseInt(String.valueOf({s[0],s[1]}));
                                          ^
Main.java:9: error: not a statement
    int a=Integer.parseInt(String.valueOf({s[0],s[1]}));
                                            ^
Main.java:9: error: ';' expected
    int a=Integer.parseInt(String.valueOf({s[0],s[1]}));
                                               ^
Main.java:9: error: not a statement
    int a=Integer.parseInt(String.valueOf({s[0],s[1]}));
                                                 ^
Main.java:9: error: ';' expected
    int a=Integer.parseInt(String.valueOf({s[0],s[1]}));
                                                    ^
Main.java:9: error: illegal start of expression
    int a=Integer.parseInt(String.valueOf({s[0],s[1]}));
                                                     ^
Main.java:10: error: illegal start of expression
    int b=Integer.parseInt(String.valueOf({s[2],s[3]}));
                                          ^
Main.java:10: error: not a statement
    int b=Integer.parseInt(String.valueOf({s[2],s[3]}));
                                            ^
Main.java:10: error: ';' expected
    int b=Integer.parseInt(String.valueOf({s[2],s[3]}));
                                               ^
Main.java:10: error: not a statement
    int b=Integer.parseInt(String.valueOf({s[2],s[3]}));
                                                 ^
Main.java:10: error: ';' expected
    int b=Integer.parseInt(String.valueOf({s[2],s[3]}));
                                                    ^
Main.java:10: error: illegal start of expression
    int b=Integer.parseInt(String.valueOf({s[2],s[3]}));
                                                     ^
12 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String answer="";
    final String S=sc.next();
    char[] s=S.toCharArray();
    int a=String.valueOf({s[0],s[1]});
    int b=String.valueOf({s[2],s[3]});
    if(a<=12){
      if(b<=12){
        answer="AMBIGUOUS";
      }else{
        answer="MMYY";
      }
    }else{
      if(b<=12){
        answer="YYMM";
      }else{
        answer="NA";
      }
    }
    System.out.println(answer);
  }
}

Compiler output:
Main.java:9: error: illegal start of expression
    int a=String.valueOf({s[0],s[1]});
                         ^
Main.java:9: error: not a statement
    int a=String.valueOf({s[0],s[1]});
                           ^
Main.java:9: error: ';' expected
    int a=String.valueOf({s[0],s[1]});
                              ^
Main.java:9: error: not a statement
    int a=String.valueOf({s[0],s[1]});
                                ^
Main.java:9: error: ';' expected
    int a=String.valueOf({s[0],s[1]});
                                   ^
Main.java:9: error: illegal start of expression
    int a=String.valueOf({s[0],s[1]});
                                    ^
Main.java:10: error: illegal start of expression
    int b=String.valueOf({s[2],s[3]});
                         ^
Main.java:10: error: not a statement
    int b=String.valueOf({s[2],s[3]});
                           ^
Main.java:10: error: ';' expected
    int b=String.valueOf({s[2],s[3]});
                              ^
Main.java:10: error: not a statement
    int b=String.valueOf({s[2],s[3]});
                                ^
Main.java:10: error: ';' expected
    int b=String.valueOf({s[2],s[3]});
                                   ^
Main.java:10: error: illegal start of expression
    int b=String.valueOf({s[2],s[3]});
                                    ^
12 errors
Language: C++

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

int main() {
  
  int S=0;
  
  cin >> S;
  
  int a = S/100;
  int b = S%100;
  
  if(0<a && a<13 && 0<b && b<13) {
    
    cout << AMBIGUOUS << endl;
    
  } else if(0<b && b<13) {
      
      cout << "YYMM" << endl;
      
  } else if(0<a && a<13) {
    
    cout << "MMYY" << endl;
    
  } else {
    
    cout << "NA" << endl;
    
  }
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'AMBIGUOUS' was not declared in this scope
   15 |     cout << AMBIGUOUS << endl;
      |             ^~~~~~~~~
Language: C++

//B YYMM or MMYY
#include<bits/stdc++.h>
using namespace std;

int main()
{
  int a,b;
  string s;
  cin>>s;
  a=((s.at(0)-'0')*10)+(s.at(1)-'0');
  b=((s.at(2)-'0')1*10)+(s.at(3)-'0');
  if(a>=1&&a<=12)
  {
    if(b>=1&&b<=12)
      cout<<"AMBIGUOUS"<<endl;
    else
      cout<<"MMYY"<<endl;
  }
  else
  {
    if(b>=1&&b<=12)
      cout<<"YYMM"<<endl;
    else
      cout<<"NA"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: expected ')' before numeric constant
   11 |   b=((s.at(2)-'0')1*10)+(s.at(3)-'0');
      |     ~             ^
      |                   )
Language: C++

#include<iostream>
#include<fstream>
using namespace std;
int main(){
	int input;
    bool NA = false;
    bool Ambiguous = false;
    bool YYMM = false;
    bool MMYY = false;
	    cin>> input;
    a = input/100;
    b = input%100;

    if (0<b && b<=12){
        MMYY = true;
    }
    if (0<a && a<=12){
        YYMM = true;
    }
    if (YYMM &&MMYY){
        Ambiguous = true;
    }
    else if(!YYMM && !MMYY){
        NA = true;
    }

    //cout
    if (Ambiguous){
        cout<< "AMBIGUOUS";
    }
    else if (YYMM){
        cout<< "YYMM";
    }
    else if(MMYY){
        cout<< "MMYY";
    }
    else if (NA){
        cout<< "NA";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'a' was not declared in this scope
   11 |     a = input/100;
      |     ^
a.cc:12:5: error: 'b' was not declared in this scope
   12 |     b = input%100;
      |     ^
Language: C++

#include<iostream>
#include<fstream>
using namespace std;
int main(){
	int input;
    bool NA = false;
    bool Ambiguous = false;
    bool YYMM = false;
    bool MMYY = false;
	cin>> input;
    a = input/100;
    b = input%100;

    if (0<b && b<=12){
        MMYY = true;
    }
    if (0<a && a<=12){
        YYMM = true;
    }
    if (YYMM &&MMYY){
        Ambiguous = true;
    }
    else if(!YYMM && !MMYY){
        NA = true;
    }

    //cout
    if (Ambiguous){
        cout<< "AMBIGUOUS";
    }
    else if (YYMM){
        cout<< "YYMM";
    }
    else if(MMYY){
        cout<< "MMYY";
    }
    else if (NA){
        cout<< "NA";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'a' was not declared in this scope
   11 |     a = input/100;
      |     ^
a.cc:12:5: error: 'b' was not declared in this scope
   12 |     b = input%100;
      |     ^
Language: C++

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

int main() {
  string s; cin >>s;
  string ans;
  string emp = "";
  string pre = emp + s.at(0) + s.at(1);
  string lat = emp + s.at(2) + s.at(3);
  if ((pre=="00"||pre>="13")&&(lat=="00"||lat>="13") ans = "NA";
  
  else if (pre>="13"||pre=="00") ans = "YYMM";
  else if (lat>="13"||lat=="00") ans = "MMYY";
  else ans = "AMBIGUOUS";
  
  cout <<ans;
  cout <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:53: error: expected ';' before 'ans'
   11 |   if ((pre=="00"||pre>="13")&&(lat=="00"||lat>="13") ans = "NA";
      |                                                     ^~~~
      |                                                     ;
a.cc:13:3: error: expected primary-expression before 'else'
   13 |   else if (pre>="13"||pre=="00") ans = "YYMM";
      |   ^~~~
a.cc:11:65: error: expected ')' before 'else'
   11 |   if ((pre=="00"||pre>="13")&&(lat=="00"||lat>="13") ans = "NA";
      |      ~                                                          ^
      |                                                                 )
   12 | 
   13 |   else if (pre>="13"||pre=="00") ans = "YYMM";
      |   ~~~~
Language: C++

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

int main() {
  int input;
  cin >> input;
  int former = input/100;
  int latter = input%100;
  
  if(former >= 1 && former <= 12) {
    if(latter >= 1 && latter <= 12) {
      cout << "AMBIGUOUS" << endl;
    }
    else {
      cout << "MMYY" << endl;
    }
  }
  if(latter >= 1 && latter <= 12) {
    if(!(former >= 1 && former <= 12)) { 
      cout << "YYMM" << endl;
    }
  else {
    cout << "NA" << endl;
  }
}


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

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  string s ;
  cin >> s  ;
  
  int former , latter ;
  former = stoi(s.substr(0,2)) ;
  latter = stoi(s.substr(2,2)) ;
  
  if(former>=1 && former<=12){
    if(latter>=1 && latter<=12){
    cout << "AMBIGUOUS" << endl ;
    }else{
      cout << "MMYY" << endl ;
    }else if(latter>=1 && latter<=12){
      cout << "YYMM" << endl ;
    }
  }else{
      cout << "NA" << endl ;
    }
  
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:6: error: expected '}' before 'else'
   19 |     }else if(latter>=1 && latter<=12){
      |      ^~~~
a.cc:14:30: note: to match this '{'
   14 |   if(former>=1 && former<=12){
      |                              ^
a.cc: At global scope:
a.cc:22:4: error: expected unqualified-id before 'else'
   22 |   }else{
      |    ^~~~
a.cc:26:3: error: expected unqualified-id before 'return'
   26 |   return 0 ;
      |   ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  string s ;
  cin >> s  ;
  
  int former , latter ;
  former = stoi(s.substr(0,2)) ;
  latter = stoi(s.substr(2,2)) ;
  
  if(former>=1 && former<=12){
    if(latter>=1 && latter<=12){
    cout << "AMBIGUOUS" << endl ;
    }else{
      cout << "MMYY" << endl ;
    }else if(latter>=1 && latter<=12){
      cout << "YYMM" << endl ;
    }else{
      cout << "NA" << endl ;
    }
  
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:6: error: expected '}' before 'else'
   19 |     }else if(latter>=1 && latter<=12){
      |      ^~~~
a.cc:14:30: note: to match this '{'
   14 |   if(former>=1 && former<=12){
      |                              ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  string s ;
  cin >> s  ;
  
  int former , latter ;
  former = stoi(s.substring(0,2)) ;
  latter = stoi(s.substring(2,2)) ;
  
  if(former>=1 && former<=12){
    if(latter>=1 && latter<=12){
    cout << "AMBIGUOUS" << endl ;
    }else{
      cout << "MMYY" << endl ;
    }else if(latter>=1 && latter<=12){
      cout << "YYMM" << endl ;
    }else{
      cout << "NA" << endl ;
    }
  
  return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
   11 |   former = stoi(s.substring(0,2)) ;
      |                   ^~~~~~~~~
      |                   substr
a.cc:12:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
   12 |   latter = stoi(s.substring(2,2)) ;
      |                   ^~~~~~~~~
      |                   substr
a.cc:19:6: error: expected '}' before 'else'
   19 |     }else if(latter>=1 && latter<=12){
      |      ^~~~
a.cc:14:30: note: to match this '{'
   14 |   if(former>=1 && former<=12){
      |                              ^
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'endl'
    9 | cout <<"AMBIGUOUS" endl;
      |                   ^~~~~
      |                   ;
a.cc:19:15: error: expected ';' before 'endl'
   19 |   cout << "NA" endl;
      |               ^~~~~
      |               ;
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

int a;
   cin >> a;
   if((a/100 == 0 &&(a%100 >= 13||a%100 == 0))||(a%100 == 0 &&(a/100 >= 13||a/100 == 0))){
    cout <<"NA" << endl;
  }
  
  else if(((a/100 >0)&&(a/100 <= 12)) && ((a%100 >0)&&(a%100 <= 12))){
    cout << "AMBIGUOUS" << endl;
  }
else if((a%100 <=12)){
  cout << "YYMM" << endl;
}
else if((a/100 <=12)){
  cout << "MMYY" << endl;
}
 
 

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

#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
//#include <bits/stdc++.h>
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define FORR(i,i0,n) for(int (i)=(n)-1; (i)>=(i0);(i)--)
#define rn return
#define fi first
#define se second
typedef std::pair<int,int> P;
using namespace std;
using ll = long long;




// str.substr(start,length)
int mainB(){
    string S;
    cin >> S;
    int F2 = stoi(S.substr(0,2));
    int L2= stoi(S.substr(2,2));
    if (F2<=12&L2<=12){
        cout << "AMBIGUOUS"; rn 0;
    }
    else if (F2<=12){
        cout << "MMYY"; rn 0;
    }
    else if (L2<=12){
        cout << "YYMM"; rn 0;
    }
    else{
        cout << "NA"; rn 0;
    }
    
    
    rn 0;
}

// tolower()
int mainA(){
    int N,K; string S;
    cin >> N >> K >> S;
    S[K-1] = tolower(S[K-1]);
    cout << S;
    rn 0;
}


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

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

int main() {
  
  vector<int> S(4);
  
  for(int i =0;i < 4;++i){
    cin >> S[i];
  }
  
  if(!(S[1] == 0)){
      if(S[2] == 1 && S[3] <= 2){
      cout << "AMBIGUOUS" << endl;
    }
    else if(S[2] == 0 && S[3] > 0){
      cout << "AMBIGUOUS" << endl;
    }
    else{
      cout << "YYMM" << endl;
    }
  }
  else if(S[0] == 0 && S[1] > 0){
    if(S[2] == 1 && S[3] > 0){
      cout << "AMBIGUOUS" << endl;
    }
    else if(S[2] == 0 && S[3] <= 2){
      cout << "AMBIGUOUS" << endl;
    }
    else{

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




Compiler output:
a.cc: In function 'int main()':
a.cc:32:3: error: expected '}' before 'else'
   32 |   else{
      |   ^~~~
a.cc:30:9: note: to match this '{'
   30 |     else{
      |         ^
a.cc:32:3: error: expected '}' before 'else'
   32 |   else{
      |   ^~~~
a.cc:23:33: note: to match this '{'
   23 |   else if(S[0] == 0 && S[1] > 0){
      |                                 ^
Language: C++

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

int main(){
  vector<int> s(4);
  for(int i=0;i<4;i++){
    if(10*s[2]+s[3]>12 && 10*s[0]+s[1]>12){
      cout << "NA" << endl;
    }else if(10*s[2]+s[3]>12){
      cout << "MMYY" << endl;
    }else if(10*s[0]+s[1]>12){
      cout << "YYMM" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:6:23: note: to match this '{'
    6 |   for(int i=0;i<4;i++){
      |                       ^
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  string s;
  cin >>s;
  bool mmyy = false;
  bool yymm = false;
  //mmyyから考慮
  if(s.at(0) == '0' && s.at(1) != '0'){
    mmyy = true;
  }
  else if(s.at(0) == '1' && (s.at(1) == '0' || s.at(1) == '1' || s.at(1) == '2')){
    mmyy = true;
  }
  //yymm
  if(s.at(2) == '0' && s.at(3) != '0'){
    yymm = true;
  }
  else if(s.at(2) == '1' && (s.at(3) == '0' || s.at(3) == '1' || s.at(3) == '2')){
    yymm = true;
  }

  if(mmyy == true && yymm == true){
    cout << "AMBIGUOUS" << endl;
  }
  else if(mmyy == false && yymm == true){
    cout << "YYMM" << endl;
  } 
  else if(mmyy == true && yymm == false){
    cout << "MMYY" << endl;
  }
  else{
    cout << "NA" << endl;1905
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:30: error: expected ';' before '}' token
   34 |     cout << "NA" << endl;1905
      |                              ^
      |                              ;
   35 |   }
      |   ~
Language: C++

#include<iostream>
#include <cmath>
#include<vector>
#define rep(i, n) for (int i=0;i<n;i++)
#include <map> 
#include<algorithm>
#include <numeric>
#include<deque>
#include<queue>
#include<string>

using namespace std;
typedef long long ll;

int main(void){
    int number;
    cin>>number;
    int first;
    int second;
    num1=number/100;
    num2=number%100;
    if (num1>13){
        if(num2>13 || num2==0){
            cout<<"NA"<<endl;
        }
        else{
            cout<<"YYMM"<<endl;
        }
    }
    else if(num1==0){
        cout<<"NA"<<endl;
    }
    else{
        if(num2>13){
            cout<<"MMYY"<<endl;
        }
        else{
            cout<<"AMBIGUOUS"<<endl;
        }
    }

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'num1' was not declared in this scope
   20 |     num1=number/100;
      |     ^~~~
a.cc:21:5: error: 'num2' was not declared in this scope
   21 |     num2=number%100;
      |     ^~~~
Language: C++

#include<iostream>
#include <cmath>
#include<vector>
#define rep(i, n) for (int i=0;i<n;i++)
#include <map> 
#include<algorithm>
#include <numeric>
#include<deque>
#include<queue>
#include<string>

template < typename T > std::string to_string( const T& n )
    {
        std::ostringstream stm ;
        stm << n ;
        return stm.str() ;
    }

using namespace std;
typedef long long ll;

int main(void){
    int number;
    cin>>number;
    string s=to_string(number);
    string sf;
    string sa;
    sf[0]=s[0];
    sf[1]=s[1];
    sa[0]=s[2];
    sa[1]=s[3];



    int num1 = stoi(sf);
    int num2 = stoi(sa);

    if (num1>13){
        if(num2>13 || num2==0){
            cout<<"NA"<<endl;
        }
        else{
            cout<<"YYMM"<<endl;
        }
    }
    else if(num1==0){
        cout<<"NA"<<endl;
    }
    else{
        if(num2>13){
            cout<<"MMYY"<<endl;
        }
        else{
            cout<<"AMBIGUOUS"<<endl;
        }
    }

    
}

Compiler output:
a.cc: In function 'std::string to_string(const T&)':
a.cc:14:28: error: 'stm' has incomplete type
   14 |         std::ostringstream stm ;
      |                            ^~~
In file included from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/iosfwd:106:11: note: declaration of 'std::ostringstream' {aka 'class std::__cxx11::basic_ostringstream<char>'}
  106 |     class basic_ostringstream;
      |           ^~~~~~~~~~~~~~~~~~~
Language: C++

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

int main(){
  int s;cin >> s;
  int o = s/100;
  int t = s%100;
  if(o > 12){//MMYYではない AMBIGUOUS  NA-YYMM
    if(t <= 12){cout << "YYMM" << endl;return 0;}
    else {cout << "NA" << endl;return 0;}
  } else if(t <= 12){//MMYY かも
    cout << "AMBIGUOUS" << endl;
    return 0;
  } else {
    cout << "MMYY"
    return 0;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected ';' before 'return'
   15 |     cout << "MMYY"
      |                   ^
      |                   ;
   16 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>
int main(){
    int S;
    scanf("%d",&S);
    
    int a = S/100
    int b = S%100;
    
    if(a >= 1 && a <= 12 && b >= 1 && b <= 12){
        printf("AMBIGUOUS\n");
    }
    if(a == 0 || a > 12){
        if(b == 0 || b > 12){
            printf("NA\n");
        }else{
            printf("YYMM\n");
        }
    if(b == 0 || b > 12){
        if(a == 0 || a > 12){
            printf("NA\n");
        }else{
            printf("MMYY\n");
        }
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:5: error: expected ',' or ';' before 'int'
    7 |     int b = S%100;
      |     ^~~
main.c:9:29: error: 'b' undeclared (first use in this function)
    9 |     if(a >= 1 && a <= 12 && b >= 1 && b <= 12){
      |                             ^
main.c:9:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
main.c:25:1: error: expected declaration or statement at end of input
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define all(x) (x).begin(),(x).end()
#define dup(x,y) (((x)+(y)-1)/(y))
#define sz(x) (int)(x).size()
#define MOD 1000000007
#define pint pair<int,int>
#define pdouble pair<double,double>
using namespace std;
typedef long long ll;

int main(){
    int s;
    cin >> s;
    int a, b, c, d;
    a = s/1000;
    b = (s-a*1000);
    c = s-a*1000-b*100;
    d = s-a*1000-b*100-c*10;
    int f, s;
    f = a*10+b;
    s = c*1-+d;
    int x = 0, y = 0;
    if(f <= 12 && f > 0) x = 1;
    if(s <= 12 && s > 0) y = 1;
    if(x){
        if(y) puts("AMBIGUOUS");
        else puts("YYMM");
    }else{
        if(y) puts("MMYY");
        else puts("NA");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: redeclaration of 'int s'
   20 |     int f, s;
      |            ^
a.cc:13:9: note: 'int s' previously declared here
   13 |     int s;
      |         ^
Language: C++

#include <iostream>
#include <string>
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';
  if(A>0 && A<13 && B>0 && B<13)cout<<"AMBIGUOUS";
  else if(A>0 && A<13)cout<<"MMYY";
  else if(B>0 && B<13)cout<<"YYMM";
  else cout<<"NA";
  cout<<endl;
}
  
  
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ',' or ';' before ')' token
    6 |   int A=S[0]-'0')*10+S[1]-'0';
      |                 ^
a.cc:7:17: error: expected ',' or ';' before ')' token
    7 |   int B=S[2]-'0')*10+S[3]-'0';
      |                 ^
Language: C++

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

/*これが一番いいとは思わないが...ごり押し
int main(){
  string S;
  cin >> S;
  int n = stoi(S);
  int a = n / 100;
  int b = n - 100 * a;

  if(a == 0){                                 //上2桁0  ->下二桁は0か13以上はアウト
    if(1 <= b && b <= 12)
      cout << "YYMM" << endl;
    else
      cout << "NA" << endl;
  }else if(1 <= a && a <= 12){        //上二桁1以上12以下 -> 下二桁がなんでも、存在
    if(1 <= b && b <= 12)
      cout << "AMBIGUOUS" << endl;
    else
      cout << "MMYY" << endl;
  }else{
    if(1 <= b && b <= 12)                   //上二桁が13以上 -> 下二桁は1以上12以下しかない...
      cout << "YYMM" << endl;
    else
      cout << "NA" << endl;
  }

  return 0;
}

Compiler output:
a.cc:4:1: error: unterminated comment
    4 | /*これが一番いいとは思わないが...ごり押し
      | ^
Language: Java

import java.util.*;

public class YYMM_or_MMYY{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] c = sc.next().toCharArray();
    int number1 = Character.getNumericValue(c[0]) * 10 + Character.getNumericValue(c[1]);
    int number2 = Character.getNumericValue(c[2]) * 10 + Character.getNumericValue(c[3]);

    //System.out.println(number1);
    //System.out.println(number2);

    int count1 = 0;
    int count2 = 0;

    if(number1<=12 && number1>0){
      count1 += 1;
    }
    if(number2<=12 && number2>0){
      count2 += 1;
    }
    if(count1==1 && count2==1){
      System.out.println("AMBIGUOUS");
    }
    if(count1==1 && count2==0){
      System.out.println(c);
    }
    if(count1==0 && count2==1){
      System.out.println(c[2]+""+c[3]+""+c[0]+""+c[1]);
    }
    if(count1==0 && count2==0){
      System.out.println("NA");
    }


  }
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
	int a[4],u,s,n;
	cin>>n;
	u=(n/100);
	s=(n%100);
	if(u>12&&s>12)cout<<"NA";
	else(u==0||s==0)cout<<"NA";
	else if(u<=12&&s>12)cout<<"MMYY";
	else if(u>12&&s<=12)cout<<"YYMM";
	else cout<<"AMBIGUOUS";
	cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before 'cout'
    9 |         else(u==0||s==0)cout<<"NA";
      |                         ^~~~
      |                         ;
a.cc:10:9: error: 'else' without a previous 'if'
   10 |         else if(u<=12&&s>12)cout<<"MMYY";
      |         ^~~~