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

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

    //4桁の入力
    scanf("%d",&s);

    //先頭2桁
    a=s/100;

    //後2桁
    b=s%100;

    if(s<100){
        printf("NA\n");
        return 0;
    }

    if((s%100)==0){
        printf("NA\n");
        return 0;
    }

    if(a<=12){
        if(b<=12){
            //12以下 AND 12以下
            printf("AMBIGUOUS\n");
        }else{
            //12以下 AND 0以上
            printf("MMYY\n");
        }
    }else{
        if(b<=12){
            //0以上 AND 12以下
            printf("YYMM\n");
        }else{
            //0以上 AND 0以上
            printf("NA\n");
        }

    return 0;
}

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

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   else if(a <= 12 && b > 12 || a <= && b == 0){
      |                                ~~^~~~~~~
a.cc:17:40: error: label 'b' used but not defined
   17 |   else if(a <= 12 && b > 12 || a <= && b == 0){
      |                                        ^
Language: C++

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

int main(){
    int s;
    string ans;
    cin >> s;
    if((s/100==00&&s%100>12)||(s/100>12&&s%100==00)||(s/100>12&&s%100>12)||(s=="0000")) ans="NA";
    else{
        if(s/100<=12&&s%100<=12) ans="AMBIGUOUS";
        else if(s/100>12&&s%100<=12) ans="YYMM";
        else if(s/100<=12&&s%100>12) ans="MMYY";
        else ans="NA";
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:78: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if((s/100==00&&s%100>12)||(s/100>12&&s%100==00)||(s/100>12&&s%100>12)||(s=="0000")) ans="NA";
      |                                                                             ~^~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected primary-expression before 'else'
   15 |   else{
      |   ^~~~
Language: C++

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

int main(){
    int s,a,b,c,d,e,f;
    cin >> s;

    a=s.at(0);
    b=s.at(1);
    c=s.at(2);
    d=s.at(3);
    e=a*10+b;
    f=c*10+d;
    if(e<1||f<1){
        cout <<"NA"<<endl;
    }
    else if(e<13&&f<13){
        cout <<"AMBIGUOUS"<<endl;
    }
    else if(e<12){
        cout <<"MMYY"<<endl;
    }
    else{
        cout <<"YYMM"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: request for member 'at' in 's', which is of non-class type 'int'
    8 |     a=s.at(0);
      |         ^~
a.cc:9:9: error: request for member 'at' in 's', which is of non-class type 'int'
    9 |     b=s.at(1);
      |         ^~
a.cc:10:9: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |     c=s.at(2);
      |         ^~
a.cc:11:9: error: request for member 'at' in 's', which is of non-class type 'int'
   11 |     d=s.at(3);
      |         ^~
Language: C++

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

int main(){
    int s;
    string ans;
    cin >> s;
    if((s/100==00&&s%100>12)||(s/100>12&&s%100==00)||(s/100>12&&s%100>12)||(s="0000")) ans="NA";
    else{
        if(s/100<=12&&s%100<=12) ans="AMBIGUOUS";
        else if(s/100>12&&s%100<=12) ans="YYMM";
        else if(s/100<=12&&s%100>12) ans="MMYY";
        else ans="NA";
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:79: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   12 |     if((s/100==00&&s%100>12)||(s/100>12&&s%100==00)||(s/100>12&&s%100>12)||(s="0000")) ans="NA";
      |                                                                               ^~~~~~
      |                                                                               |
      |                                                                               const char*
Language: C++

#include<iostream>
#include <string.h>
#include <algorithm>
#include <string>
using namespace std;

int gcd( int m, int n )
{
	// 引数に０がある場合は０を返す
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;
	
	// ユークリッドの方法
	while( m != n )
	{
		if ( m > n ) m = m - n;
		else         n = n - m;
	}
	return m;
}//gcd
int main()
{
    int s,h,l;
    cin >> s;
    h = s/100;
    l = s%100;

    if(0 < l && l <= 12)
    {
        if(0 < h && h <= 12)
        {
            cout << ("AMBIGUOUS");
        }
        else if(h == 0)
        {
            cout << ("NA");
        }
        else
        {
            cout << ("YYMM");
        }
        
    }
    else if(l == 0)
    {
        cout << ("NA");
    }else if(h > 12)
    {
        cout << ("NA");
    }else{
        cout << ("MMYY")
    }
    

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:25: error: expected ';' before '}' token
   51 |         cout << ("MMYY")
      |                         ^
      |                         ;
   52 |     }
      |     ~
Language: C

int main(){
  	int S;
  int A[4]=S;
  if(A[1][2]>12) and (A[3][4]>12){
    printf("NA\n");
  } even if(A[1][2]<12) and (A[3][4]<12){
    printf("AMBIGUOUS\n");
  } even if(A[1][2]<12) and (A[3][4]>12){
    printf("MMYY\n");
  } even if(A[1][2]>12) and (A[3][4]<12){
 	printf("YYMM\n");
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:12: error: invalid initializer
    3 |   int A[4]=S;
      |            ^
main.c:4:10: error: subscripted value is neither array nor pointer nor vector
    4 |   if(A[1][2]>12) and (A[3][4]>12){
      |          ^
main.c:4:18: error: implicit declaration of function 'and' [-Wimplicit-function-declaration]
    4 |   if(A[1][2]>12) and (A[3][4]>12){
      |                  ^~~
main.c:4:27: error: subscripted value is neither array nor pointer nor vector
    4 |   if(A[1][2]>12) and (A[3][4]>12){
      |                           ^
main.c:4:34: error: expected ';' before '{' token
    4 |   if(A[1][2]>12) and (A[3][4]>12){
      |                                  ^
      |                                  ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int S;
  cin >>S;
  int a,b,c,d;
  a=S.at(0);
  b=S.at(1);
  c=S.at(2);
  d=S.at(3);
  int A=a*10+b;
  int B=c*10+d;
  if(A>0&&A<13&&B>0&&B<13){
    cout <<"AMBIGUOUS"<<endl;
  }
  if((A=0||A>12)&&B>0&&B<13){
    cout <<"YYMM"<<endl;
  }
  if(A>0&&A<13&&(B=0||B>12)){
    cout <<"MMYY"<<endl;
  }
  if((A=0||A>12)&&(B=0||B>12){
    cout <<"NA"<<endl;
  }
     }
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   a=S.at(0);
      |       ^~
a.cc:8:7: error: request for member 'at' in 'S', which is of non-class type 'int'
    8 |   b=S.at(1);
      |       ^~
a.cc:9:7: error: request for member 'at' in 'S', which is of non-class type 'int'
    9 |   c=S.at(2);
      |       ^~
a.cc:10:7: error: request for member 'at' in 'S', which is of non-class type 'int'
   10 |   d=S.at(3);
      |       ^~
a.cc:22:30: error: expected ')' before '{' token
   22 |   if((A=0||A>12)&&(B=0||B>12){
      |     ~                        ^
      |                              )
a.cc:25:6: error: expected primary-expression before '}' token
   25 |      }
      |      ^
Language: C++

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

int main(){
    int s;
    string ans;
    cin >> s;
    if((s/100==00&&s%100>12)||(s/100>12&&s%100==00)||(s/100>12&&s%100>12)) ans="NA";
    else if{
    if(s/100<=12&&s%100<=12) ans="AMBIGUOUS";
    else if(s/100>12&&s%100<=12) ans="YYMM";
    else if(s/100<=12&&s%100>12) ans="MMYY";
    else ans="NA";
    }else ans="NA";
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: expected '(' before '{' token
   13 |     else if{
      |            ^
      |            (
a.cc:18:6: error: 'else' without a previous 'if'
   18 |     }else ans="NA";
      |      ^~~~
Language: C++

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


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

#include<vector>
#include <algorithm>
#include<string>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> n;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<string>
  +++ |+#include <iostream>
    4 | 
a.cc:34:9: error: 'cout' was not declared in this scope
   34 |         cout << ans;
      |         ^~~~
a.cc:34:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int main(){
    int s;
    string ans;
    cin >> s;
    if((s/100==00&&s%100>12)||(s/100>12&&s%100==00)||(s/100>12&&s%100>12)) ans="NA";
    else{
    if(s/100<=12&&s%100<=12) ans="AMBIGUOUS";
    else if(s/100>12&&s%100<=12) ans="YYMM";
    else if(s/100<=12&&s%100>12) ans="MMYY";
    else ans="NA";
    }else ans="NA";
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:6: error: 'else' without a previous 'if'
   18 |     }else ans="NA";
      |      ^~~~
Language: Java

import java.util.*;
public class HelloWorld{
     public static void main(String []args){
        Scanner sc= new Scanner(System.in);
        int S=sc.nextInt();
        if(S%100<13&&S%100!=0){
            System.out.println("YYMM");
            if(S/100<13){
                System.out.println("AMBIGUOUS");
            }
            return;
        }
        if(S/100<13&&S/100!=0){
            System.out.println("MMYY");
        
            return;
        }
        System.out.println("NA");
        
        
        
        
        
     }
}

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

#include <stdio.h>

int main(void)
{
  char S[5]
  int mmyy_flag=1,yymm_flag=1;
  
  scanf("%s",S);
  
  if(S[0]>='1' || S[1]>='3' || (S[0]>='0' && S[1]>='0'))
  {
    mmyy_flag=0;
  }
  if(S[2]=='0' && S[3]=='0')
  {
    yymm_flag=0;
  }
  
  if(yymm_flag==1 && mmyy_flag==1)
  {
    printf("AMBIGUOUS\n");
  }
  else if(yymm_flag==1 && mmyy_flag==0)
  {
    printf("YYMM\n");
  }
  else if(yymm_flag==0 && mmyy_flag==1)
  {
    printf("MMYY\n");
  }
  else
  {
    printf("NA\n");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: expected ';' before 'int'
    5 |   char S[5]
      |            ^
      |            ;
    6 |   int mmyy_flag=1,yymm_flag=1;
      |   ~~~       
main.c:8:14: error: 'S' undeclared (first use in this function)
    8 |   scanf("%s",S);
      |              ^
main.c:8:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <string>

using namespace std;

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

    int num = atoi(s.substr(0, 2).c_str());
    int num2 = atoi(s.substr(2, 2).c_str());
    if (num > 0 && num <= 12 && num2 > 0 && num2 <= 12)
    {
        cout << "AMBIGUOUS" << endl;
    }
    else if(num > 0 && num <= 12)
    {
        cout << "MMYY" << endl;
    }
    else if(num2 > 0 && num2 <= 12)
    {
        cout << "YYMM" << endl;
    }
    else
    {
        cout << "NA" << endl;
    }
    
    return 0;

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

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

int main()
{
    int a,b;
    string s;
  //  cin >> a >> b;
    cin >> s;
   // s[b-1] = s[b-1]+32+'0';
  a = (s[0]-'0')*10; a += s[1]-'0';
b = (s[2]-'0')*10; b += s[3]-'0';
if(a > 12 && (b > 0 && b < 13) ) cout << "YYMM" << endl;
else if(b > 0 && (a > 0 && a < 13)  cout << "MMYY" << endl;
else cout << "NA" << endl;
   // cout << s << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:35: error: expected ';' before 'cout'
   14 | else if(b > 0 && (a > 0 && a < 13)  cout << "MMYY" << endl;
      |                                   ^ ~~~~
      |                                   ;
a.cc:15:1: error: expected primary-expression before 'else'
   15 | else cout << "NA" << endl;
      | ^~~~
a.cc:14:60: error: expected ')' before 'else'
   14 | else if(b > 0 && (a > 0 && a < 13)  cout << "MMYY" << endl;
      |        ~                                                   ^
      |                                                            )
   15 | else cout << "NA" << endl;
      | ~~~~
Language: C++


#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;

int mm(string s)
{
	int a = 0;
	if ((s[0] == '0' && (!(s[1] == '0'))) || s[0] == '1' && (s[1] == '0' )||( s[1] == '1') || (s[1] == '2')))
	{
		a += 1;

	}

		if ((s[2] == '0' && (!(s[3] == '0'))) || s[2] == '1' && ((s[3] == '0') ||( s[3] == '1') ||( s[3] == '2')))
		{
			a += 2;
		}
	return a;
}

int main()
{
	string s;
	cin >> s;
	int a = mm(s);
	switch (a)
	{
	case 0:
		cout << "NA" << endl;
		break;
	case 1:
		cout << "MMYY" << endl;
		break;
	case 2:
		cout << "YYMM" << endl;
		break;
	case 3:
		cout << "AMBIGOUS" << endl;
		break;
	}
    return 0;
}



Compiler output:
a.cc: In function 'int mm(std::string)':
a.cc:10:113: error: expected primary-expression before ')' token
   10 |         if ((s[0] == '0' && (!(s[1] == '0'))) || s[0] == '1' && (s[1] == '0' )||( s[1] == '1') || (s[1] == '2')))
      |                                                                                                                 ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:29: error: expected ';' before 's'
   12 |   s[1] = A/100 - (A/1000)*10
      |                             ^
      |                             ;
   13 |   s[2] = A/10 - (A/100)*10
      |   ~                          
main.c:17:3: error: 'c1' undeclared (first use in this function); did you mean 'y1'?
   17 |   c1 = (s[0]*10 + s[1]);
      |   ^~
      |   y1
main.c:17:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:3: error: 'c2' undeclared (first use in this function)
   18 |   c2 = (s[2]*10 + s[3]);
      |   ^~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int number;
    cin >> number;
    if( number % 100 <= 12 && number % 100 != 0 ){//下二つがつき

      if( number/100 <=12 && number != 0 ){//上もつき
        cout << "AMBIGUOUS" <<endl;
      }
      else if(number / 100 >12 && number / 100 < 20){//上が年
        cout << "YYMM" <<endl;
    }
    else{
      cout << "NA" << endl;
    }
  }
    else if( number % 100 >12 number % 100 < 20){//下が年

      if( number/100 <=12 && number != 0 ){
        cout << "MMYY" <<endl;
    }
    else{
      cout << "NA" << endl;
    }
  }
  else{
    cout << "NA" << endl;
  }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: error: expected ')' before 'number'
   19 |     else if( number % 100 >12 number % 100 < 20){//下が年
      |            ~                 ^~~~~~~
      |                              )
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a;
  int i,j,f=0,s=0,flag=0;
  cin>>a;
    f=a/100;
    s=a%100;
  if(f<=12 && s<=12)//ambi
     flag=1;
  if((f>=12||f==0)&&s(>=12||s==0))//na
     flag=2;
  if(f>12&&s<=12)//yymm
     flag=3;
  if(f<=12&&s>12)//mmyy
     flag=4;
  
  if(flag==1)
    cout<<"AMBIGIOUS";
  if(flag==2)
    cout<<"NA";
  if(flag==3)
    cout<<"YYMM";
  if(flag==4)
    cout<<"MMYY";
 
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: expected primary-expression before '>=' token
   12 |   if((f>=12||f==0)&&s(>=12||s==0))//na
      |                       ^~
a.cc:12:33: error: 's' cannot be used as a function
   12 |   if((f>=12||f==0)&&s(>=12||s==0))//na
      |                                 ^
Language: C++

#include<iostream>

using namespace std;

int main() {
	int S[4];


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

	


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

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

int main()
{
    int a,b;
    string s;
  //  cin >> a >> b;
    cin >> s;
   // s[b-1] = s[b-1]+32+'0';
  a = (s[0]-'0')×10; a += s[1]-'0';
b = (s[2]-'0')×10; b += s[3]-'0';
if(a > 12 && (b > 0 && b < 13) ) cout << "YYMM" << endl;
else if(b > 0 && (a > 0 && a < 13)  cout << "MMYY" << endl;
else cout << "NA" << endl;
   // cout << s << endl;
    return 0;
}


Compiler output:
a.cc:11:17: error: extended character × is not valid in an identifier
   11 |   a = (s[0]-'0')×10; a += s[1]-'0';
      |                 ^
a.cc:12:15: error: extended character × is not valid in an identifier
   12 | b = (s[2]-'0')×10; b += s[3]-'0';
      |               ^
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '\U000000d710'
   11 |   a = (s[0]-'0')×10; a += s[1]-'0';
      |                 ^~~
      |                 ;
a.cc:12:15: error: expected ';' before '\U000000d710'
   12 | b = (s[2]-'0')×10; b += s[3]-'0';
      |               ^~~
      |               ;
a.cc:14:35: error: expected ';' before 'cout'
   14 | else if(b > 0 && (a > 0 && a < 13)  cout << "MMYY" << endl;
      |                                   ^ ~~~~
      |                                   ;
a.cc:15:1: error: expected primary-expression before 'else'
   15 | else cout << "NA" << endl;
      | ^~~~
a.cc:14:60: error: expected ')' before 'else'
   14 | else if(b > 0 && (a > 0 && a < 13)  cout << "MMYY" << endl;
      |        ~                                                   ^
      |                                                            )
   15 | else cout << "NA" << endl;
      | ~~~~
Language: C

int main(void)
{
	int s;
	int l, h;
	bool hm, lm;
	hm = false;
	lm = false;


	scanf("%d", &s);

	h =  s/100;
	l =  s%100;

	if (1 <= h && h <= 12) hm = true;
	if (1 <= l && l <= 12) lm = true;

	if (!hm && !lm) {
		printf("NA\n");
	}
	if (hm && lm) {
		printf("AMBIGUOUS\n");
	}
	if (hm && !lm) {
		printf("MMYY\n");
	}
	if (!hm && lm) {
		printf("YYMM\n");
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name 'bool'
    5 |         bool hm, lm;
      |         ^~~~
main.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
  +++ |+#include <stdbool.h>
    1 | int main(void)
main.c:6:14: error: 'false' undeclared (first use in this function)
    6 |         hm = false;
      |              ^~~~~
main.c:6:14: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   10 |         scanf("%d", &s);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:10:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |         scanf("%d", &s);
      |         ^~~~~
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:15:37: error: 'true' undeclared (first use in this function)
   15 |         if (1 <= h && h <= 12) hm = true;
      |                                     ^~~~
main.c:15:37: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:19:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |                 printf("NA\n");
      |                 ^~~~~~
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |                 printf("AMBIGUOUS\n");
      |                 ^~~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   25 |                 printf("MMYY\n");
      |                 ^~~~~~
main.c:25:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   28 |                 printf("YYMM\n");
      |                 ^~~~~~
main.c:28:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

Compiler output:
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:29:10: error: expected unqualified-id before '=' token
   29 |   for(int=0;i<4;i++){
      |          ^
a.cc:29:10: error: expected ';' before '=' token
   29 |   for(int=0;i<4;i++){
      |          ^
      |          ;
a.cc:29:10: error: expected primary-expression before '=' token
a.cc:29:13: error: 'i' was not declared in this scope
   29 |   for(int=0;i<4;i++){
      |             ^
a.cc:29:16: error: expected ')' before ';' token
   29 |   for(int=0;i<4;i++){
      |      ~         ^
      |                )
a.cc:29:17: error: 'i' was not declared in this scope
   29 |   for(int=0;i<4;i++){
      |                 ^
Language: C++

#include<iostream>

using namespace std;
int main()
{
	int s;
	cin >> s;
	int a, b;
	a = s / 100;
	b = s - (a * 100);
	if (a > 0 && a < 13) {
		if (b > 0 && b < 13) {
			cout << "AMBIGUOUS" << endl;
		}
		if (b==0) {
			cout << "NA" << endl;
		}
		if (b>12) {
			cout << "MMYY" << endl;
	}
	if (a == 0) {
		cout << "NA" << endl;
	}
	if (a > 12) {
		if (b > 0 && b < 13) {
			cout << "YYMM" << endl;
		}
		else {
			cout << "NA" << endl;
		}
	}
    return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before '=' token
    5 |   for(int=0;i<4;i++){
      |          ^
a.cc:5:10: error: expected ';' before '=' token
    5 |   for(int=0;i<4;i++){
      |          ^
      |          ;
a.cc:5:10: error: expected primary-expression before '=' token
a.cc:5:13: error: 'i' was not declared in this scope
    5 |   for(int=0;i<4;i++){
      |             ^
a.cc:5:16: error: expected ')' before ';' token
    5 |   for(int=0;i<4;i++){
      |      ~         ^
      |                )
a.cc:5:17: error: 'i' was not declared in this scope
    5 |   for(int=0;i<4;i++){
      |                 ^
Language: C

int main(void)
{
	int s;
	int l, h;
	bool hm, lm;
	hm = false;
	lm = false;


	scanf("%d", &s);

	h =  s/100;
	l =  s%100;

	if (1 <= h && h <= 12) hm = true;
	if (1 <= l && l <= 12) lm = true;

	if (!hm && !lm) {
		printf("NA\n");
	}
	if (hm && lm) {
		printf("AMBIGUOUS\n");
	}
	if (hm && !lm) {
		printf("MMYY\n");
	}
	if (!hm && lm) {
		printf("YYMM\n");
	}

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name 'bool'
    5 |         bool hm, lm;
      |         ^~~~
main.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
  +++ |+#include <stdbool.h>
    1 | int main(void)
main.c:6:14: error: 'false' undeclared (first use in this function)
    6 |         hm = false;
      |              ^~~~~
main.c:6:14: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   10 |         scanf("%d", &s);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:10:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |         scanf("%d", &s);
      |         ^~~~~
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:15:37: error: 'true' undeclared (first use in this function)
   15 |         if (1 <= h && h <= 12) hm = true;
      |                                     ^~~~
main.c:15:37: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:19:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |                 printf("NA\n");
      |                 ^~~~~~
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:19:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |                 printf("AMBIGUOUS\n");
      |                 ^~~~~~
main.c:22:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   25 |                 printf("MMYY\n");
      |                 ^~~~~~
main.c:25:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   28 |                 printf("YYMM\n");
      |                 ^~~~~~
main.c:28:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include<stdio.h>

int main(void)
{
  char S[5],mmyy_flag=1,yymm_flag=1;
  
  scanf("%s",S);
  
  if(S[0]>='1' || S[1]>='3')
  {
    mmyy_flag=0;
  }
  if(S[2]=='0' && S[3]=='0')
  {
    yymm_flag=0;
  }
  
  if(yymm_flag==1 && mmyy_flag==1)
  {
    printf("AMBIGUOUS\n");
  }
  else if(yymm_flag==1 && mmyy_flag==0)
  {
	printf("YYMM\n");
  }
  else if(yymm_flag==0 && mmyy_flag==1)
  {
    printf("MMYY\n");
  }
  else
  {
    printf("NA\n");
  }
  
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
#define repR(i, n) for(ll i = n; i >= 0; i--)
#define For(i, m, n) for(ll i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
typedef long double ld;
using namespace std;
struct Fast {Fast(){std::cin.tie(0);std::ios::sync_with_stdio(false);}} fast;
ll gcd(ll a, ll b){
    ll r = a % b;
    while(r!=0){
        a = b;
        b = r;
        r = a % b;
    }
    return b;
}

bool vector_find(std::vector<ll> vec, ll number) {
    auto itr = std::find(vec.begin(), vec.end(), number);
    size_t index = std::distance( vec.begin(), itr );
    if (index != vec.size()) {
        return true;
    }
    else {
        return false;
    }
}

int main(int argc, char *argv[]){
    string result = "";
    string S;
    cin >> S;
    if( (S[0] == '1' && stoi(&S[1]) > 2)
          && (S[2] == '1' && stoi(&S[3]) > 2) ){
        result = "NA";
    }else if(S[0] == '1' && stoi(&S[1]) > 2){
        if(S[2] == '0' && stoi(&S[3]) > 0){
            result = "NA";
        }else{
            result = "YYMM";
        }
    }else if(S[2] == '1' && stoi(&S[3]) > 2){
        if(S[0] == '1' && stoi(&S[1]) > 2){
            result = "NA"
        }else{
        result = "MMYY";
        }
    }else{
        result = "AMBIGUOUS";
    }
    
    
    cout << result << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:46:26: error: expected ';' before '}' token
   46 |             result = "NA"
      |                          ^
      |                          ;
   47 |         }else{
      |         ~
Language: C++

#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=0;i<b;i++)
#define REP(i,a,b) for(int i=0;i<=b;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define Yes(f) cout <<(f?"Yes":"No")<<endl//fが真の場合Yesを出力、偽の場合Noを出力
#define yes(f) cout <<(f?"yes":"no")<<endl
#define YES(f) cout <<(f?"YES":"NO")<<endl
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())

using namespace std;

const int mod=1e9+7;

signed main(){
    string s;
    cin >> s;
    vi k(4);

    rep(i,4)
    {
        switch(s[i])
        {
            case '0':
            k[i]=;0
                break;
            case '1':
k[i]=1;
                break;
            case '2':
k[i]=2;
                break;
            case '3':
k[i]=3;
                break;
                case '4':
k[i]=4;
                break;
                case '5':
k[i]=5;
                break;
                case '6':
k[i]=6;
                break;
                case '7':
k[i]=7;
                break;
                case '8':
k[i]=8;
                break;
                case '9':
k[i]=9;
                break;
        }
    }

    int ans=0b00;
    string a;
    int month=0;
    month+=k[0]*10+k[1];
    if(month>12&&month==0)ans+=0b10;
    month=0;
    month+=k[2]*10+k[3];
    if(month>12&&month==0)ans+=0b01;

    if(ans==0b00)a="AMBIGUOUS";
    if(ans==0b01)a="YYMM";
    if(ans==0b10)a="MMYY";
    if(ans==0b11)a="NA";

    cout << a << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:18: error: expected primary-expression before ';' token
   39 |             k[i]=;0
      |                  ^
a.cc:39:20: error: expected ';' before 'break'
   39 |             k[i]=;0
      |                    ^
      |                    ;
   40 |                 break;
      |                 ~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: lvalue required as left operand of assignment
   16 |     if(a1=1&&b1=1){cout<<"AMBIGUOUS"<<endl;}
      |           ~^~~~
a.cc:17:12: error: lvalue required as left operand of assignment
   17 |     if(a1=0&&b1=0){cout<<"NA"<<endl;}
      |           ~^~~~
a.cc:18:12: error: lvalue required as left operand of assignment
   18 |     if(a1=1&&b1=0){cout<<"YYMM"<<endl;}
      |           ~^~~~
a.cc:19:12: error: lvalue required as left operand of assignment
   19 |     if(a1=0&&b1=1){cout<<"MMYY"<<endl;}
      |           ~^~~~
Language: C++

# include <bits/stdc++.h>

using namespace std;

#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) ((int)(x).size())
#define whole(x) (x).begin(), (x).end()

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair < int, int > pii;
typedef pair < ll, ll > pll;

const int N = int(2000) + 2;
const int LG = 20;
const ll mod = 998244353;
const int INF = 2147483647;
const ll linf = 1e18;
const ld pi = acos(-1);
const ld EPS = 1e-10;

string s;

bool a (bool flag, int x, int y){
    if (flag){
        if (x == 0 || x > 12) return 0;
        return 1;
    }
    else {
        if (y == 0 || y > 12) return 0;
        return 1;
    }
}

int main (){
    cin >> s;
    int cur = int(s[0] - '0');
    cur = cur * 10 + int(s[1] - '0');
    int cur2 = int(s[2] - '0');
    cur2 = cur2 * 10 + int(s[3] - '0');
    if (a(1, cur1, cur2) && a(0, cur1, cur2)) return cout << "AMBIGUOUS\n", 0;
    else if (a(1, cur1, cur2)) return cout << "MMYY\n", 0;
    else if (a(0, cur1, cur2)) return cout << "YYMM\n", 0;
    else return cout << "NA\n", 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:14: error: 'cur1' was not declared in this scope; did you mean 'cur2'?
   45 |     if (a(1, cur1, cur2) && a(0, cur1, cur2)) return cout << "AMBIGUOUS\n", 0;
      |              ^~~~
      |              cur2
Language: C++

#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <cstdlib>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

string solve(string s) {
  int a = atoi(s.substr(0, 2).c_str());
  int b = atoi(s.substr(2).c_str());
  if (a <= 12 && a >= 1 && b <= 12 && b >= 1)
    return "AMBIGUOUS";
  if (b <= 12 && b >= 1 && a <= 12)
    return "AMBIGUOUS";
  if (a <= 12 && a >= 1 && b <= 12)
    return "AMBIGUOUS";
  if (a >= 1 && b <= 12 && b >= 1)
    return "YYMM";g
  if (a <= 12 && a >= 1 && b >= 1)
    return "MMYY";
  return "NA";
}

int main() {
  string s;
  cin >> s;
  cout << solve(s) << endl;
}


Compiler output:
a.cc: In function 'std::string solve(std::string)':
a.cc:20:19: error: 'g' was not declared in this scope
   20 |     return "YYMM";g
      |                   ^
Language: C++

#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=0;i<b;i++)
#define REP(i,a,b) for(int i=0;i<=b;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define Yes(f) cout <<(f?"Yes":"No")<<endl//fが真の場合Yesを出力、偽の場合Noを出力
#define yes(f) cout <<(f?"yes":"no")<<endl
#define YES(f) cout <<(f?"YES":"NO")<<endl
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())

using namespace std;

const int mod=1e9+7;

signed main(){
    string s;
    cin >> s;
    vi k(4);

    rep(i,4)
    {
        switch(s[i])b
        {
            case '0':
            k[i]=;0
                break;
            case '1':
k[i]=1;
                break;
            case '2':
k[i]=2;
                break;
            case '3':
k[i]=3;
                break;
                case '4':
k[i]=4;
                break;
                case '5':
k[i]=5;
                break;
                case '6':
k[i]=6;
                break;
                case '7':
k[i]=7;
                break;
                case '8':
k[i]=8;
                break;
                case '9':
k[i]=9;
                break;
        }
    }

    int ans=0b00;
    string a;
    int month=0;
    month+=k[0]*10+k[1];
    if(month>12&&month==0)ans+=0b10;
    month=0;
    month+=k[2]*10+k[3];
    if(month>12&&month==0)ans+=0b01;

    if(ans==0b00)a="AMBIGUOUS";
    if(ans==0b01)a="YYMM";
    if(ans==0b10)a="MMYY";
    if(ans==0b11)a="NA";

    cout << a << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:21: error: 'b' was not declared in this scope
   36 |         switch(s[i])b
      |                     ^
Language: C++

#include<bits/stdc++.h>
#include<math.h>
#include<string>
using namespace std;
int main(void){
	int s,result=0;
	cin >> s;
	if(s/100 <=12&&s>=1){
		result +=10;
	}
	if(s%100<=12&&s%>=1){
		result += 1;
	}
	if(result == 0){
		cout << "NA" << endl;
	}else if(result == 1){
		cout << "YYMM" << endl;
	}else if(result==10){
		cout << "MMYY" << endl;
	}else if(result == 11){
		cout << "AMBIGUOUS" << endl;

	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ')' before '%>' token
   11 |         if(s%100<=12&&s%>=1){
      |           ~            ^~
      |                        )
a.cc:11:24: error: expected primary-expression before '%>' token
   11 |         if(s%100<=12&&s%>=1){
      |                        ^~
a.cc: At global scope:
a.cc:11:26: error: expected unqualified-id before '=' token
   11 |         if(s%100<=12&&s%>=1){
      |                          ^
a.cc:14:9: error: expected unqualified-id before 'if'
   14 |         if(result == 0){
      |         ^~
a.cc:16:10: error: expected unqualified-id before 'else'
   16 |         }else if(result == 1){
      |          ^~~~
a.cc:18:10: error: expected unqualified-id before 'else'
   18 |         }else if(result==10){
      |          ^~~~
a.cc:20:10: error: expected unqualified-id before 'else'
   20 |         }else if(result == 11){
      |          ^~~~
a.cc:24:9: error: expected unqualified-id before 'return'
   24 |         return 0;
      |         ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

妙可兰多妙可兰多振动棒振动棒，保证你够爽保证你够爽，真舒畅真舒畅 

Compiler output:
a.cc:1:1: error: '\U00005999\U000053ef\U00005170\U0000591a\U00005999\U000053ef\U00005170\U0000591a\U0000632f\U000052a8\U000068d2\U0000632f\U000052a8\U000068d2\U0000ff0c\U00004fdd\U00008bc1\U00004f60\U0000591f\U0000723d\U00004fdd\U00008bc1\U00004f60\U0000591f\U0000723d\U0000ff0c\U0000771f\U00008212\U00007545\U0000771f\U00008212\U00007545' does not name a type
    1 | 妙可兰多妙可兰多振动棒振动棒，保证你够爽保证你够爽，真舒畅真舒畅
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: expected ';' before '(' token
   13 |   else if(stoi(bb)>12)&&stoi(aa)<=12&&stoi(aa)>0)
      |                             ^
      |                             ;
a.cc:13:25: error: label 'stoi' used but not defined
   13 |   else if(stoi(bb)>12)&&stoi(aa)<=12&&stoi(aa)>0)
      |                         ^~~~
Language: C++

#include <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:58: error: expected primary-expression before '||' token
   16 |         if((S[0]==0 && S[1]==0) || (S[2]==0 && S[3]==0)) || (S[0]*10+S[1]>=13 && S[2]*10+S[3]>=13))
      |                                                          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int moji;
    
    cin>>moji;
    
    int MM = moji%100;
    int YY = moji/100;
    
    if((1 <= MM && MM <= 12) && (1 <= YY && YY <= 12)){
        cout<<"AMBIGUOUS"<<endl;
    }else if((1 <= MM && MM <= 12) && (YY > 12) ){
        cout<<"YYMM"<<endl;
    }else if((1 <= YY && YY <= 12) && (MM > 12) ){
        cout<<"MMYY"<<endl;
    else{
        cout<<"NA"<<endl;
    }
    
    
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: expected '}' before 'else'
   18 |     else{
      |     ^~~~
a.cc:16:50: note: to match this '{'
   16 |     }else if((1 <= YY && YY <= 12) && (MM > 12) ){
      |                                                  ^
Language: C

int main(){
  int A[4]=S;
  if(A[1][2]>12 and A[3][4]>12){
    printf("NA\n");
  } even if(A[1][2]<12 and A[3][4]<12){
    printf("AMBIGUOUS\n");
  } even if(A[1][2]<12 and A[3][4]>12){
    printf("MMYY\n");
  } even if(A[1][2]>12 and A[3][4]<12){
 	printf("YYMM\n");
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:2:12: error: 'S' undeclared (first use in this function)
    2 |   int A[4]=S;
      |            ^
main.c:2:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:10: error: subscripted value is neither array nor pointer nor vector
    3 |   if(A[1][2]>12 and A[3][4]>12){
      |          ^
main.c:3:16: error: expected ')' before 'and'
    3 |   if(A[1][2]>12 and A[3][4]>12){
      |     ~          ^~~~
      |                )
main.c:4:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 |     printf("NA\n");
      |     ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:4:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    4 |     printf("NA\n");
      |     ^~~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:5: error: 'even' undeclared (first use in this function)
    5 |   } even if(A[1][2]<12 and A[3][4]<12){
      |     ^~~~
main.c:5:9: error: expected ';' before 'if'
    5 |   } even if(A[1][2]<12 and A[3][4]<12){
      |         ^~~
      |         ;
Language: C++

#include<bits/stdc++.h>
using namespace std ;
#define int long long
#define pb push_back
#define maxn 200005
int n,m,a,b,c,x,y,z,i,j,k;

void solve(){
    string str ;
    cin >> str ;
    int x ;
    x = str[2]-'0' ;
    x = x*10 + (str[3]-'0') ;
    int y = str[0]-'0' ;
    y*=10 ;
    y += str[1]-'0' ;
    if(x==0 && y==0)
        cout << "NA" ;
    else if(x==0 && y>12){
        cout << "NA" ;
    }
    else if(x==0 && y<=12)
        cout << "MMYY" ;
    else if(y==0 && x<=12)
        cout << "YYMM"
    else if(x>12 && y==0)
        cout << "NA" ;
    else if(x>12 && y>12){
        cout << "NA" ;
    }
    else if(x>12 && y<=12){
        cout << "MMYY" ;
    }
    else if(x<=12 && y>12){
        cout << "YYMM" ;
    }
    else cout << "AMBIGUOUS" ;
}
signed main(){

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1 ;
    //cin >> t ;
    while(t--){
        solve();
    }
    return 0 ;
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:25:23: error: expected ';' before 'else'
   25 |         cout << "YYMM"
      |                       ^
      |                       ;
   26 |     else if(x>12 && y==0)
      |     ~~~~