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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, bool>;
const int INF = 1000000007;

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

Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:2: error: illegal character: '#'
#define rep(i, n) for (int i = 0; i < (n); ++i)
^
Main.java:2: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (n); ++i)
                                  ^
Main.java:2: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (n); ++i)
                                           ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
using ll = long long;
^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: '.class' expected
using ll = long long;
                ^
Main.java:5: error: '.class' expected
using P = pair<int, bool>;
                  ^
Main.java:5: error: ';' expected
using P = pair<int, bool>;
                        ^
Main.java:6: error: class, interface, enum, or record expected
const int INF = 1000000007;
^
Main.java:10: error: not a statement
  cin >> s;
      ^
Main.java:15: error: not a statement
    cout << "NA" << endl;
                 ^
Main.java:17: error: not a statement
    cout << "AMBIGUOUS" << endl;
                        ^
Main.java:19: error: not a statement
    cout << "YYMM" << endl;
                   ^
Main.java:21: error: not a statement
    cout << "MMYY" << endl;
                   ^
15 errors
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mod 1000000007
using namespace std;

int main()
{
    fast_io
int s,a,b;
    cin>>s;
a=s/100;
b=s%100;

    if(a>12){
        if(b>0&&b<=12)
    cout<<"YYMM"<<endl;
        else
    cout<<"NA"<<endl;
    }
    else if(a==0)
    {
        if(b==0||b>12)
    cout<<"NA"<<endl;
        else
    cout<<"YYMM"<<endl;
    }
    else{
    else if(b==0||b>12)
    cout<<"MMYY"<<endl;
    else  cout<<"AMBIGUOUS"<<endl;
    }

    return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:29:5: error: 'else' without a previous 'if'
   29 |     else if(b==0||b>12)
      |     ^~~~
Language: C++

s = input()
mae = int(s[:2])
usiro = int(s[2:])

ym = 0
my = 0

if (1 <= usiro <= 12): ym = 1
if (1 <= mae <= 12): my = 1

if (ym and my): print("AMBIGUOUS")
elif (ym): print("YYMM")
elif (my): print("MMYY")
else: print("NA")



Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

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

int main()
{
  int n;
  cin >> n;
  int a = n /100;
  int b = n % 100;
  if (1 <= a && a <= 12){
    if(1 <= b && b <= 12) cout << "AMBIGUOS" << endl;
  	else cout << "MMYY" << endl;
  }
  else {
    if (1 <= b && b <= 12) cout << "YYMM" << endl;
  	else cout << "NA" << endl;
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int main() {
	String s,a,b; cin>>s;
	a=s.substring(0,2); b=s.substring(2,2);
	cout<<("00"<a&&a<"13"?"00"<b&&b<"13"?"AMBIGUOUS":"MMYY":"00"<b&&b<"13"?"YYMM":"NA";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'String' was not declared in this scope
    4 |         String s,a,b; cin>>s;
      |         ^~~~~~
a.cc:4:28: error: 's' was not declared in this scope
    4 |         String s,a,b; cin>>s;
      |                            ^
a.cc:5:9: error: 'a' was not declared in this scope
    5 |         a=s.substring(0,2); b=s.substring(2,2);
      |         ^
a.cc:5:29: error: 'b' was not declared in this scope
    5 |         a=s.substring(0,2); b=s.substring(2,2);
      |                             ^
a.cc:6:91: error: expected ')' before ';' token
    6 |         cout<<("00"<a&&a<"13"?"00"<b&&b<"13"?"AMBIGUOUS":"MMYY":"00"<b&&b<"13"?"YYMM":"NA";
      |               ~                                                                           ^
      |                                                                                           )
Language: C++

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

int main() {
    int s;
    int a, b;
    cin >> s;

    a = s / 100;
    b = s % 100;

    if (i <= a && a <= 12) {
        if (1 <= b && b <= 12) cout << "AMBIGUOUS" << "\n";
        else cout << "MMYY" << "\n";
    } else {
        if (1 <= b && b <= 12) cout << "YYMM" << "\n";
        else cout << "NA" << "\n";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'i' was not declared in this scope
   12 |     if (i <= a && a <= 12) {
      |         ^
Language: C++

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

int main() {
    int s;
    int a, b;
    cin >> s;

    a = s / 100;
    b = s % 100;

    if (i <= a && a <= 12) {
        if (i <= b && b <= 12) cout << "AMBIGUOUS" << "\n";
        else cout << "MMYY" << "\n";
    } else {
        if (1 <= b && b <= 12) cout << "YYMM" << "\n";
        else cout << "NA" << "\n";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'i' was not declared in this scope
   12 |     if (i <= a && a <= 12) {
      |         ^
Language: C

#include<stdio.h>
int main(){
  int a[4];
  int n;
  scanf("%d",&n);
  a[0] = (n-n%1000)/1000;
  a[1] = (n-a[0]*1000-n%100)/100;
  a[2] = (n-a[0]*1000-a[1]*100)/10;
  a[3] = n%10;
  int a = a[0]*10+a[1];
  int b = a[2]*10+a[3];
  if(a>12 && b>12){
    printf("NA");
  }else if(a <=12 && b >12 && a!= 0){
    printf("MMYY");
  }else if(b <=12 && a >12 && b!= 0){
    printf("YYMM");
  }else{
    printf("AMBIGUOUS");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: conflicting types for 'a'; have 'int'
   10 |   int a = a[0]*10+a[1];
      |       ^
main.c:3:7: note: previous declaration of 'a' with type 'int[4]'
    3 |   int a[4];
      |       ^
Language: C++

#include <iostream>
using namespace std;
 
int main(){
	int s;
	cin>>s;
	int a=s/100;
	int b=s%100;
	if(1<=a && a<=12){
		if(1<=b && b<=12) cout<<"AMBIGUOUS";
		else cout<<"MMYY";
	} else{
		if(1<=b && b<=12) cout<<"YYMM";
		else cout<<"NA";
	}

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

include iostream;
using namespace std;

int main(){
int a;
  scanf("%d",&a);
int L=a/100;
int R=a%100;
if(1<=L&&L<=12){
if(1<=R&&R<=12)printf("AMBIGUOUS\n");
else printf("MMYY\n");
}else{
if(1<=R&&R<=12)printf("YYMM\n");
else printf("NA\n");
}
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include iostream;
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
    6 |   scanf("%d",&a);
      |   ^~~~~
a.cc:10:16: error: 'printf' was not declared in this scope
   10 | if(1<=R&&R<=12)printf("AMBIGUOUS\n");
      |                ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include iostream;
a.cc:11:6: error: 'printf' was not declared in this scope
   11 | else printf("MMYY\n");
      |      ^~~~~~
a.cc:11:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:16: error: 'printf' was not declared in this scope
   13 | if(1<=R&&R<=12)printf("YYMM\n");
      |                ^~~~~~
a.cc:13:16: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:6: error: 'printf' was not declared in this scope
   14 | else printf("NA\n");
      |      ^~~~~~
a.cc:14:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
using namespace std;

int main() {
	int S[4];
	for(int i=0;i<4;i++)
	{ 
		cin>>S[i];
	}
	int a=10*S[0]+S[1];
	int b=10*S[2]+S[3];
	if(12<a && a<=99 && 0<b && b<=12)
	cout<<"YYMM";
	else if(0<a && a<=12 && 12<b && b<=99)
	cout<<"MMYY";
	else if(0<a && a<=12 && 0<b && b<=12)
	cout<<"AMBIGUOUS"
	else
	cout<<"NA"
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: expected ';' before 'else'
   17 |         cout<<"AMBIGUOUS"
      |                          ^
      |                          ;
   18 |         else
      |         ~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int S[4];
	for(int i=0;i<4;i++)
	{ 
		cin>>S[i];
	}
	a=10*S[0]+S[1];
	b=10*S[2]+S[3];
	if(12<a && a<=99 && 0<b && b<=12)
	cout<<"YYMM";
	else if(0<a && a<=12 && 12<b && b<=99)
	cout<<"MMYY";
	else if(0<a && a<=12 && 0<b && b<=12)
	cout<<"AMBIGUOUS"
	else
	cout<<"NA"
	


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'a' was not declared in this scope
   10 |         a=10*S[0]+S[1];
      |         ^
a.cc:11:9: error: 'b' was not declared in this scope
   11 |         b=10*S[2]+S[3];
      |         ^
a.cc:17:26: error: expected ';' before 'else'
   17 |         cout<<"AMBIGUOUS"
      |                          ^
      |                          ;
   18 |         else
      |         ~~~~              
a.cc:19:19: error: expected '}' at end of input
   19 |         cout<<"NA"
      |                   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int S[4];
	for(int i=0;i<4;i++)
	{ 
		cin>>S[i];
	}
	a=10*S[0]+S[1]
	b=10*S[2]+S[3]
	if(12<a && a<=99 && 0<b && b<=12)
	cout<<"YYMM";
	else if(0<a && a<=12 && 12<b && b<=99)
	cout<<"MMYY";
	else if(0<a && a<=12 && 0<b && b<=12)
	cout<<"AMBIGUOUS"
	else
	cout<<"NA"
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'a' was not declared in this scope
   10 |         a=10*S[0]+S[1]
      |         ^
a.cc:14:9: error: 'else' without a previous 'if'
   14 |         else if(0<a && a<=12 && 12<b && b<=99)
      |         ^~~~
a.cc:14:36: error: 'b' was not declared in this scope
   14 |         else if(0<a && a<=12 && 12<b && b<=99)
      |                                    ^
a.cc:17:26: error: expected ';' before 'else'
   17 |         cout<<"AMBIGUOUS"
      |                          ^
      |                          ;
   18 |         else
      |         ~~~~
Language: Java

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

bool check(int n)
{
	if(n>=1 && n<=12)
		return true;
	return false;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	string S;
	cin>>S;

	string S1,S2;

	for(int i = 0;i<4;i++)
	{
		if(i == 0 || i == 1)
			S1 = S1 + S[i];
		else
			S2 = S2 + S[i];
	}

	//cout<<S1<<" "<<S2<<endl;

	int a = stoi(S1);
	int b = stoi(S2);

	if(check(a) && check(b))
		cout<<"AMBIGUOUS"<<endl;
	else if(check(a))
		cout<<"MMYY"<<endl;
	else if(check(b))
		cout<<"YYMM"<<endl;
	else
		cout<<"NA"<<endl;

	return 0;
} 

Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:3: error: illegal character: '#'
#define ll long long
^
Main.java:3: error: class, interface, enum, or record expected
#define ll long long
        ^
Main.java:4: error: illegal character: '#'
#define pb push_back
^
Main.java:10: error: class, interface, enum, or record expected
	return false;
	^
Main.java:11: error: class, interface, enum, or record expected
}
^
Main.java:16: error: class, interface, enum, or record expected
	cin.tie(NULL);
	^
Main.java:18: error: unnamed classes are a preview feature and are disabled by default.
	string S;
	^
  (use --enable-preview to enable unnamed classes)
Main.java:19: error: class, interface, enum, or record expected
	cin>>S;
	^
Main.java:21: error: class, interface, enum, or record expected
	string S1,S2;
	^
Main.java:23: error: class, interface, enum, or record expected
	for(int i = 0;i<4;i++)
	^
Main.java:23: error: class, interface, enum, or record expected
	for(int i = 0;i<4;i++)
	              ^
Main.java:23: error: class, interface, enum, or record expected
	for(int i = 0;i<4;i++)
	                  ^
Main.java:27: error: class, interface, enum, or record expected
		else
		^
Main.java:29: error: class, interface, enum, or record expected
	}
	^
Main.java:36: error: class, interface, enum, or record expected
	if(check(a) && check(b))
	^
Main.java:38: error: class, interface, enum, or record expected
	else if(check(a))
	^
Main.java:40: error: class, interface, enum, or record expected
	else if(check(b))
	^
Main.java:42: error: class, interface, enum, or record expected
	else
	^
Main.java:45: error: class, interface, enum, or record expected
	return 0;
	^
Main.java:46: error: class, interface, enum, or record expected
} 
^
22 errors
Language: C++

#include <iostream>

using namespace std;
int main(){
  int S[4];
  int x; 
  cin>>x;
  for(int i=3;i>=0;i--)
  {
	S[i]=x%10;
	x=x/10;
  }
  
  int a= (10*S[0])+S[1];
  int b= (10*S[2])+S[3];
  if ((b<=0 || b>12) &&( a=<0 || a >12)){
  	cout << "NA";
  }
  else if (a>12){
    cout<< "YYMM";
  }
 else if (a<=12){ 
    if (b>12){
      cout<< "MMYY";
    }
    if (b<=12){
        cout<< "AMBIGUOUS";
    }
  }
 
  return 0;
}    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: expected primary-expression before '<' token
   16 |   if ((b<=0 || b>12) &&( a=<0 || a >12)){
      |                            ^
Language: Java

import java.util.Scanner;

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

        Scanner sc = new Scanner(System.in);
        String sNum = sc.nextLine();
        String sConv1 = sNum.substring(0, 1);
        String sConv2 = sNum.substring(2, 3);
        String sResult = "";

        if (0 == Integer.parseInt(sConv1) || 0 == Integer.parseInt(sConv2)) {
            sResult = "NA";
        } else if (12 >= Integer.parseInt(sConv1) && 12 >= Integer.parseInt(sConv2)) {
            sResult = "AMBIGUOUS";
        } else if (12 < Integer.parseInt(sConv1)) {
            sResult = "YYMM";
        } else if (12 < Integer.parseInt(sConv2)) {
            sResult = "MMYY";
        }
        System.out.print(sResult);
    }
}


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

import java.util.Scanner;

public class App {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String sNum = sc.nextLine();
        String sConv1 = sNum.substring(0, 1);
        String sConv2 = sNum.substring(2, 3);
        String sResult = "";

        if (0 == Integer.parseInt(sConv1) || 0 == Integer.parseInt(sConv2)) {
            sResult = "NA";
        } else if (12 >= Integer.parseInt(sConv1) && 12 >= Integer.parseInt(sConv2)) {
            sResult = "AMBIGUOUS";
        } else if (12 < Integer.parseInt(sConv1)) {
            sResult = "YYMM";
        } else if (12 < Integer.parseInt(sConv2)) {
            sResult = "MMYY";
        }
        System.out.print(sResult);
    }
}


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

#include <stdio.h>
void f(int s){
  int a,b,c,d,m,n;
  a=s/1000;
  s=s%1000;
  b=s/100;
  s=s%100;
  c=s/10;
  d=s%10;
  m=10*a+b;
  n=10*c+d;
  if(0<<n<=12 && 0<<m<=12){
    printf("AMBIGUOUS");
  }
  else if(0<<m<=12)printf("YYMM"):
  else if(0<<n<=12)printf("MMYY");
  else printf("NA");
}
int main(){
  int s,m,n;
  scanf("%d",&s);
  f(s);
  return 0;
}
  
  


Compiler output:
main.c: In function 'f':
main.c:15:34: error: expected ';' before ':' token
   15 |   else if(0<<m<=12)printf("YYMM"):
      |                                  ^
      |                                  ;
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int upper = N /100, lower = N % 100;
  
  if (upper > 0 && upper <= 12) {
    cout << "AMBIGIOUS" << endl;
    }
  } else {
    if (lower > 0 && lower <= 12) {
      cout << "YYMM" << endl;
    } else {
      cout << "NA" << endl;
    } 
    
  }
  
  
  
}

Compiler output:
a.cc:13:5: error: expected unqualified-id before 'else'
   13 |   } else {
      |     ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  int upper = N /100; lower = N % 100;
  
  if (upper > 0 && upper <= 12) {
    cout << "AMBIGIOUS" << endl;
    }
  } else {
    if (lower > 0 && lower <= 12) {
      cout << "YYMM" << endl;
    } else {
      cout << "NA" << endl;
    } 
    
  }
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'lower' was not declared in this scope; did you mean 'tolower'?
    8 |   int upper = N /100; lower = N % 100;
      |                       ^~~~~
      |                       tolower
a.cc: At global scope:
a.cc:13:5: error: expected unqualified-id before 'else'
   13 |   } else {
      |     ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream> 
#include<iomanip> 
#include<vector> 
#include<map> 
#include<set> 
#include<algorithm> 
#include<numeric> 
#include<limits> 
#include<bitset> 
#include<functional> 
#include<type_traits> 
#include<queue> 
#include<stack> 
#include<array> 
#include<random> 
#include<utility> 
#include<cstdlib> 
#include<ctime>
//#define _LIBCPP_DEBUG 0
//#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define all(a) (a).begin(),(a),end()
#define rep(i,n) for (ll i = 0; i < (n); ++i)	
//setprecision(16)

void outi(int x) { cout << x << endl; }
void outl(ll x) { cout << x << endl; }
void outs(string x) { cout << x << endl; }
ll max(ll a, ll b) {
	ll max;
	if (a > b) max = a;
	else max = b;
	return max;
}
ll min(ll a, ll b) {
	ll min;
	if (a < b) min = a;
	else min = b;
	return min;
}
//---------------------------------------------------------------

int main() {
	string s;
	cin >> s;
	string mae;
	mae.push_back(s[0]);
	mae.push_back(s[1]);
	string usiro;
	usiro.push_back(s[2]);
	usiro.push_back(s[3]);

	int m = atoi(mae.c_str);
	int u = atoi(usiro.c_str);

	if (u <= 12 && m <= 12) outs("AMBIGUOUS");
	else if (u <= 12) {
		outs("YYMM");
	}
	else if (m <= 12) {
		outs("MMYY");
	}
	else {
		outs("NA");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:26: error: invalid use of non-static member function 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   55 |         int m = atoi(mae.c_str);
      |                      ~~~~^~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:56:28: error: invalid use of non-static member function 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   56 |         int u = atoi(usiro.c_str);
      |                      ~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:2640:7: note: declared here
 2640 |       c_str() const _GLIBCXX_NOEXCEPT
      |       ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int cnt1=0,cnt2=0;
  int num1=(s[0]-'0')*10+s[1]-'0';
  int num2=(s[2]-'0')*10+s[3]-'0';
  if(num1>0 && num1<13)cnt1++;
  if(num2>0 && num2<13)cnt2++;
  if(cnt==0)	cout<<"NA"<<endl;
  else if(cnt1==1 && cnt2==0)	cout<<"MMYY"<<endl;
  else if(cnt2==1 && cnt1==0) cout<<"YYMM"<<endl;
  else	cout<<"AMBIGUOUS"<<endl;
  return 0
    ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'cnt' was not declared in this scope; did you mean 'cnt2'?
   11 |   if(cnt==0)    cout<<"NA"<<endl;
      |      ^~~
      |      cnt2
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string S;
    cin >> S;
    int yy = 10 * (S[0] - '0') + S[1] - '0';
    int mm = 10 * (S[2] - '0') + S[3] - '0';
    if (yy == 0 && mm > 0 && mm <= 12)
    {
        cout << "YYMM" << endl;
    }
    else if (yy == 0 && mm > 12)
    {
        cout << "NA" << endl;
    }
    els
    else if (mm == 0)
    {
        cout << "MMYY" << endl;
    }
    else if (yy <= 12 && mm <= 12)
    {
        cout << "AMBIGUOUS" << endl;
    }
    else if (yy > 12 && mm <= 12)
    {
        cout << "YYMM" << endl;
    }
    else if (yy <= 12 && mm > 12)
    {
        cout << "MMYY" << endl;
    }
    else
    {
        cout << "NA" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'els' was not declared in this scope
   17 |     els
      |     ^~~
a.cc:22:5: error: 'else' without a previous 'if'
   22 |     else if (yy <= 12 && mm <= 12)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
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=(B>=1&&B<=12);
  bool MMYY=(A>=1&&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:9:14: error: 'B' was not declared in this scope
    9 |   bool YYMM=(B>=1&&B<=12);
      |              ^
a.cc:10:14: error: 'A' was not declared in this scope
   10 |   bool MMYY=(A>=1&&A<=12);
      |              ^
Language: C++

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

int main(){
  string ;
  cin>>s;
  int a=(s[0]-'0')*10+(s[1]-'0');
  int b=(s[2]-'0')*10+(s[3]-'0');
  bool YYMM=(B>=1&&B<=12);
  bool MMYY=(A>=1&&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:5:3: error: declaration does not declare anything [-fpermissive]
    5 |   string ;
      |   ^~~~~~
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:9:14: error: 'B' was not declared in this scope
    9 |   bool YYMM=(B>=1&&B<=12);
      |              ^
a.cc:10:14: error: 'A' was not declared in this scope
   10 |   bool MMYY=(A>=1&&A<=12);
      |              ^
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

int main(){
    int inputNum;
    cout<<"Enter number";
    cin >> inputNum;

    if (inputNum/100 <= 12 && inputNum%100 <= 12 && inputNum/100 !=0 && inputNum%100 !=0){
        cout<< "AMBIGUOUS" ;
    }
    else if (inputNum/100 > 12 && inputNum%100 <= 12 &&  inputNum/100 !=0 && inputNum%100 !=0){
        cout<< "YYMM" ;
    }
    else if (inputNum/100 <= 12 && inputNum%100 > 12 &&inputNum/100 !=0 && inputNum%100 !=0){
        cout<< "MMYY" ;
    }
    else{
        cout<< "N/A";
    }
    return 0;

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

#include <iostream>
#include <cmath>

using namespace std;

int main(){
    int inputNum;
    cout<<"Enter number";
    cin >> inputNum;

    if (inputNum/100 <= 12 && inputNum%100 <= 12 && inputNum !=0){
        cout<< "AMBIGUOUS" ;
    }
    else if (inputNum/100 > 12 && inputNum%100 <= 12 %% inputNum !=0){
        cout<< "YYMM" ;
    }
    else if (inputNum/100 <= 12 && inputNum%100 > 12 && inputNum !=0){
        cout<< "MMYY" ;
    }
    else{
        cout<< "N/A";
    }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:14:55: error: expected primary-expression before '%' token
   14 |     else if (inputNum/100 > 12 && inputNum%100 <= 12 %% inputNum !=0){
      |                                                       ^
a.cc:23:14: error: expected '}' at end of input
   23 |     return 0;
      |              ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define fin ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ii pair<int,int>
#define F first
#define S second
#define pb push_back
#define pf push_front
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fore(i,a,b) for(int i = a;i < b; i+= 1)
#define forr(i,a) for(int i = a; i >= 0; i--)
#define fori(i,m) for(auto i = m.begin(); i != m.end(); i++) 
#define w(t) while(t--)
#define sz(s) int(s.size())
#define cls(a,car) memset(a,car,sizeof (a))
#define ff(x) cerr << #x << " is " << x << '\n'
#define FL freopen("in", "r", stdin),freopen("out", "w", stdout);
#define time cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ii> vii;
const int N = 2 * 1e5 + 5;
const ll mod = 1e9 + 7;
const int INF = INT_MAX;
const ll INFCAD  = ll(INT_MAX) * 2 + 1;
const double E = 1e-9;
int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
// fflush(stdout)
// cout << flush
// a + b = a ^ b + 2 * (a & b) 
int toInt(const string &cad){
    int ans = 0;
    fore(i, 0, sz(cad))
        ans = ans * 10 + (cad[i] - '0');
    return ans;
}
int main(){
    //FL;
    fin;
    int n;
    cin >> n;
    int sec = n % 100;
    n /= 100;
    int fir = n;
    if(1 <= l && l <= 12){
        if(1 <= r && r <= 12)
            cout << "AMBIGUOUS\n";
        else
            cout << "MMYY\n";
    }else{
        if(1 <= r && r <= 12)
            cout << "YYMM\n";
        else
            cout << "NA\n"; 
    }
    time;
    return 0;
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:46:13: error: 'l' was not declared in this scope
   46 |     if(1 <= l && l <= 12){
      |             ^
a.cc:47:17: error: 'r' was not declared in this scope
   47 |         if(1 <= r && r <= 12)
      |                 ^
a.cc:52:17: error: 'r' was not declared in this scope
   52 |         if(1 <= r && r <= 12)
      |                 ^
Language: C++

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

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

    string f,l;
    f = s.sub_str(0,2);
    l = s.sub_str(2,2);
    int fi =stoi(f);
    int li = stoi(l);

    bool a=true;
    bool b=true;
    if(li<=12&&li>0){
        a=true;
    }else{
        a=false;
    }
    if(fi<=12&&fi>0){
        b=true;
    }else{
        b=false;
    }

    if(a&b){
        cout<<"AMBIGUOUS"<<endl;
        return 0;
    }
    if(a){
        cout<<"YYMM"<<endl;
        return 0;
    }
    if(b){
        cout<<"MMYY"<<endl;
        return 0;
    }

    if(!(a||b)){
        cout<<"NA"<<endl;
        return 0;
    }




    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sub_str'; did you mean 'substr'?
   13 |     f = s.sub_str(0,2);
      |           ^~~~~~~
      |           substr
a.cc:14:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sub_str'; did you mean 'substr'?
   14 |     l = s.sub_str(2,2);
      |           ^~~~~~~
      |           substr
Language: C++

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

#define rep(i,a,b)      for(int i=a;i<=b;i++)
#define revp(i,a,b)     for(int i=b;i>=a;i--)
int fd(int n)
{
    n/=100;
    return n;
}

int ld(int n)
{
    n-=100*fd(n);
    return n;
}
int n,a,b;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    
    cin>>n;
    a=fd(n);
    b=ld(n);
    if(a<=12 and a>=1 and b<=12 and b>=1)
        cout<<"AMBIGUOUS";
    else if(a>12 and b<=12 and b>=1)
        cout<<"YYMM";
    else if(a>=1 and a<=12 and b>12)
        cout<<"MMYY";
    else if(a>=1 and a<=12)
        cout<<"MMYY";
    else if(b>=1 and b<=12)
        cout<<"YYMM"
    else
        cout<<"NA";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:21: error: expected ';' before 'else'
   35 |         cout<<"YYMM"
      |                     ^
      |                     ;
   36 |     else
      |     ~~~~
Language: C

#include<stdio.h>
int main()
{
	int s,a,b;

	scanf("%d",&s);
	a=s/100;
	b=s%100;
	if((a==0)||(b==0)){
		printf("NA\n");
		return 0;
	}
	else if((a>12)&&(b>12)){
		pritnf("NA\n");
		return 0;
	}
	else if((a>0)&&(b>0)&&(a<13)&&(b<13)){
		printf("AMBIGUOUS\n");
		return 0;
	}
	else if(b<13){
		printf("YYMM\n");
		return 0;
	}	
	else{
		printf("MMYY\n");
		return 0;
	}
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   14 |                 pritnf("NA\n");
      |                 ^~~~~~
      |                 printf
Language: C

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


int main()
{
int s,n,a,b;

scanf("%d",&s);

b = s%100;
a = (s-b)/100; 

if(a=1&&b=0)
{
    printf("YYMM");
    return 0;
}
if(a=0&&b=1)
{
    printf("MMYY");
    return 0;
}


if(a==0||b==0)
{
    printf("NA");
    return 0;
}

if(a<=12)
{
    if(b>=13)
    {
        printf("MMYY");
        return 0;
    }
    if(b<=12)
    {
        printf("AMBIGUOUS");
        return 0;
    }
}
if(a>=13){
    if(b<=12)
    {
        printf("YYMM");
        return 0;
    }
    if(b>=13)
    {
        printf("NA");
        return 0;
    }
}
}

Compiler output:
main.c: In function 'main':
main.c:15:10: error: lvalue required as left operand of assignment
   15 | if(a=1&&b=0)
      |          ^
main.c:20:10: error: lvalue required as left operand of assignment
   20 | if(a=0&&b=1)
      |          ^
Language: C

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


int main()
{
int s,n,a,b;

scanf("%d",&s);

b = s%100;
a = (s-b)/100; 

if(a==0)
{
    printf("NA");
    return 0;
}
if(b==0)
{
    printf("NA");
    return 0;
}

}

if(a<=12)
{
    if(b>=13)
    {
        printf("MMYY");
        return 0;
    }
    if(b<=12)
    {
        printf("AMBIGUOUS");
        return 0;
    }
}
if(a>=13){
    if(b<=12)
    {
        printf("YYMM");
        return 0;
    }
    if(b>=13)
    {
        printf("NA");
        return 0;
    }
}
}

Compiler output:
main.c:28:1: error: expected identifier or '(' before 'if'
   28 | if(a<=12)
      | ^~
main.c:41:1: error: expected identifier or '(' before 'if'
   41 | if(a>=13){
      | ^~
main.c:53:1: error: expected identifier or '(' before '}' token
   53 | }
      | ^
Language: C

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


int main()
{
int s,n,a,b;

scanf("%d",&s);

b = s%100;
a = (s-b)/100; 

if(a==0||b==0)
{
    printf("NA");
    return 0;
}

if(a<=12)
{
    if(b>=13)
    {
        printf("MMYY");
        return 0;
    }
    if(b<=12)
    {
        printf("AMBIGUOUS");
        return 0;
    }
if(a>=13){
    if(b<=12)
    {
        printf("YYMM");
        return 0;
    }
    if(b>=13)
    {
        printf("NA");
        return 0;
    }
}
}

Compiler output:
main.c: In function 'main':
main.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^
Language: C

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


int main()
{
int s,n,a,b;

scanf("%d",&s);

b = s%100;
a = (s-b)/100; 

if(a==0||b==0)
{
    printf("NA");
    return 0;
}

if(a<=12)
{
    if(b>=13)
    {
        printf("MMYY");
        return 0;
    if(b<=12)
    {
        printf("AMBIGUOUS");
        return 0;
    }
if(a>=13){
    if(b<=12)
    {
        printf("YYMM");
        return 0;
    if(b>=13)
    {
        printf("NA");
        return 0;
    }
}
}

Compiler output:
main.c: In function 'main':
main.c:43:1: error: expected declaration or statement at end of input
   43 | }
      | ^
main.c:43:1: error: expected declaration or statement at end of input
main.c:43:1: error: expected declaration or statement at end of input
Language: C++

#include <iostream>
using namespace std;
string alphabet = "abcdefghijklmnopqrstuvwxyz";
string ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

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



Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected primary-expression before 'else'
   13 |   else if(k >= 13 && l >= 1 && l <= 12)cout << "YYMM" << endl;
      |   ^~~~
Language: C++

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

int main() {
  int N,A=0;
  cin>>N;
  if(A/100>0&&A/100<13){
    A+=2;
  }
  if(A%100>0&&A%100<13>){
    A++;
  }
  if(A==3){
    cout<<"AMBIGUOUS"<<endl;
  }
  if(A==2){
    cout<<"MMYY"<<endl;
  }
  if(A==1){
    cout<<"YYMM"<<endl;
  }
  if(A==0){
    cout<<"NA"<<endl;
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected primary-expression before ')' token
   10 |   if(A%100>0&&A%100<13>){
      |                        ^
Language: C++

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
using namespace std;
string alphabet = "abcdefghijklmnopqrstuvwxyz";
string ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main(){
   string S;
   cin >> S;
   int s = stoi(S);
   int k = s % 100;
   int l = s / 100;
   if(k == 0 && l >= 13 || s = 0)cout << "NA" << endl;
   else if(13 <= s && s <= 99)cout << "NA" << endl;
   else if(13 <= k && k <= 99 && 13 <= l && l <= 99)cout << "NA" << endl;
   else if(1 <= s && s <= 12)cout << "YYMM" << endl;
   else if(1 <= l && l <= 12 && 1 <= k && k <= 12)cout << "AMBIGUOUS" << endl;
   else if(l >= 13)cout << "YYMM" << endl;
   else cout << "MMYY" << endl;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: lvalue required as left operand of assignment
   15 |    if(k == 0 && l >= 13 || s = 0)cout << "NA" << endl;
      |       ~~~~~~~~~~~~~~~~~~^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  string t="NA";
  if((s.at(2)=='0' && s.at(3)!='0') || (s.at(2)=='1' && s.at(3)<'3')){
    t="YYMM";
    if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)<'3')){
    t="AMBIGUOUS";
      cout << t;
      return 0;
    }
  }
  }else if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)<'3')){
     t="MMYY";
  }
  cout << t;
}
     


Compiler output:
a.cc:15:4: error: expected unqualified-id before 'else'
   15 |   }else if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)<'3')){
      |    ^~~~
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout << t;
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  string t="NA";
  if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)<'3')){
    t="AMBIGUOUS";
  }else if((s.at(2)=='0' && s.at(3)!='0') || (s.at(2)=='1' && s.at(3)<'3')){
    t="YYMM";
  }else if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)!<'3')){
     t="MMYY";
  }
  cout << t;
}
     


Compiler output:
a.cc: In function 'int main()':
a.cc:11:70: error: expected ')' before '!' token
   11 |   }else if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)!<'3')){
      |                                              ~                       ^
      |                                                                      )
a.cc:13:4: error: expected ')' before 'cout'
   13 |   }
      |    ^
      |    )
   14 |   cout << t;
      |   ~~~~
a.cc:11:11: note: to match this '('
   11 |   }else if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)!<'3')){
      |           ^
Language: C

#include<stdio.h>
int main()
{
	int i,j,k,l,m,p,q;
	char S[10000];
	scanf("%s",&S);
	p=(S[0]-48)*10+(S[1]-48);
	q=(S[2]-48)*10+(S[3]-48);
	if((p<=12 && p>0)&& (q>12))
	{
		printf("MMYY");
	}
	if((p>12)&& (q<=12 && q>0))
	{
		printf("YYMM");
	}
	if(p<=12 && q<=12 && p>0 && q>0 )
	{
		printf("AMBIGUOUS");
	}
	if(p>12 && q>12)||(p==0 || q==0))
	{
		printf("NA");
	}

}


