problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k ⌀ | fixed_code stringlengths 12 526k ⌀ | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M ⌀ | fixed_submission_id int64 2 1.54M ⌀ | user_id stringlengths 10 10 ⌀ | language stringclasses 9 values |
|---|---|---|---|---|---|---|---|
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S, L, R;
cin >> S;
L = S / 100;
R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (R >= 1 && R <= 12)
cout << "YYMM" << endl;
else
cout << "MA" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int S, L, R;
cin >> S;
L = S / 100;
R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (R >= 1 && R <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 859,275 | 859,276 | u743561048 | cpp |
p03042 | // Author: Rahul Purohit
#include <bits/stdc++.h>
#define vi vector<int>
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define ll long long int
#define pi pair<ll, ll>
#define f first
#define mp make_pair
#define mod 1000000007
#define s second
#define pb push_back
#define mp make_pair
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
else
return (b, a % b);
}
/*ll isp[N]={1};
void sieve(int n)
{
isp[0]=isp[1]=0;
for(int i=2;i<=n;i++)
{
if(isp[i]==1)
{
for(int j=i*i;j<=n;j+=i)
{
isp[j]==0;
}
}
}
}*/
ll pow(int x, int y, int m) {
ll ans = 1;
while (y != 0) {
if (y % 2 == 1) {
ans = (ans * x) % m;
}
x = (x * x) % m;
y /= 2;
}
return ans;
}
template <class x> void swap(x &a, x &b) {
x tp;
tp = a;
a = b;
b = tp;
}
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
ll a = n % 100;
ll b = n / 100;
// cout<<a<<" "<<b<<endl;
if (b >= 12 && b <= 12) {
if (a >= 1 && a <= 12) {
cout << "AMBIGUOUS";
} else {
cout << "MMYY";
}
} else {
if (a >= 1 && a <= 12) {
cout << "YYMM";
} else {
cout << "NA";
}
}
return 0;
}
| // Author: Rahul Purohit
#include <bits/stdc++.h>
#define vi vector<int>
#define rep(i, a, b) for (ll i = a; i < b; ++i)
#define ll long long int
#define pi pair<ll, ll>
#define f first
#define mp make_pair
#define mod 1000000007
#define s second
#define pb push_back
#define mp make_pair
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
else
return (b, a % b);
}
/*ll isp[N]={1};
void sieve(int n)
{
isp[0]=isp[1]=0;
for(int i=2;i<=n;i++)
{
if(isp[i]==1)
{
for(int j=i*i;j<=n;j+=i)
{
isp[j]==0;
}
}
}
}*/
ll pow(int x, int y, int m) {
ll ans = 1;
while (y != 0) {
if (y % 2 == 1) {
ans = (ans * x) % m;
}
x = (x * x) % m;
y /= 2;
}
return ans;
}
template <class x> void swap(x &a, x &b) {
x tp;
tp = a;
a = b;
b = tp;
}
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
ll a = n % 100;
ll b = n / 100;
// cout<<a<<" "<<b<<endl;
if (b >= 1 && b <= 12) {
if (a >= 1 && a <= 12) {
cout << "AMBIGUOUS";
} else {
cout << "MMYY";
}
} else {
if (a >= 1 && a <= 12) {
cout << "YYMM";
} else {
cout << "NA";
}
}
return 0;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,277 | 859,278 | u707655771 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
scanf("%d", &a);
int x = a / 100;
int y = a % 100;
if (x >= 1 && y <= 12) {
if (y >= 1 && y <= 12)
cout << "AMBIGUOUS\n";
else
cout << "MMYY\n";
} else {
if (y >= 1 && y <= 12)
cout << "YYMM\n";
else
cout << "NA\n";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
scanf("%d", &a);
int x = a / 100;
int y = a % 100;
if (x >= 1 && x <= 12) {
if (y >= 1 && y <= 12)
cout << "AMBIGUOUS\n";
else
cout << "MMYY\n";
} else {
if (y >= 1 && y <= 12)
cout << "YYMM\n";
else
cout << "NA\n";
}
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,290 | 859,291 | u936053819 | cpp |
p03042 | #include <algorithm>
#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
int main() {
string s;
int a, b;
bool aa, bb;
cin >> s;
a = atoi(s.substr(0, 2).c_str());
b = atoi(s.substr(2, 2).c_str());
if (1 <= a && a <= 12) {
if (1 <= b && b <= 12) {
cout << "AMBIGOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= b && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | #include <algorithm>
#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
int main() {
string s;
int a, b;
cin >> s;
a = atoi(s.substr(0, 2).c_str());
b = atoi(s.substr(2, 2).c_str());
if (1 <= a && a <= 12) {
if (1 <= b && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= b && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"variable_declaration.remove",
"literal.string.change",
"io.output.change"
] | 859,296 | 859,297 | u133765395 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int sa, sb;
cin >> s;
sa = 10 * (s[0] - '0') + s[1] - '0';
sb = 10 * (s[2] - '0') + s[3] - '0';
if (0 < sa && sa <= 12) {
if (0 < sb && sb <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (0 < sa && sb <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int sa, sb;
cin >> s;
sa = 10 * (s[0] - '0') + s[1] - '0';
sb = 10 * (s[2] - '0') + s[3] - '0';
if (0 < sa && sa <= 12) {
if (0 < sb && sb <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (0 < sb && sb <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,304 | 859,305 | u066372434 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int a, b;
string s;
cin >> s;
a = (s[0] - '0') * 10 + (s[1] - '0');
b = (s[2] - '0') * 10 + (s[3] - '0');
bool f1 = true, f2 = true;
if ((a > 0) && (a < 13))
f2 = true;
else
f2 = false;
if ((b > 0) && (b < 13))
f1 = true;
else
f1 = false;
if (f1 && f2)
cout << "AMBGUOUS" << endl;
else if (f1)
cout << "YYMM" << endl;
else if (f2)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int a, b;
string s;
cin >> s;
a = (s[0] - '0') * 10 + (s[1] - '0');
b = (s[2] - '0') * 10 + (s[3] - '0');
bool f1 = true, f2 = true;
if ((a > 0) && (a < 13))
f2 = true;
else
f2 = false;
if ((b > 0) && (b < 13))
f1 = true;
else
f1 = false;
if (f1 && f2)
cout << "AMBIGUOUS" << endl;
else if (f1)
cout << "YYMM" << endl;
else if (f2)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 859,306 | 859,307 | u172369914 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] - '0' == 0 && s[1] - '0' != 0 ||
s[0] - '0' == 1 && s[1] - '0' <= 2) {
if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "ANBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] - '0' == 0 && s[1] - '0' != 0 ||
s[0] - '0' == 1 && s[1] - '0' <= 2) {
if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"literal.string.change",
"io.output.change"
] | 859,319 | 859,320 | u675125216 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] - '0' == 0 && s[1] - '0' != 0 ||
s[0] - '0' == 1 && s[1] - '0' <= 2) {
if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "ANBIGOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] - '0' == 0 && s[1] - '0' != 0 ||
s[0] - '0' == 1 && s[1] - '0' <= 2) {
if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (s[2] - '0' == 0 && s[3] - '0' != 0 ||
s[2] - '0' == 1 && s[3] - '0' <= 2) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"literal.string.change",
"io.output.change"
] | 859,321 | 859,320 | u675125216 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
bool b1, b2;
b1 = false;
b2 = false;
if ((s[0] == '1' && ((int)s[1] >= 48 && (int)s[1] <= 50)) ||
(s[0] == '0' && (int)s[1] >= 49 && (int)s[1] <= 57)) {
b1 = true;
}
if ((s[2] == '1' && ((int)s[3] >= 48 && (int)s[2] <= 50)) ||
(s[1] == '0' && (int)s[2] >= 49 && (int)s[2] <= 57)) {
b2 = true;
}
if (b1 && b2) {
cout << "AMBIGUOUS" << endl;
return 0;
} else if (b1) {
cout << "MMYY" << endl;
return 0;
} else if (b2) {
cout << "YYMM" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
bool b1, b2;
b1 = false;
b2 = false;
if ((s[0] == '1' && ((int)s[1] >= 48 && (int)s[1] <= 50)) ||
(s[0] == '0' && (int)s[1] >= 49 && (int)s[1] <= 57)) {
b1 = true;
}
if ((s[2] == '1' && ((int)s[3] >= 48 && (int)s[3] <= 50)) ||
(s[2] == '0' && (int)s[3] >= 49 && (int)s[3] <= 57)) {
b2 = true;
}
if (b1 && b2) {
cout << "AMBIGUOUS" << endl;
return 0;
} else if (b1) {
cout << "MMYY" << endl;
return 0;
} else if (b2) {
cout << "YYMM" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
} | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 859,324 | 859,325 | u442039299 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
bool b1, b2;
b1 = false;
b2 = false;
if ((s[0] == '1' && ((int)s[1] >= 48 && (int)s[1] <= 50)) ||
(s[0] == '0' && (int)s[1] >= 49 && (int)s[1] <= 57)) {
b1 = true;
}
if ((s[2] == '1' && ((int)s[3] >= 48 && (int)s[2] <= 50)) ||
(s[1] == '0' && (int)s[2] >= 49 && (int)s[2] <= 57)) {
b2 = true;
}
if (b1 && b2) {
cout << "AMBIGOUS" << endl;
return 0;
} else if (b1) {
cout << "MMYY" << endl;
return 0;
} else if (b2) {
cout << "YYMM" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
bool b1, b2;
b1 = false;
b2 = false;
if ((s[0] == '1' && ((int)s[1] >= 48 && (int)s[1] <= 50)) ||
(s[0] == '0' && (int)s[1] >= 49 && (int)s[1] <= 57)) {
b1 = true;
}
if ((s[2] == '1' && ((int)s[3] >= 48 && (int)s[3] <= 50)) ||
(s[2] == '0' && (int)s[3] >= 49 && (int)s[3] <= 57)) {
b2 = true;
}
if (b1 && b2) {
cout << "AMBIGUOUS" << endl;
return 0;
} else if (b1) {
cout << "MMYY" << endl;
return 0;
} else if (b2) {
cout << "YYMM" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
} | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change"
] | 859,326 | 859,325 | u442039299 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define reep(i, n) for (ll i = n; i > -1; i--)
#define deb(variable) cout << #variable << "=" << variable << endl
#define MMOD(i) ((i % MOD) + MOD) % MOD;
#define vec(i, j) vector<vector<ll>>(i, vector<ll>(j, 0))
const ll INF = 99999999999999999;
const ll MOD = 128;
const ll MAX_N = 500010;
ll a, b, c, d, e, x, y, z, k, m, n, l, q, ans = 0;
vl v(100010, 0), anss(100010, 0);
vp p[100010];
string s;
ll solve(void) {
a = 0;
b = 0;
if (n / 100 < 13 && n / 100 > 0)
a++;
if (n % 100 < 13 && n & 100 > 0)
b++;
if (a == 1 && b == 1) {
cout << "AMBIGUOUS" << endl;
}
if (a == 0 && b == 1) {
cout << "YYMM" << endl;
}
if (a == 1 && b == 0) {
cout << "MMYY" << endl;
}
if (a == 0 && b == 0) {
cout << "NA" << endl;
}
return 0;
}
int main() {
cin >> n;
solve();
} | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define reep(i, n) for (ll i = n; i > -1; i--)
#define deb(variable) cout << #variable << "=" << variable << endl
#define MMOD(i) ((i % MOD) + MOD) % MOD;
#define vec(i, j) vector<vector<ll>>(i, vector<ll>(j, 0))
const ll INF = 99999999999999999;
const ll MOD = 128;
const ll MAX_N = 500010;
ll a, b, c, d, e, x, y, z, k, m, n, l, q, ans = 0;
vl v(100010, 0), anss(100010, 0);
vp p[100010];
string s;
ll solve(void) {
a = 0;
b = 0;
if (n / 100 < 13 && (n / 100 > 0))
a++;
if (n % 100 < 13 && (n % 100 > 0))
b++;
if (a == 1 && b == 1) {
cout << "AMBIGUOUS" << endl;
}
if (a == 0 && b == 1) {
cout << "YYMM" << endl;
}
if (a == 1 && b == 0) {
cout << "MMYY" << endl;
}
if (a == 0 && b == 0) {
cout << "NA" << endl;
}
return 0;
}
int main() {
cin >> n;
solve();
} | [
"control_flow.branch.if.condition.change"
] | 859,327 | 859,328 | u268571052 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll, ll> P;
#define M 1000000007
int main() {
bool a = false, b = false;
string s;
cin >> s;
if (s[0] == '0') {
if (s[1] != '0')
a = true;
} else if (s[0] == '1') {
if (s[1] >= '0' || s[1] <= '2')
a = true;
}
if (s[2] == '0') {
if (s[3] != '0')
b = true;
} else if (s[2] == '1') {
if (s[3] >= '0' || s[3] <= '2')
b = true;
}
if (a && b)
cout << "AMBIGUOUS";
else if (a)
cout << "YYMM";
else if (b)
cout << "MMYY";
else
cout << "NA";
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll, ll> P;
#define M 1000000007
int main() {
bool a = false, b = false;
string s;
cin >> s;
if (s[0] == '0') {
if (s[1] != '0')
a = true;
} else if (s[0] == '1') {
if (s[1] >= '0' && s[1] <= '2')
a = true;
}
if (s[2] == '0') {
if (s[3] != '0')
b = true;
} else if (s[2] == '1') {
if (s[3] >= '0' && s[3] <= '2')
b = true;
}
if (a && b)
cout << "AMBIGUOUS";
else if (a)
cout << "MMYY";
else if (b)
cout << "YYMM";
else
cout << "NA";
}
| [
"misc.opposites",
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change"
] | 859,329 | 859,330 | u987476436 | cpp |
p03042 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
string S;
int first_half;
int second_half;
int main() {
cin >> S;
first_half = (S[0] - '0') * 10 + (S[1] - '0');
second_half = (S[2] - '0') * 10 + (S[3] - '0');
if (((first_half >= 1) & (second_half <= 12)) &
((second_half == 0) or (second_half > 12)))
cout << "MMYY" << endl;
else if (((first_half == 0) or (first_half > 12)) &
((second_half >= 1) & (second_half <= 12)))
cout << "YYMM" << endl;
else if (((first_half >= 1) & (first_half <= 12)) &
((second_half >= 1) & (second_half <= 12)))
cout << "AMBIGUOUS" << endl;
else
cout << "NA" << endl;
} | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
string S;
int first_half;
int second_half;
int main() {
cin >> S;
first_half = (S[0] - '0') * 10 + (S[1] - '0');
second_half = (S[2] - '0') * 10 + (S[3] - '0');
if (((first_half >= 1) & (first_half <= 12)) &
((second_half == 0) or (second_half > 12)))
cout << "MMYY" << endl;
else if (((first_half == 0) or (first_half > 12)) &
((second_half >= 1) & (second_half <= 12)))
cout << "YYMM" << endl;
else if (((first_half >= 1) & (first_half <= 12)) &
((second_half >= 1) & (second_half <= 12)))
cout << "AMBIGUOUS" << endl;
else
cout << "NA" << endl;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,350 | 859,351 | u551247219 | cpp |
p03042 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
if (S == "0000") {
cout << "NA" << endl;
return 0;
}
string t = S.substr(0, 2);
string u = S.substr(2, 2);
if (t == "00") {
if (u > "12") {
cout << "NA" << endl;
return 0;
} else {
cout << "YYMM" << endl;
return 0;
}
}
if (u == "00") {
if (t > "12") {
cout << "NA" << endl;
return 0;
} else {
cout << "MMYY" << endl;
return 0;
}
}
if (t > "12") {
if (u > "12") {
cout << "NA" << endl;
return 0;
} else {
cout << "YYMM" << endl;
return 0;
}
} else {
if (u > "12") {
cout << "YYMM" << endl;
return 0;
} else {
cout << "AMBIGUOUS" << endl;
return 0;
}
}
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = (0); i < (n); i++)
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
if (S == "0000") {
cout << "NA" << endl;
return 0;
}
string t = S.substr(0, 2);
string u = S.substr(2, 2);
if (t == "00") {
if (u > "12") {
cout << "NA" << endl;
return 0;
} else {
cout << "YYMM" << endl;
return 0;
}
}
if (u == "00") {
if (t > "12") {
cout << "NA" << endl;
return 0;
} else {
cout << "MMYY" << endl;
return 0;
}
}
if (t > "12") {
if (u > "12") {
cout << "NA" << endl;
return 0;
} else {
cout << "YYMM" << endl;
return 0;
}
} else {
if (u > "12") {
cout << "MMYY" << endl;
return 0;
} else {
cout << "AMBIGUOUS" << endl;
return 0;
}
}
}
| [
"literal.string.change",
"io.output.change"
] | 859,366 | 859,367 | u755830696 | cpp |
p03042 | #include <iostream>
#include <string>
int main() {
std::string S;
std::cin >> S;
const int a = std::stoi(S.substr(0, 2));
const int b = std::stoi(S.substr(2, 2));
const auto month = [](int n) -> bool { return 1 <= n && n <= 12; };
std::string result;
if (month(a) && month(b)) {
result = "AMIBUGUOUS";
} else if (month(a) && !month(b)) {
result = "MMYY";
} else if (!month(a) && month(b)) {
result = "YYMM";
} else {
result = "NA";
}
std::cout << result << std::endl;
return 0;
}
| #include <iostream>
#include <string>
int main() {
std::string S;
std::cin >> S;
const int a = std::stoi(S.substr(0, 2));
const int b = std::stoi(S.substr(2, 2));
const auto month = [](int n) -> bool { return 1 <= n && n <= 12; };
std::string result;
if (month(a) && month(b)) {
result = "AMBIGUOUS";
} else if (month(a) && !month(b)) {
result = "MMYY";
} else if (!month(a) && month(b)) {
result = "YYMM";
} else {
result = "NA";
}
std::cout << result << std::endl;
return 0;
}
| [
"literal.string.change",
"assignment.value.change"
] | 859,375 | 859,376 | u591440280 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define sz(x) ((int)(x).size())
#define all(x) x.begin(), x.end()
#define dmp(x) cerr << #x << ":" << x << endl
#define FOR(i, a, b) for (int i = (int)a, c = (int)b; i < c; ++i)
#define rep(i, b) FOR(i, 0, b)
#define ROF(i, a, b) for (int i = b - 1, c = (int)a; i >= c; --i)
#define per(i, b) ROF(i, 0, b)
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
signed main() {
string s;
cin >> s;
int a = (s[0] - '0') * 10 + s[1] - '0';
int b = (s[2] - '0') * 10 + s[3] - '0';
if ((a > 12 || a == 0) && (b > 12 || b == 0))
cout << "NA" << endl;
else if ((a <= 12 && 0 < a) && (b <= 12 && 0 < b))
cout << "AMBIGUOUS" << endl;
else if (a <= 12 && a < 0)
cout << "MMYY" << endl;
else
cout << "YYMM" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define pb push_back
#define sz(x) ((int)(x).size())
#define all(x) x.begin(), x.end()
#define dmp(x) cerr << #x << ":" << x << endl
#define FOR(i, a, b) for (int i = (int)a, c = (int)b; i < c; ++i)
#define rep(i, b) FOR(i, 0, b)
#define ROF(i, a, b) for (int i = b - 1, c = (int)a; i >= c; --i)
#define per(i, b) ROF(i, 0, b)
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
signed main() {
string s;
cin >> s;
int a = (s[0] - '0') * 10 + s[1] - '0';
int b = (s[2] - '0') * 10 + s[3] - '0';
if ((a > 12 || a == 0) && (b > 12 || b == 0))
cout << "NA" << endl;
else if ((a <= 12 && 0 < a) && (b <= 12 && 0 < b))
cout << "AMBIGUOUS" << endl;
else if (a <= 12 && 0 < a)
cout << "MMYY" << endl;
else
cout << "YYMM" << endl;
return 0;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 859,382 | 859,383 | u084871864 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int d = x % 10;
x /= 10;
int c = x % 10;
x /= 10;
int b = x % 10;
x /= 10;
int a = x;
// abcd
int l = a * 10 + x;
int r = c * 10 + d;
if (l <= 12 && l > 0 && r <= 12 && r > 0) {
cout << "AMBIGUOUS" << endl;
return 0;
} else if ((l > 12 || l == 0) && (r <= 12 && r > 0))
cout << "YYMM" << endl;
else if ((l <= 12 && l > 0) && (r > 12 || r == 0))
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int d = x % 10;
x /= 10;
int c = x % 10;
x /= 10;
int b = x % 10;
x /= 10;
int a = x;
// abcd
int l = a * 10 + b;
int r = c * 10 + d;
if (l <= 12 && l > 0 && r <= 12 && r > 0) {
cout << "AMBIGUOUS" << endl;
return 0;
} else if ((l > 12 || l == 0) && (r <= 12 && r > 0))
cout << "YYMM" << endl;
else if ((l <= 12 && l > 0) && (r > 12 || r == 0))
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| [
"identifier.change",
"expression.operation.binary.change"
] | 859,394 | 859,395 | u504403442 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 2e9;
int main() {
int mae, usiro;
string s, ans;
cin >> s;
mae = (s[0] - '0') * 10 + (s[1] - '0');
usiro = (s[2] - '0') * 10 + (s[3] - '0');
if (mae == 0 || mae > 12) {
if (usiro == 0 || usiro > 12) {
ans = "NA";
} else {
ans = "YYMM";
}
} else {
if (usiro == 0 || usiro > 12) {
ans = "MMYY";
} else {
ans = "ANBIGUOUS";
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 2e9;
int main() {
int mae, usiro;
string s, ans;
cin >> s;
mae = (s[0] - '0') * 10 + (s[1] - '0');
usiro = (s[2] - '0') * 10 + (s[3] - '0');
if (mae == 0 || mae > 12) {
if (usiro == 0 || usiro > 12) {
ans = "NA";
} else {
ans = "YYMM";
}
} else {
if (usiro == 0 || usiro > 12) {
ans = "MMYY";
} else {
ans = "AMBIGUOUS";
}
}
cout << ans << endl;
} | [
"literal.string.change",
"assignment.value.change"
] | 859,418 | 859,419 | u193591892 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
int num;
int a, b;
cin >> num;
a = 0;
b = 0;
while (num > 99) {
num -= 100;
a++;
}
while (num > 0) {
num -= 1;
b++;
}
if (a < 13 && a > 0 && b < 13 && b > 0) {
cout << "AMBIGUOUS";
} else if (a < 13 && a > 0) {
cout << "YYMM";
} else if (b < 13 && b > 0) {
cout << "MMYY";
} else {
cout << "NA";
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int num;
int a, b;
cin >> num;
a = 0;
b = 0;
while (num > 99) {
num -= 100;
a++;
}
while (num > 0) {
num -= 1;
b++;
}
if (a < 13 && a > 0 && b < 13 && b > 0) {
cout << "AMBIGUOUS";
} else if (a < 13 && a > 0) {
cout << "MMYY";
} else if (b < 13 && b > 0) {
cout << "YYMM";
} else {
cout << "NA";
}
} | [
"literal.string.change",
"io.output.change"
] | 859,447 | 859,448 | u872794515 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5, MOD = 1e9 + 7;
typedef long long ll;
int n, c, u, v, k, tc, ans;
char s[N];
int main() {
bool YYMM = false, MMYY = false;
scanf("%s", s);
int m = (s[0] - '0') * 10 + s[1] - '0', y = (s[2] - '0') * 10 + s[3] - '0';
if (m > 0 && m <= 12)
MMYY = true;
if (y > 0 && y <= 12)
YYMM = true;
if (YYMM && MMYY)
printf("AMBIGIOUS");
else if (YYMM)
printf("YYMM");
else if (MMYY)
printf("MMYY");
else
printf("NA");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5, MOD = 1e9 + 7;
typedef long long ll;
int n, c, u, v, k, tc, ans;
char s[N];
int main() {
bool YYMM = false, MMYY = false;
scanf("%s", s);
int m = (s[0] - '0') * 10 + s[1] - '0', y = (s[2] - '0') * 10 + s[3] - '0';
if (m > 0 && m <= 12)
MMYY = true;
if (y > 0 && y <= 12)
YYMM = true;
if (YYMM && MMYY)
printf("AMBIGUOUS");
else if (YYMM)
printf("YYMM");
else if (MMYY)
printf("MMYY");
else
printf("NA");
return 0;
}
| [
"misc.typo",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 859,455 | 859,456 | u318875010 | cpp |
p03042 | /**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*
* AND WATCH OUT FOR OFF BY ONE!!!
*/
#include <bits/stdc++.h>
const bool unsyncedio = std::ios::sync_with_stdio(false);
using namespace std;
typedef unsigned int uint;
typedef long long ll;
#define fori(n) for (ll i = 0; i < (n); i++)
#define forn(i, n) for (ll(i) = 0; (i) < (n); (i)++)
bool isMonth(char c1, char c2) {
int i1 = c1 - '0';
int i2 = c2 - '0';
int m = i1 * 10 + i2;
return m >= 1 && m <= 12;
}
int main() {
string s;
cin >> s;
// "YYMM" vs "MMYY"
// year numbers can be any numbers, but months are limited to 01 - 12
bool yymm = isMonth(s[2], s[3]);
bool mmyy = isMonth(s[0], s[1]);
if (!yymm && !mmyy)
cout << "NA";
else if (yymm && !mmyy)
cout << "YYMM";
else if (!yymm && mmyy)
cout << "MMYY";
else
cout << "AMBIGOUS";
cout << endl;
}
| /**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*
* AND WATCH OUT FOR OFF BY ONE!!!
*/
#include <bits/stdc++.h>
const bool unsyncedio = std::ios::sync_with_stdio(false);
using namespace std;
typedef unsigned int uint;
typedef long long ll;
#define fori(n) for (ll i = 0; i < (n); i++)
#define forn(i, n) for (ll(i) = 0; (i) < (n); (i)++)
bool isMonth(char c1, char c2) {
int i1 = c1 - '0';
int i2 = c2 - '0';
int m = i1 * 10 + i2;
return m >= 1 && m <= 12;
}
int main() {
string s;
cin >> s;
// "YYMM" vs "MMYY"
// year numbers can be any numbers, but months are limited to 01 - 12
bool yymm = isMonth(s[2], s[3]);
bool mmyy = isMonth(s[0], s[1]);
if (!yymm && !mmyy)
cout << "NA";
else if (yymm && !mmyy)
cout << "YYMM";
else if (!yymm && mmyy)
cout << "MMYY";
else
cout << "AMBIGUOUS";
cout << endl;
}
| [
"literal.string.change",
"io.output.change"
] | 859,481 | 859,482 | u014617387 | cpp |
p03042 | // include
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
// namespace
using namespace std;
// for
#define REP(i, m, n) for (int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)
// range
#define all_range(C) begin(C), end(C)
// STL
typedef long long ll;
typedef pair<int, int> pint;
typedef pair<ll, int> pli;
typedef pair<string, int> pst;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;
// chmin&chmax
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
// GCD
ll my_gcd(ll x, ll y) {
ll r;
while (y != 0) {
r = x % y;
x = y;
y = r;
}
return x;
}
// LCM
ll my_lcm(ll x, ll y) { return (x * y) / my_gcd(x, y); }
// POW
ll my_pow(ll x, ll y) {
ll sum = 1;
while (y > 0) {
sum *= x;
--y;
}
return sum;
}
// main.cpp----------------------------
int main() {
string s;
cin >> s;
int R = (s[0] - '0') * 10 + (s[1] - '0');
int L = (s[2] - '0') * 10 + (s[3] - '0');
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= R && R <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
}
| // include
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
// namespace
using namespace std;
// for
#define REP(i, m, n) for (int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)
// range
#define all_range(C) begin(C), end(C)
// STL
typedef long long ll;
typedef pair<int, int> pint;
typedef pair<ll, int> pli;
typedef pair<string, int> pst;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;
// chmin&chmax
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
// GCD
ll my_gcd(ll x, ll y) {
ll r;
while (y != 0) {
r = x % y;
x = y;
y = r;
}
return x;
}
// LCM
ll my_lcm(ll x, ll y) { return (x * y) / my_gcd(x, y); }
// POW
ll my_pow(ll x, ll y) {
ll sum = 1;
while (y > 0) {
sum *= x;
--y;
}
return sum;
}
// main.cpp----------------------------
int main() {
string s;
cin >> s;
int L = (s[0] - '0') * 10 + (s[1] - '0');
int R = (s[2] - '0') * 10 + (s[3] - '0');
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= R && R <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
}
| [
"variable_declaration.name.change",
"identifier.change"
] | 859,483 | 859,484 | u541830414 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int A = S / 100;
int B = S - S / 100 * 100;
bool Abool = false;
bool Bbool = false;
if (A > 1 && A < 13)
Abool = true;
if (B > 1 && B < 13)
Bbool = true;
if (Abool && Bbool)
cout << "AMBIGUOUS" << endl;
if (Abool && !Bbool)
cout << "MMYY" << endl;
if (!Abool && Bbool)
cout << "YYMM" << endl;
if (!Abool && !Bbool)
cout << "NA" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int A = S / 100;
int B = S - S / 100 * 100;
bool Abool = false;
bool Bbool = false;
if (A > 0 && A < 13)
Abool = true;
if (B > 0 && B < 13)
Bbool = true;
if (Abool && Bbool)
cout << "AMBIGUOUS" << endl;
if (Abool && !Bbool)
cout << "MMYY" << endl;
if (!Abool && Bbool)
cout << "YYMM" << endl;
if (!Abool && !Bbool)
cout << "NA" << endl;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,491 | 859,492 | u689245321 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, tmp, res;
cin >> s;
tmp = s.substr(0, 2);
res = s.substr(2, 2);
if ("00" < tmp && tmp <= "12") {
if ("00" < res && res <= "12") {
cout << "AMBIGUOS";
} else
cout << "MMYY";
} else {
if ("00" < res && res <= "12")
cout << "YYMM";
else
cout << "NA";
};
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string s, tmp, res;
cin >> s;
tmp = s.substr(0, 2);
res = s.substr(2, 2);
if ("00" < tmp && tmp <= "12") {
if ("00" < res && res <= "12") {
cout << "AMBIGUOUS";
} else
cout << "MMYY";
} else {
if ("00" < res && res <= "12")
cout << "YYMM";
else
cout << "NA";
};
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 859,493 | 859,494 | u661081791 | cpp |
p03042 | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
int a = (s[0] - 48) * 10 + s[1] - 48;
int b = (s[2] - 48) * 10 + s[3] - 48;
if (a > 0 && a <= 12) {
if (b > 0 && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (b > 0 && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
}
| #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
int a = (s[0] - 48) * 10 + s[1] - 48;
int b = (s[2] - 48) * 10 + s[3] - 48;
if (a > 0 && a <= 12) {
if (b > 0 && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (b > 0 && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
}
| [
"literal.string.change",
"io.output.change"
] | 859,496 | 859,497 | u942393279 | cpp |
p03042 | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
int a = (s[0] - 48) * 10 + s[1] - 48;
int b = (s[2] - 48) * 10 + s[3] - 48;
if (a >= 0 && a <= 12) {
if (b >= 0 && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (b >= 0 && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
}
| #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
int a = (s[0] - 48) * 10 + s[1] - 48;
int b = (s[2] - 48) * 10 + s[3] - 48;
if (a > 0 && a <= 12) {
if (b > 0 && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (b > 0 && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change"
] | 859,498 | 859,497 | u942393279 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int M = S % 100;
if (L >= 1 && L <= 12) {
if (M >= 12 && M <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (M >= 1 && M <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
}
| #include <iostream>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int M = S % 100;
if (L >= 1 && L <= 12) {
if (M >= 1 && M <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (M >= 1 && M <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,500 | 859,501 | u272169387 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
bool YYMM = false, MMYY = false;
if (N <= 1299 && N >= 100)
MMYY = true;
if (N & 100 <= 12 && N % 100 >= 1)
YYMM = true;
if (YYMM && MMYY)
cout << "AMBIGUOUS" << endl;
else if (YYMM)
cout << "YYMM" << endl;
else if (MMYY)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
bool YYMM = false, MMYY = false;
if (N <= 1299 && N >= 100)
MMYY = true;
if (N % 100 <= 12 && N % 100 >= 1)
YYMM = true;
if (YYMM && MMYY)
cout << "AMBIGUOUS" << endl;
else if (YYMM)
cout << "YYMM" << endl;
else if (MMYY)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | [
"control_flow.branch.if.condition.change"
] | 859,502 | 859,503 | u507188501 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
bool YYMM = false, MMYY = false;
if (N <= 1200 && N >= 100)
MMYY = true;
if (N & 100 <= 12 && N % 100 >= 1)
YYMM = true;
if (YYMM && MMYY)
cout << "AMBIGUOUS" << endl;
else if (YYMM)
cout << "YYMM" << endl;
else if (MMYY)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
bool YYMM = false, MMYY = false;
if (N <= 1299 && N >= 100)
MMYY = true;
if (N % 100 <= 12 && N % 100 >= 1)
YYMM = true;
if (YYMM && MMYY)
cout << "AMBIGUOUS" << endl;
else if (YYMM)
cout << "YYMM" << endl;
else if (MMYY)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,504 | 859,503 | u507188501 | cpp |
p03042 | #include <iostream>
using namespace std;
int main(void) {
int num[2] = {0, 0};
string mes[4] = {"NA", "MMYY", "YYMM", "AMBIGUOUS"};
for (int i = 0; i < 3; i++) {
char c;
cin >> c;
num[i / 2] = num[i / 2] * 10 + (c - '0');
if (i % 2) {
num[i / 2] = (num[i / 2] > 0 && num[i / 2] <= 12) ? 1 : 0;
}
}
cout << mes[num[0] + num[1] * 2] << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main(void) {
int num[2] = {0, 0};
string mes[4] = {"NA", "MMYY", "YYMM", "AMBIGUOUS"};
for (int i = 0; i < 4; i++) {
char c;
cin >> c;
num[i / 2] = num[i / 2] * 10 + (c - '0');
if (i % 2) {
num[i / 2] = (num[i / 2] > 0 && num[i / 2] <= 12) ? 1 : 0;
}
}
cout << mes[num[0] + num[1] * 2] << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 859,505 | 859,506 | u023463844 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
using itn = int;
using namespace std;
int main() {
int s;
cin >> s;
int p = s / 100;
int q = s % 100;
if (p <= 12 && p > 0) {
if (q <= 12 && q > 0) {
cout << "AMBITIOUS" << endl;
} else {
cout << "MMYY" << endl;
}
}
if (p > 12 || p == 0) {
if (q <= 12 && q > 0) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
using itn = int;
using namespace std;
int main() {
int s;
cin >> s;
int p = s / 100;
int q = s % 100;
if (p <= 12 && p > 0) {
if (q <= 12 && q > 0) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
}
if (p > 12 || p == 0) {
if (q <= 12 && q > 0) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 859,507 | 859,508 | u499009346 | cpp |
p03042 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS";
} else
cout << "MMYY";
}
if (1 <= R && R <= 12) {
cout << "YYMM";
} else
cout << "NA";
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS";
} else
cout << "MMYY";
} else if (1 <= R && R <= 12) {
cout << "YYMM";
} else
cout << "NA";
}
| [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 859,513 | 859,514 | u116136539 | cpp |
p03042 | #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, 1, 0, -1};
const int INF = 100000000;
const long long LINF = 1LL << 60;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using pLL = std::pair<long long, long long>;
using ll = long long;
#define SORT(v) std::sort(v.begin(), v.end())
#define rSORT(v) std::sort(v.begin(), v.end(), std::greater<int>())
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int s;
cin >> s;
int a = s / 100;
int b = s % 100;
if (1 <= a && a <= 12) {
if (1 <= b && b <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= a && a <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
}
| #include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, 1, 0, -1};
const int INF = 100000000;
const long long LINF = 1LL << 60;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using pLL = std::pair<long long, long long>;
using ll = long long;
#define SORT(v) std::sort(v.begin(), v.end())
#define rSORT(v) std::sort(v.begin(), v.end(), std::greater<int>())
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int s;
cin >> s;
int a = s / 100;
int b = s % 100;
if (1 <= a && a <= 12) {
if (1 <= b && b <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= b && b <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,518 | 859,519 | u199371251 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
int s;
cin >> s;
int a, b;
a = s / 100;
b = s % 100;
if (a == 0 || a > 12) {
if (b == 0 || b > 12) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (b == 0 || b > 12) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGOUS" << endl;
}
}
} | #include <iostream>
using namespace std;
int main() {
int s;
cin >> s;
int a, b;
a = s / 100;
b = s % 100;
if (a == 0 || a > 12) {
if (b == 0 || b > 12) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (b == 0 || b > 12) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
}
return 0;
}
| [
"literal.string.change",
"io.output.change",
"control_flow.return.add",
"control_flow.return.0.add"
] | 859,523 | 859,524 | u625026729 | cpp |
p03042 | #include "string.h"
#include <iostream>
#include <sstream>
using namespace std;
int main() {
float s;
cin >> s;
int f2 = s / 100.0;
int l2 = (int)s % 100;
int count_yy_mm = 0;
int count_mm_yy = 0;
if (f2 >= 1 && f2 <= 99)
count_yy_mm++;
if (f2 >= 1 && f2 <= 12)
count_mm_yy++;
if (l2 >= 1 && l2 <= 99)
count_yy_mm++;
if (l2 >= 1 && l2 <= 12)
count_mm_yy++;
if ((count_yy_mm == 2) && (count_mm_yy == 2))
cout << "AMBIGUOUS" << endl;
else if (count_yy_mm == 2)
cout << "YYMM" << endl;
else if (count_mm_yy == 2)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
} | #include "string.h"
#include <iostream>
#include <sstream>
using namespace std;
int main() {
float s;
cin >> s;
int f2 = s / 100.0;
int l2 = (int)s % 100;
int count_yy_mm = 0;
int count_mm_yy = 0;
if (f2 >= 0 && f2 <= 99)
count_yy_mm++;
if (f2 >= 1 && f2 <= 12)
count_mm_yy++;
if (l2 >= 1 && l2 <= 12)
count_yy_mm++;
if (l2 >= 0 && l2 <= 99)
count_mm_yy++;
if ((count_yy_mm == 2) && (count_mm_yy == 2))
cout << "AMBIGUOUS" << endl;
else if (count_yy_mm == 2)
cout << "YYMM" << endl;
else if (count_mm_yy == 2)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,525 | 859,526 | u008729541 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a), i##formax = (b); i < i##formax; i++)
#define FORR(i, a, b) for (int i = (a), i##formax = (b); i >= i##formax; i--)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define pcnt __builtin_popcount
#define sz(x) (int)(x).size()
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define show(x) cout << #x << " = " << x << endl;
#define all(a) (a.begin()), (a.end())
#define each(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define perm(c) \
sort(all(c)); \
for (bool c##p = 1; c##p; c##p = next_permutation(all(c)))
#define bitComb(a, n, k) \
for (int a##x, a##y, a = (1 << k) - 1; a < (1 << n); \
a##x = a & -a, a##y = a + a##x, a = (((a & ~a##y) / a##x) >> 1) | a##y)
#define uniq(v) \
sort(all(v)); \
v.erase(unique(all(v)), v.end())
#define bit(n) (1LL << (n))
#define randInt(l, r) (uniform_int_distribution<ll>(l, r)(rnd))
#define randDouble(l, r) (uniform_real_distribution<double>(l, r)(rnd))
#define dout(d) printf("%.12f\n", d)
typedef long long ll;
typedef __int128_t lll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T, class Y>
ostream &operator<<(ostream &o, const pair<T, Y> &p) {
return o << "(" << p.fi << ", " << p.se << ")";
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &v) {
fill((T *)array, (T *)(array + N), v);
}
lll gcd(lll a, lll b, lll &x, lll &y) {
if (!b) {
x = 1;
y = 0;
return a;
}
lll d = gcd(b, a % b, y, x);
y -= a / b * x;
return d;
}
ll gcd(ll a, ll b) {
lll x = 0, y = 0;
return gcd(a, b, x, y);
}
ll modInv(ll a, ll m) {
lll x, y;
gcd(a, m, x, y);
return (x % m + m) % m;
}
ll modPow(lll a, lll n, ll m) {
if (!a)
return a;
lll p = 1;
for (; n > 0; n >>= 1, a = a * a % m)
if (n & 1)
p = p * a % m;
return (ll)p;
}
bool isPrime(ll n) {
if (n < 2 || n % 2 == 0)
return n == 2;
lll t = n - 1, d = t / (t & -t);
for (lll a : {2, 325, 9375, 28178, 450775, 9780504, 1795265022})
if (a % n) {
for (t = d, a = modPow(a, t, n); t != n - 1 && a != 1 && a != n - 1;
a = a * a % n, t = t * 2 % n)
;
if (a != n - 1 && t % 2 == 0)
return 0;
}
return 1;
}
const int IINF = 1e9 + 6;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
const double PI = acos(-1);
const double EPS = 1e-10;
static random_device rd;
static mt19937 rnd(rd());
const int N = 1e5;
int n, x;
string s[4] = {"AMBIGUOUS", "MMYY", "YYMM", "NA"};
main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
if (n / 100 > 13 || n / 100 == 0)
x += 2;
if (n % 100 > 13 || n % 100 == 0)
x += 1;
cout << s[x] << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a), i##formax = (b); i < i##formax; i++)
#define FORR(i, a, b) for (int i = (a), i##formax = (b); i >= i##formax; i--)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define pcnt __builtin_popcount
#define sz(x) (int)(x).size()
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define show(x) cout << #x << " = " << x << endl;
#define all(a) (a.begin()), (a.end())
#define each(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define perm(c) \
sort(all(c)); \
for (bool c##p = 1; c##p; c##p = next_permutation(all(c)))
#define bitComb(a, n, k) \
for (int a##x, a##y, a = (1 << k) - 1; a < (1 << n); \
a##x = a & -a, a##y = a + a##x, a = (((a & ~a##y) / a##x) >> 1) | a##y)
#define uniq(v) \
sort(all(v)); \
v.erase(unique(all(v)), v.end())
#define bit(n) (1LL << (n))
#define randInt(l, r) (uniform_int_distribution<ll>(l, r)(rnd))
#define randDouble(l, r) (uniform_real_distribution<double>(l, r)(rnd))
#define dout(d) printf("%.12f\n", d)
typedef long long ll;
typedef __int128_t lll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T, class Y>
ostream &operator<<(ostream &o, const pair<T, Y> &p) {
return o << "(" << p.fi << ", " << p.se << ")";
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &v) {
fill((T *)array, (T *)(array + N), v);
}
lll gcd(lll a, lll b, lll &x, lll &y) {
if (!b) {
x = 1;
y = 0;
return a;
}
lll d = gcd(b, a % b, y, x);
y -= a / b * x;
return d;
}
ll gcd(ll a, ll b) {
lll x = 0, y = 0;
return gcd(a, b, x, y);
}
ll modInv(ll a, ll m) {
lll x, y;
gcd(a, m, x, y);
return (x % m + m) % m;
}
ll modPow(lll a, lll n, ll m) {
if (!a)
return a;
lll p = 1;
for (; n > 0; n >>= 1, a = a * a % m)
if (n & 1)
p = p * a % m;
return (ll)p;
}
bool isPrime(ll n) {
if (n < 2 || n % 2 == 0)
return n == 2;
lll t = n - 1, d = t / (t & -t);
for (lll a : {2, 325, 9375, 28178, 450775, 9780504, 1795265022})
if (a % n) {
for (t = d, a = modPow(a, t, n); t != n - 1 && a != 1 && a != n - 1;
a = a * a % n, t = t * 2 % n)
;
if (a != n - 1 && t % 2 == 0)
return 0;
}
return 1;
}
const int IINF = 1e9 + 6;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
const double PI = acos(-1);
const double EPS = 1e-10;
static random_device rd;
static mt19937 rnd(rd());
const int N = 1e5;
int n, x;
string s[4] = {"AMBIGUOUS", "MMYY", "YYMM", "NA"};
main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
if (n / 100 > 12 || n / 100 == 0)
x += 2;
if (n % 100 > 12 || n % 100 == 0)
x += 1;
cout << s[x] << endl;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,530 | 859,531 | u976045235 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a = n / 100, b = n % 100, c = 0, d = 0;
if (a != 0 && a < 13)
c++;
if (b != 0 && b < 13)
d++;
if (c + d == 2)
cout << "NA" << endl;
else if (c + d == 1) {
if (c == 1)
cout << "MMYY" << endl;
else
cout << "YYMM" << endl;
} else
cout << "AMBIGUOUS" << endl;
} | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a = n / 100, b = n % 100, c = 0, d = 0;
if (a != 0 && a < 13)
c++;
if (b != 0 && b < 13)
d++;
if (c + d == 2)
cout << "AMBIGUOUS" << endl;
else if (c + d == 1) {
if (c == 1)
cout << "MMYY" << endl;
else
cout << "YYMM" << endl;
} else
cout << "NA" << endl;
}
| [
"literal.string.change",
"io.output.change"
] | 859,534 | 859,535 | u921168761 | cpp |
p03042 | /*
author said_v15
*
created with web_programmer
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string stri;
#define forn for (i = 0; i < n; i++)
#define car cin >> arr[i]
#define fl int flag = 0;
#define forn2 for (i = 0; i < 2 * n; i++)
#define pb push_back
#define pob pop_back
#define sn "\n"
#define vi vector<int>
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a;
int cel = a / 100;
int drob = a % 100;
if (1 <= cel && cel <= 12) {
if (1 <= drob && drob <= 12)
cout << "AMBIGUOUS";
else
cout << "MMYY";
} else {
if (drob >= 1 && drob <= 12)
cout << "YYMM";
else
cout << "NA";
}
return 0;
} | /*
author said_v15
*
created with web_programmer
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string stri;
#define forn for (i = 0; i < n; i++)
#define car cin >> arr[i]
#define fl int flag = 0;
#define forn2 for (i = 0; i < 2 * n; i++)
#define pb push_back
#define pob pop_back
#define sn "\n"
#define vi vector<int>
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a;
cin >> a;
int cel = a / 100;
int drob = a % 100;
if (1 <= cel && cel <= 12) {
if (1 <= drob && drob <= 12)
cout << "AMBIGUOUS";
else
cout << "MMYY";
} else {
if (drob >= 1 && drob <= 12)
cout << "YYMM";
else
cout << "NA";
}
return 0;
} | [] | 859,546 | 859,547 | u972416449 | cpp |
p03042 | #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll = V<pair<ll, ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
#define FOR(i, a, b) for (ll i = (a); i < (ll)(b); i++)
#define rFOR(i, a, b) for (ll i = (b); i > (ll)(a); i--)
#define oFOR(i, a, b) for (ll i = (a); i < (ll)(b); i += 2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn, (a).en)
#define REV(a) reverse((a).bgn, (a).en)
#define M(a, b) max(a, b)
#define rM(a, b) min(a, b)
#define fi first
#define se second
#define sz size()
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) __lcm(a, b)
#define co(a) cout << a << endl;
#define ci(a) cin >> a;
int main() {
ll n;
ci(n);
vll S(4);
FOR(i, 0, 4) {
ll a = n % 10;
S[i] = a;
n /= 10;
}
ll A = (10 * S[3] + S[2]);
ll B = (10 * S[1] + S[0]);
if ((0 < A && A <= 12) && (0 < B && B <= 12)) {
co("AMBIGUPUS")
}
else if ((0 == A || 12 < A) && (0 < B && B <= 12)) {
co("YYMM")
}
else if ((0 < A && A <= 12) && (12 < B || B == 0)) {
co("MMYY")
} else {
co("NA")
}
}
| #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
template <class T> using V = vector<T>;
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll = V<pair<ll, ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
#define FOR(i, a, b) for (ll i = (a); i < (ll)(b); i++)
#define rFOR(i, a, b) for (ll i = (b); i > (ll)(a); i--)
#define oFOR(i, a, b) for (ll i = (a); i < (ll)(b); i += 2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn, (a).en)
#define REV(a) reverse((a).bgn, (a).en)
#define M(a, b) max(a, b)
#define rM(a, b) min(a, b)
#define fi first
#define se second
#define sz size()
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) __lcm(a, b)
#define co(a) cout << a << endl;
#define ci(a) cin >> a;
int main() {
ll n;
ci(n);
vll S(4);
FOR(i, 0, 4) {
ll a = n % 10;
S[i] = a;
n /= 10;
}
ll A = (10 * S[3] + S[2]);
ll B = (10 * S[1] + S[0]);
if ((0 < A && A <= 12) && (0 < B && B <= 12)) {
co("AMBIGUOUS")
}
else if ((0 == A || 12 < A) && (0 < B && B <= 12)) {
co("YYMM")
}
else if ((0 < A && A <= 12) && (12 < B || B == 0)) {
co("MMYY")
} else {
co("NA")
}
}
| [
"literal.string.change",
"call.arguments.change"
] | 859,551 | 859,552 | u835924161 | cpp |
p03042 | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "unordered_map"
#include "unordered_set"
using namespace std;
const long long int MOD = 1000000007;
// const int MOD = 1000000007;
// const int MOD = 998244353;
// const long long int MOD = 998244353;
long long int N, M, K, H, W, L, R;
// int N, M, K, H, W, L, R;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
int a = (s[0] - '0') * 10 + (s[1] - '0');
int b = (s[2] - '0') * 10 + (s[3] - '0');
if (a <= 12 && a >= 1 && b <= 12 && b >= 1)
cout << "AMBIGUOUS\n";
else if (a <= 12 && a >= 1)
cout << "MMYY\n";
else if (b <= 12 && b >= 1)
cout << "YYMM\n";
else
cout << "NA\n";
return 0;
} | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "unordered_map"
#include "unordered_set"
using namespace std;
const long long int MOD = 1000000007;
// const int MOD = 1000000007;
// const int MOD = 998244353;
// const long long int MOD = 998244353;
long long int N, M, K, H, W, L, R;
// int N, M, K, H, W, L, R;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int a = (s[0] - '0') * 10 + (s[1] - '0');
int b = (s[2] - '0') * 10 + (s[3] - '0');
if (a <= 12 && a >= 1 && b <= 12 && b >= 1)
cout << "AMBIGUOUS\n";
else if (a <= 12 && a >= 1)
cout << "MMYY\n";
else if (b <= 12 && b >= 1)
cout << "YYMM\n";
else
cout << "NA\n";
return 0;
}
| [] | 859,553 | 859,554 | u468700753 | cpp |
p03042 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define ll long long
#define vl vector<ll>
#define vvl vector<vector<ll>>
using namespace std;
int main() {
string s;
cin >> s;
vl a(4);
for (int i = 0; i < 4; ++i)
a[i] = s[i] - '0';
if (1 <= a[0] * 10 + a[1] && a[0] * 10 + a[1] <= 12) {
if (1 <= a[2] * 10 + a[3] && a[2] * 10 + a[3] <= 12)
cout << "AMBIGOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= a[2] * 10 + a[3] && a[2] * 10 + a[3] <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define ll long long
#define vl vector<ll>
#define vvl vector<vector<ll>>
using namespace std;
int main() {
string s;
cin >> s;
vl a(4);
for (int i = 0; i < 4; ++i)
a[i] = s[i] - '0';
if (1 <= a[0] * 10 + a[1] && a[0] * 10 + a[1] <= 12) {
if (1 <= a[2] * 10 + a[3] && a[2] * 10 + a[3] <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= a[2] * 10 + a[3] && a[2] * 10 + a[3] <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 859,563 | 859,564 | u386131832 | cpp |
p03042 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define ll long long
#define vl vector<ll>
#define vvl vector<vector<ll>>
using namespace std;
int main() {
string s;
cin >> s;
vl a(4);
for (int i = 0; i < 4; ++i)
a[i] = s[i] - '0';
if (1 <= a[0] * 10 + a[1] && a[0] * 10 + a[1] <= 12) {
if (1 <= a[2] * 10 + a[3] && a[0] * 10 + a[1] <= 12)
cout << "AMBIGOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= a[2] * 10 + a[3] && a[0] * 10 + a[1] <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define ll long long
#define vl vector<ll>
#define vvl vector<vector<ll>>
using namespace std;
int main() {
string s;
cin >> s;
vl a(4);
for (int i = 0; i < 4; ++i)
a[i] = s[i] - '0';
if (1 <= a[0] * 10 + a[1] && a[0] * 10 + a[1] <= 12) {
if (1 <= a[2] * 10 + a[3] && a[2] * 10 + a[3] <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= a[2] * 10 + a[3] && a[2] * 10 + a[3] <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
} | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change"
] | 859,565 | 859,564 | u386131832 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
#define REP(i, n) for (int i = 0; (i) < (n); ++(i))
#define FOR(i, n) for (int i = 1; (i) <= (n); ++(i))
#define dump(x) cout << #x << " = " << (x) << endl;
#define pb push_back
#define int long long
//#define lint long long
const int INF = 1e9;
const int MOD = 1e9 + 7;
// const lint LINF = 1e18;
const double eps = 0.000000001; //もとの値の10^(-16)まで
using namespace std;
string a;
string b, c;
int f1, f2; // yymm,mmyy
string ans;
signed main() {
cin >> a;
b = a.substr(0, 2);
c = a.substr(2, 2);
if (b == "00")
f2 = 1;
if (stoi(b) > 13)
f2 = 1;
if (c == "00")
f1 = 1;
if (stoi(c) > 13)
f1 = 1;
if (f1 == 1 && f2 == 1)
ans = "NA";
if (f1 == 1 && f2 == 0)
ans = "MMYY";
if (f1 == 0 && f2 == 1)
ans = "YYMM";
if (f1 == 0 && f2 == 0)
ans = "AMBIGUOUS";
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <vector>
#define REP(i, n) for (int i = 0; (i) < (n); ++(i))
#define FOR(i, n) for (int i = 1; (i) <= (n); ++(i))
#define dump(x) cout << #x << " = " << (x) << endl;
#define pb push_back
#define int long long
//#define lint long long
const int INF = 1e9;
const int MOD = 1e9 + 7;
// const lint LINF = 1e18;
const double eps = 0.000000001; //もとの値の10^(-16)まで
using namespace std;
string a;
string b, c;
int f1, f2; // yymm,mmyy
string ans;
signed main() {
cin >> a;
b = a.substr(0, 2);
c = a.substr(2, 2);
if (b == "00")
f2 = 1;
if (stoi(b) > 12)
f2 = 1;
if (c == "00")
f1 = 1;
if (stoi(c) > 12)
f1 = 1;
if (f1 == 1 && f2 == 1)
ans = "NA";
if (f1 == 1 && f2 == 0)
ans = "MMYY";
if (f1 == 0 && f2 == 1)
ans = "YYMM";
if (f1 == 0 && f2 == 0)
ans = "AMBIGUOUS";
cout << ans << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,579 | 859,580 | u697232864 | cpp |
p03042 | #include <iostream>
using namespace std;
bool isMM(string s) {
int n = stoi(s);
return 1 <= n && n <= 12;
}
int main() {
string s;
cin >> s;
pair<bool, bool> pa = make_pair(isMM(s.substr(0, 2)), isMM(s.substr(2, 2)));
if (pa.first && pa.second)
cout << "AMIGUOUS";
else if (pa.first && !pa.second)
cout << "MMYY";
else if (!pa.first && pa.second)
cout << "YYMM";
else if (!pa.first && !pa.second)
cout << "NA";
return 0;
} | #include <iostream>
using namespace std;
bool isMM(string s) {
int n = stoi(s);
return 1 <= n && n <= 12;
}
int main() {
string s;
cin >> s;
pair<bool, bool> pa = make_pair(isMM(s.substr(0, 2)), isMM(s.substr(2, 2)));
if (pa.first && pa.second)
cout << "AMBIGUOUS";
else if (pa.first && !pa.second)
cout << "MMYY";
else if (!pa.first && pa.second)
cout << "YYMM";
else if (!pa.first && !pa.second)
cout << "NA";
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 859,591 | 859,592 | u505195286 | cpp |
p03042 | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int S, top2, bottom2;
string answer;
cin >> S;
top2 = S / 100;
bottom2 = S % 100;
if ((top2 > 12 || top2 == 0) && (bottom2 <= 12 || bottom2 >= 1))
answer = "YYMM";
else if ((bottom2 > 12 || bottom2 == 0) && (top2 <= 12 || top2 >= 1))
answer = "MMYY";
else if ((bottom2 <= 12 || bottom2 >= 1) && (top2 <= 12 || top2 >= 1))
answer = "AMBIGUOUS";
else
answer = 'NA';
cout << answer << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int S, top2, bottom2;
string answer;
cin >> S;
top2 = S / 100;
bottom2 = S % 100;
if ((top2 > 12 || top2 == 0) && (bottom2 <= 12 && bottom2 >= 1))
answer = "YYMM";
else if ((bottom2 > 12 || bottom2 == 0) && (top2 <= 12 && top2 >= 1))
answer = "MMYY";
else if ((bottom2 <= 12 && bottom2 >= 1) && (top2 <= 12 && top2 >= 1))
answer = "AMBIGUOUS";
else
answer = "NA";
cout << answer << endl;
return 0;
} | [
"misc.opposites",
"control_flow.branch.if.condition.change",
"literal.string.change",
"assignment.value.change"
] | 859,613 | 859,614 | u969617556 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
int S;
cin >> S;
string result;
int up = S / 100;
int down = S % 100;
if ((up >= 13) && (down >= 13))
result = "NA";
else if ((up >= 13) && (1 <= down && down <= 12))
result = "YYMM";
else if ((up >= 13) && (down == 0))
result = "NA";
else if ((1 <= up && up <= 12) && (13 <= down))
result = "MMYY";
else if ((1 <= up && up <= 12) && (1 <= down && down <= 12))
result == "AMBIGUOUS";
else if ((1 <= up && up <= 12) && (down == 0))
result = "MMYY";
else if ((up == 0) && (down >= 13))
result == "NA";
else if ((up == 0) && (1 <= down && down <= 12))
result = "YYMM";
else if ((up == 0) && (down == 0))
result = "NA";
cout << result << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int S;
cin >> S;
string result;
int up = S / 100;
int down = S % 100;
if ((up >= 13) && (down >= 13))
result = "NA";
else if ((up >= 13) && (1 <= down && down <= 12))
result = "YYMM";
else if ((up >= 13) && (down == 0))
result = "NA";
else if ((1 <= up && up <= 12) && (13 <= down))
result = "MMYY";
else if ((1 <= up && up <= 12) && (1 <= down && down <= 12))
result = "AMBIGUOUS";
else if ((1 <= up && up <= 12) && (down == 0))
result = "MMYY";
else if ((up == 0) && (down >= 13))
result = "NA";
else if ((up == 0) && (1 <= down && down <= 12))
result = "YYMM";
else if ((up == 0) && (down == 0))
result = "NA";
cout << result << endl;
return 0;
}
| [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 859,620 | 859,621 | u704719854 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
if (a % 100 > 12 || a % 100 != 0) {
if (a / 100 > 12 || a / 100 != 0) {
cout << "NA";
} else {
cout << "MMYY";
}
} else {
if (a / 100 > 12 || a / 100 != 0) {
cout << "YYMM";
} else {
cout << "AMBIGUOUS";
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
if (a % 100 > 12 || a % 100 == 0) {
if (a / 100 > 12 || a / 100 == 0) {
cout << "NA";
} else {
cout << "MMYY";
}
} else {
if (a / 100 > 12 || a / 100 == 0) {
cout << "YYMM";
} else {
cout << "AMBIGUOUS";
}
}
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 859,622 | 859,623 | u200855589 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
string S;
int first, last;
bool fYY = 0, fMM = 0;
bool lYY = 0, lMM = 0;
cin >> S;
last = first = atoi(S.c_str());
last = first % 100;
first = first / 100;
// is first YY?
if (first >= 0 && first < 100) {
fYY = true;
// is first MM?
if (first > 0 && first < 13) {
fMM = true;
}
}
// is last YY?
if (last >= 0 && last < 100) {
lYY = true;
// is first MM?
if (last > 0 && last < 13) {
lMM = true;
}
}
string output;
if (fYY && lYY) {
if (fMM) {
if (lMM) {
output = "AMBIGUOUS";
} else {
output = "MMYY";
}
} else if (lMM) {
output = "YYMM";
} else {
output = "AMBIGUOUS";
}
} else {
// neither first and last Year or month
output = "NA";
}
cout << output << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string S;
int first, last;
bool fYY = 0, fMM = 0;
bool lYY = 0, lMM = 0;
cin >> S;
last = first = atoi(S.c_str());
last = first % 100;
first = first / 100;
// is first YY?
if (first >= 0 && first < 100) {
fYY = true;
// is first MM?
if (first > 0 && first < 13) {
fMM = true;
}
}
// is last YY?
if (last >= 0 && last < 100) {
lYY = true;
// is first MM?
if (last > 0 && last < 13) {
lMM = true;
}
}
string output;
if (fYY && lYY) {
if (fMM) {
if (lMM) {
output = "AMBIGUOUS";
} else {
output = "MMYY";
}
} else if (lMM) {
output = "YYMM";
} else {
output = "NA";
}
} else {
// neither first and last Year or month
output = "NA";
}
cout << output << endl;
return 0;
} | [
"literal.string.change",
"assignment.value.change"
] | 859,644 | 859,645 | u358822669 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[4][100] = {"AMBIGUOUS", "YYMM", "MMYY", "NA"};
int a, ans = 0;
cin >> a;
if (a / 100 > 12 || a / 100 == 0)
ans += 1;
if (a % 100 > 12 || a / 100 == 0)
ans += 2;
cout << s[ans];
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
char s[4][100] = {"AMBIGUOUS", "YYMM", "MMYY", "NA"};
int a, ans = 0;
cin >> a;
if (a / 100 > 12 || a / 100 == 0)
ans += 1;
if (a % 100 > 12 || a % 100 == 0)
ans += 2;
cout << s[ans];
} | [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 859,652 | 859,653 | u219398458 | cpp |
p03042 | #include <stdio.h>
int main(void) {
int s;
scanf("%d", &s);
int t = s % 100;
int u = s - t;
if (t >= 1 && t <= 12) {
if (u >= 1 && u <= 12) {
printf("AMBIGUOUS");
} else {
printf("YYMM");
}
} else {
if (u >= 1 && u <= 12) {
printf("MMYY");
} else {
printf("NA");
}
}
} | #include <stdio.h>
int main(void) {
int s;
scanf("%d", &s);
int t = s % 100;
int u = (s - t) / 100;
if (t >= 1 && t <= 12) {
if (u >= 1 && u <= 12) {
printf("AMBIGUOUS");
} else {
printf("YYMM");
}
} else {
if (u >= 1 && u <= 12) {
printf("MMYY");
} else {
printf("NA");
}
}
}
| [
"assignment.change"
] | 859,659 | 859,660 | u222643545 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
string S;
int main() {
cin >> S;
int up = atoi(S.substr(0, 2).c_str());
int lw = atoi(S.substr(2, 2).c_str());
bool yymm = false;
bool mmyy = false;
if (up >= 0 && up <= 99 && lw >= 1 && lw <= 12) {
yymm = true;
}
if (lw >= 0 && lw <= 99 && up >= 1 && up <= 12) {
mmyy = true;
}
if (yymm && !mmyy) {
cout << "YYMM" << endl;
} else if (!yymm && mmyy) {
cout << "MMYY" << endl;
} else if (yymm && mmyy) {
cout << "AMBIGOUS" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
string S;
int main() {
cin >> S;
int up = atoi(S.substr(0, 2).c_str());
int lw = atoi(S.substr(2, 2).c_str());
bool yymm = false;
bool mmyy = false;
if (up >= 0 && up <= 99 && lw >= 1 && lw <= 12) {
yymm = true;
}
if (lw >= 0 && lw <= 99 && up >= 1 && up <= 12) {
mmyy = true;
}
if (yymm && !mmyy) {
cout << "YYMM" << endl;
} else if (!yymm && mmyy) {
cout << "MMYY" << endl;
} else if (yymm && mmyy) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 859,666 | 859,667 | u489053642 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
if ((n / 100 == 0 || n / 100 > 12) && (n % 100 == 0 || n % 100 > 12))
cout << "NA\n";
else if (n / 100 == 0 || n / 100 > 12)
cout << "YYMM\n";
else if (n % 100 == 0 || n % 100 > 12)
cout << "MMYY\n";
else
cout << "AMBIGOUS\n";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
if ((n / 100 == 0 || n / 100 > 12) && (n % 100 == 0 || n % 100 > 12))
cout << "NA\n";
else if (n / 100 == 0 || n / 100 > 12)
cout << "YYMM\n";
else if (n % 100 == 0 || n % 100 > 12)
cout << "MMYY\n";
else
cout << "AMBIGUOUS\n";
}
| [
"literal.string.change",
"io.output.change"
] | 859,668 | 859,669 | u132434645 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define int long long int
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using namespace std;
typedef pair<int, int> P;
const int INF = 1e15;
const int MOD = 1e9 + 7;
template <typename T> using vector2 = vector<vector<T>>;
template <typename T> vector2<T> initVec2(size_t n0, size_t n1, T e = T()) {
return vector2<T>(n0, vector<T>(n1, e));
}
template <typename T> using vector3 = vector<vector<vector<T>>>;
template <typename T>
vector3<T> initVec3(size_t n0, size_t n1, size_t n2, T e = T()) {
return vector3<T>(n0, vector2<T>(n1, vector<T>(n2, e)));
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
vector<int> a(2);
rep(i, 2) {
char c;
cin >> c;
a[i] += c - '0';
a[i] *= 10;
cin >> c;
a[i] += c - '0';
}
if (1 <= a[0] && a[0] <= 12 && (13 <= a[1] || a[1] == 0)) {
cout << "MMYY" << endl;
return 0;
}
if (1 <= a[1] && a[1] <= 12 && (13 <= a[0] || a[0] == 0)) {
cout << "YYMM" << endl;
return 0;
}
if (1 <= a[0] && a[0] <= 12 && 1 <= a[1] && a[1] == 12) {
cout << "AMBIGUOUS" << endl;
return 0;
}
cout << "NA" << endl;
return 0;
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define int long long int
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using namespace std;
typedef pair<int, int> P;
const int INF = 1e15;
const int MOD = 1e9 + 7;
template <typename T> using vector2 = vector<vector<T>>;
template <typename T> vector2<T> initVec2(size_t n0, size_t n1, T e = T()) {
return vector2<T>(n0, vector<T>(n1, e));
}
template <typename T> using vector3 = vector<vector<vector<T>>>;
template <typename T>
vector3<T> initVec3(size_t n0, size_t n1, size_t n2, T e = T()) {
return vector3<T>(n0, vector2<T>(n1, vector<T>(n2, e)));
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
vector<int> a(2);
rep(i, 2) {
char c;
cin >> c;
a[i] += c - '0';
a[i] *= 10;
cin >> c;
a[i] += c - '0';
}
if (1 <= a[0] && a[0] <= 12 && (13 <= a[1] || a[1] == 0)) {
cout << "MMYY" << endl;
return 0;
}
if (1 <= a[1] && a[1] <= 12 && (13 <= a[0] || a[0] == 0)) {
cout << "YYMM" << endl;
return 0;
}
if (1 <= a[0] && a[0] <= 12 && 1 <= a[1] && a[1] <= 12) {
cout << "AMBIGUOUS" << endl;
return 0;
}
cout << "NA" << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 859,670 | 859,671 | u558092537 | cpp |
p03042 | #include <cstdio>
int main() {
int n;
scanf("%d", &n);
int a, b;
a = n / 100;
b = n % 100;
int p = 0;
int q = 0;
if (0 < b && b < 13)
p = 1;
if (0 < a && a < 13)
q = 1;
if (p + q == 2)
printf("AMBIGUOUOS");
else if (p == 1)
printf("YYMM");
else if (q == 1)
printf("MMYY");
else
printf("NA");
return 0;
} | #include <cstdio>
int main() {
int n;
scanf("%d", &n);
int a, b;
a = n / 100;
b = n % 100;
int p = 0;
int q = 0;
if (0 < b && b < 13)
p = 1;
if (0 < a && a < 13)
q = 1;
if (p + q == 2)
printf("AMBIGUOUS");
else if (p == 1)
printf("YYMM");
else if (q == 1)
printf("MMYY");
else
printf("NA");
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 859,674 | 859,675 | u016382081 | cpp |
p03042 | #include "bits/stdc++.h"
using namespace std;
#define sp(x) cout << setprecision(x);
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define inf 10000000
#define linf INT64_MAX * 0.99
#define print(s) cout << (s) << endl
#define lint long long
#define yes "Yes"
#define no "No"
typedef pair<int, int> P;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
string a = s.substr(0, 2);
string b = s.substr(2, 2);
int m = stoi(a);
int n = stoi(b);
bool y = false, z = false;
if (m <= 12 && m > 0)
z = true;
if (n <= 12 && n > 0)
y = true;
string ans;
if (z) {
if (z)
ans = "AMBIGUOUS";
else
ans = "MMYY";
} else {
if (y)
ans = "YYMM";
else
ans = "NA";
}
print(ans);
return 0;
} | #include "bits/stdc++.h"
using namespace std;
#define sp(x) cout << setprecision(x);
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(a) (a).begin(), (a).end()
#define inf 10000000
#define linf INT64_MAX * 0.99
#define print(s) cout << (s) << endl
#define lint long long
#define yes "Yes"
#define no "No"
typedef pair<int, int> P;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
string a = s.substr(0, 2);
string b = s.substr(2, 2);
int m = stoi(a);
int n = stoi(b);
bool y = false, z = false;
if (m <= 12 && m > 0)
z = true;
if (n <= 12 && n > 0)
y = true;
string ans;
if (z) {
if (y)
ans = "AMBIGUOUS";
else
ans = "MMYY";
} else {
if (y)
ans = "YYMM";
else
ans = "NA";
}
print(ans);
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,678 | 859,679 | u601825761 | cpp |
p03042 | #include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
constexpr ll MOD = 1000000007LL;
int main(void) {
string S;
cin >> S;
int Y, M, flag = 0;
Y = (S[0] - '0') * 10 + (S[1] - '0');
M = (S[2] - '0') * 10 + (S[3] - '0');
if (Y <= 12 && Y >= 1)
flag |= 2;
if (M <= 12 && M >= 1)
flag |= 1;
if ((flag & 3) == 3)
cout << "AMBIGIOUS" << endl;
else if (flag & 2)
cout << "MMYY" << endl;
else if (flag & 1)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
constexpr ll MOD = 1000000007LL;
int main(void) {
string S;
cin >> S;
int Y, M, flag = 0;
Y = (S[0] - '0') * 10 + (S[1] - '0');
M = (S[2] - '0') * 10 + (S[3] - '0');
if (Y <= 12 && Y >= 1)
flag |= 2;
if (M <= 12 && M >= 1)
flag |= 1;
if ((flag & 3) == 3)
cout << "AMBIGUOUS" << endl;
else if (flag & 2)
cout << "MMYY" << endl;
else if (flag & 1)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
return 0;
}
| [
"misc.typo",
"literal.string.change",
"io.output.change"
] | 859,680 | 859,681 | u677149117 | cpp |
p03042 | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9
constexpr int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
constexpr int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
bool f(int a) { return a > 0 && a <= 12; }
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b;
cin >> a;
b = a % 100;
a /= 100;
if (f(a) && f(b)) {
cout << "AMBIGOUS" << endl;
} else if (f(a)) {
cout << "MMYY" << endl;
} else if (f(b)) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | #include "bits/stdc++.h"
#define REP(i, n) for (ll i = 0; i < ll(n); ++i)
#define RREP(i, n) for (ll i = ll(n) - 1; i >= 0; --i)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define RFOR(i, m, n) for (ll i = ll(n) - 1; i >= ll(m); --i)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9
constexpr int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
constexpr int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T> bool chmin(T &a, const T &b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
bool f(int a) { return a > 0 && a <= 12; }
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b;
cin >> a;
b = a % 100;
a /= 100;
if (f(a) && f(b)) {
cout << "AMBIGUOUS" << endl;
} else if (f(a)) {
cout << "MMYY" << endl;
} else if (f(b)) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 859,682 | 859,683 | u918357423 | cpp |
p03042 | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < static_cast<long long>(n); i++)
#define repi(i, a, b) \
for (long long i = static_cast<long long>(a); i < static_cast<long long>(b); \
i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define mt make_tuple
#define mp make_pair
template <class T1, class T2> bool chmin(T1 &a, T2 b) {
return b < a && (a = b, true);
}
template <class T1, class T2> bool chmax(T1 &a, T2 b) {
return a < b && (a = b, true);
}
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<ll, ll>;
using ld = long double;
using vld = vector<ld>;
using vi = vector<int>;
using vvi = vector<vi>;
vll conv(vi &v) {
vll r(v.size());
rep(i, v.size()) r[i] = v[i];
return r;
}
inline void input(int &v) {
v = 0;
char c = 0;
int p = 1;
while (c < '0' || c > '9') {
if (c == '-')
p = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
v = (v << 3) + (v << 1) + c - '0';
c = getchar();
}
v *= p;
} // これを使うならば、tieとかを消して!!
template <typename T, typename U>
ostream &operator<<(ostream &o, const pair<T, U> &v) {
o << "(" << v.first << ", " << v.second << ")";
return o;
}
template <size_t...> struct seq {};
template <size_t N, size_t... Is>
struct gen_seq : gen_seq<N - 1, N - 1, Is...> {};
template <size_t... Is> struct gen_seq<0, Is...> : seq<Is...> {};
template <class Ch, class Tr, class Tuple, size_t... Is>
void print_tuple(basic_ostream<Ch, Tr> &os, Tuple const &t, seq<Is...>) {
using s = int[];
(void)s{0, (void(os << (Is == 0 ? "" : ", ") << get<Is>(t)), 0)...};
}
template <class Ch, class Tr, class... Args>
auto operator<<(basic_ostream<Ch, Tr> &os, tuple<Args...> const &t)
-> basic_ostream<Ch, Tr> & {
os << "(";
print_tuple(os, t, gen_seq<sizeof...(Args)>());
return os << ")";
}
ostream &operator<<(ostream &o, const vvll &v) {
rep(i, v.size()) {
rep(j, v[i].size()) o << v[i][j] << " ";
o << endl;
}
return o;
}
template <typename T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << '[';
rep(i, v.size()) o << v[i] << (i != v.size() - 1 ? ", " : "");
o << "]";
return o;
}
template <typename T> ostream &operator<<(ostream &o, const deque<T> &v) {
o << '[';
rep(i, v.size()) o << v[i] << (i != v.size() - 1 ? ", " : "");
o << "]";
return o;
}
template <typename T> ostream &operator<<(ostream &o, const set<T> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it << (next(it) != m.end() ? ", " : "");
o << "]";
return o;
}
template <typename T>
ostream &operator<<(ostream &o, const unordered_set<T> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it << (next(it) != m.end() ? ", " : "");
o << "]";
return o;
}
template <typename T, typename U>
ostream &operator<<(ostream &o, const map<T, U> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it << (next(it) != m.end() ? ", " : "");
o << "]";
return o;
}
template <typename T, typename U, typename V>
ostream &operator<<(ostream &o, const unordered_map<T, U, V> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it;
o << "]";
return o;
}
vector<int> range(const int x, const int y) {
vector<int> v(y - x + 1);
iota(v.begin(), v.end(), x);
return v;
}
template <typename T> istream &operator>>(istream &i, vector<T> &o) {
rep(j, o.size()) i >> o[j];
return i;
}
template <typename T, typename S, typename U>
ostream &operator<<(ostream &o, const priority_queue<T, S, U> &v) {
auto tmp = v;
while (tmp.size()) {
auto x = tmp.top();
tmp.pop();
o << x << " ";
}
return o;
}
template <typename T> ostream &operator<<(ostream &o, const queue<T> &v) {
auto tmp = v;
while (tmp.size()) {
auto x = tmp.front();
tmp.pop();
o << x << " ";
}
return o;
}
template <typename T> ostream &operator<<(ostream &o, const stack<T> &v) {
auto tmp = v;
while (tmp.size()) {
auto x = tmp.top();
tmp.pop();
o << x << " ";
}
return o;
}
template <typename T> unordered_map<T, ll> counter(vector<T> vec) {
unordered_map<T, ll> ret;
for (auto &&x : vec)
ret[x]++;
return ret;
};
string substr(string s, P x) { return s.substr(x.fi, x.se - x.fi); }
void vizGraph(vvll &g, int mode = 0, string filename = "out.png") {
ofstream ofs("./out.dot");
ofs << "digraph graph_name {" << endl;
set<P> memo;
rep(i, g.size()) rep(j, g[i].size()) {
if (mode && (memo.count(P(i, g[i][j])) || memo.count(P(g[i][j], i))))
continue;
memo.insert(P(i, g[i][j]));
ofs << " " << i << " -> " << g[i][j]
<< (mode ? " [arrowhead = none]" : "") << endl;
}
ofs << "}" << endl;
ofs.close();
system((string("dot -T png out.dot >") + filename).c_str());
}
class ScopedTime {
public:
ScopedTime(const std::string &msg = "") : msg_(msg) {
start_ = std::chrono::system_clock::now();
}
void lap(const std::string &msg) {
const auto duration_time = std::chrono::system_clock::now() - start_;
const auto duration_ms =
std::chrono::duration_cast<std::chrono::milliseconds>(duration_time);
std::cerr << "[" << duration_ms.count() << " ms] " << msg << std::endl;
}
virtual ~ScopedTime() { this->lap(msg_); }
private:
std::chrono::system_clock::time_point start_;
std::string msg_;
};
size_t g_random_seed;
struct init_ {
init_() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
srand(static_cast<unsigned int>(time(NULL)));
g_random_seed = RAND_MAX / 2 + rand() / 2;
}
} init__;
namespace std {
using argument_type = P;
template <> struct hash<argument_type> {
size_t operator()(argument_type const &x) const {
size_t seed = g_random_seed;
seed ^= hash<ll>{}(x.fi);
seed ^= (hash<ll>{}(x.se) << 1);
return seed;
}
};
}; // namespace std
#define ldout fixed << setprecision(40)
#define EPS (double)1e-14
#define INF (ll)1e18
#define mo (ll)(1e9 + 7)
// end of hamko utils
template <typename T, typename X> auto vectors(T a, X x) {
return vector<T>(x, a);
}
template <typename T, typename X, typename Y, typename... Zs>
auto vectors(T a, X x, Y y, Zs... zs) {
auto cont = vectors(a, y, zs...);
return vector<decltype(cont)>(x, cont);
}
// usage: vector<vector<vector<double> > > dp = vectors(double(), 10, 20, 30);
int S;
int main(void) {
cin >> S;
int upper = S / 100;
int lower = S % 100;
if (upper >= 1 && upper <= 12 && lower >= 1 && lower <= 12) {
std::cout << "AMBIGUOUS" << std::endl;
} else if (upper >= 1 && upper <= 12 && (lower > 12 || lower == 0)) {
std::cout << "YYMM" << std::endl;
} else if ((upper > 12 || upper == 0) && lower >= 1 && lower <= 12) {
std::cout << "YYMM" << std::endl;
} else {
std::cout << "NA" << std::endl;
}
return 0;
}
| #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < static_cast<long long>(n); i++)
#define repi(i, a, b) \
for (long long i = static_cast<long long>(a); i < static_cast<long long>(b); \
i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define mt make_tuple
#define mp make_pair
template <class T1, class T2> bool chmin(T1 &a, T2 b) {
return b < a && (a = b, true);
}
template <class T1, class T2> bool chmax(T1 &a, T2 b) {
return a < b && (a = b, true);
}
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<ll, ll>;
using ld = long double;
using vld = vector<ld>;
using vi = vector<int>;
using vvi = vector<vi>;
vll conv(vi &v) {
vll r(v.size());
rep(i, v.size()) r[i] = v[i];
return r;
}
inline void input(int &v) {
v = 0;
char c = 0;
int p = 1;
while (c < '0' || c > '9') {
if (c == '-')
p = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
v = (v << 3) + (v << 1) + c - '0';
c = getchar();
}
v *= p;
} // これを使うならば、tieとかを消して!!
template <typename T, typename U>
ostream &operator<<(ostream &o, const pair<T, U> &v) {
o << "(" << v.first << ", " << v.second << ")";
return o;
}
template <size_t...> struct seq {};
template <size_t N, size_t... Is>
struct gen_seq : gen_seq<N - 1, N - 1, Is...> {};
template <size_t... Is> struct gen_seq<0, Is...> : seq<Is...> {};
template <class Ch, class Tr, class Tuple, size_t... Is>
void print_tuple(basic_ostream<Ch, Tr> &os, Tuple const &t, seq<Is...>) {
using s = int[];
(void)s{0, (void(os << (Is == 0 ? "" : ", ") << get<Is>(t)), 0)...};
}
template <class Ch, class Tr, class... Args>
auto operator<<(basic_ostream<Ch, Tr> &os, tuple<Args...> const &t)
-> basic_ostream<Ch, Tr> & {
os << "(";
print_tuple(os, t, gen_seq<sizeof...(Args)>());
return os << ")";
}
ostream &operator<<(ostream &o, const vvll &v) {
rep(i, v.size()) {
rep(j, v[i].size()) o << v[i][j] << " ";
o << endl;
}
return o;
}
template <typename T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << '[';
rep(i, v.size()) o << v[i] << (i != v.size() - 1 ? ", " : "");
o << "]";
return o;
}
template <typename T> ostream &operator<<(ostream &o, const deque<T> &v) {
o << '[';
rep(i, v.size()) o << v[i] << (i != v.size() - 1 ? ", " : "");
o << "]";
return o;
}
template <typename T> ostream &operator<<(ostream &o, const set<T> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it << (next(it) != m.end() ? ", " : "");
o << "]";
return o;
}
template <typename T>
ostream &operator<<(ostream &o, const unordered_set<T> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it << (next(it) != m.end() ? ", " : "");
o << "]";
return o;
}
template <typename T, typename U>
ostream &operator<<(ostream &o, const map<T, U> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it << (next(it) != m.end() ? ", " : "");
o << "]";
return o;
}
template <typename T, typename U, typename V>
ostream &operator<<(ostream &o, const unordered_map<T, U, V> &m) {
o << '[';
for (auto it = m.begin(); it != m.end(); it++)
o << *it;
o << "]";
return o;
}
vector<int> range(const int x, const int y) {
vector<int> v(y - x + 1);
iota(v.begin(), v.end(), x);
return v;
}
template <typename T> istream &operator>>(istream &i, vector<T> &o) {
rep(j, o.size()) i >> o[j];
return i;
}
template <typename T, typename S, typename U>
ostream &operator<<(ostream &o, const priority_queue<T, S, U> &v) {
auto tmp = v;
while (tmp.size()) {
auto x = tmp.top();
tmp.pop();
o << x << " ";
}
return o;
}
template <typename T> ostream &operator<<(ostream &o, const queue<T> &v) {
auto tmp = v;
while (tmp.size()) {
auto x = tmp.front();
tmp.pop();
o << x << " ";
}
return o;
}
template <typename T> ostream &operator<<(ostream &o, const stack<T> &v) {
auto tmp = v;
while (tmp.size()) {
auto x = tmp.top();
tmp.pop();
o << x << " ";
}
return o;
}
template <typename T> unordered_map<T, ll> counter(vector<T> vec) {
unordered_map<T, ll> ret;
for (auto &&x : vec)
ret[x]++;
return ret;
};
string substr(string s, P x) { return s.substr(x.fi, x.se - x.fi); }
void vizGraph(vvll &g, int mode = 0, string filename = "out.png") {
ofstream ofs("./out.dot");
ofs << "digraph graph_name {" << endl;
set<P> memo;
rep(i, g.size()) rep(j, g[i].size()) {
if (mode && (memo.count(P(i, g[i][j])) || memo.count(P(g[i][j], i))))
continue;
memo.insert(P(i, g[i][j]));
ofs << " " << i << " -> " << g[i][j]
<< (mode ? " [arrowhead = none]" : "") << endl;
}
ofs << "}" << endl;
ofs.close();
system((string("dot -T png out.dot >") + filename).c_str());
}
class ScopedTime {
public:
ScopedTime(const std::string &msg = "") : msg_(msg) {
start_ = std::chrono::system_clock::now();
}
void lap(const std::string &msg) {
const auto duration_time = std::chrono::system_clock::now() - start_;
const auto duration_ms =
std::chrono::duration_cast<std::chrono::milliseconds>(duration_time);
std::cerr << "[" << duration_ms.count() << " ms] " << msg << std::endl;
}
virtual ~ScopedTime() { this->lap(msg_); }
private:
std::chrono::system_clock::time_point start_;
std::string msg_;
};
size_t g_random_seed;
struct init_ {
init_() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
srand(static_cast<unsigned int>(time(NULL)));
g_random_seed = RAND_MAX / 2 + rand() / 2;
}
} init__;
namespace std {
using argument_type = P;
template <> struct hash<argument_type> {
size_t operator()(argument_type const &x) const {
size_t seed = g_random_seed;
seed ^= hash<ll>{}(x.fi);
seed ^= (hash<ll>{}(x.se) << 1);
return seed;
}
};
}; // namespace std
#define ldout fixed << setprecision(40)
#define EPS (double)1e-14
#define INF (ll)1e18
#define mo (ll)(1e9 + 7)
// end of hamko utils
template <typename T, typename X> auto vectors(T a, X x) {
return vector<T>(x, a);
}
template <typename T, typename X, typename Y, typename... Zs>
auto vectors(T a, X x, Y y, Zs... zs) {
auto cont = vectors(a, y, zs...);
return vector<decltype(cont)>(x, cont);
}
// usage: vector<vector<vector<double> > > dp = vectors(double(), 10, 20, 30);
int S;
int main(void) {
cin >> S;
int upper = S / 100;
int lower = S % 100;
if (upper >= 1 && upper <= 12 && lower >= 1 && lower <= 12) {
std::cout << "AMBIGUOUS" << std::endl;
} else if (upper >= 1 && upper <= 12 && (lower > 12 || lower == 0)) {
std::cout << "MMYY" << std::endl;
} else if ((upper > 12 || upper == 0) && lower >= 1 && lower <= 12) {
std::cout << "YYMM" << std::endl;
} else {
std::cout << "NA" << std::endl;
}
return 0;
}
| [
"literal.string.change",
"expression.operation.binary.change"
] | 859,684 | 859,685 | u897282055 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
typedef long long ll;
using namespace std;
template <typename T> void output(T, int);
template <typename T> T max(T, T);
int gcd(int a, int b);
int main() {
// source
string s;
cin >> s;
int a, b;
int temp = stoi(s);
a = temp / 100;
b = temp % 100;
bool first, second;
first = a != 0 && a <= 12;
second = b != 0 && b <= 12;
if (first && second) {
cout << "AMBIGUOUS" << endl;
} else if (!first && second) {
cout << "YYMM" << endl;
} else if (first && second) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
template <typename T> void output(T a, int precision) {
if (precision > 0) {
cout << setprecision(precision) << a << "\n";
} else {
cout << a << "\n";
}
}
template <typename T> T max(T a, T b) {
if (a > b) {
return a;
} else {
return b;
}
}
template <typename T> T min(T a, T b) {
if (a < b) {
return a;
} else {
return b;
}
}
int gcd(int a, int b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
| #include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
typedef long long ll;
using namespace std;
template <typename T> void output(T, int);
template <typename T> T max(T, T);
int gcd(int a, int b);
int main() {
// source
string s;
cin >> s;
int a, b;
int temp = stoi(s);
a = temp / 100;
b = temp % 100;
bool first, second;
first = a != 0 && a <= 12;
second = b != 0 && b <= 12;
if (first && second) {
cout << "AMBIGUOUS" << endl;
} else if (!first && second) {
cout << "YYMM" << endl;
} else if (first && !second) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
template <typename T> void output(T a, int precision) {
if (precision > 0) {
cout << setprecision(precision) << a << "\n";
} else {
cout << a << "\n";
}
}
template <typename T> T max(T a, T b) {
if (a > b) {
return a;
} else {
return b;
}
}
template <typename T> T min(T a, T b) {
if (a < b) {
return a;
} else {
return b;
}
}
int gcd(int a, int b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
| [
"expression.operation.unary.add",
"control_flow.branch.if.condition.change"
] | 859,692 | 859,693 | u030992242 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long mod2 = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
const string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string abc = "abcdefghijklmnopqrstuvwxyz";
template <class T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int divCeil(int A, int B) { return (A + (B - 1)) / B; }
long long divCeil(long long A, int B) { return (A + (B - 1)) / B; }
long long divCeil(int A, long long B) { return (A + (B - 1)) / B; }
long long divCeil(long long A, long long B) { return (A + (B - 1)) / B; }
int main() {
string S;
cin >> S;
int fir = stoi(S.substr(0, 2));
int sec = stoi(S.substr(2, 2));
string ans;
bool yymm, mmyy;
if (fir == 0 || fir > 12)
mmyy = false;
if (sec == 0 || sec > 12)
yymm = false;
if (mmyy) {
if (yymm)
ans = "AMBIGUOUS";
else
ans = "MMYY";
} else {
if (yymm)
ans = "YYMM";
else
ans = "NA";
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long mod2 = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
const string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string abc = "abcdefghijklmnopqrstuvwxyz";
template <class T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
int divCeil(int A, int B) { return (A + (B - 1)) / B; }
long long divCeil(long long A, int B) { return (A + (B - 1)) / B; }
long long divCeil(int A, long long B) { return (A + (B - 1)) / B; }
long long divCeil(long long A, long long B) { return (A + (B - 1)) / B; }
int main() {
string S;
cin >> S;
int fir = stoi(S.substr(0, 2));
int sec = stoi(S.substr(2, 2));
string ans;
bool yymm = true, mmyy = true;
if (fir == 0 || fir > 12)
mmyy = false;
if (sec == 0 || sec > 12)
yymm = false;
if (mmyy) {
if (yymm)
ans = "AMBIGUOUS";
else
ans = "MMYY";
} else {
if (yymm)
ans = "YYMM";
else
ans = "NA";
}
cout << ans << endl;
} | [
"variable_declaration.value.change"
] | 859,694 | 859,695 | u811472478 | cpp |
p03042 | #include <bits/stdc++.h>
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define lp(i, a, n) for (int i = a; i <= n; ++i)
#define lpd(i, a, n) for (int i = a; i >= n; --i)
#define mem(a, b) memset(a, b, sizeof a)
#define all(v) v.begin(), v.end()
#define println(a) cout << (a) << endl
#define sz(x) ((int)(x).size())
#define readi(x) scanf("%d", &x)
#define read2i(x, y) scanf("%d%d", &x, &y)
#define read3i(x, y, z) scanf("%d%d%d", &x, &y, &z)
#define mod 1000000007
#define eps 1e-9
#define infi 1000000000
#define infll 1000000000000000000ll
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef set<int> si;
typedef map<int, int> mii;
const int N = 100002;
int a, b;
int main() {
scanf("%2d%2d", &a, &b);
if ((a > 12 or !a) and (b > 12 or !b))
cout << "NA";
else if (a > 12 or !a)
cout << "YYMM";
else if (b > 12 or !b)
cout << "MMYY";
else
cout << "AMBIGOUS";
}
/*
uniform_int_distribution<type>(l, r)(rng)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
*/
| #include <bits/stdc++.h>
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define lp(i, a, n) for (int i = a; i <= n; ++i)
#define lpd(i, a, n) for (int i = a; i >= n; --i)
#define mem(a, b) memset(a, b, sizeof a)
#define all(v) v.begin(), v.end()
#define println(a) cout << (a) << endl
#define sz(x) ((int)(x).size())
#define readi(x) scanf("%d", &x)
#define read2i(x, y) scanf("%d%d", &x, &y)
#define read3i(x, y, z) scanf("%d%d%d", &x, &y, &z)
#define mod 1000000007
#define eps 1e-9
#define infi 1000000000
#define infll 1000000000000000000ll
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef set<int> si;
typedef map<int, int> mii;
const int N = 100002;
int a, b;
int main() {
scanf("%2d%2d", &a, &b);
if ((a > 12 or !a) and (b > 12 or !b))
cout << "NA";
else if (a > 12 or !a)
cout << "YYMM";
else if (b > 12 or !b)
cout << "MMYY";
else
cout << "AMBIGUOUS";
}
/*
uniform_int_distribution<type>(l, r)(rng)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
*/
| [
"literal.string.change",
"io.output.change"
] | 859,698 | 859,699 | u527876446 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 200000000007;
signed main() {
int a;
cin >> a;
if ((a % 100) < 13 && (a % 100) > 0) {
if (a / 100 < 13 && a / 100 > 0)
cout << "AMBIGUOUS";
else
cout << "YYMM";
} else {
if (a / 100 < 13 && a / 100 > 0)
cout << "MMYY";
else
cout << "WA";
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 200000000007;
signed main() {
int a;
cin >> a;
if ((a % 100) < 13 && (a % 100) > 0) {
if (a / 100 < 13 && a / 100 > 0)
cout << "AMBIGUOUS";
else
cout << "YYMM";
} else {
if (a / 100 < 13 && a / 100 > 0)
cout << "MMYY";
else
cout << "NA";
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 859,700 | 859,701 | u651317892 | cpp |
p03042 | #include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
for (int i = 0; i < 4; i++)
s[i] -= '0';
ll a = s[0] * 10 + s[1];
ll b = s[2] * 10 + s[3];
bool vl = (1 <= a && a <= 12);
bool vr = (1 <= b && b <= 12);
if (vl & vr)
cout << "AMBIGIOUS" << endl;
else if (vl)
cout << "MMYY" << endl;
else if (vr)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
for (int i = 0; i < 4; i++)
s[i] -= '0';
ll a = s[0] * 10 + s[1];
ll b = s[2] * 10 + s[3];
bool vl = (1 <= a && a <= 12);
bool vr = (1 <= b && b <= 12);
if (vl & vr)
cout << "AMBIGUOUS" << endl;
else if (vl)
cout << "MMYY" << endl;
else if (vr)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
return 0;
}
| [
"misc.typo",
"literal.string.change",
"io.output.change"
] | 859,702 | 859,703 | u924885571 | cpp |
p03042 | //==========================Head files==========================
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define LL long long
#define db double
#define mp make_pair
#define pr pair<int, int>
#define fir first
#define sec second
#define pb push_back
#define ms(i, j) memset(i, j, sizeof i)
using namespace std;
//==========================Templates==========================
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
f = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
x = x * 10 + c - '0';
c = getchar();
}
return x * f;
}
inline LL readl() {
LL x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
f = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
x = x * 10 + c - '0';
c = getchar();
}
return x * f;
}
int power(int a, int b) {
int ans = 1;
while (b) {
if (b & 1)
ans = ans * a;
b >>= 1;
a = a * a;
}
return ans;
}
int power_mod(int a, int b, int mod) {
a %= mod;
int ans = 1;
while (b) {
if (b & 1)
ans = (ans * a) % mod;
b >>= 1, a = (a * a) % mod;
}
return ans;
}
LL powerl(LL a, LL b) {
LL ans = 1ll;
while (b) {
if (b & 1ll)
ans = ans * a;
b >>= 1ll;
a = a * a;
}
return ans;
}
LL power_modl(LL a, LL b, LL mod) {
a %= mod;
LL ans = 1ll;
while (b) {
if (b & 1ll)
ans = (ans * a) % mod;
b >>= 1ll, a = (a * a) % mod;
}
return ans;
}
LL gcdl(LL a, LL b) { return b == 0 ? a : gcdl(b, a % b); }
LL abssl(LL a) { return a > 0 ? a : -a; }
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int abss(int a) { return a > 0 ? a : -a; }
//==========================Main body==========================
#define LD "%I64d"
#define D "%d"
#define pt printf
#define sn scanf
#define pty printf("YES\n")
#define ptn printf("NO\n")
//==========================Code here==========================
char s[10];
int main() {
cin >> s;
for (int i = 0; i < 4; ++i)
s[i] -= '0';
int a = s[0] * 10 + s[1];
int b = s[2] * 10 + s[3];
int bja = 0, bjb = 0;
if (0 <= a && a <= 12)
bja = 1;
if (0 <= b && b <= 12)
bjb = 1;
if (bja && bjb)
cout << "AMBIGUOUS";
else if (bja)
cout << "MMYY";
else if (bjb)
cout << "YYMM";
else
cout << "NA";
return 0;
} | //==========================Head files==========================
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define LL long long
#define db double
#define mp make_pair
#define pr pair<int, int>
#define fir first
#define sec second
#define pb push_back
#define ms(i, j) memset(i, j, sizeof i)
using namespace std;
//==========================Templates==========================
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
f = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
x = x * 10 + c - '0';
c = getchar();
}
return x * f;
}
inline LL readl() {
LL x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
f = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
x = x * 10 + c - '0';
c = getchar();
}
return x * f;
}
int power(int a, int b) {
int ans = 1;
while (b) {
if (b & 1)
ans = ans * a;
b >>= 1;
a = a * a;
}
return ans;
}
int power_mod(int a, int b, int mod) {
a %= mod;
int ans = 1;
while (b) {
if (b & 1)
ans = (ans * a) % mod;
b >>= 1, a = (a * a) % mod;
}
return ans;
}
LL powerl(LL a, LL b) {
LL ans = 1ll;
while (b) {
if (b & 1ll)
ans = ans * a;
b >>= 1ll;
a = a * a;
}
return ans;
}
LL power_modl(LL a, LL b, LL mod) {
a %= mod;
LL ans = 1ll;
while (b) {
if (b & 1ll)
ans = (ans * a) % mod;
b >>= 1ll, a = (a * a) % mod;
}
return ans;
}
LL gcdl(LL a, LL b) { return b == 0 ? a : gcdl(b, a % b); }
LL abssl(LL a) { return a > 0 ? a : -a; }
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int abss(int a) { return a > 0 ? a : -a; }
//==========================Main body==========================
#define LD "%I64d"
#define D "%d"
#define pt printf
#define sn scanf
#define pty printf("YES\n")
#define ptn printf("NO\n")
//==========================Code here==========================
char s[10];
int main() {
cin >> s;
for (int i = 0; i < 4; ++i)
s[i] -= '0';
int a = s[0] * 10 + s[1];
int b = s[2] * 10 + s[3];
int bja = 0, bjb = 0;
if (1 <= a && a <= 12)
bja = 1;
if (1 <= b && b <= 12)
bjb = 1;
if (bja && bjb)
cout << "AMBIGUOUS";
else if (bja)
cout << "MMYY";
else if (bjb)
cout << "YYMM";
else
cout << "NA";
return 0;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,704 | 859,705 | u774596402 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
typedef long long LL;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int a = stoi(s.substr(0, 2));
int b = stoi(s.substr(2, 2));
auto isM = [=](int a) { return a > 0 and a < 12; };
if (isM(a) and isM(b))
cout << "AMBIGUOUS\n";
else if (isM(a))
cout << "MMYY\n";
else if (isM(b))
cout << "YYMM\n";
else
cout << "NA\n";
}
| #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
typedef long long LL;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
int a = stoi(s.substr(0, 2));
int b = stoi(s.substr(2, 2));
auto isM = [=](int a) { return a > 0 and a <= 12; };
if (isM(a) and isM(b))
cout << "AMBIGUOUS\n";
else if (isM(a))
cout << "MMYY\n";
else if (isM(b))
cout << "YYMM\n";
else
cout << "NA\n";
}
| [
"expression.operator.compare.change"
] | 859,706 | 859,707 | u459737327 | cpp |
p03042 | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define rep(i, a, b) for (int i = (a); i < (b); i++)
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef complex<double> com;
const int mod = 1e9 + 7;
const int MOD = 998244353;
const int inf = 2e9;
int main() {
string s;
cin >> s;
int a = s[0] - '0';
int b = s[1] - '0';
int c = s[2] - '0';
int d = s[3] - '0';
b += 10 * a;
d += 10 * c;
if (b >= 1 && b < 13) {
if (d >= 1 && d < 13) {
printf("AMBIGOUS");
} else {
printf("MMYY");
}
} else {
if (d >= 1 && d < 13) {
printf("YYMM");
} else {
printf("NA");
}
}
return 0;
}
| #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define rep(i, a, b) for (int i = (a); i < (b); i++)
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef complex<double> com;
const int mod = 1e9 + 7;
const int MOD = 998244353;
const int inf = 2e9;
int main() {
string s;
cin >> s;
int a = s[0] - '0';
int b = s[1] - '0';
int c = s[2] - '0';
int d = s[3] - '0';
b += 10 * a;
d += 10 * c;
if (b >= 1 && b < 13) {
if (d >= 1 && d < 13) {
printf("AMBIGUOUS");
} else {
printf("MMYY");
}
} else {
if (d >= 1 && d < 13) {
printf("YYMM");
} else {
printf("NA");
}
}
return 0;
}
| [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 859,708 | 859,709 | u407614884 | cpp |
p03042 | #pragma region include
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define MOD 1000000007
#define INF 1000000000
#define LLINF 4000000000000000000
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#pragma endregion
//#define __DEBUG__
#ifdef __DEBUG__
#define dump(x) \
cerr << #x << " = " << (x) << " [" << __LINE__ << ":" << __FUNCTION__ \
<< "] " << endl;
// vector出力
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) {
os << "{";
REP(i, (int)v.size()) { os << v[i] << (i < v.size() - 1 ? ", " : ""); }
os << "}";
return os;
}
// pair出力
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &p) {
return os << "(" << p.first << ", " << p.second << ")";
}
// map出力
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
os << "{";
for (auto itr = map_var.begin(); itr != map_var.end(); itr++) {
os << "(" << itr->first << ", " << itr->second << ")";
itr++;
if (itr != map_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// set 出力
template <typename T> ostream &operator<<(ostream &os, set<T> &set_var) {
os << "{";
for (auto itr = set_var.begin(); itr != set_var.end(); itr++) {
os << *itr;
++itr;
if (itr != set_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
#endif
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
int a, b;
int ans = 0;
a = (S[0] - '0') * 10 + (S[1] - '0');
b = (S[2] - '0') * 10 + (S[3] - '0');
if (1 <= a <= 12) {
ans += 1;
}
if (1 <= b <= 12) {
ans += 2;
}
switch (ans) {
case 0:
cout << "NA" << endl;
break;
case 1:
cout << "MMYY" << endl;
break;
case 2:
cout << "YYMM" << endl;
break;
case 3:
cout << "AMBIGUOUS" << endl;
break;
}
getchar();
getchar();
} | #pragma region include
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define MOD 1000000007
#define INF 1000000000
#define LLINF 4000000000000000000
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#pragma endregion
//#define __DEBUG__
#ifdef __DEBUG__
#define dump(x) \
cerr << #x << " = " << (x) << " [" << __LINE__ << ":" << __FUNCTION__ \
<< "] " << endl;
// vector出力
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) {
os << "{";
REP(i, (int)v.size()) { os << v[i] << (i < v.size() - 1 ? ", " : ""); }
os << "}";
return os;
}
// pair出力
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &p) {
return os << "(" << p.first << ", " << p.second << ")";
}
// map出力
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &map_var) {
os << "{";
for (auto itr = map_var.begin(); itr != map_var.end(); itr++) {
os << "(" << itr->first << ", " << itr->second << ")";
itr++;
if (itr != map_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
// set 出力
template <typename T> ostream &operator<<(ostream &os, set<T> &set_var) {
os << "{";
for (auto itr = set_var.begin(); itr != set_var.end(); itr++) {
os << *itr;
++itr;
if (itr != set_var.end())
os << ", ";
itr--;
}
os << "}";
return os;
}
#endif
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
int a, b;
int ans = 0;
a = (S[0] - '0') * 10 + (S[1] - '0');
b = (S[2] - '0') * 10 + (S[3] - '0');
if (1 <= a && a <= 12) {
ans += 1;
}
if (1 <= b && b <= 12) {
ans += 2;
}
switch (ans) {
case 0:
cout << "NA" << endl;
break;
case 1:
cout << "MMYY" << endl;
break;
case 2:
cout << "YYMM" << endl;
break;
case 3:
cout << "AMBIGUOUS" << endl;
break;
}
getchar();
getchar();
} | [
"control_flow.branch.if.condition.change"
] | 859,728 | 859,729 | u435935167 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++)
#define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--)
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
int S;
cin >> S;
int AA, BB;
AA = S / 100;
BB = S - AA * 100;
if ((0 == AA || AA > 13) && (BB > 13 || BB == 0)) {
cout << "NA";
} else if (AA == 0 || AA > 13) {
cout << "YYMM";
} else if (BB > 13 || BB == 0) {
cout << "MMYY";
} else {
cout << "AMBIGUOUS";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++)
#define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--)
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
int S;
cin >> S;
int AA, BB;
AA = S / 100;
BB = S - AA * 100;
if ((0 == AA || AA >= 13) && (BB >= 13 || BB == 0)) {
cout << "NA";
} else if (AA == 0 || AA >= 13) {
cout << "YYMM";
} else if (BB >= 13 || BB == 0) {
cout << "MMYY";
} else {
cout << "AMBIGUOUS";
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 859,735 | 859,736 | u963037787 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
#define pii pair<int, int>
#define ff first
#define ss second
#define mii map<int, int>
#define si set<int>
#define sti stack<int>
#define qi queue<int>
#define vi vector<int>
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
const int M = 1e9 + 7;
int32_t main() {
int flag1 = 0, flag2 = 0;
string s;
cin >> s;
int a = ((s[0] - '0') * 10 + (s[1] - '0'));
int b = ((s[2] - '0') * 10 + (s[3] - '0'));
if (a < 13 && a > 0)
flag1 = 1;
if (b < 13 && b > 0)
flag2 = 1;
if (flag1 && flag2)
cout << "AMBIGOUS";
else if (flag1 && !flag2)
cout << "MMYY";
else if (!flag1 && flag2)
cout << "YYMM";
else
cout << "NA";
} | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
#define pii pair<int, int>
#define ff first
#define ss second
#define mii map<int, int>
#define si set<int>
#define sti stack<int>
#define qi queue<int>
#define vi vector<int>
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
const int M = 1e9 + 7;
int32_t main() {
int flag1 = 0, flag2 = 0;
string s;
cin >> s;
int a = ((s[0] - '0') * 10 + (s[1] - '0'));
int b = ((s[2] - '0') * 10 + (s[3] - '0'));
if (a < 13 && a > 0)
flag1 = 1;
if (b < 13 && b > 0)
flag2 = 1;
if (flag1 && flag2)
cout << "AMBIGUOUS";
else if (flag1 && !flag2)
cout << "MMYY";
else if (!flag1 && flag2)
cout << "YYMM";
else
cout << "NA";
} | [
"literal.string.change",
"io.output.change"
] | 859,743 | 859,744 | u231918578 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
int N;
int K;
int S;
string b;
cin >> S;
N = S / 100;
K = S - N * 100;
if (N == 0) {
if ((0 < K) && (K < 13)) {
b = "YYMM";
} else
b = "NA";
}
if (K == 0) {
if ((0 < N) && (N < 13)) {
b = "MMYY";
} else
b = "NA";
}
if ((0 < K) && (K < 13)) {
if ((0 < N) && (N < 13)) {
b = "AMBIGOUS";
} else {
b = "YYMM";
}
} else if ((0 < N) && (N < 13)) {
b = "MMYY";
} else {
b = "NA";
}
cout << b << endl;
} | #include <iostream>
using namespace std;
int main() {
int N;
int K;
int S;
string b;
cin >> S;
N = S / 100;
K = S - N * 100;
if (N == 0) {
if ((0 < K) && (K < 13)) {
b = "YYMM";
} else
b = "NA";
}
if (K == 0) {
if ((0 < N) && (N < 13)) {
b = "MMYY";
} else
b = "NA";
}
if ((0 < K) && (K < 13)) {
if ((0 < N) && (N < 13)) {
b = "AMBIGUOUS";
} else {
b = "YYMM";
}
} else if ((0 < N) && (N < 13)) {
b = "MMYY";
} else {
b = "NA";
}
cout << b << endl;
} | [
"literal.string.change",
"assignment.value.change"
] | 859,752 | 859,753 | u768204022 | cpp |
p03042 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef unsigned long ul;
typedef pair<ul, ul> P;
int main() {
int S, L, R;
string ans;
cin >> S;
R = S % 100;
L = S / 100;
if (R <= 12 && L <= 12 && L > 0 && R > 0) {
ans = "MBIGUOUS";
} else if ((R > 12 || R == 0) && L > 0 && L <= 12) {
ans = "MMYY";
} else if ((L > 12 || L == 0) && R > 0 && R <= 12) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef unsigned long ul;
typedef pair<ul, ul> P;
int main() {
int S, L, R;
string ans;
cin >> S;
R = S % 100;
L = S / 100;
if (R <= 12 && L <= 12 && L > 0 && R > 0) {
ans = "AMBIGUOUS";
} else if ((R > 12 || R == 0) && L > 0 && L <= 12) {
ans = "MMYY";
} else if ((L > 12 || L == 0) && R > 0 && R <= 12) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| [
"literal.string.change",
"assignment.value.change"
] | 859,758 | 859,759 | u283779141 | cpp |
p03042 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef unsigned long ul;
typedef pair<ul, ul> P;
int main() {
int S, L, R;
string ans;
cin >> S;
R = S % 100;
L = S / 100;
if (R <= 12 && L <= 12 && (L > 0 || R > 0)) {
ans = "MBIGUOUS";
} else if ((R > 12 || R == 0) && L > 0 && L <= 12) {
ans = "MMYY";
} else if ((L > 12 || L == 0) && R > 0 && R <= 12) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef unsigned long ul;
typedef pair<ul, ul> P;
int main() {
int S, L, R;
string ans;
cin >> S;
R = S % 100;
L = S / 100;
if (R <= 12 && L <= 12 && L > 0 && R > 0) {
ans = "AMBIGUOUS";
} else if ((R > 12 || R == 0) && L > 0 && L <= 12) {
ans = "MMYY";
} else if ((L > 12 || L == 0) && R > 0 && R <= 12) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| [
"control_flow.branch.if.condition.change",
"misc.opposites",
"literal.string.change",
"assignment.value.change"
] | 859,760 | 859,759 | u283779141 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x, y) scanf("%d%d", &x, &y)
#define Scd3(x, y, z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%llu", &x)
#define Scll2(x, y) scanf("%llu%llu", &x, &y)
#define Scll3(x, y, z) scanf("%llu%llu%llu", &x, &y, &z)
#define Scc(c) scanf("%c", &c);
#define Scs(s) scanf("%s", s);
#define Scstr(s) scanf("%s", &s);
// }}} 2
// constants {{{ 2
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// }}} 2
// systems {{{ 2
#define Rep(x, y) for (int x = 0; x < y; x++)
#define Repe(x, y, z) for (int x = z; x < y; x++)
// }}} 2
// output {{{ 2
#define YesNo(a) (a) ? printf("Yes\n") : printf("No\n");
// }}} 2
// }}} 1
int main() {
char s[5];
Scs(s);
int k = (s[0] - '0') * 10 + s[1] - '0';
int l = (s[2] - '0') * 10 + s[3] - '0';
if (k < 13 && l < 13 && k > 0 && l > 0)
printf("AMBIGUOUS\n");
else if (l < 13 && l > 0)
printf("YYMM\n");
else if (k < 13 && k > 0)
printf("MMYY\n");
else
printf("AMBIGUOUS\n");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x, y) scanf("%d%d", &x, &y)
#define Scd3(x, y, z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%llu", &x)
#define Scll2(x, y) scanf("%llu%llu", &x, &y)
#define Scll3(x, y, z) scanf("%llu%llu%llu", &x, &y, &z)
#define Scc(c) scanf("%c", &c);
#define Scs(s) scanf("%s", s);
#define Scstr(s) scanf("%s", &s);
// }}} 2
// constants {{{ 2
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
// }}} 2
// systems {{{ 2
#define Rep(x, y) for (int x = 0; x < y; x++)
#define Repe(x, y, z) for (int x = z; x < y; x++)
// }}} 2
// output {{{ 2
#define YesNo(a) (a) ? printf("Yes\n") : printf("No\n");
// }}} 2
// }}} 1
int main() {
char s[5];
Scs(s);
int k = (s[0] - '0') * 10 + s[1] - '0';
int l = (s[2] - '0') * 10 + s[3] - '0';
if (k < 13 && l < 13 && k > 0 && l > 0)
printf("AMBIGUOUS\n");
else if (l < 13 && l > 0)
printf("YYMM\n");
else if (k < 13 && k > 0)
printf("MMYY\n");
else
printf("NA\n");
return 0;
}
| [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 859,761 | 859,762 | u550398291 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S, a, b;
cin >> S;
a = S / 100;
b = S - 100 * a;
if ((a > 12 || a == 0) && (b > 12 || b == 0)) {
cout << "NA" << endl;
} else if ((a > 12 || a == 0) && 12 >= b && b > 0) {
cout << "YYMM" << endl;
} else if (12 >= a && a > 0 && (b > 12 || b == 0)) {
cout << "MMYY" << endl;
} else if (12 >= a && a > 0 && 12 >= b && b > 0) {
cout << "ANBIGUOUS" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int S, a, b;
cin >> S;
a = S / 100;
b = S - 100 * a;
if ((a > 12 || a == 0) && (b > 12 || b == 0)) {
cout << "NA" << endl;
} else if ((a > 12 || a == 0) && 12 >= b && b > 0) {
cout << "YYMM" << endl;
} else if (12 >= a && a > 0 && (b > 12 || b == 0)) {
cout << "MMYY" << endl;
} else if (12 >= a && a > 0 && 12 >= b && b > 0) {
cout << "AMBIGUOUS" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 859,765 | 859,766 | u801530021 | cpp |
p03042 | #include <algorithm>
#include <iomanip>
#include <ios>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, K;
string S;
cin >> S;
string result = "NA";
int str_first = atoi(S.substr(0, 2).c_str());
int str_second = atoi(S.substr(2, 2).c_str());
if (str_first >= 1 && str_first <= 12 && str_second >= 1 &&
str_second <= 12) {
result = "AMBIGOUS";
} else if (str_second >= 1 && str_second <= 12) {
result = "YYMM";
} else if (str_first >= 1 && str_first <= 12) {
result = "MMYY";
}
cout << result;
return 0;
} | #include <algorithm>
#include <iomanip>
#include <ios>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, K;
string S;
cin >> S;
string result = "NA";
int str_first = atoi(S.substr(0, 2).c_str());
int str_second = atoi(S.substr(2, 2).c_str());
if (str_first >= 1 && str_first <= 12 && str_second >= 1 &&
str_second <= 12) {
result = "AMBIGUOUS";
} else if (str_second >= 1 && str_second <= 12) {
result = "YYMM";
} else if (str_first >= 1 && str_first <= 12) {
result = "MMYY";
}
cout << result;
return 0;
} | [
"literal.string.change",
"assignment.value.change"
] | 859,807 | 859,808 | u758765597 | cpp |
p03042 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int S, AA, BB;
string tmp;
bool isYYMM = false;
bool isMMYY = false;
cin >> tmp;
S = stoi(tmp);
AA = S / 100;
BB = S % 100;
// judge YYMM
if ((12 >= BB) && (BB >= 1)) {
isYYMM = true;
}
// judge MMYY
if ((12 >= AA) && (AA >= 1)) {
isMMYY = true;
}
if (isYYMM && isMMYY) {
cout << "AMBIGOUS" << endl;
} else if (isYYMM && !isMMYY) {
cout << "YYMM" << endl;
} else if (!isYYMM && isMMYY) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int S, AA, BB;
string tmp;
bool isYYMM = false;
bool isMMYY = false;
cin >> tmp;
S = stoi(tmp);
AA = S / 100;
BB = S % 100;
// judge YYMM
if ((12 >= BB) && (BB >= 1)) {
isYYMM = true;
}
// judge MMYY
if ((12 >= AA) && (AA >= 1)) {
isMMYY = true;
}
if (isYYMM && isMMYY) {
cout << "AMBIGUOUS" << endl;
} else if (isYYMM && !isMMYY) {
cout << "YYMM" << endl;
} else if (!isYYMM && isMMYY) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 859,813 | 859,814 | u989110852 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string s;
cin >> s;
bool ym_able, my_able;
int date = stoi(s);
if (date % 100 >= 1 && date % 100 <= 12)
ym_able = true;
if (date / 100 >= 1 && date / 100 <= 12)
my_able = true;
if (ym_able) {
if (my_able)
cout << "AMBIGUOUS" << endl;
else
cout << "YYMM" << endl;
} else if (my_able)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main(void) {
string s;
cin >> s;
bool ym_able = false, my_able = false;
int date = stoi(s);
if (date % 100 >= 1 && date % 100 <= 12)
ym_able = true;
if (date / 100 >= 1 && date / 100 <= 12)
my_able = true;
if (ym_able) {
if (my_able)
cout << "AMBIGUOUS" << endl;
else
cout << "YYMM" << endl;
} else if (my_able)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| [
"variable_declaration.value.change"
] | 859,815 | 859,816 | u451538287 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define debug(x) cout << #x << " = " << (x) << endl;
using namespace std;
typedef long long int LL;
typedef unsigned long long int ULL;
int main() {
string str;
cin >> str;
// int right = (str[2] - '0') * 10 + (str[3] - '0');
// int left = (str[0] - '0') * 10 + (str[1] - '0');
string right = str.substr(2, 2);
string left = str.substr(0, 2);
if (left >= "01" and left <= "12" and right >= "01" and right <= "12") {
cout << "AMBIGUOUS" << endl;
return 0;
} else if (right >= "01" and right <= "12" and left >= "00" and
left <= "99") {
cout << "YYMM" << endl;
return 0;
} else if (left >= "01" and left <= "12" and right >= "00" and
right >= "99") {
cout << "MMYY" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
return 0;
}
| #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define debug(x) cout << #x << " = " << (x) << endl;
using namespace std;
typedef long long int LL;
typedef unsigned long long int ULL;
int main() {
string str;
cin >> str;
// int right = (str[2] - '0') * 10 + (str[3] - '0');
// int left = (str[0] - '0') * 10 + (str[1] - '0');
string right = str.substr(2, 2);
string left = str.substr(0, 2);
if (left >= "01" and left <= "12" and right >= "01" and right <= "12") {
cout << "AMBIGUOUS" << endl;
return 0;
} else if (right >= "01" and right <= "12" and left >= "00" and
left <= "99") {
cout << "YYMM" << endl;
return 0;
} else if (left >= "01" and left <= "12" and right >= "00" and
right <= "99") {
cout << "MMYY" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
return 0;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 859,821 | 859,822 | u614063956 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define debug(x) cout << #x << " = " << (x) << endl;
using namespace std;
typedef long long int LL;
typedef unsigned long long int ULL;
int main() {
string str;
cin >> str;
// int right = (str[2] - '0') * 10 + (str[3] - '0');
// int left = (str[0] - '0') * 10 + (str[1] - '0');
string right = str.substr(2, 2);
string left = str.substr(0, 2);
if (left >= "01" and left <= "12" and right >= "01" and right <= "12") {
cout << "AMBIGUOUS" << endl;
return 0;
} else if (right >= "01" and right <= "12" and left >= "00" and
right <= "99") {
cout << "YYMM" << endl;
return 0;
} else if (left >= "01" and left <= "12" and right >= "00" and
right >= "99") {
cout << "MMYY" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
return 0;
}
| #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define debug(x) cout << #x << " = " << (x) << endl;
using namespace std;
typedef long long int LL;
typedef unsigned long long int ULL;
int main() {
string str;
cin >> str;
// int right = (str[2] - '0') * 10 + (str[3] - '0');
// int left = (str[0] - '0') * 10 + (str[1] - '0');
string right = str.substr(2, 2);
string left = str.substr(0, 2);
if (left >= "01" and left <= "12" and right >= "01" and right <= "12") {
cout << "AMBIGUOUS" << endl;
return 0;
} else if (right >= "01" and right <= "12" and left >= "00" and
left <= "99") {
cout << "YYMM" << endl;
return 0;
} else if (left >= "01" and left <= "12" and right >= "00" and
right <= "99") {
cout << "MMYY" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"misc.opposites",
"expression.operator.compare.change"
] | 859,823 | 859,822 | u614063956 | cpp |
p03042 | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a), i##_max = (b); i < i##_max; ++i)
#define RFOR(i, a, b) for (int i = (b)-1, i##_min = (a); i >= i##_min; --i)
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define ALL(obj) (obj).begin(), (obj).end()
using namespace std;
using i64 = int64_t;
using u64 = uint64_t;
using vi = vector<int>;
using vl = vector<i64>;
using vd = vector<double>;
using pi = pair<int, int>;
using pl = pair<i64, i64>;
using pd = pair<double, double>;
constexpr int INF = 1 << 30;
constexpr int MOD = 1000000007;
template <typename T> void print(vector<T> &v) {
REP(i, v.size()) {
if (i)
cout << " ";
cout << v[i];
}
cout << endl;
}
int main() {
string s;
cin >> s;
auto i = stoi(s);
auto y = i / 100;
auto m = i % 100;
if (1 <= y && y <= 12 && 1 <= m && m <= 12) {
cout << "AMBIGUOUS";
} else if (1 <= y && y <= 12) {
cout << "YYMM";
} else if (1 <= m && y <= 12) {
cout << "MMYY";
} else {
cout << "NA";
}
cout << endl;
}
| #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a), i##_max = (b); i < i##_max; ++i)
#define RFOR(i, a, b) for (int i = (b)-1, i##_min = (a); i >= i##_min; --i)
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define ALL(obj) (obj).begin(), (obj).end()
using namespace std;
using i64 = int64_t;
using u64 = uint64_t;
using vi = vector<int>;
using vl = vector<i64>;
using vd = vector<double>;
using pi = pair<int, int>;
using pl = pair<i64, i64>;
using pd = pair<double, double>;
constexpr int INF = 1 << 30;
constexpr int MOD = 1000000007;
template <typename T> void print(vector<T> &v) {
REP(i, v.size()) {
if (i)
cout << " ";
cout << v[i];
}
cout << endl;
}
int main() {
string s;
cin >> s;
auto i = stoi(s);
auto y = i / 100;
auto m = i % 100;
if (1 <= y && y <= 12 && 1 <= m && m <= 12) {
cout << "AMBIGUOUS";
} else if (1 <= y && y <= 12) {
cout << "MMYY";
} else if (1 <= m && m <= 12) {
cout << "YYMM";
} else {
cout << "NA";
}
cout << endl;
}
| [
"literal.string.change",
"io.output.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,835 | 859,836 | u220997159 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
// Your code here!
int a;
int a1, a2;
cin >> a1;
a2 = a1 % 100;
a1 = a1 / 100;
if (a1 < 12 && a1 != 0) {
a1 = 9;
} else {
a1 = 0;
}
if (a2 < 12 && a2 != 0) {
a2 = 9;
} else {
a2 = 0;
}
if (a1 * a2 == 81) {
cout << "AMBIGUOUS";
} else if (a1 == 9 && a2 == 0) {
cout << "MMYY";
} else if (a1 == 0 && a2 == 9) {
cout << "YYMM";
} else {
cout << "NA";
}
cout << endl;
}
| #include <iostream>
#include <string>
using namespace std;
int main(void) {
// Your code here!
int a;
int a1, a2;
cin >> a1;
a2 = a1 % 100;
a1 = a1 / 100;
if (a1 <= 12 && a1 != 0) {
a1 = 9;
} else {
a1 = 0;
}
if (a2 <= 12 && a2 != 0) {
a2 = 9;
} else {
a2 = 0;
}
if (a1 * a2 == 81) {
cout << "AMBIGUOUS";
} else if (a1 == 9 && a2 == 0) {
cout << "MMYY";
} else if (a1 == 0 && a2 == 9) {
cout << "YYMM";
} else {
cout << "NA";
}
cout << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 859,846 | 859,847 | u373291210 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
// Your code here!
int a;
int a1, a2;
cin >> a1;
a2 = a1 % 100;
a1 = a1 / 100;
if (a1 < 12 && a1 != 0) {
a1 = 9;
} else {
a1 = 0;
}
if (a1 < 12 && a1 != 0) {
a2 = 9;
} else {
a2 = 0;
}
if (a1 * a2 == 81) {
cout << "AMBIGUOUS";
} else if (a1 == 9 && a2 == 0) {
cout << "MMYY";
} else if (a1 == 0 && a2 == 9) {
cout << "YYMM";
} else {
cout << "NA";
}
cout << endl;
}
| #include <iostream>
#include <string>
using namespace std;
int main(void) {
// Your code here!
int a;
int a1, a2;
cin >> a1;
a2 = a1 % 100;
a1 = a1 / 100;
if (a1 <= 12 && a1 != 0) {
a1 = 9;
} else {
a1 = 0;
}
if (a2 <= 12 && a2 != 0) {
a2 = 9;
} else {
a2 = 0;
}
if (a1 * a2 == 81) {
cout << "AMBIGUOUS";
} else if (a1 == 9 && a2 == 0) {
cout << "MMYY";
} else if (a1 == 0 && a2 == 9) {
cout << "YYMM";
} else {
cout << "NA";
}
cout << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"identifier.change"
] | 859,848 | 859,847 | u373291210 | cpp |
p03042 | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
char a, b, c, d;
cin >> a >> b >> c >> d;
int x = (a - '0') * 10 + b - '0';
int y = (c - '0') * 10 + d - '0';
if (x > 0 && x < 13) {
if (y > 0 && y < 13) {
cout << "AMBIGUIOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (y > 0 && y < 13) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | #include "bits/stdc++.h"
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
char a, b, c, d;
cin >> a >> b >> c >> d;
int x = (a - '0') * 10 + b - '0';
int y = (c - '0') * 10 + d - '0';
if (x > 0 && x < 13) {
if (y > 0 && y < 13) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (y > 0 && y < 13) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"literal.string.change",
"io.output.change"
] | 859,857 | 859,858 | u555962250 | cpp |
p03042 | //----------ACCIDENTAL COMPETITIVE PROGRAMMER---------------------
#include <bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>,
rb_tree_tag,tree_order_statistics_node_update>
*/
using namespace std;
#define LL long long
#define LD long double
#define PB push_back
#define MP make_pair
const LL MOD = (1e9) + 7;
const LD EPS = 0.0000001;
bool cm(int x) {
if (x >= 0 && x <= 11)
return true;
return false;
}
bool cy(int x) {
if (x >= 0 && x <= 99)
return true;
return false;
}
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string st;
cin >> st;
int f = 10 * (st[0] - '0') + (st[1] - '0');
int s = 10 * (st[2] - '0') + (st[3] - '0');
bool flag = cm(f);
bool flag2 = cm(s);
bool flag3 = cy(f);
bool flag4 = cy(s);
if (flag && flag4 && flag3 && flag2) {
cout << "AMBIGUOUS\n";
return 0;
}
if (flag && flag4) {
cout << "MMYY\n";
} else if (flag2 && flag3) {
cout << "YYMM\n";
} else {
cout << "NA\n";
}
return 0;
} | //----------ACCIDENTAL COMPETITIVE PROGRAMMER---------------------
#include <bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>,
rb_tree_tag,tree_order_statistics_node_update>
*/
using namespace std;
#define LL long long
#define LD long double
#define PB push_back
#define MP make_pair
const LL MOD = (1e9) + 7;
const LD EPS = 0.0000001;
bool cm(int x) {
if (x >= 1 && x <= 12)
return true;
return false;
}
bool cy(int x) {
if (x >= 0 && x <= 99)
return true;
return false;
}
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string st;
cin >> st;
int f = 10 * (st[0] - '0') + (st[1] - '0');
int s = 10 * (st[2] - '0') + (st[3] - '0');
bool flag = cm(f);
bool flag2 = cm(s);
bool flag3 = cy(f);
bool flag4 = cy(s);
if (flag && flag4 && flag3 && flag2) {
cout << "AMBIGUOUS\n";
return 0;
}
if (flag && flag4) {
cout << "MMYY\n";
} else if (flag2 && flag3) {
cout << "YYMM\n";
} else {
cout << "NA\n";
}
return 0;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 859,859 | 859,860 | u109311178 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string S;
cin >> S;
int f = (S[0] - '0') * 10 + (S[1] - '0');
int l = (S[2] - '0') * 10 + (S[3] - '0');
if ((f == 0 || f >= 13) && (1 <= l && l < 12)) {
cout << "YYMM" << endl;
} else if ((1 <= f && f < 12) && (l == 0 || l >= 13)) {
cout << "MMYY" << endl;
} else if ((f == 0 || f >= 13) && (l == 0 || l >= 13)) {
cout << "NA" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
string S;
cin >> S;
int f = (S[0] - '0') * 10 + (S[1] - '0');
int l = (S[2] - '0') * 10 + (S[3] - '0');
if ((f == 0 || f >= 13) && (1 <= l && l <= 12)) {
cout << "YYMM" << endl;
} else if ((1 <= f && f <= 12) && (l == 0 || l >= 13)) {
cout << "MMYY" << endl;
} else if ((f == 0 || f >= 13) && (l == 0 || l >= 13)) {
cout << "NA" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 859,870 | 859,871 | u341347211 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
int s;
cin >> s;
int f = s / 100, l = s %= 100;
if (0 < f && f <= 12 && 0 < l && l <= 12)
cout << "AMBIGIOUS\n";
else if (0 < f && f <= 12)
cout << "MMYY\n";
else if (0 < l && l <= 12)
cout << "YYMM\n";
else
cout << "NA\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
int s;
cin >> s;
int f = s / 100, l = s %= 100;
if (0 < f && f <= 12 && 0 < l && l <= 12)
cout << "AMBIGUOUS\n";
else if (0 < f && f <= 12)
cout << "MMYY\n";
else if (0 < l && l <= 12)
cout << "YYMM\n";
else
cout << "NA\n";
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 859,872 | 859,873 | u997023236 | cpp |
p03042 | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
int trans(std::string x) {
int ret = 0;
for (int i = 0; i < x.length(); ++i)
ret = ret * 10 + (x[i] ^ 48);
return ret;
}
std::string st;
int main() {
std::ios::sync_with_stdio(0), std::cin.tie(0), std::cout.tie(0);
std::cin >> st;
int p = 0, q = 0, a = trans(st.substr(0, 2)), b = trans(st.substr(3, 2));
if (b > 0 && b < 13)
q = 1;
if (a > 0 && a < 13)
p = 1;
if (p && q)
std::cout << "AMBIGUOUS\n";
else if (!p && !q)
std::cout << "NA\n";
else if (p)
std::cout << "MMYY\n";
else
std::cout << "YYMM\n";
return 0;
} | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
int trans(std::string x) {
int ret = 0;
for (int i = 0; i < x.length(); ++i)
ret = ret * 10 + (x[i] ^ 48);
return ret;
}
std::string st;
int main() {
std::ios::sync_with_stdio(0), std::cin.tie(0), std::cout.tie(0);
std::cin >> st;
int p = 0, q = 0, a = trans(st.substr(0, 2)), b = trans(st.substr(2, 2));
if (b > 0 && b < 13)
q = 1;
if (a > 0 && a < 13)
p = 1;
if (p && q)
std::cout << "AMBIGUOUS\n";
else if (!p && !q)
std::cout << "NA\n";
else if (p)
std::cout << "MMYY\n";
else
std::cout << "YYMM\n";
return 0;
} | [
"literal.number.change",
"call.arguments.change"
] | 859,882 | 859,883 | u240904580 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
typedef vector<int> VI;
typedef pair<int, int> pii;
const int MD = 1e9 + 7;
typedef vector<ll> VL;
void dbg() { cerr << "\n"; }
template <typename T, typename... T2> void dbg(const T &fst, const T2 &...rst) {
cerr << fst << ": ";
dbg(rst...);
}
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
string x[] = {"YYMM", "MMYY", "AMBIGUOUS", "NA"};
int p1 = stoi(s.substr(0, 2));
int p2 = stoi(s.substr(2, 2));
bool b1 = true, b2 = true;
if (p1 < 1 || p1 > 12)
b1 = false;
if (p2 < 1 || p2 > 12)
b1 = false;
if (!b1 && b2)
cout << x[0] << endl;
else if (b1 && !b2)
cout << x[1] << endl;
else if (b1 && b2)
cout << x[2] << endl;
else
cout << x[3] << endl;
;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
typedef vector<int> VI;
typedef pair<int, int> pii;
const int MD = 1e9 + 7;
typedef vector<ll> VL;
void dbg() { cerr << "\n"; }
template <typename T, typename... T2> void dbg(const T &fst, const T2 &...rst) {
cerr << fst << ": ";
dbg(rst...);
}
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
string x[] = {"YYMM", "MMYY", "AMBIGUOUS", "NA"};
int p1 = stoi(s.substr(0, 2));
int p2 = stoi(s.substr(2, 2));
bool b1 = true, b2 = true;
if (p1 < 1 || p1 > 12)
b1 = false;
if (p2 < 1 || p2 > 12)
b2 = false;
if (!b1 && b2)
cout << x[0] << endl;
else if (b1 && !b2)
cout << x[1] << endl;
else if (b1 && b2)
cout << x[2] << endl;
else
cout << x[3] << endl;
;
return 0;
}
| [
"assignment.variable.change",
"identifier.change"
] | 859,884 | 859,885 | u714564133 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
typedef vector<int> VI;
typedef pair<int, int> pii;
const int MD = 1e9 + 7;
typedef vector<ll> VL;
void dbg() { cerr << "\n"; }
template <typename T, typename... T2> void dbg(const T &fst, const T2 &...rst) {
cerr << fst << ": ";
dbg(rst...);
}
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
string x[] = {"YYMM", "MMYY", "AMBIGUOUS", "NA"};
int p1 = stoi(s.substr(0, 2));
int p2 = stoi(s.substr(2, 2));
bool b1 = true, b2 = true;
if (p1 < 1 || p1 > 12)
b1 = false;
if (p2 < 1 || p2 > 12)
b1 = false;
if (!b1 && p2)
cout << x[0] << endl;
else if (b1 && !p2)
cout << x[1] << endl;
else if (b1 && b2)
cout << x[2] << endl;
else
cout << x[3] << endl;
;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
typedef vector<int> VI;
typedef pair<int, int> pii;
const int MD = 1e9 + 7;
typedef vector<ll> VL;
void dbg() { cerr << "\n"; }
template <typename T, typename... T2> void dbg(const T &fst, const T2 &...rst) {
cerr << fst << ": ";
dbg(rst...);
}
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
string x[] = {"YYMM", "MMYY", "AMBIGUOUS", "NA"};
int p1 = stoi(s.substr(0, 2));
int p2 = stoi(s.substr(2, 2));
bool b1 = true, b2 = true;
if (p1 < 1 || p1 > 12)
b1 = false;
if (p2 < 1 || p2 > 12)
b2 = false;
if (!b1 && b2)
cout << x[0] << endl;
else if (b1 && !b2)
cout << x[1] << endl;
else if (b1 && b2)
cout << x[2] << endl;
else
cout << x[3] << endl;
;
return 0;
}
| [
"assignment.variable.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,886 | 859,885 | u714564133 | cpp |
p03042 | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
int main() {
int N;
cin >> N;
int first = N / 100, second = N % 100;
string ans;
if (1 <= first && first <= 12) {
if (1 <= second && second <= 12)
ans = "AMBIGIOUS";
else
ans = "MMYY";
}
else {
if (1 <= second && second <= 12)
ans = "YYMM";
else
ans = "NA";
}
cout << ans << endl;
} | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
int main() {
int N;
cin >> N;
int first = N / 100, second = N % 100;
string ans;
if (1 <= first && first <= 12) {
if (1 <= second && second <= 12)
ans = "AMBIGUOUS";
else
ans = "MMYY";
}
else {
if (1 <= second && second <= 12)
ans = "YYMM";
else
ans = "NA";
}
cout << ans << endl;
} | [
"misc.typo",
"literal.string.change",
"assignment.value.change"
] | 859,887 | 859,888 | u951952491 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <regex>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
int main(int argc, char const *argv[]) {
ll s;
cin >> s;
if (s / 100 == 00 || s / 100 >= 13) {
if (s % 100 == 00 || s % 100 >= 13) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (s % 100 == 0 || s % 100 >= 13) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGOUS" << endl;
}
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <regex>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
int main(int argc, char const *argv[]) {
ll s;
cin >> s;
if (s / 100 == 00 || s / 100 >= 13) {
if (s % 100 == 00 || s % 100 >= 13) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (s % 100 == 0 || s % 100 >= 13) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 859,891 | 859,892 | u507128581 | cpp |
p03042 | /**
* @Author: WeakestRookie
* @Email: 1311053296@qq.com
* @DateTime: 2019-05-19 20:06:44
* @Description: Description
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(x, y, z) for (int x = y; x < z; ++x)
#define dwn(x, y, z) for (int x = y; x >= z; --x)
#define mst(a, b) memset(a, b, sizeof(a));
#define clr(a) mst(a, 0);
#define lbit(x) (x & (-x))
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const double PI = 3.1415926535898;
const double E = 2.718281828459;
const int INF = 0x7fffffff;
const int MOD = 1e9 + 7;
const int MAXN = 1e5 + 10;
string str;
int main(int argc, char const *argv[]) {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> str;
int x = (str[0] - '0') * 10 + str[1] - '0';
int y = (str[2] - '0') * 10 + str[3] - '0';
if (x > 0 && x<13 & y> 0 && x < 13)
cout << "AMBIGUOUS" << endl;
else if (x > 0 && x < 13)
cout << "MMYY" << endl;
else if (y > 0 && y < 13)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
// system("pause");
return 0;
} | /**
* @Author: WeakestRookie
* @Email: 1311053296@qq.com
* @DateTime: 2019-05-19 20:06:44
* @Description: Description
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(x, y, z) for (int x = y; x < z; ++x)
#define dwn(x, y, z) for (int x = y; x >= z; --x)
#define mst(a, b) memset(a, b, sizeof(a));
#define clr(a) mst(a, 0);
#define lbit(x) (x & (-x))
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const double PI = 3.1415926535898;
const double E = 2.718281828459;
const int INF = 0x7fffffff;
const int MOD = 1e9 + 7;
const int MAXN = 1e5 + 10;
string str;
int main(int argc, char const *argv[]) {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> str;
int x = (str[0] - '0') * 10 + str[1] - '0';
int y = (str[2] - '0') * 10 + str[3] - '0';
if (x > 0 && x < 13 && y > 0 && y < 13)
cout << "AMBIGUOUS" << endl;
else if (x > 0 && x < 13)
cout << "MMYY" << endl;
else if (y > 0 && y < 13)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
// system("pause");
return 0;
} | [
"control_flow.branch.if.condition.change",
"identifier.change"
] | 859,893 | 859,894 | u772258310 | cpp |
p03042 | //#include <bits/stdc++.h>
//#include <stdio.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define INF 1000000000 // 2000000000
#define LINF 1000000000000000000 // 9000000000000000000
#define PI 3.14159265358979
#define MAXI 7500000
using namespace std;
typedef long long int ll;
typedef pair<long long int, long long int> P;
int dy[5] = {0, 0, 1, -1, 0};
int dx[5] = {1, -1, 0, 0, 0};
int main(void) {
string s;
int a, b;
cin >> s;
a = (s[0] - '0') * 10 + (s[1] - '0');
b = (s[2] - '0') * 10 + (s[3] - '0');
if (a > 12) {
if (b > 0) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} else if (a > 0) {
if (b > 0 && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (b > 0 && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
;
}
}
return 0;
} | //#include <bits/stdc++.h>
//#include <stdio.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define INF 1000000000 // 2000000000
#define LINF 1000000000000000000 // 9000000000000000000
#define PI 3.14159265358979
#define MAXI 7500000
using namespace std;
typedef long long int ll;
typedef pair<long long int, long long int> P;
int dy[5] = {0, 0, 1, -1, 0};
int dx[5] = {1, -1, 0, 0, 0};
int main(void) {
string s;
int a, b;
cin >> s;
a = (s[0] - '0') * 10 + (s[1] - '0');
b = (s[2] - '0') * 10 + (s[3] - '0');
if (a > 12) {
if (b > 0 && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} else if (a > 0) {
if (b > 0 && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (b > 0 && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
;
}
}
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 859,899 | 859,900 | u057611820 | cpp |
p03042 | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
#define MOD (long long)1000000007
#define INF (long long)998244353
using namespace std;
int main(void) {
string s;
cin >> s;
int a, b;
a = (s[0] - '0') * 10 + s[1] - '0';
b = (s[2] - '0') * 10 + s[3] - '0';
if (0 < a && a <= 12 && b < 0 && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else if (0 < a && a <= 12) {
cout << "MMYY" << endl;
} else if (0 < b && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
#define MOD (long long)1000000007
#define INF (long long)998244353
using namespace std;
int main(void) {
string s;
cin >> s;
int a, b;
a = (s[0] - '0') * 10 + s[1] - '0';
b = (s[2] - '0') * 10 + s[3] - '0';
if (0 < a && a <= 12 && 0 < b && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else if (0 < a && a <= 12) {
cout << "MMYY" << endl;
} else if (0 < b && b <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
| [
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 859,901 | 859,902 | u122365993 | cpp |
p03042 | #include <algorithm>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define eps LDBL_EPSILON
#define moder 1000000007
#define int long long
#define ll long long
#define double long double
#define INF LLONG_MAX / 10000
#define P pair<int, int>
#define prique priority_queue
using namespace std;
signed main() {
string s;
cin >> s;
int a = stoi(s.substr(0, 2)), b = stoi(s.substr(2, 2));
if ((a > 12 || a == 0) && (b > 12 || b == 0))
puts("NA");
else if ((a <= 12 && a != 0) && (b <= 12 && b != 0))
puts("AMBIGOUS");
else if ((a > 12 || a == 0) && (b <= 12 && b != 0))
puts("YYMM");
else
puts("MMYY");
return 0;
} | #include <algorithm>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
#define eps LDBL_EPSILON
#define moder 1000000007
#define int long long
#define ll long long
#define double long double
#define INF LLONG_MAX / 10000
#define P pair<int, int>
#define prique priority_queue
using namespace std;
signed main() {
string s;
cin >> s;
int a = stoi(s.substr(0, 2)), b = stoi(s.substr(2, 2));
if ((a > 12 || a == 0) && (b > 12 || b == 0))
puts("NA");
else if ((a <= 12 && a != 0) && (b <= 12 && b != 0))
puts("AMBIGUOUS");
else if ((a > 12 || a == 0) && (b <= 12 && b != 0))
puts("YYMM");
else
puts("MMYY");
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 859,909 | 859,910 | u379822620 | cpp |
p03042 | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repf(i, m, n) for (int(i) = m; (i) < n; (i)++)
#define all(v) (v).begin(), (v).end()
#define ll long long
#define vec(name, num) vector<ll> name((num), 0);
#define op(i) cout << (i) << endl;
#define ip(i) cin >> (i);
#define opN cout << "No" << endl;
#define opY cout << "Yes" << endl;
#define opP cout << "Possible" << endl;
#define opI cout << "Impossible" << endl;
#define mat(name, fnum, snum) \
; \
vector<vector<ll>> name((fnum), vector<ll>((snum), 0));
#define matC(name, fnum, snum) \
; \
vector<vector<char>> name((fnum), vector<char>((snum), 0));
#define debugP \
int debug_point; \
cin >> debug_point;
#define FI first
#define SE second
const ll MOD = 1e9 + 7;
template <typename T> void putv(vector<T> &V) {
// cout << "The elements in the vector are: " << endl;
for (auto x : V)
cout << x << " ";
cout << endl;
}
ll pow_mod(ll fi, ll se, ll mod) {
if (se == 0) {
return 1;
}
if (se % 2) {
return pow_mod(fi, se - 1, mod) * fi % mod;
}
ll t = pow_mod(fi, se / 2, mod);
return t * t % mod;
}
template <class T> vector<T> getv(ll n) {
vector<T> Vector_temp;
rep(i, n) {
T input;
cin >> input;
Vector_temp.emplace_back(input);
}
return Vector_temp;
}
ll gcd(ll c, ll b) {
while (1) {
if (c % b != 0) {
ll tmp = b;
b = c % b;
c = tmp;
} else {
return b;
}
}
}
vector<pair<int, int>> Dir = {{-1, 0}, {1, 0}, {0, 1}, {0, -1}};
/* <3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3*/
int main() {
string s;
cin >> s;
if ((s[0] - ('0')) * 10 + (s[1] - '0') > 12 ||
(s[0] - ('0')) * 10 + (s[1] - '0') == 0) {
if ((s[2] - ('0')) * 10 + (s[3] - '0') > 12 ||
(s[2] - ('0')) * 10 + (s[3] - '0') == 0)
op("NA") else op("YYMM");
} else if ((s[2] - ('0')) * 10 + (s[3] - '0') > 12 ||
(s[2] - ('0')) * 10 + (s[3] - '0') == 0) {
op("NA");
} else
op("AMBIGUOUS") return 0;
} | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repf(i, m, n) for (int(i) = m; (i) < n; (i)++)
#define all(v) (v).begin(), (v).end()
#define ll long long
#define vec(name, num) vector<ll> name((num), 0);
#define op(i) cout << (i) << endl;
#define ip(i) cin >> (i);
#define opN cout << "No" << endl;
#define opY cout << "Yes" << endl;
#define opP cout << "Possible" << endl;
#define opI cout << "Impossible" << endl;
#define mat(name, fnum, snum) \
; \
vector<vector<ll>> name((fnum), vector<ll>((snum), 0));
#define matC(name, fnum, snum) \
; \
vector<vector<char>> name((fnum), vector<char>((snum), 0));
#define debugP \
int debug_point; \
cin >> debug_point;
#define FI first
#define SE second
const ll MOD = 1e9 + 7;
template <typename T> void putv(vector<T> &V) {
// cout << "The elements in the vector are: " << endl;
for (auto x : V)
cout << x << " ";
cout << endl;
}
ll pow_mod(ll fi, ll se, ll mod) {
if (se == 0) {
return 1;
}
if (se % 2) {
return pow_mod(fi, se - 1, mod) * fi % mod;
}
ll t = pow_mod(fi, se / 2, mod);
return t * t % mod;
}
template <class T> vector<T> getv(ll n) {
vector<T> Vector_temp;
rep(i, n) {
T input;
cin >> input;
Vector_temp.emplace_back(input);
}
return Vector_temp;
}
ll gcd(ll c, ll b) {
while (1) {
if (c % b != 0) {
ll tmp = b;
b = c % b;
c = tmp;
} else {
return b;
}
}
}
vector<pair<int, int>> Dir = {{-1, 0}, {1, 0}, {0, 1}, {0, -1}};
/* <3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3*/
int main() {
string s;
cin >> s;
if ((s[0] - ('0')) * 10 + (s[1] - '0') > 12 ||
(s[0] - ('0')) * 10 + (s[1] - '0') == 0) {
if ((s[2] - ('0')) * 10 + (s[3] - '0') > 12 ||
(s[2] - ('0')) * 10 + (s[3] - '0') == 0)
op("NA") else op("YYMM");
} else if ((s[2] - ('0')) * 10 + (s[3] - '0') > 12 ||
(s[2] - ('0')) * 10 + (s[3] - '0') == 0) {
op("MMYY");
} else
op("AMBIGUOUS") return 0;
} | [
"literal.string.change",
"call.arguments.change"
] | 859,917 | 859,918 | u190234543 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int a = stoi(s.substr(0, 2));
int b = stoi(s.substr(2, 2));
bool c = (1 <= a && a <= 12);
bool d = (1 <= b && b <= 12);
cout << (!c && d ? "YYMM"
: c && !d ? "MMYY"
: !c && !d ? "NA"
: "AMBIGUOS")
<< endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int a = stoi(s.substr(0, 2));
int b = stoi(s.substr(2, 2));
bool c = (1 <= a && a <= 12);
bool d = (1 <= b && b <= 12);
cout << (!c && d ? "YYMM"
: c && !d ? "MMYY"
: !c && !d ? "NA"
: "AMBIGUOUS")
<< endl;
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 859,925 | 859,926 | u338550320 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
// __builtin_popcount
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
bool MMYY = false, YYMM = true;
int k;
cin >> k;
if (k / 100 <= 12 && k / 100 >= 1)
MMYY = true;
if (k % 100 <= 12 && k % 100 >= 1)
YYMM = true;
if (MMYY && YYMM)
cout << "AMBIGUOUS";
else if (MMYY)
cout << "MMYY";
else if (YYMM)
cout << "YYMM";
else
cout << "NA";
} | #include <bits/stdc++.h>
using namespace std;
// __builtin_popcount
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
bool MMYY = false, YYMM = false;
int k;
cin >> k;
if (k / 100 <= 12 && k / 100 >= 1)
MMYY = true;
if (k % 100 <= 12 && k % 100 >= 1)
YYMM = true;
if (MMYY && YYMM)
cout << "AMBIGUOUS";
else if (MMYY)
cout << "MMYY";
else if (YYMM)
cout << "YYMM";
else
cout << "NA";
} | [
"misc.opposites",
"variable_declaration.value.change"
] | 859,929 | 859,930 | u170407818 | cpp |
p03042 | /**
* @Author: G_bg
* @DateTime: 2019-05-19 20:06:26
* @Description:
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const double PI = 3.1415926535898;
const double E = 2.718281828459;
const int INF = 0x7fffffff;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
int main(int argc, char const *argv[]) {
ios::sync_with_stdio(0);
cin.tie(0);
string str;
cin >> str;
int x = 0, y = 0;
x = (str[0] - '0') * 10 + (str[1] - '0');
y = (str[2] - '0') * 10 + (str[3] - '0');
if ((x > 0 && x < 13) && (x > 0 && x < 13))
cout << "AMBIGUOUS" << endl;
else if (x > 0 && x < 13)
cout << "MMYY" << endl;
else if (y > 0 && y < 13)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
// system("pause");
return 0;
} | /**
* @Author: G_bg
* @DateTime: 2019-05-19 20:06:26
* @Description:
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const double PI = 3.1415926535898;
const double E = 2.718281828459;
const int INF = 0x7fffffff;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
int main(int argc, char const *argv[]) {
ios::sync_with_stdio(0);
cin.tie(0);
string str;
cin >> str;
int x = 0, y = 0;
x = (str[0] - '0') * 10 + (str[1] - '0');
y = (str[2] - '0') * 10 + (str[3] - '0');
if ((x > 0 && x < 13) && (y > 0 && y < 13))
cout << "AMBIGUOUS" << endl;
else if (x > 0 && x < 13)
cout << "MMYY" << endl;
else if (y > 0 && y < 13)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
// system("pause");
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,939 | 859,940 | u838609976 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main() {
int s;
cin >> s;
int a = 0, b = 0;
a += s % 10;
s /= 10;
a += 10 * (s % 10);
s /= 10;
b += s % 10;
s /= 10;
b += 10 * (s % 10);
s /= 10;
if (1 <= a && a <= 12) {
if (1 <= b && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (1 <= a && a <= 12) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main() {
int s;
cin >> s;
int a = 0, b = 0;
a += s % 10;
s /= 10;
a += 10 * (s % 10);
s /= 10;
b += s % 10;
s /= 10;
b += 10 * (s % 10);
s /= 10;
if (1 <= a && a <= 12) {
if (1 <= b && b <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (1 <= b && b <= 12) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 859,947 | 859,948 | u905270643 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.