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

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

int abs(int x, int y) {
  if (x < y) {
    return y-x;
  }
  else{
    return x-y;
  }
}
int main(){
  int S;
  cin >>S;
  int mae,ato;
  mae = S/100;
  ato = S%100;
  if(ato <= 12 && ato >= 1 && mae >12){
    cout << "YYMM" <<endl;
  }
  else if(ato >12 && mae >12){
    cout<< "NA" <<endl;
  }
  else if(ato <=12 &&ato>=1 && mae >=1 &&mae<=12  )
    cout <<"AMBIGUOUS"<<endl;
  }
  else if(ato >12 && mae >=1 && mae <= 12){
    cout<<"MMYY"<<endl;
  }
  else{
    cout<< "NA" <<endl;
  }
}

Compiler output:
a.cc:27:3: error: expected unqualified-id before 'else'
   27 |   else if(ato >12 && mae >=1 && mae <= 12){
      |   ^~~~
a.cc:30:3: error: expected unqualified-id before 'else'
   30 |   else{
      |   ^~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

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

int abs(int x, int y) {
  if (x < y) {
    return y-x;
  }
  else{
    return x-y;
  }
}
int main(){
  int S;
  cin >>S;
  int mae,ato;
  mae = S/100;
  ato = S%100
  if(ato <= 12 && mae >12){
    cout << 'YYMM' <<endl;
  }
  else if(ato >12 && mae >12){
    cout<< 'NA' <<endl;
  }
  else if(ato >12 && mae <= 12){
    cout<<'MMYY'<<endl;
  }
  else{
    cout <<'AMBIGUOUS'<<endl;
  }
}

Compiler output:
a.cc:19:13: warning: multi-character character constant [-Wmultichar]
   19 |     cout << 'YYMM' <<endl;
      |             ^~~~~~
a.cc:22:12: warning: multi-character character constant [-Wmultichar]
   22 |     cout<< 'NA' <<endl;
      |            ^~~~
a.cc:25:11: warning: multi-character character constant [-Wmultichar]
   25 |     cout<<'MMYY'<<endl;
      |           ^~~~~~
a.cc:28:12: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
   28 |     cout <<'AMBIGUOUS'<<endl;
      |            ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before 'if'
   17 |   ato = S%100
      |              ^
      |              ;
   18 |   if(ato <= 12 && mae >12){
      |   ~~          
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else if(ato >12 && mae >12){
      |   ^~~~
Language: C++

#include<bits/stdc++.h>

#define rep(i, a, n)  for(ll i=a; i<n; i++)
#define per(i, a, n)  for(ll i=n-1; i>=a; i--)
#define fill0(n)  setfill('0') << right << setw(n)
#define all(x)  (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define LONGMAX 1e18
#define INTMAX 1000000000
using namespace std;
typedef long long ll;
typedef pair<ll,ll> p;

string s;
bool flag1, flag2;

int main(){
  cin >> s;
  int tmp1 = stoi(s.substr(0,2));
  int tmp2 = stoi(s.substr(2,2));

  if(1<=tmp1 && tmp1<=12  and 1<=tmp2&&tmp2<=12)cout << "AMBIGUOUS" << endl;
  else if(t1<=tmp1 && tmp1<=12  and tmp2 > 12)cout << "MMYY" << endl;
  else if(tmp1 > 12 and 1<=tmp2&&tmp2<=12)cout << "YYMM" << endl;
  else cout << "NA" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: 't1' was not declared in this scope; did you mean 'y1'?
   23 |   else if(t1<=tmp1 && tmp1<=12  and tmp2 > 12)cout << "MMYY" << endl;
      |           ^~
      |           y1
Language: C++

#include<iostream>
using namespace std;

int main(){

int n;
cin>>n;

int a,b;
a=n/100;
b=n%100;


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


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


return 0;
}

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

#include<bits/stdc++.h>

using namespace std;


int main(){
	
  int n;cin >> n;
  int t1 = n/100;
  int t2 = n%100;
  
  if(1 <= t1 <= 12){
  	
    if(1 <= t2 <= 99){
    	cout << "MMYY";
    }
    else{
      	cout << "AMBIGUOUS";
  }else{
  	
      if(1 <= t2 <= 12){
      	cout << "YYMM";
      }
      else{
      	cout << "NA";
      }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:4: error: expected '}' before 'else'
   19 |   }else{
      |    ^~~~
a.cc:12:20: note: to match this '{'
   12 |   if(1 <= t1 <= 12){
      |                    ^
Language: C

#include<stdio.h>

int main() {
  int i;

  char s_val[4];
  scanf("%s", s_val);
  for(i = 0; i < 4; i++) (int)s_val[i] -= '0';

  int first = 10 * s_val[0] + s_val[1];
  int last  = 10 * s_val[2] + s_val[3];

  int yymm = 0;
  int mmyy = 0;

  if(1 <= first && first <= 12) mmyy = 1;
  if(1 <= last  && last  <= 12) yymm = 1;

  if(yymm = 1 && mmyy = 0)      printf("YYMM\n");
  else if(yymm = 0 && mmyy = 1) printf("MMYY\n");
  else if(yymm = 1 && mmyy = 1) printf("AMBIGUOUS\n");
  else                          printf("NA\n");

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:40: error: lvalue required as left operand of assignment
    8 |   for(i = 0; i < 4; i++) (int)s_val[i] -= '0';
      |                                        ^~
main.c:19:23: error: lvalue required as left operand of assignment
   19 |   if(yymm = 1 && mmyy = 0)      printf("YYMM\n");
      |                       ^
main.c:20:28: error: lvalue required as left operand of assignment
   20 |   else if(yymm = 0 && mmyy = 1) printf("MMYY\n");
      |                            ^
main.c:21:28: error: lvalue required as left operand of assignment
   21 |   else if(yymm = 1 && mmyy = 1) printf("AMBIGUOUS\n");
      |                            ^
Language: C++

#include <iostream>
using namespace std;

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

	a = s / 100;
	b = s % 100;
	if (a == 0) {
		if (b > 0 && b < 13) cout << "YYMM";
		else cout << "NA";
	}
	else if (a >= 13){
		if (b > 0 && b < 13) cout << "YYMM";
		else cout << "NA";
	}
	else if (a < 13){
		if (b > 0 && b < 13) cout << "AMBIGUOUS";
		else cout << "MMYY";99
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:39: error: expected ';' before '}' token
   20 |                 else cout << "MMYY";99
      |                                       ^
      |                                       ;
   21 |         }
      |         ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'at' was not declared in this scope
   11 |   if ((s.at(0)=='0'&&s>at(1)!='0')||
      |                        ^~
a.cc:15:25: error: 'at' was not declared in this scope
   15 |    if ((s.at(2)=='0'&&s>at(3)!='0')||
      |                         ^~
Language: C

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

#define MAX 4

int main()
{
char s[MAX+1];
int number;
int t, u;
int a=0;


scanf("%s",s);

number=atoi(s);
u=number%100;
t=(number-u)/100;


if(1<=u && u<=12)
a=1;
if(1<=t && t<=12)
a=2;
if(1<=u && u<=12 && 1<=t && t<=12)
a=3

switch(a) {
case 0:
printf("NA\n");
break;
case 1:
printf("YYMM\n");
break;
case 2:
printf("MMYY\n");
break;
case 3:
printf("AMBIGUOUS\n");
break;
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:4: error: expected ';' before 'switch'
   26 | a=3
      |    ^
      |    ;
   27 | 
   28 | switch(a) {
      | ~~~~~~
Language: C

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

#define MAX 4

int main()
{
char s[MAX+1];
int number;
int t, u;
int a=0;


scanf("%s",s);

number=atoi(s);
u=number%100;
t=(numver-u)/100;


if(1<=u && u<=12)
a=1;
if(1<=t && t<=12)
a=2;
if(1<=u && u<=12 && 1<=t && t<=12)
a=3

switch(a) {
case 0:
printf("NA\n");
break;
case 1:
printf("YYMM\n");
break;
case 2:
printf("MMYY\n");
break;
case 3:
printf("AMBIGUOUS\n");
break;
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:4: error: 'numver' undeclared (first use in this function); did you mean 'number'?
   18 | t=(numver-u)/100;
      |    ^~~~~~
      |    number
main.c:18:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:4: error: expected ';' before 'switch'
   26 | a=3
      |    ^
      |    ;
   27 | 
   28 | switch(a) {
      | ~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int l;
  cin >> l;
  int f = l/100;
  l = l-(l/100)*100;
  if (f==0)
  {
    if(l< 13)
    {
      cout << "YYMM";
    }else
    {
      cout << "NA"
    }

  }
  if (l==0)
  {
    if(f< 13)
    {
      cout << "MMYY"
    }else
    {
      cout << "NA"
    }

  }
  if(l < 13 && f < 13)
  {
    cout << "AMBIGUOUS";
  }
  else if(l > 12 && f < 13){
    cout << "MMYY";
  }
  else if(f > 12 && l < 13){
      cout << "YYMM";
  }
  else if(f > 12 && l > 12){
    cout << "NA";
  }
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected ';' before '}' token
   16 |       cout << "NA"
      |                   ^
      |                   ;
   17 |     }
      |     ~              
a.cc:24:21: error: expected ';' before '}' token
   24 |       cout << "MMYY"
      |                     ^
      |                     ;
   25 |     }else
      |     ~                
a.cc:27:19: error: expected ';' before '}' token
   27 |       cout << "NA"
      |                   ^
      |                   ;
   28 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int S;
	cin>>S;
	int ante = S/100
	int poste = S-(S/100)*100
	if (ante>=1 && ante<=12 && poste>=1 && poste<=12){
	    cout<<"AMBIGOUS"<<endl;
    }else if(ante>=13 && poste>=1 && poste<=12){
    	cout<<"YYMM"<<endl;
    }else if(ante>=1 && ante<=12 && poste>=13){
    	cout<<"MMYY"<<endl;
    }else{
    	cout<<"NA"<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'int'
    8 |         int poste = S-(S/100)*100
      |         ^~~
a.cc:11:6: error: 'else' without a previous 'if'
   11 |     }else if(ante>=13 && poste>=1 && poste<=12){
      |      ^~~~
a.cc:11:26: error: 'poste' was not declared in this scope
   11 |     }else if(ante>=13 && poste>=1 && poste<=12){
      |                          ^~~~~
Language: C++

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

Compiler output:
a.cc:14:31: warning: missing terminating " character
   14 |                         cout<<"NA<<endl;
      |                               ^
a.cc:14:31: error: missing terminating " character
   14 |                         cout<<"NA<<endl;
      |                               ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:17: error: expected primary-expression before '}' token
   15 |                 }else{
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a[4];
  if(a[0]+a[1] <= 9){
    if(a[0]+a[1] <= 9) cout << AMBIGUOUS << endl;
    else cout << MMYY;
  }else{
    if(a[2]+a[3] <= 9) cout << YYMM << endl;
    else cout << NA << endl;
  }
}





Compiler output:
a.cc: In function 'int main()':
a.cc:6:32: error: 'AMBIGUOUS' was not declared in this scope
    6 |     if(a[0]+a[1] <= 9) cout << AMBIGUOUS << endl;
      |                                ^~~~~~~~~
a.cc:7:18: error: 'MMYY' was not declared in this scope
    7 |     else cout << MMYY;
      |                  ^~~~
a.cc:9:32: error: 'YYMM' was not declared in this scope
    9 |     if(a[2]+a[3] <= 9) cout << YYMM << endl;
      |                                ^~~~
a.cc:10:18: error: 'NA' was not declared in this scope; did you mean 'NAN'?
   10 |     else cout << NA << endl;
      |                  ^~
      |                  NAN
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a[4];
  if(a[0:1]<=12){
    if(a[0]+a[1] <= 9) cout << AMBIGUOUS << endl;
    else cout << MMYY;
  }else{
    if(a[2]+a[3] <= 9) cout << YYMM << endl;
    else cout << NA << endl;
  }
}





Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected ']' before ':' token
    5 |   if(a[0:1]<=12){
      |         ^
      |         ]
a.cc:5:9: error: expected ')' before ':' token
    5 |   if(a[0:1]<=12){
      |     ~   ^
      |         )
a.cc:5:11: error: expected primary-expression before ']' token
    5 |   if(a[0:1]<=12){
      |           ^
a.cc:9:32: error: 'YYMM' was not declared in this scope
    9 |     if(a[2]+a[3] <= 9) cout << YYMM << endl;
      |                                ^~~~
a.cc:10:18: error: 'NA' was not declared in this scope; did you mean 'NAN'?
   10 |     else cout << NA << endl;
      |                  ^~
      |                  NAN
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a[4];
  if(a[0:1]<=12){
    if(a[2:3]<=12) cout << AMBIGUOUS << endl;
    else cout << MMYY;
  }else{
    if(a[2:3]<=12) cout << YYMM << endl;
    else cout << NA << endl;
  }
}





Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected ']' before ':' token
    5 |   if(a[0:1]<=12){
      |         ^
      |         ]
a.cc:5:9: error: expected ')' before ':' token
    5 |   if(a[0:1]<=12){
      |     ~   ^
      |         )
a.cc:5:11: error: expected primary-expression before ']' token
    5 |   if(a[0:1]<=12){
      |           ^
a.cc:9:11: error: expected ']' before ':' token
    9 |     if(a[2:3]<=12) cout << YYMM << endl;
      |           ^
      |           ]
a.cc:9:11: error: expected ')' before ':' token
    9 |     if(a[2:3]<=12) cout << YYMM << endl;
      |       ~   ^
      |           )
a.cc:9:13: error: expected primary-expression before ']' token
    9 |     if(a[2:3]<=12) cout << YYMM << endl;
      |             ^
a.cc:10:18: error: 'NA' was not declared in this scope; did you mean 'NAN'?
   10 |     else cout << NA << endl;
      |                  ^~
      |                  NAN
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }
int main(int argc, char* argv[]) {
   string s;
   cin >> s;
   if((s[0]>='1'||s[0]=='1'&&s[1]>'2')&&(s[2]>='1'||(s[2]=='1'&&s[3]>'2')||(s[0]=='0'&&s[1]=='0')||(s[2]=='0'&&s[3]=='0')) {
       cout << "NA" <<endl;
      return 0;
      }
    
   if((s[0]>'1'||s[0]=='1'&&s[1]>'2')) {
       cout << "YYMM" << endl ;
   return 0;
   }
  
   if(s[2]>'1'||s[2]=='1'&&s[3]>'2') {
   cout <<"MMYY" << endl;
      return 0;
      }
   cout << "AMBIGUOUS" << endl;   


    return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:16:123: error: expected ';' before '{' token
   16 |    if((s[0]>='1'||s[0]=='1'&&s[1]>'2')&&(s[2]>='1'||(s[2]=='1'&&s[3]>'2')||(s[0]=='0'&&s[1]=='0')||(s[2]=='0'&&s[3]=='0')) {
      |                                                                                                                           ^~
      |                                                                                                                           ;
a.cc:21:4: error: expected primary-expression before 'if'
   21 |    if((s[0]>'1'||s[0]=='1'&&s[1]>'2')) {
      |    ^~
a.cc:19:8: error: expected ')' before 'if'
   19 |       }
      |        ^
      |        )
   20 | 
   21 |    if((s[0]>'1'||s[0]=='1'&&s[1]>'2')) {
      |    ~~   
a.cc:16:6: note: to match this '('
   16 |    if((s[0]>='1'||s[0]=='1'&&s[1]>'2')&&(s[2]>='1'||(s[2]=='1'&&s[3]>'2')||(s[0]=='0'&&s[1]=='0')||(s[2]=='0'&&s[3]=='0')) {
      |      ^
Language: C++

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

int main(){
    string s;
    cin >> s;
    // s = "1902";
    vector<char> c1;
    vector<char> c2;

    c1.push_back(s[0]);
    c1.push_back(s[1]);
    c2.push_back(s[2]);
    c2.push_back(s[3]);

    string s1(c1.begin(), c1.end());
    string s2(c2.begin(), c2.end());
    int n1 = atoi(s1.c_str());
    int n2 = atoi(s2.c_str());

    if ((n1 > 12) || (n1 < 1){
        if (n2 >= 1 && n2 <= 12){
            cout << "YYMM" << endl;
        }
        else{
            cout << "NA" << endl;
        }
        return 0;
    }
    if ((n2 > 12) || (n2 < 1){
        if (n1 >= 1 && n1 <= 12){
            cout << "MMYY" << endl;
        }
        else{
            cout << "NA" << endl;
        }
        return 0;
    }

    cout << "AMBIGUOUS" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:30: error: expected ')' before '{' token
   25 |     if ((n1 > 12) || (n1 < 1){
      |        ~                     ^
      |                              )
Language: C++

#include <bitd/stdc++.h>
using namespace std;
int main(){
  int S;
  cin >> S;
  if(S / 100 > 12)
    cout << "YYMM" << endl;
  if(S / 100 < 13 && S % 100 < 13)
    cout << "AMBIGUOUS" << endl;
  if(S / 100 < 13 && S % 100 > 12)
     cout << "MMYY" << endl;
  if(S / 100 < 13 && S % 100 < 12)
    cout << "NA" << endl;
}
  
  

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

#include <bitd/stdc++.h>
using namespace std;
int main(){
  int S;
  cin >> S;
  if(S / 100 > 12)
    cout << YYMM << endl;
  if(S / 100 < 13 && S % 100 < 13)
    cout << AMBIGUOUS << endl;
  if(S / 100 < 13 && S % 100 > 12)
     cout << MMYY << endl;
  if(S / 100 < 13 && S % 100 < 12)
    cout << NA << endl;
}
  
  

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

int main(){
  string s;
  cin>>s;
  int s0 = (int) s[0]-48;
  int s1 = (int) s[1]-48;
  int s2 = (int) s[2]-48;
  int s3 = (int) s[3]-48;
  int t0 = 10*s0+s1;
  int t1 = 10*s2+s3;
  if(t0 ==0 || t1 ==0){
    cout<<"NA";
  } else if(t0>12){
      if(t1<=12){
        cout<< "YYMM";
      } else {
        cout<<"NA";
      }
  } else if(t0<= 12){
      if(t1>12){
        cout<<"MMYY";
      } else{
        cout<<"AMBIGUOUS";
      }
  } else{
      cout<<"NA";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string s;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>s;
      |   ^~~
a.cc:3:8: error: 's' was not declared in this scope
    3 |   cin>>s;
      |        ^
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<"NA";
      |     ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout<< "YYMM";
      |         ^~~~
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout<<"NA";
      |         ^~~~
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout<<"MMYY";
      |         ^~~~
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout<<"AMBIGUOUS";
      |         ^~~~
a.cc:25:7: error: 'cout' was not declared in this scope
   25 |       cout<<"NA";
      |       ^~~~
Language: C++

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

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

  int a1,a3,b1,b2;
  string judge = "NA";
  a1=stoi(S.substr(0,1));
  a3=stoi(S.substr(2,1));
  b1=stoi(S.substr(0,2));
  b2=stoi(S.substr(2,2));
  
 // if(a1==0 && a3==0) judge="AMBIGUROUS";
  if( b1 >12 && b2>12 ) judge="NA";
  if( b1 <= 12 && b2 <=12) {
    if(b1==0 && b2 ==0) judge="NA";  
    else if( b1==0 && 0<b2<=12) judge="YYMM":
    else if( b1==0 && 0<b2<=12) judge="MMYY":
  }
  if(0<b1<=12 && b2 >12) judge="MMYY";
  if(b1 > 12 && 0< b2 <= 12) judge="YYMM";
 
  cout << judge << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:45: error: expected ';' before ':' token
   19 |     else if( b1==0 && 0<b2<=12) judge="YYMM":
      |                                             ^
      |                                             ;
Language: C++

#include <iostream>
using namespace std;
int main() 
{
	int n,a,b;
  	cin >> n;
  	a = n / 100;(kami2)
  	b = n % 100;(simo2)
	
	if(a<=12 && b<=12){
		cout << "AMBIGUOUS" << endl;
	} 
	else if(a<=12 && b>=12){
		cout << "YYMM" << endl;
	} 
	else if(a>=12 && b<=12){
		cout << "MMYY" << endl;
	}
	else{
		cout << "NA" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'kami2' was not declared in this scope
    7 |         a = n / 100;(kami2)
      |                      ^~~~~
a.cc:8:22: error: 'simo2' was not declared in this scope
    8 |         b = n % 100;(simo2)
      |                      ^~~~~
a.cc:13:9: error: 'else' without a previous 'if'
   13 |         else if(a<=12 && b>=12){
      |         ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int s, flag=0;
  cin >> s;
  if(s/100<13&&s/100>0&&s%100<13&&s%100>0) cout "AMBIGUOUS";
  else if(s/100<13&&s/100>0&&s%100>0) cout "YYMM";
  else if(s/100>0&&s%100<13&&s%100>0) cout "MMYY";
  else "NA";
  return 0;
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:48: error: expected ';' before string constant
    6 |   if(s/100<13&&s/100>0&&s%100<13&&s%100>0) cout "AMBIGUOUS";
      |                                                ^~~~~~~~~~~~
      |                                                ;
a.cc:7:43: error: expected ';' before string constant
    7 |   else if(s/100<13&&s/100>0&&s%100>0) cout "YYMM";
      |                                           ^~~~~~~
      |                                           ;
a.cc:8:43: error: expected ';' before string constant
    8 |   else if(s/100>0&&s%100<13&&s%100>0) cout "MMYY";
      |                                           ^~~~~~~
      |                                           ;
Language: C++

#include <bits/stdc++.h>
#define MOD 1000000007
//for(int i=0; i<n; ++i)
using namespace std;

int main()
{
    int n, k;
    string st;
    cin >> st;
    n = (st[0] - '0') * 10 + (st[1] - '0');
    k = (st[2] - '0') * 10 + (st[3] - '0');

    if (n > 12 && k <= 12 && k > 0)
        cout << "YYMM" << endl;
    else if (k > 12 && n <= 12 && n > 0)
        cout << "YYMM" << endl;
    else if (n <= 12 && k <= 12 && n > 0 && k > 0)
        cout << "AMBIGUOUS" << endl;
    else
        cout << "NA" << endl;
    return 0;
}

#include <bits/stdc++.h>
#define MOD 1000000007
//for(int i=0; i<n; ++i)
using namespace std;

int main()
{
    int n, k;
    string st;
    cin >> st;
    n = (st[0] - '0') * 10 + (st[1] - '0');
    k = (st[2] - '0') * 10 + (st[3] - '0');

    if (n > 12 && k <= 12 && k > 0)
        cout << "YYMM" << endl;
    else if (k > 12 && n <= 12 && n > 0)
        cout << "MMYY" << endl;
    else if (n <= 12 && k <= 12 && n > 0 && k > 0)
        cout << "AMBIGUOUS" << endl;
    else
        cout << "NA" << endl;
    return 0;
}


Compiler output:
a.cc:30:5: error: redefinition of 'int main()'
   30 | int main()
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main()
      |     ^~~~
Language: C++

#include "pch.h"

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <limits>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x * x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXISTch(s,c) ((((s).find_first_of(c)) != std::string::npos)? 1 : 0)//cがあれば1 if(1)
#define SORT(c) sort((c).begin(),(c).end())

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = (int)1000000007;
const LL MOD = (LL)1000000007;//10^9+7
const LL INF2 = (LL)100000000000000000;//10^18

int main() {
	int n, m; cin >> n >> m;
	if (a+b>=c)
	{
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: request for member 'at' in 'S', which is of non-class type 'int'
    8 |   a=S.at(0)*10+S.at(1);
      |       ^~
a.cc:8:18: error: request for member 'at' in 'S', which is of non-class type 'int'
    8 |   a=S.at(0)*10+S.at(1);
      |                  ^~
a.cc:9:7: error: request for member 'at' in 'S', which is of non-class type 'int'
    9 |   b=S.at(2)*10+S.at(3);
      |       ^~
a.cc:9:18: error: request for member 'at' in 'S', which is of non-class type 'int'
    9 |   b=S.at(2)*10+S.at(3);
      |                  ^~
a.cc:17:3: error: expected '}' before 'else'
   17 |   else{
      |   ^~~~
a.cc:10:19: note: to match this '{'
   10 |   if(a!=0 && a<13){
      |                   ^
a.cc:22:17: error: expected ';' before 'endl'
   22 |     cout << "NA" endl;
      |                 ^~~~~
      |                 ;
a.cc: At global scope:
a.cc:26:3: error: expected declaration before '}' token
   26 |   }
      |   ^
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <iostream>
#include <string>

bool is_month(int vv) { return vv > 0 && vv < 13; }

Format get_format(int vvvv) {}

int main() {
  int vvvv;
  std::cin >> vvvv;

  std::cout << "MMYY" << std::endl;
  const auto vv1 = vvvv / 100;
  const auto vv2 = vvvv - 100 * vv1;

  if (is_month(vv1) && is_month(vv2))
    std::cout << "AMBIGUOUS" << std::endl;
  else if (is_month(vv1) && !is_month(vv2))
    std::cout << "MMYY" << std::endl;
  else if (!is_month(vv1) && is_month(vv2))
    std::cout << "YYMM" << std::endl;
  else
    std::cout << "NA" << std::endl;
}


Compiler output:
a.cc:6:1: error: 'Format' does not name a type
    6 | Format get_format(int vvvv) {}
      | ^~~~~~
Language: Java

s = input()

if((int)(s[0:2]) <= 12 and (int)(s[0:2]) >= 1) :
    if(int(s[2:]) <=12 and (int)(s[2:]) >=1):
        print("AMBIGUOUS")
    elif(int(s[2:]) <= 99 and (int)(s[2:]) >= 0):
        print("MMYY")
    else:
        print("NA")
elif ((int)(s[0:2]) <= 99 and (int)(s[0:2]) >= 0):
     if((int)(s[2:]) <=12 and (int)(s[2:]) >=1):
         print("YYMM")
     else:
         print("NA")
else:
    print("NA")


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
s = input()
^
1 error
Language: C++

#include <bits/stdc++.h>
#define int long long
#define pii pair<int,int>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(c) (c).begin(),(c).end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MINF(a) memset(a,0x3f,sizeof(a))
#define POW(n) (1LL<<(n))
#define IN(i,a,b) (a <= i && i <= b)
using namespace std;
template <typename T> inline bool CHMIN(T& a,T b) { if(a>b) { a=b; return 1; } return 0; }
template <typename T> inline bool CHMAX(T& a,T b) { if(a<b) { a=b; return 1; } return 0; }
template <typename T> inline void SORT(T& a) { sort(ALL(a)); }
template <typename T> inline void REV(T& a) { reverse(ALL(a)); }
template <typename T> inline void UNI(T& a) { sort(ALL(a)); a.erase(unique(ALL(a)),a.end()); }
const int MOD = 1000000007;
const int INF = 0x3f3f3f3f3f3f3f3f;
const double EPS = 1e-10;
/* ---------------------------------------------------------------------------------------------------- */

string S;

signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  cin >> S;
  int a = stoi(S.substr(0,2));
  int b = stoi(S.substr(2,2));
  if (a == 0 || b == 0) {
    cout << "NA" << endl;
  } else if (IN(a,1,12) && IN(b,1,12)) {
    cout << "AMBIGUOUS" << endl;
  } else if (IN(a,1,12)) {
    cout << "MMYY" << endl;
  } else {
    cout << "YYMM" << endl;
  } else {
    cout << "NA" << endl;
  }

  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  int a,b;
  a=n/100;
  n=n-100*a;
  if((a>12)&&(b=<12)){cout<<"YYMM";return 0;}
  if((a<=12)&&(b>12)){cout<<"MMYY";return 0;}
  if((a>12)&&(b>12)){cout<<"NA";return 0;}
  if((a<=12)&&(b<=12)){cout<<"AMBIGUOUS";return 0;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected primary-expression before '<' token
   10 |   if((a>12)&&(b=<12)){cout<<"YYMM";return 0;}
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin>>n;
  int a,b;
  a=n/100;
  n=n-100*a;
  if((a>12)&&(b=<12)){cout<<"YYMM";return 0;}
  if((a<=12)&&(b>12)){cout<<"MMYY";return 0;}
  if((a>12)&&(b>12)){cout<<"NA";return 0;}
  if((a<=12)&&(b<=12)){cout<<"AMBIGUOUS";return 0;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected primary-expression before '<' token
   10 |   if((a>12)&&(b=<12)){cout<<"YYMM";return 0;}
      |                 ^
Language: C++

#include<iostream>

using namespace std;

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

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

}

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

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

int main(){
  string s;
  cin >> s;
  
  //year 00~99
  //month 01~12
  
  bool a = (s[2] == 0 && s[3] != 0)||(s[2] == 1 && (s[3] == 1 || s[3] == 2));
  bool b = (s[0] == 0 && s[1] != 0)||(s[0] == 1 && (s[1] == 1 || s[1] == 2));
  
  if(a == true && b == false){
    cout << "YYMM" << endl;
  }
  else if(a == false && b == true){
    cout << "MMYY" << endl;
  }
  else if(a == true && b == true){
    cout << "AMBIGUOUS" << endl;
  }
  else{
    cout << "NA" << endl;
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
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:15:5: error: 'cout' was not declared in this scope
   15 |     cout << "YYMM" << endl;
      |     ^~~~
a.cc:15:23: error: 'endl' was not declared in this scope
   15 |     cout << "YYMM" << endl;
      |                       ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << "MMYY" << endl;
      |     ^~~~
a.cc:18:23: error: 'endl' was not declared in this scope
   18 |     cout << "MMYY" << endl;
      |                       ^~~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << "AMBIGUOUS" << endl;
      |     ^~~~
a.cc:21:28: error: 'endl' was not declared in this scope
   21 |     cout << "AMBIGUOUS" << endl;
      |                            ^~~~
a.cc:24:5: error: 'cout' was not declared in this scope
   24 |     cout << "NA" << endl;
      |     ^~~~
a.cc:24:21: error: 'endl' was not declared in this scope
   24 |     cout << "NA" << endl;
      |                     ^~~~
Language: C++

#include <stdio.h>


int main()
{
    int in;
    int higher, lower;

    scanf("%d", &in);

    higher = in/100;
    lower = in - higher;

    // AMBIGUOUS
    if (1 <= higher && higher <= 12) && (1 <= lower && lower <= 12)
    {
        puts("AMBIGUOUS");
        return 0;
    }

    // NA
    if (higher == 0 || 13 <= higher) && (lower == 0 || 13 <= lower)
    {
        puts("NA");
        return 0;
    }
    
    // MMYY
    if (1 <= higher && higher <= 12) && (lower == 0 || 13 <= lower)
    {
        puts("MMYY");
        return 0;
    }

    // YYMM
    puts("YYMM");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:41: error: expected identifier before '(' token
   15 |     if (1 <= higher && higher <= 12) && (1 <= lower && lower <= 12)
      |                                         ^
a.cc:22:41: error: expected identifier before '(' token
   22 |     if (higher == 0 || 13 <= higher) && (lower == 0 || 13 <= lower)
      |                                         ^
a.cc:29:41: error: expected identifier before '(' token
   29 |     if (1 <= higher && higher <= 12) && (lower == 0 || 13 <= lower)
      |                                         ^
Language: C++

#include<iostream>

using namespace std;

int main(){
	int a;
  cin>>a;
  int l,r;
  l=a/100;
  r=a%100;
  if(l>=1 && l<=12){
  	if(r>=1 && r<=12){
    	cout<<"AMBIGUOUS\n";
    }
    else{
    	cout<<"MMYY\n";
    }
  }
  else{
  	if(r>=1 && r<=12 && l>=0){
    	cout<<"YYMM\n";
    }
    else{
    	out<<"NA\n";
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'out' was not declared in this scope
   24 |         out<<"NA\n";
      |         ^~~
Language: C++

#include<iostream>

using namepsace std;

int main(){
	int a;
  cin>>a;
  int l,r;
  l=a/100;
  r=a%100;
  if(l>=1 && l<=12){
  	if(r>=1 && r<=12){
    	cout<<"AMBIGUOUS\n";
    }
    else{
    	cout<<"MMYY\n";
    }
  }
  else{
  	if(r>=1 && r<=12 && l>=0){
    	cout<<"YYMM\n";
    }
    else{
    	out<<"NA\n";
    }
  }
  return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namepsace'
    3 | using namepsace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>a;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |         cout<<"AMBIGUOUS\n";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |         cout<<"MMYY\n";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |         cout<<"YYMM\n";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:9: error: 'out' was not declared in this scope
   24 |         out<<"NA\n";
      |         ^~~
Language: C++

s=input()
fo=s[0:2]
la=s[2:]
n=int(fo)
m=int(la)
a=n<13
b=m<13
ans=''
if a and b:
  ans='AMBIGUOS'
elif a and not b:
  ans='MMYY'
elif not a and b:
  ans='YYMM'
else:
  ans='NA'
print(ans)

Compiler output:
a.cc:8:5: error: empty character constant
    8 | ans=''
      |     ^~
a.cc:10:7: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   10 |   ans='AMBIGUOS'
      |       ^~~~~~~~~~
a.cc:12:7: warning: multi-character character constant [-Wmultichar]
   12 |   ans='MMYY'
      |       ^~~~~~
a.cc:14:7: warning: multi-character character constant [-Wmultichar]
   14 |   ans='YYMM'
      |       ^~~~~~
a.cc:16:7: warning: multi-character character constant [-Wmultichar]
   16 |   ans='NA'
      |       ^~~~
a.cc:1:1: error: 's' does not name a type
    1 | s=input()
      | ^
Language: C++

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

int a,b;
int main(){
  bool t,f;
  scanf(%2d%2d,a,b);
  if(0<a&&a<13)t=1;
  if(0<b&&b<13)f=1;
  if(t=1&&f=1)cout<<'AMBIGUOUS'<<endl;
  else if(t=1)cout<<'YYMM'<<endl;
  else if(f=1)cout<<'MMYY'<<endl;
  else cout<<'NA';
}

Compiler output:
a.cc:1:9: fatal error: bits/std.h: No such file or directory
    1 | #include<bits/std.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class YYMMorMMYY {

	public static void main(String[] args) {
		
		Scanner scanner = new Scanner(System.in);
		String S        = scanner.next();
		//上2桁を取得し数値に変換
		int front = Integer.parseInt(S.substring(0,2));
		//下2桁を取得し数値に変換
		int back  = Integer.parseInt(S.substring(2,4));

		//NAの場合
		if(front == 00 || back == 00) {
			
			System.out.println("NA");
		
		//AMBIGUOUSの場合
		}else if(front <= 12 && back <= 12){
			
			System.out.println("AMBIGUOUS");
			
		//YYMMの場合
		}else if(back <= 12){
			
			System.out.println("YYMM");
			
		//MMYYの場合
		}else{
			
			System.out.println("MMYY");
		}
	}
}

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

#include <iostream>
using namespace std;
int main() {
  	string x;
  	cin >> x;
  	int num = atoi(x.c_str());
  	int a = num/100;
  	int b = num%100;
  	string y;
  	if(a<13 && a>0){
  	    if(b<13 &&b>0){
  	        y="AMBIGUOUS";
  	    }else if(b<100 && b>=0){
  	        y="MMYY";
  	    }else{
  	        y="NA";
  	    
  	}else if(b<13 && b>0){
  	    if(a<13 && a>0){
  	        y="AMBIGUOUS";
  	    }else if(a<100 && a>=0){
  	        y="YYMM";
  	    }else{
  	        y="NA";
  	    }
    }else{
  	    y = "NA"
  	}
  	cout << y <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: expected '}' before 'else'
   18 |         }else if(b<13 && b>0){
      |          ^~~~
a.cc:10:24: note: to match this '{'
   10 |         if(a<13 && a>0){
      |                        ^
a.cc:27:21: error: expected ';' before '}' token
   27 |             y = "NA"
      |                     ^
      |                     ;
   28 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;
int main() {
  	string x;
  	cin >> x;
  	int num = atoi(x.c_str());
  	int a = num/100;
  	int b = num%100;
  	string y;
  	if(a<13 && a>0){
  	    if(b<13 &&b>0){
  	        y="AMBIGUOUS";
  	    }else if(b<100 && b>=0){
  	        y="MMYY";
  	    }else{
  	        y="NA";
  	    
  	}elif(b<13 && b>0){
  	    if(a<13 && a>0){
  	        y="AMBIGUOUS";
  	    }else if(a<100 && a>=0){
  	        y="YYMM";
  	    }else{
  	        y="NA";
  	    }
    }else{
  	    y = "NA"
  	}
  	cout << y <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'elif' was not declared in this scope
   18 |         }elif(b<13 && b>0){
      |          ^~~~
a.cc:26:6: error: expected '}' before 'else'
   26 |     }else{
      |      ^~~~
a.cc:10:24: note: to match this '{'
   10 |         if(a<13 && a>0){
      |                        ^
a.cc:27:21: error: expected ';' before '}' token
   27 |             y = "NA"
      |                     ^
      |                     ;
   28 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;
int main() {
  	string x;
  	cin >> x;
  	int num = atoi(x.c_str());
  	int a = num/100;
  	int b = num%100;
  	string y;
  	if(a<13 && a>0){
  	    if(b<13 &&b>0){
  	        y="AMBIGUOUS";
  	    }else if(b<100 && b>=0){
  	        y="MMYY";
  	    }else{
  	        y="NA";
  	    
  	}
  	if(b<13 && b>0){
  	    if(a<13 && a>0){
  	        y="AMBIGUOUS";
  	    }else if(a<100 && a>=0){
  	        y="YYMM";
  	    }else{
  	        y="NA";
  	    }
    }else{
  	    y = "NA"
  	}
  	cout << y <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: expected ';' before '}' token
   28 |             y = "NA"
      |                     ^
      |                     ;
   29 |         }
      |         ~            
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main() {
  	string x;
  	cin >> x;
  	int num = atoi(x.c_str());
  	int a = num/100;
  	int b = num%100;
  	string y;
  	if(a<13 && a>0){
  	    if(b<13 &&b>0){
  	        y="AMBIGUOUS";
  	    }else if(b<100 && b>=0){
  	        y="MMYY";
  	    }else{
  	        y="NA";
  	    
  	}
  	if(b<13 && b>0){
  	    if(a<13 && a>0){
  	        y="AMBIGUOUS";
  	    }else if(a<100 && a>=0){
  	        y="YYMM";
  	    }else{
  	        y="NA";
  	    }
  	}else{
  	    y = "NA"
  	}
  	cout << y <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: expected ';' before '}' token
   28 |             y = "NA"
      |                     ^
      |                     ;
   29 |         }
      |         ~            
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main() {
  	string x;
  	cin >> x;
  	int num = atoi(x.c_str());
  	int a = num/100;
  	int b = num%100;
  	string y;
  	if(a<13 && a>0){
  	    if(b<13 &&b>0){
  	        y="AMBIGUOUS";
  	    }else if(b<100 && b>=0){
  	        y="MMYY";
  	    }else{
  	        y="NA";
  	    }
  	}
  	if(b<13 && b>0){
  	    if(a<13 && a>0){
  	        y="AMBIGUOUS";
  	    }else if(a<100 && a>=0){
  	        y="YYMM";
  	    }else{
  	        y="NA";
  	    }
  	}else{
  	    y = "NA"
  	}
  	cout << y <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: expected ';' before '}' token
   28 |             y = "NA"
      |                     ^
      |                     ;
   29 |         }
      |         ~
Language: C++

S = int(input())
XX = S // 100
YY = S % 100

if   0<=XX<=12 and 0 <= YY <= 12:print("AMBIGUOUS")
elif 0<=XX<=99 and 0 <= YY <= 12:print("YYMM")
elif 0 <= XX <= 12 and 0 <= YY <= 99:print("MMYY")
else :print("NA")

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

v#include<stdio.h>
int main()
{
  int a, b, c, d, e;
  scanf("%d", &e);
  a=e/100;
  b=e-100*a;
  if(a>=1&&a<=12)
  {
  	if(b>=1&&b<=12)
  	printf("AMBIGOUS");
  	else
  	printf("MMYY");
  }
  else
  {
  	if(b>=1&&b<=12)
  	printf("YYMM");
  	else
  	printf("NA");
  }
  return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include<stdio.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include<stdio.h>
      | ^
Language: C++

num = input()
num1 = int(num[0] + num[1])
num2 = int(num[2] + num[3])

if(num1 < 13) and (num1 > 0):
    if(num2 < 13) and (num2 > 0):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if(num2 < 13) and (num2 > 0):
        print("YYMM")
    else:
        print("NA")


Compiler output:
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'?
    1 | num = input()
      | ^~~
      | enum
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int S;
  cin >> S;
  int a= S/100;
  int b=S%100;
  string ans;
  if(a>0 && a<13 && b>0 && b<13){
    ans="AMBIGUOUS";
  }
  else if((a==0 || a>12) && b>0 && b<13){
    ans="YYMM";
  }
  else if(a>0 && a<13&&(b==0||b>12)){
    ans="MMYY";
  }
  else{
    ans="NA";
  }
  cout << ans << endk;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: 'endk' was not declared in this scope
   21 |   cout << ans << endk;
      |                  ^~~~
Language: C++

#include<bits/stdc.h>
using namespace std;
int main(){
  int S;
  cin >> S;
  int a= S/100;
  int b=S%100;
  string ans;
  if(a>0 && a<13 && b>0 && b<13){
    ans="AMBIGUOUS";
  }
  else if((a==0 || a>12) && b>0 && b<13){
    ans="YYMM";
  }
  else if(a>0 && a<13&&(b==0||b>12)){
    ans="MMYY";
  }
  else{
    ans="NA";
  }
  cout << ans << endk;
}
  

Compiler output:
a.cc:1:9: fatal error: bits/stdc.h: No such file or directory
    1 | #include<bits/stdc.h>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main(){
int s;cin>>s;
  int s1=s/100;s2=s%100;
  if(s1<13&&s1>0)
  {
    if(s2<13&&s2>0)
      cout<<"AMBIGUOUS"<<endl;
    else
      cout<<"YYMM"<<endl;
  }
  else
  {
     if(s2<13&&s2>0)
       cout<<"MMYY"<<endl;
    else
      cout<<"NA"<<endl;
  }
}
       
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 's2' was not declared in this scope; did you mean 's1'?
    8 |   int s1=s/100;s2=s%100;
      |                ^~
      |                s1
Language: C++

#include <iostream>
#include <string>

using namespace std;

int strtoint(string str) {
	int res = 0;
	int i = 0;
	while (i < str.length && str[i] >= '0' && str[i] <= '9') {
		res *= 10;
		res += str[i];
	}
	
	return res;
}

int main()
{
	string str;
	cin >> str;
	int former = strtoint(str.substr(0, 2));
	int	latter = strtoint(str.substr(2, 4));
	if (former >= 1 && former <= 12) {
		if (latter >= 1 && latter <= 12) {
			cout << "AMBIGUOUS";
		}
		else {
			cout << "MMYY";
		}
	}
	else {
		if (latter >= 1 && latter <= 12) {
			cout << "YYMM";
		}
		else {
			cout << "NA";
		}
	}
}

Compiler output:
a.cc: In function 'int strtoint(std::string)':
a.cc:9:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         while (i < str.length && str[i] >= '0' && str[i] <= '9') {
      |                    ~~~~^~~~~~
      |                              ()
Language: C++

#include "pch.h"
#include <iostream>
#include <string>

using namespace std;

int main()
{
	string str;
	cin >> str;
	int former= stoi(str.substr(0, 2)), latter= stoi(str.substr(2, 4));
	if (former >= 1 && former <= 12) {
		if (latter >= 1 && latter <= 12) {
			cout << "AMBIGUOUS";
		}
		else {
			cout << "MMYY";
		}
	}
	else {
		if (latter >= 1 && latter <= 12) {
			cout << "YYMM";
		}
		else {
			cout << "NA";
		}
	}
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.