Compiler output:
main.c: In function 'main':
main.c:21:25: error: expected expression before '||' token
   21 |         if(p>12 && q>12)||(p==0 || q==0))
      |                         ^~
main.c:21:41: error: expected statement before ')' token
   21 |         if(p>12 && q>12)||(p==0 || q==0))
      |                                         ^
Language: C

#include<stdio.h>
int main()
{
	int i,j,k,l,m,p,q;
	char S[10000];
	scanf("%s",&S);
	p=(S[0]-48)*10+(S[1]-48);
	q=(S[2]-48)*10+(S[3]-48);
	if((p<=12 && p>0)&& (q>12))
	{
		printf("MMYY");
	}
	if((p>12)&& (q<=12 && q>0))
	{
		printf("YYMM");
	}
	if(p<=12 && q<=12 && p>0 && q>0 )
	{
		printf("AMBIGUOUS");
	}
	if((p>12 && q>12) ||((p==0)|| (q==0))
	{
		printf("NA");
	}

}


Compiler output:
main.c: In function 'main':
main.c:21:46: error: expected ')' before '{' token
   21 |         if((p>12 && q>12) ||((p==0)|| (q==0))
      |           ~                                  ^
      |                                              )
   22 |         {
      |         ~                                     
main.c:26:1: error: expected expression before '}' token
   26 | }
      | ^
Language: C++

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

int ctoi(char c){
  return c - '0';
}

int main(void){
  char t[4];
  int s[4];
  for(int i = 0; i < 4; i++){
    cin >> t[i];
    s[i] = ctoi(t[i]);
  }
  int y1 = s[0]*10 + s[1],y2 = s[2] * 10 + s[3];
  if(y1 >= 1 && y1 <= 12){
    if(y2 >= 1 && y2 <= 12){
      cout << "AMBIGUOUS" << endl;
    }
    eles{
      cout <<"MMYY" << endl;
    }
  }
  else{
    if(y2 >= 1 && y2 <= 12){
      cout << "YYMM" << endl;
    }
    else cout << "NA" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'eles' was not declared in this scope
   23 |     eles{
      |     ^~~~
Language: C

#include<stdio.h>
int main()
{
	int i,j,k,l,p,q;
	char S[1000];
	scanf("%s",&S);
		p=S[0]*10+S[1]*1;
		q=S[2]*10+S[3]*1;
	if(p>=31 && q<=31)
	{
		printf("YYMM");
	}
	if(p<=31 && q>=31)
	{
		printf("MMYY");
	}
	if((p>=31 && q>=31) || (p=0 || q=0))
	{
	printf("NA");	
	}	
	if(p<=31 && q<=31)
	{
		printf("AMBIGUOUS");
	}
}

Compiler output:
main.c: In function 'main':
main.c:17:41: error: lvalue required as left operand of assignment
   17 |         if((p>=31 && q>=31) || (p=0 || q=0))
      |                                         ^
Language: C++

#include<stdio.h>
#include<string>

int main() {
  string S;
  cin >> S;
  cout << S;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> S;
      |   ^~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << S;
      |   ^~~~
Language: C++

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

int main() {
  string S;
  cin >> S;
  string fir = ""s + S.at(0) + S.at(1);
  string sec = ""s + S.at(2) + S.at(3);
  int top = stoi(fir); int last = stoi(sec);
  bool a = false; // topがMMの可能性
  bool b = false; // lastがMMの可能性
  for (int i = 1; i < 13; i++) {
    if (i == top) a = true;
    if (i == last) b = true;
  }
  if(a) {
    if(b) cout << "AMBIGUOUS" << endl;
    else cout << "MMYY" << endl;
  else {
    if(b) cout << "YYMM" << endl;
    else cout << "NA" << endl;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
int S;
  cin>>S;
  int a=S/100;
  int b=S%100;
  bool x=1<=a && a<=12;
  bool y=1<=b && b<=12;
  if(x&&y)
    cout<<"AMBIGOUS"<<endl;
  if(!x&&y)
    cout<<"YYMM"<<endl;
  if(x&&!y)
    cout<<"MMYY"<<endl
    if(!x&&!y)
      cout<<"NA"<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: expected ';' before 'if'
   15 |     cout<<"MMYY"<<endl
      |                       ^
      |                       ;
   16 |     if(!x&&!y)
      |     ~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  string t="NA";
  if((s.at(2)=='0' && s.at(3)!='0') || (s.at(2)=='1' && s.at(3)<'3')){
    t="YYMM";
    if((s.at(0)=='0' && s.at(1)!='0') || (s.at(0)=='1' && s.at(1)<'3')){
      t="AMBIGUOUS";
    }
       }
   if((s.at(2)=='0' && s.at(3)='0')&& (s.at(2)=='0' && s.at(3)!='0') || (s.at(2)=='1' && s.at(3)<'3')){
     t="MMYY";
   }

       cout << t;
       }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: lvalue required as left operand of assignment
   13 |    if((s.at(2)=='0' && s.at(3)='0')&& (s.at(2)=='0' && s.at(3)!='0') || (s.at(2)=='1' && s.at(3)<'3')){
      |        ~~~~~~~~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n;
   cin >> n;
   if (n / 100 == 0 || n / 100 > 12) 
    cout << "NA\n";
   else if(n % 100 == 0 || n % 100 > 12))
    cout << "NA\n";
   else if (n / 100 == 0 || n / 100 > 12)  
    cout << "YYMM\n";
   else if (n % 100 == 0 || n % 100 > 12) 
    cout << "MMYY\n";
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:41: error: expected primary-expression before ')' token
    9 |    else if(n % 100 == 0 || n % 100 > 12))
      |                                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n;
   cin >> n;
   if ((n / 100 == 0 || n / 100 > 12) 
    cout << "NA\n";
   else if(n % 100 == 0 || n % 100 > 12))
    cout << "NA\n";
   else if (n / 100 == 0 || n / 100 > 12)  
    cout << "YYMM\n";
   else if (n % 100 == 0 || n % 100 > 12) 
    cout << "MMYY\n";
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: expected ';' before 'cout'
    7 |    if ((n / 100 == 0 || n / 100 > 12)
      |                                      ^
      |                                      ;
    8 |     cout << "NA\n";
      |     ~~~~                              
a.cc:9:4: error: expected primary-expression before 'else'
    9 |    else if(n % 100 == 0 || n % 100 > 12))
      |    ^~~~
a.cc:8:20: error: expected ')' before 'else'
    8 |     cout << "NA\n";
      |                    ^
      |                    )
    9 |    else if(n % 100 == 0 || n % 100 > 12))
      |    ~~~~             
a.cc:7:7: note: to match this '('
    7 |    if ((n / 100 == 0 || n / 100 > 12)
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s[5];
    int c=0;
    gets(s);
    if(s[0]=='0' && s[1]>=1 || s[0]=='1' && s[1]<='2')
    {
        c++;
    }
    if(s[2]=='0' && s[3]>=1 || s[2]=='1' && s[3]<='2')
    {
        c=c+2;
    }
    if(c==0)
        cout<< "NA";
    if(c==1)
        cout<< "YYMM";
    if(c==2)
        cout<<"MMYY";
    if(c==3)
        cout<< "AMBIGUOUS";
    return 0;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>n;
      |   ^~~
a.cc:8:7: error: 'cout' was not declared in this scope
    8 |       cout<<"NA"<<endl;
      |       ^~~~
a.cc:8:19: error: 'endl' was not declared in this scope
    8 |       cout<<"NA"<<endl;
      |                   ^~~~
a.cc:10:7: error: 'cout' was not declared in this scope
   10 |       cout<<"YYMM"<<endl;
      |       ^~~~
a.cc:10:21: error: 'endl' was not declared in this scope
   10 |       cout<<"YYMM"<<endl;
      |                     ^~~~
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout<<"MMYY"<<endl;
      |       ^~~~
a.cc:14:21: error: 'endl' was not declared in this scope
   14 |       cout<<"MMYY"<<endl;
      |                     ^~~~
a.cc:16:7: error: 'cout' was not declared in this scope
   16 |       cout<<"AMBIGUOUS"<<endl;
      |       ^~~~
a.cc:16:26: error: 'endl' was not declared in this scope
   16 |       cout<<"AMBIGUOUS"<<endl;
      |                          ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>n;
      |   ^~~
a.cc:8:7: error: 'cout' was not declared in this scope
    8 |       cout<<"NA"<<endl;
      |       ^~~~
a.cc:8:19: error: 'endl' was not declared in this scope
    8 |       cout<<"NA"<<endl;
      |                   ^~~~
a.cc:10:7: error: 'cout' was not declared in this scope
   10 |       cout<<"YYMM"<<endl;
      |       ^~~~
a.cc:10:21: error: 'endl' was not declared in this scope
   10 |       cout<<"YYMM"<<endl;
      |                     ^~~~
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout<<"MMYY"<<endl;
      |       ^~~~
a.cc:14:21: error: 'endl' was not declared in this scope
   14 |       cout<<"MMYY"<<endl;
      |                     ^~~~
a.cc:16:7: error: 'cout' was not declared in this scope
   16 |       cout<<"AMBIGUOUS"<<endl;
      |       ^~~~
a.cc:16:26: error: 'endl' was not declared in this scope
   16 |       cout<<"AMBIGUOUS"<<endl;
      |                          ^~~~
a.cc:17:4: error: expected '}' at end of input
   17 |   }
      |    ^
a.cc:1:12: note: to match this '{'
    1 | int main() {
      |            ^