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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: lvalue required as left operand of assignment
   16 |   else if (S.at(0) == 0 && S.at(1) =- 0){
      |            ~~~~~~~~~~~~~^~~~~~~~~~
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 > 12 && (a > 0 && a < 13)) cout << "MMYY" << endl;
else if((a == 0 || b == 0 || b > 12) || (b == 0 || a == 0 || a > 12)) cout"NA" << endl;
else cout << "AMBIGUOUS" << endl;
   // cout << s << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:75: error: expected ';' before string constant
   15 | else if((a == 0 || b == 0 || b > 12) || (b == 0 || a == 0 || a > 12)) cout"NA" << endl;
      |                                                                           ^~~~
      |                                                                           ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:32: error: 'end1' was not declared in this scope
   23 |         cout << "AMBIGUOUS" << end1;
      |                                ^~~~
a.cc:24:5: error: expected '}' before 'else'
   24 |     else if(flagA==1 && flagB==0){
      |     ^~~~
a.cc:22:29: note: to match this '{'
   22 |     if(flagA==1 && flagB==1){
      |                             ^
a.cc:25:27: error: 'end1' was not declared in this scope
   25 |         cout << "MMYY" << end1;
      |                           ^~~~
a.cc:26:5: error: expected '}' before 'else'
   26 |     else if(flagA==0 && flagB==1){
      |     ^~~~
a.cc:24:34: note: to match this '{'
   24 |     else if(flagA==1 && flagB==0){
      |                                  ^
a.cc:27:27: error: 'end1' was not declared in this scope
   27 |         cout << "YYMM" << end1;
      |                           ^~~~
a.cc:28:5: error: expected '}' before 'else'
   28 |     else cout << "NA" << end1;
      |     ^~~~
a.cc:26:34: note: to match this '{'
   26 |     else if(flagA==0 && flagB==1){
      |                                  ^
a.cc:28:26: error: 'end1' was not declared in this scope
   28 |     else cout << "NA" << end1;
      |                          ^~~~
a.cc: At global scope:
a.cc:30:5: error: expected declaration before '}' token
   30 |     }
      |     ^
a.cc:31:5: error: expected declaration before '}' token
   31 |     }
      |     ^
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
    // 文字列の入力
    string S;
    cin >> S;

    int num = atoi(S.c_str());

    if (num / 100 <= 12 && num % 100 <= 12)
    {
        if (num / 100 = 0 && num % 100 = 0)
            S = "NA";
        else if (num / 100 == 0)
            S = "MMYY";
        else if (num % 100 == 0)
            S = "YYMM";

        else
            S = "AMBIGUOUS";
    }
    else if (num % 100 <= 12 && num % 100 > 0)
        S = "YYMM";
    else if (num / 100 <= 12 && num / 100 > 0)
        S = "MMYY";
    else
        S = "NA";

    // 出力
    cout << S << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: lvalue required as left operand of assignment
   14 |         if (num / 100 = 0 && num % 100 = 0)
      |                         ~~^~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
    // 文字列の入力
    string S;
    cin >> S;

    int num = atoi(S.c_str());

    if (num / 100 <= 12 && num % 100 <= 12)
    {
        if (num / 100 = 0 &&num % 100 = 0)
            S = "NA";
        else if (num / 100 == 0)
            S = "MMYY";
        else if (num % 100 == 0)
            S = "YYMM";

        else
            S = "AMBIGUOUS";
    }
    else if (num % 100 <= 12 && num % 100 > 0)
        S = "YYMM";
    else if (num / 100 <= 12 && num / 100 > 0)
        S = "MMYY";
    else
        S = "NA";

    // 出力
    cout << S << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: lvalue required as left operand of assignment
   14 |         if (num / 100 = 0 &&num % 100 = 0)
      |                         ~~^~~~~~~~~~~
Language: C++

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

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


Compiler output:
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
   11 |       cout<<'YYMM'<<endl;
      |             ^~~~~~
a.cc:14:13: warning: multi-character character constant [-Wmultichar]
   14 |       cout<<'MMYY'<<endl;
      |             ^~~~~~
a.cc:17:13: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
   17 |       cout<<'AMBIGUOUS'<<endl;
      |             ^~~~~~~~~~~
a.cc:21:11: warning: multi-character character constant [-Wmultichar]
   21 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc:24:11: warning: multi-character character constant [-Wmultichar]
   24 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc:27:11: warning: multi-character character constant [-Wmultichar]
   27 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc:30:11: warning: multi-character character constant [-Wmultichar]
   30 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int A=S-S/100
      |   ^~~
a.cc:20:12: error: 'A' was not declared in this scope
   20 |   if(B>12&&A==0){
      |            ^
a.cc:23:12: error: 'A' was not declared in this scope
   23 |   if(B==0&&A>12){
      |            ^
a.cc:26:12: error: 'A' was not declared in this scope
   26 |   if(B>12&&A>12){
      |            ^
a.cc:29:12: error: 'A' was not declared in this scope
   29 |   if(B==0&&A==0){
      |            ^
Language: C++

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

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

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

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

int main(){
  string s;cin>>s;
  string top,bot;
  int topn,botn;
  top=s.substr(0,2);
  bot=s.substr(2,2);
  topn=atoi(top.c_str());
  botn=atoi(top.c_str());
  
  if(1<=topn&&topn<=12){
    if(1=<botn&&botn<=12){
      cout<<"AMBIGUOUS"<<endl;
    }else{
      cout<<"MMYY"<<endl;
    }
  }else{
    if(1<=botn&&botn<=12){
      cout<<"YYMM"<<endl;
    }else{
      cout<<"NA"<<endl;
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected primary-expression before '<' token
   14 |     if(1=<botn&&botn<=12){
      |          ^
Language: Java

import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int s = sc.nextInt();
    String str = String.valueOf(s);
    boolean yymm = false;
    boolean mmyy = false;
    
    int mae = Integer.parseInt(str.substring(0,2).replaceFirst("0"));
    int ato = Integer.parseInt(str.substring(2).replaceFirst("0"));
    if(mae<13&&mae!=0&&ato!=0){
      mmyy = true;
    }
    if(ato<13&&ato!=0&&mae!=0){
        yymm = true;
    }
    if(mmyy&&yymm){System.out.println("AMBIGUOUS");}
    if(mmyy&&!yymm){System.out.println("MMYY");}
    if(!mmyy&&yymm){System.out.println("YYMM");}
    if(!mmyy&&!yymm){System.out.println("NA");}
  }
}


Compiler output:
Main.java:12: error: method replaceFirst in class String cannot be applied to given types;
    int mae = Integer.parseInt(str.substring(0,2).replaceFirst("0"));
                                                 ^
  required: String,String
  found:    String
  reason: actual and formal argument lists differ in length
Main.java:13: error: method replaceFirst in class String cannot be applied to given types;
    int ato = Integer.parseInt(str.substring(2).replaceFirst("0"));
                                               ^
  required: String,String
  found:    String
  reason: actual and formal argument lists differ in length
2 errors
Language: C++

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

int main() {
  string s;
  cin>>s;
  if(s[2]s[3]<=12&&s[2]s[3]!=00){
    cout<<"YYMM"<<endl;
  }
  else if(s[0]s[1]<=12&&s[0]s[1]!=00){
    cout<<"MMYY"<<endl;
  }
  else if(s[0]s[1]<=12&&s[0]s[1]!=00&&s[2]s[3]<=12&&s[2]s[3]!=00){
    cout<<"AMBIGUOUS"endl;
  }
  else{
    cout<<"NA"<<endl;
  }
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ')' before 's'
    7 |   if(s[2]s[3]<=12&&s[2]s[3]!=00){
      |     ~    ^
      |          )
a.cc:10:15: error: expected ')' before 's'
   10 |   else if(s[0]s[1]<=12&&s[0]s[1]!=00){
      |          ~    ^
      |               )
a.cc:13:15: error: expected ')' before 's'
   13 |   else if(s[0]s[1]<=12&&s[0]s[1]!=00&&s[2]s[3]<=12&&s[2]s[3]!=00){
      |          ~    ^
      |               )
a.cc:14:11: error: unable to find string literal operator 'operator""endl' with 'const char [10]', 'long unsigned int' arguments
   14 |     cout<<"AMBIGUOUS"endl;
      |           ^~~~~~~~~~~~~~~
Language: C++

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

int main() {
  int  S; cin >> S;
  
  vector<int> vec(4);
  for(int i=0; i<4; i++){
    vec.at(i)=S%10;
    S /= 10;
  }
  
  if( vec.at(0)*10+vec.at(1)>12 ) {
    if( vec.at(3)*10+vec.at(4) > 12) cout << "NA" << endl;
    else cout << "YYMM" << endl;
  }
  else {
    if (vec.at(3)*10+vec.at(4) > 12) cout << "MMYY" << endl;;
    else cout << "AMBIGUOUS" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'else' without a previous 'if'
   19 |     else cout << "AMBIGUOUS" << endl;
      |     ^~~~
Language: C++

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

using namespace std;


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

  string S12, S34;

  S12 = S1234.substr(0,2);
  S34 = S1234.substr(2);

  int num12 = atoi(S12.c_str());
  int num34 = atoi(S34.c_str());

  if( (num12 == 0 || num12 >= 13) && (num34 != 0 && num34 <= 12 ) cout << "YYMM";
  //else if( num12 >= 13 && num34 >= 13 ) cout << "NA";
  else if( num12 > 0 && num12 <=12 && (num34 == 0 || num34 >= 13) ) cout << "MMYY";
  else if( (num12 >= 1 && num12 <= 12) && (num34 >= 1 && num34 <= 12) ) cout << "AMBIGUOUS";
  else cout << "NA";

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:66: error: expected ';' before 'cout'
   21 |   if( (num12 == 0 || num12 >= 13) && (num34 != 0 && num34 <= 12 ) cout << "YYMM";
      |                                                                  ^~~~~
      |                                                                  ;
a.cc:23:3: error: expected primary-expression before 'else'
   23 |   else if( num12 > 0 && num12 <=12 && (num34 == 0 || num34 >= 13) ) cout << "MMYY";
      |   ^~~~
a.cc:21:82: error: expected ')' before 'else'
   21 |   if( (num12 == 0 || num12 >= 13) && (num34 != 0 && num34 <= 12 ) cout << "YYMM";
      |     ~                                                                            ^
      |                                                                                  )
   22 |   //else if( num12 >= 13 && num34 >= 13 ) cout << "NA";
   23 |   else if( num12 > 0 && num12 <=12 && (num34 == 0 || num34 >= 13) ) cout << "MMYY";
      |   ~~~~
Language: C++

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

int main(){
  int S;
  cin>>S;
  int B=S.at(0)*10+S.at(1);
  int A=S.at(2)*10+S.at(3);
  if(B!=0&&A!=0){
    if(B>12&&A<13){
      cout<<'YYMM'<<endl;
    }
    if(B<13&&A>12){
      cout<<'MMYY'<<endl;
    }
    if(B<13&&A<13){
      cout<<'AMBIGUOUS'<<endl;
    }
  }
  if(B>12&&A==0){
    cout<<'NA'<<endl;
  }
  if(B==0&&A>12){
    cout<<'NA'<<endl;
  }
  if(B>12&&A>12){
    cout<<'NA'<<endl;
  }
  if(B==0&&A==0){
    cout<<'NA'<<endl;
  }
}


Compiler output:
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
   11 |       cout<<'YYMM'<<endl;
      |             ^~~~~~
a.cc:14:13: warning: multi-character character constant [-Wmultichar]
   14 |       cout<<'MMYY'<<endl;
      |             ^~~~~~
a.cc:17:13: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
   17 |       cout<<'AMBIGUOUS'<<endl;
      |             ^~~~~~~~~~~
a.cc:21:11: warning: multi-character character constant [-Wmultichar]
   21 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc:24:11: warning: multi-character character constant [-Wmultichar]
   24 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc:27:11: warning: multi-character character constant [-Wmultichar]
   27 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc:30:11: warning: multi-character character constant [-Wmultichar]
   30 |     cout<<'NA'<<endl;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:7:11: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   int B=S.at(0)*10+S.at(1);
      |           ^~
a.cc:7:22: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   int B=S.at(0)*10+S.at(1);
      |                      ^~
a.cc:8:11: error: request for member 'at' in 'S', which is of non-class type 'int'
    8 |   int A=S.at(2)*10+S.at(3);
      |           ^~
a.cc:8:22: error: request for member 'at' in 'S', which is of non-class type 'int'
    8 |   int A=S.at(2)*10+S.at(3);
      |                      ^~
Language: C++

#include <algorithm>
#include <string> 
#include <vector>
#include <iomanip>
#include <queue>
#include <math.h>
	using namespace std;
#define lol long long



	int main()
	{
		int N;
		cin >> N;
		int A = N / 100;
		int B = N % 100;
		if (1 <= A && A <= 12 && 1 <= B && B <= 12) {
			cout << "AMBIGUOUS" << endl;
		}
		else if (0 <= A && A <= 99 && 1 <= B && B <= 12) {
			cout << "YYMM" << endl;
		}
		else if (1 <= A && A <= 12 && 0 <= B && B <= 99) {
			cout << "MMYY" << endl;
		}
		else {
			cout << "NA" << endl;
		}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'cin' was not declared in this scope
   15 |                 cin >> N;
      |                 ^~~
a.cc:7:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    6 | #include <math.h>
  +++ |+#include <iostream>
    7 |         using namespace std;
a.cc:19:25: error: 'cout' was not declared in this scope
   19 |                         cout << "AMBIGUOUS" << endl;
      |                         ^~~~
a.cc:19:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:25: error: 'cout' was not declared in this scope
   22 |                         cout << "YYMM" << endl;
      |                         ^~~~
a.cc:22:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:25: error: 'cout' was not declared in this scope
   25 |                         cout << "MMYY" << endl;
      |                         ^~~~
a.cc:25:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:25: error: 'cout' was not declared in this scope
   28 |                         cout << "NA" << endl;
      |                         ^~~~
a.cc:28:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: At global scope:
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: Java

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		String S  = keyboard.next();
		 String[] T = S.split("");
		
		int a = Integer.parseInt(T[0]);
		int b = Integer.parseInt(T[1]);
		int c = Integer.parseInt(T[2]);
		int d = Integer.parseInt(T[3]);

		int AA = 10*a + b;
		int BB = 10*c + d;
				
		String ans = "";
		
		if(AA < 13 && BB > 13) {
			if(BB < 32 )
			ans = "MMYY" ;
		}else {
			ans = "NA" ;
		}
		
		if(AA > 13 && BB < 13) {
			if(AA < 32 )
			ans = "YYMM" ;
		}else {
			ans = "NA" ;
		}
		
		if(AA == 0) {
			ans = "NA" ;
		}

		if(BB == 0) {
			ans = "NA" ;
		}
		
		if(AA > 32  &&  BB > 32) {
			ans = "NA" ;
		}
		if(AA < 13 && BB < 13) {
			ans = "AMBIGUOUS" ;
		}

		System.out.print(ans);
		keyboard.close();	
	}

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

int main() {
	int S;
	int count;
	int count2;
	cin >> S;
	count = S / 100;
	count2 = S % 100;
	if (count != 0) {
		if (count2 == 0) {
			cout << "NA" << endl;
		}
		else if (count >= 13) {
			cout << "YYMM" << endl;
		}
		else {
			cout << "AMBIGUOUS" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> S;
      |         ^~~
a.cc:10:25: error: 'cout' was not declared in this scope; did you mean 'count'?
   10 |                         cout << "NA" << endl;
      |                         ^~~~
      |                         count
a.cc:10:41: error: 'endl' was not declared in this scope
   10 |                         cout << "NA" << endl;
      |                                         ^~~~
a.cc:13:25: error: 'cout' was not declared in this scope; did you mean 'count'?
   13 |                         cout << "YYMM" << endl;
      |                         ^~~~
      |                         count
a.cc:13:43: error: 'endl' was not declared in this scope
   13 |                         cout << "YYMM" << endl;
      |                                           ^~~~
a.cc:16:25: error: 'cout' was not declared in this scope; did you mean 'count'?
   16 |                         cout << "AMBIGUOUS" << endl;
      |                         ^~~~
      |                         count
a.cc:16:48: error: 'endl' was not declared in this scope
   16 |                         cout << "AMBIGUOUS" << endl;
      |                                                ^~~~
Language: C++

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

int main(){
    string s;
    cin >> s;
    int num = atoi(s.c_str());
    num1 = num / 1000;
    num2 = (num / 100) % 10;
    num3 = (num / 10) % 10
    num4 = num % 10;
    num12 = num1 + num2;
    num34 = num3 + num4;
    if(num1 == 0 || num1 == 1){
        if(num2 == 0 && num1 == 0) printf("NA\n");
        else if(num12 > 9 && num34 != 0) printf("YYMM\n");
        else if(num12 < 9 && num34 != 0) printf("MMYY\n");
        else printf("AMBIGUOUS\n");
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'num1' was not declared in this scope; did you mean 'num'?
    8 |     num1 = num / 1000;
      |     ^~~~
      |     num
a.cc:9:5: error: 'num2' was not declared in this scope; did you mean 'num'?
    9 |     num2 = (num / 100) % 10;
      |     ^~~~
      |     num
a.cc:10:5: error: 'num3' was not declared in this scope; did you mean 'num'?
   10 |     num3 = (num / 10) % 10
      |     ^~~~
      |     num
a.cc:12:5: error: 'num12' was not declared in this scope; did you mean 'num'?
   12 |     num12 = num1 + num2;
      |     ^~~~~
      |     num
a.cc:13:5: error: 'num34' was not declared in this scope; did you mean 'num'?
   13 |     num34 = num3 + num4;
      |     ^~~~~
      |     num
a.cc:13:20: error: 'num4' was not declared in this scope; did you mean 'num'?
   13 |     num34 = num3 + num4;
      |                    ^~~~
      |                    num
Language: C++

#include<iostream>
#include<string.h>
using namespace std;
#define pb push_back
int main(){
  for(int i=0;i<9999;i++)
  string S;
  cin >> S;
  string A,B;
  A.pb(S[0]);A.pb(S[1]);
  B.pb(S[2]);B.pb(S[3]);
  int C = atoi(A.c_str());
  int D = atoi(B.c_str());
  //cout<<C<<D<<endl;
  if(C<=0 || D<=0 ) {
    cout<<"NA"<<endl;
    return 0;
  }
   if(C >12  && D>12 ) {
    cout<<"NA"<<endl;
    return 0;
  }

  if((int)C <=12 && (int)D <=12){
    cout<<"AMBIGUOUS"<<endl;
    return 0;
  }

  if((int)C<=12 && (int)D >12){
    cout<<"MMYY"<<endl;
    return 0;
  }
  if((int)C>12 && (int)D <=12){
    cout<<"YYMM"<<endl;
    return 0;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'S' was not declared in this scope
    8 |   cin >> S;
      |          ^
Language: C++

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

using ll=long long;
const int inf=100000000;

int in(){
  int a;
  cin >> a;
  return a;
}//int型関数の受け取り

void forin(int* x,int y){
  for (int i=0;i<y;i++){
    cin >> x[i];
  }
}//(x,y) int型配列x[y]の受け取り

int intpow(int x,int y){
  double a=x,b=y;
  return pow(a,b);
}//(x,y) xをy乗

int intfabs(int x){
  double a=x;
  return fabs(a);
}//(x) xの絶対値

int fact(int x){
  if (x == 1) return 1;
  return x*fact(x-1);
}//(x) x!

int fib(int x){
  if (x <= 2) return x;
  int a[x];
  a[0]=1;
  a[1]=2;
  for (int i=2;i<x;i++){
    a[i]=a[i-1]+a[i-2];
  }
  return a[x-1];
}//(x) フィボナッチ数列のx番目

int div1(ll x){
  return x%1000000007;
}

main(){
  int s=in(),f=s/100,s=s%100;
  if (0<f && 0<s){
    if (f<13 && s<13) cout << "AMBIGUOUS" << endl;
    else if (f<13) cout << "MMYY" << endl;
    else if (s<13) cout << "YYMM" << endl;
    else cout << "NA" << endl;
  }
  else cout << "NA" << endl;
}

Compiler output:
a.cc:49:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   49 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:50:22: error: redeclaration of 'int s'
   50 |   int s=in(),f=s/100,s=s%100;
      |                      ^
a.cc:50:7: note: 'int s' previously declared here
   50 |   int s=in(),f=s/100,s=s%100;
      |       ^
Language: C++

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

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

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

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

    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:31: error: expected ';' before '}' token
   26 |                 cout << "YYMM"
      |                               ^
      |                               ;
   27 |             }
      |             ~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:4:16: error: subscripted value is neither array nor pointer nor vector
    4 |         if(A[1][2]>12 || A[3][4]>12){
      |                ^
main.c:4:30: error: subscripted value is neither array nor pointer nor vector
    4 |         if(A[1][2]>12 || A[3][4]>12){
      |                              ^
main.c:5:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 |         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:5:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    5 |         printf("NA\n");
      |         ^~~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:23: error: subscripted value is neither array nor pointer nor vector
    6 |         } else if(A[1][2]<12 || A[3][4]<12){
      |                       ^
main.c:6:37: error: subscripted value is neither array nor pointer nor vector
    6 |         } else if(A[1][2]<12 || A[3][4]<12){
      |                                     ^
main.c:7:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    7 |     printf("AMBIGUOUS\n");
      |     ^~~~~~
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:23: error: subscripted value is neither array nor pointer nor vector
    8 |         } else if(A[1][2]<12 || A[3][4]>12){
      |                       ^
main.c:8:37: error: subscripted value is neither array nor pointer nor vector
    8 |         } else if(A[1][2]<12 || A[3][4]>12){
      |                                     ^
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |     printf("MMYY\n");
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:23: error: subscripted value is neither array nor pointer nor vector
   10 |         } else if(A[1][2]>12 || A[3][4]<12){
      |                       ^
main.c:10:37: error: subscripted value is neither array nor pointer nor vector
   10 |         } else if(A[1][2]>12 || A[3][4]<12){
      |                                     ^
main.c:11:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   11 |         printf("YYMM\n");
      |         ^~~~~~
main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

import java.util.Scanner;

public class B {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();

		int[] b = new int[4];

		b[0] = a/1000;
		b[1] = (a/100)%10;
		b[2] = (a/10)%10;
		b[3] = a%10;

		int TH = b[0]*10 + b[1];
		int TO = b[2]*10 + b[3];

		if(TH > 12) {
			if(TO > 12) System.out.print("NA");
			else if(TO <=12) {
				if(TO==0) {System.out.print("NA");
				System.exit(0);}
				System.out.print("YYMM");}

		}

		else if(TH <=12) {

			if(TH==0) {

			if(TO > 12) System.out.print("NA");
			else if(TO<=12) System.out.print("YYMM");
			}

			else {
				if(TO > 12) System.out.print("MMYY");
				else if(TO<=12 && TO>0) System.out.print("AMBIGUOUS");
				else if(TO==0) System.out.print("MMYY");
			}
		}
	}

}


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

#include <iostream>
#include <string>
using namespace std;

int main(){
  string S;
  cin >> S;
  
  string c01 = S[0]+S[1];
  string c23 = S[2]+S[3];
  
  int i01 = stoi(c01);
  int i23 = stoi(c23);
  
  if(i01 >= 1 && i01 <=12 && i23 >= 1 && i23 <=12) {
    cout << "AMBIGUOUS" << endl;
  }else if(i01 >= 0 && i23 >= 1 && i23 <=12) {
    cout << "YYMM" << endl;
  }else if( i01 >= 1 && i01 <=12 && i23 >= 0) {
    cout << "MMYY" << endl;
  }else{
    cout << "NA" << endl;
  }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    9 |   string c01 = S[0]+S[1];
a.cc:10:20: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   10 |   string c23 = S[2]+S[3];
Language: C

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


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

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

int main(){
    string s;
    cin >> s;
    int num1 = atoi(s[0].c_str());
    int num2 = atoi(s[1].c_str());
    int num3 = atoi(s[2].c_str());
    int num4 = atoi(s[3].c_str());
    num12 = num1 + num2;
    num34 = num3 + num4;
    if(num1 == 0 || num1 == 1){
        if(num2 == 0 && num1 == 0) printf("NA\n");
        else if(num12 > 9 && num34 != 0) printf("YYMM\n");
        else if(num12 < 9 && num34 != 0) printf("MMYY\n");
        else printf("AMBIGUOUS\n");
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    7 |     int num1 = atoi(s[0].c_str());
      |                          ^~~~~
a.cc:8:26: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    8 |     int num2 = atoi(s[1].c_str());
      |                          ^~~~~
a.cc:9:26: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](2)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    9 |     int num3 = atoi(s[2].c_str());
      |                          ^~~~~
a.cc:10:26: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](3)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   10 |     int num4 = atoi(s[3].c_str());
      |                          ^~~~~
a.cc:11:5: error: 'num12' was not declared in this scope; did you mean 'num2'?
   11 |     num12 = num1 + num2;
      |     ^~~~~
      |     num2
a.cc:12:5: error: 'num34' was not declared in this scope; did you mean 'num4'?
   12 |     num34 = num3 + num4;
      |     ^~~~~
      |     num4
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(){
  int S;
  cin >> S;
  string result;
  int up = S/100;
  int down = S % 100;
  if(down == 0 && up >= 13) result = "NA";
  else(up >= 13 && down >= 13) result = "NA";
  else if(up == 0 && down >= 13) result = "NA";
  else if(up == 0 && down == 0) result = "NA";
  else if((up >= 1 && up <= 12) && (down == 0 || down >= 13))
    result = "MMYY";
  else if((down >= 1 && down <= 12) && (up == 0 || up >= 13))
    result = "YYMM";
  else result = "AMBIGOUS";
  cout << result << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: expected ';' before 'result'
   12 |   else(up >= 13 && down >= 13) result = "NA";
      |                               ^~~~~~~
      |                               ;
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else if(up == 0 && down >= 13) result = "NA";
      |   ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int mmyyflag=1,yymmflag=0;
  string s;
  cin>>s;
  if((int)s[0]%48*10+(int)s[1]%48>12 && (int)(s[2]*%48)*10+(int)s[3]%48>12)
  {
    cout<<"NA"<<endl;
    return 0;
  }
  if((int)s[0]%48*10+(int)s[1]%48<=12 || (int)(s[2]*%48)*10+(int)s[3]%48<=12)
  {
    cout<<"AMBIGUOUS"<<endl;
    return 0;
  }
  if((int)s[0]%48*10+(int)s[1]%48<=12 && (int)(s[2]*%48)*10+(int)s[3]%48>12)
  {
    cout<<"MMYY"<<endl;
    return 0;
  }
  cout<<"YYMM"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:52: error: expected primary-expression before '%' token
    9 |   if((int)s[0]%48*10+(int)s[1]%48>12 && (int)(s[2]*%48)*10+(int)s[3]%48>12)
      |                                                    ^
a.cc:14:53: error: expected primary-expression before '%' token
   14 |   if((int)s[0]%48*10+(int)s[1]%48<=12 || (int)(s[2]*%48)*10+(int)s[3]%48<=12)
      |                                                     ^
a.cc:19:53: error: expected primary-expression before '%' token
   19 |   if((int)s[0]%48*10+(int)s[1]%48<=12 && (int)(s[2]*%48)*10+(int)s[3]%48>12)
      |                                                     ^
Language: C++

#include<iostream>
#include <cstdio>
#include<cstring>
#include <cstdlib>  
#include<cmath>   
#include <cctype>
#include<string>
#include<set>
#include <iomanip>
#include <map>
#include<algorithm>
#include <functional>
#include<vector>
#include<climits>
#include<stack>
#include<queue>
#include <deque>
#include <climits>
#include <typeinfo>
#include <utility> 
#define all(x) (x).begin(),(x).end()
#define rep(i,m,n) for(int i = m;i < n;++i)
#define pb push_back
#define fore(i,a) for(auto &i:a)
#define rrep(i,m,n) for(int i = m;i >= n;--i)
#define INF INT_MAX/2
using namespace std;
using ll = long long;
int main()
{
	int S;
	int a, c;
	cin >> S;
	a = S / 100;
	c = S % 100;
	if (a <= 12 && a >= 1 && c <= 12 && c >= 1) { cout << "AMBIGUOUS" << endl; }
	else if (a <= 12 && c > 12a>0&&c>0) { cout << "MMYY" << endl; }
	else if (a > 12 && c <= 12&&a>0&&c>0) { cout << "YYMM" << endl; }
	else { cout << "NA" << endl; }

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:33: error: unable to find numeric literal operator 'operator""a'
   37 |         else if (a <= 12 && c > 12a>0&&c>0) { cout << "MMYY" << endl; }
      |                                 ^~~
Language: C

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


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

import java.util.Scanner;

public class B {

public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();

		int[] b = new int[4];

		b[0] = a/1000;
		b[1] = (a/100)%10;
		b[2] = (a/10)%10;
		b[3] = a%10;

		int TH = b[0]*10 + b[1];
		int TO = b[2]*10 + b[3];

		if(TH > 12) {
			if(TO > 12) System.out.print("NA");
			else if(TO <=12) {
				if(TO==0) {System.out.print("NA");
				System.exit(0);}
				System.out.print("YYMM");}

		}

		else if(TH <=12) {

			if(TH==0) {

			if(TO > 12) System.out.print("NA");
			else if(TO<=12) System.out.print("YYMM");
			}

			else {
				if(TO > 12) System.out.print("MMYY");
				else if(TO<=12) System.out.print("AMBIGUOUS");

			}
		}
	}

}


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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string 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: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>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else if((A>=13 && B>=13) || A==0 || B==0){
      |   ^~~~
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[0] == 1 && S[1] < 3)) {
		if ((S[2] == 0 && S[3] > 0) || (S[2] == 1 && S[3] < 3)) {
			cout << "AMIGUOUS" << endl;
		}
		else {
			cout << "MMYY" << endl;
		}
	}
	else {
		if ((S[2] == 0 && S[3] > 0) || (S[2] == 1 && S[3] < 3)) {
			cout << "YYMM" << endl;
		}
		else {
			cout << "NA" << endl;
		}
	}

	


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

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

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

#include<stdio.h>
#include<string.h>
int main(void){
  char A[6];
  char B[3]={'\0'};
  char C[3]={'\0'};
  char D[]="12";
  char E[]="00";
  scanf("%s",A);
  B[0]=A[0];
  B[1]=A[1];
  C[0]=A[2];
  C[1]=A[3];
  if(strcmp(B,C)>0){
    if(strcmp(B,D)<=0){
      if(strcmp(C,E)!=0){
        printf("ANBIGIOUS\n");
      }else{
        printf("MMYY\n");
      }
    }else{
      if(strcmp(C,E)!=0){
        printf("YYMM\n");
      }else{
        printf("NA\n");
      }
    }
  }else if(srrcmp(B,C)<0){
    if(strcmp(C,D)<=0){
      if(strcmp(B,E)!=0){
        printf("ANBIGIOUS\n");
      }else{
        printf("MMYY\n");
      }
    }else{
      if(strcmp(B,E)!=0){
        printf("YYMM\n");
      }else{
        printf("NA\n");
      }
    }
  }else{
    if(strcmp(B,D)<0 && strcmp(B,E)!=0){
      printf("AMBIGIOUS\n");
    }else{
      printf("NA\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:12: error: implicit declaration of function 'srrcmp'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
   28 |   }else if(srrcmp(B,C)<0){
      |            ^~~~~~
      |            strcmp
Language: C++

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

int main(){
  string S; cin >> S;
  int a,b; 
  if(S.substr(0,2) == "01" || "02" || "03" || "04" ||
    "05" || "06" || "07" || "08" || "09" || "10" ||
    "11" || "12"){a = 1;}
  else {a = 0;}
  if(S.substr(2,2) == "01" || "02" || "03" || "04" ||
    "05" || "06" || "07" || "08" || "09" || "10" ||
    "11" || "12"){b = 1;}
  else {b = 0;}
  if(a = 1 && b = 0){
    cout << "YYMM" << endl;
  }
  if(a = 0 && B = 1){
    cout << "MMYY" << endl;
  }
  if(a = 1 && B = 1){
    cout << "AMBIGUOUS" << endl;
  }
  else{cout << "NA" << endl;}
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: lvalue required as left operand of assignment
   15 |   if(a = 1 && b = 0){
      |          ~~^~~~
a.cc:18:15: error: 'B' was not declared in this scope
   18 |   if(a = 0 && B = 1){
      |               ^
a.cc:21:15: error: 'B' was not declared in this scope
   21 |   if(a = 1 && B = 1){
      |               ^
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)||(a/100==00&&s%100==00)) 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:77: error: 'a' was not declared in this scope
   12 |     if((s/100==00&&s%100>12)||(s/100>12&&s%100==00)||(s/100>12&&s%100>12)||(a/100==00&&s%100==00)) ans="NA";
      |                                                                             ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    int S;cin>>S;
    int a[]={S/100,S%100};
    if(a[0]==0||a[1]==0||){
        cout<<"NA"<<endl;
        return 0;
    }else if(a[0]>12&&a[1]>12){
        cout<<"NA"<<endl;
        return 0;

    }
    if(a[0]<=12&&a[1]<=12){
        cout<<"AMBIGUOUS"<<endl;
    }else if(a[0]>12){
        cout<<"YYMM"<<endl;
    }else{
        cout<<"MMYY"<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before ')' token
    7 |     if(a[0]==0||a[1]==0||){
      |                          ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
	int s;
	cin >> s;
	int s1,s2;
	s1=s/100;
	s2=s-s1*100;
	if(s1>12 && s2!=0 && s2<=12){
		cout << "YYMM";
	}else if(s1!=0 && s1<=12 && s2>12){
		cout << "MMYY";
	}else if(s1<=12 && s2<=12 not (s2==0 && s1==0)){
		cout << "AMBIGUOUS";
	}else{
		cout << "NA";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: expected ')' before 'not' token
   16 |         }else if(s1<=12 && s2<=12 not (s2==0 && s1==0)){
      |                 ~                ^~~~
      |                                  )
Language: C++

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

int main {
  int s, x, y;
  cin >> s;
  x = s / 100;
  y = s % 100;
  if (x < 12 && x != 00) {
    if (y < 12 && y != 00){
      cout << "AMBIGUOUS" <<endl;
    }
    else {
      cout << "MMYY" <<endl;
    }
  }
  else {
    if (y < 12 && y != 00) {
      cout << "YYMM" <<endl;
    }
    else {
      cout << "NA" <<endl;
    }
  }
}
  

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main {
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int s, x, y;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
    4 | int main {
      |          ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> s;
      |   ^~~
a.cc:7:3: error: 'x' does not name a type
    7 |   x = s / 100;
      |   ^
a.cc:8:3: error: 'y' does not name a type
    8 |   y = s % 100;
      |   ^
a.cc:9:3: error: expected unqualified-id before 'if'
    9 |   if (x < 12 && x != 00) {
      |   ^~
a.cc:17:3: error: expected unqualified-id before 'else'
   17 |   else {
      |   ^~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^