Datasets:

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
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; //#define int ll #define double ld #define loop(i, n) for (int i = 0; i < (int)n; ++i) #define loop1(i, n) for (int i = 1; i <= (int)n; ++i) #define F first #define S second #define pb push_back #define pi pair<int, int> #define all(x) begin(x), end(x) #define ti tuple<int, int, int> #define Point Vect #define mkt make_tuple #define no \ { \ cout << -1; \ return; \ } void solve() { char a, b, c, d; cin >> a >> b >> c >> d; int x = (a - '0') * 10 + b - '0', y = (c - '0') * 10 + d - '0'; bool f1 = x > 0 && x<12, f2 = y> 0 && y < 12; if (f1 && f2) cout << "AMBIGIOUS"; else if (f1) cout << "MMYY"; else if (f2) cout << "YYMM"; else cout << "NA"; } signed main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // int t; cin >> t; loop(i, t) solve(); return 0; }
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef long double ld; //#define int ll #define double ld #define loop(i, n) for (int i = 0; i < (int)n; ++i) #define loop1(i, n) for (int i = 1; i <= (int)n; ++i) #define F first #define S second #define pb push_back #define pi pair<int, int> #define all(x) begin(x), end(x) #define ti tuple<int, int, int> #define Point Vect #define mkt make_tuple #define no \ { \ cout << -1; \ return; \ } void solve() { char a, b, c, d; cin >> a >> b >> c >> d; int x = (a - '0') * 10 + b - '0', y = (c - '0') * 10 + d - '0'; bool f1 = x > 0 && x <= 12, f2 = y > 0 && y <= 12; if (f1 && f2) cout << "AMBIGUOUS"; else if (f1) cout << "MMYY"; else if (f2) cout << "YYMM"; else cout << "NA"; } signed main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // int t; cin >> t; loop(i, t) solve(); return 0; }
[ "expression.operator.compare.change", "expression.operation.binary.change", "misc.typo", "literal.string.change", "io.output.change" ]
857,274
857,273
u727064118
cpp
p03042
#include <algorithm> #include <iostream> #include <math.h> #include <string> using namespace std; void b_yymm_or_mmyy(void) { string s; cin >> s; int upper, lower; string sub_s; sub_s = s.substr(0, 2); upper = stoi(sub_s); sub_s = s.substr(2, 2); lower = stoi(sub_s); string upper_type, lower_type; if (upper > 12) { upper_type = "YY"; } else if (upper == 0) { upper_type = "YY"; } else { upper_type = "MM"; } if (lower > 12) { lower_type = "YY"; } else if (lower == 0) { lower_type = "YY"; } else { lower_type = "MM"; } if (upper_type == "YY" && lower_type == "MM") cout << "YYMM" << endl; else if (upper_type == "MM" && lower_type == "YY") cout << "MMYY" << endl; else if (upper_type == "YY" && lower_type == "YY") cout << "NA" << endl; else cout << "AMBIGUOUT" << endl; } int main() { b_yymm_or_mmyy(); return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <string> using namespace std; void b_yymm_or_mmyy(void) { string s; cin >> s; int upper, lower; string sub_s; sub_s = s.substr(0, 2); upper = stoi(sub_s); sub_s = s.substr(2, 2); lower = stoi(sub_s); string upper_type, lower_type; if (upper > 12) { upper_type = "YY"; } else if (upper == 0) { upper_type = "YY"; } else { upper_type = "MM"; } if (lower > 12) { lower_type = "YY"; } else if (lower == 0) { lower_type = "YY"; } else { lower_type = "MM"; } if (upper_type == "YY" && lower_type == "MM") cout << "YYMM" << endl; else if (upper_type == "MM" && lower_type == "YY") cout << "MMYY" << endl; else if (upper_type == "YY" && lower_type == "YY") cout << "NA" << endl; else cout << "AMBIGUOUS" << endl; } int main() { b_yymm_or_mmyy(); return 0; }
[ "literal.string.change", "io.output.change" ]
857,275
857,276
u635435492
cpp
p03042
#include <iostream> #include <stdlib.h> #include <string.h> #include <string> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { char *S = (char *)calloc(5, sizeof(char)); cin >> S; string ans; char *first = (char *)calloc(3, sizeof(char)); first[0] = S[0]; first[1] = S[1]; char *second = (char *)calloc(3, sizeof(char)); second[0] = S[2]; second[1] = S[3]; int f = atoi(first); int s = atoi(second); if (1 < f && f < 13) { if (1 < s && s < 13) ans = "AMBIGUOUS"; else ans = "MMYY"; } else { if (1 < s && s < 13) ans = "YYMM"; else ans = "NA"; } cout << ans << endl; }
#include <iostream> #include <stdlib.h> #include <string.h> #include <string> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { char *S = (char *)calloc(5, sizeof(char)); cin >> S; string ans; char *first = (char *)calloc(3, sizeof(char)); first[0] = S[0]; first[1] = S[1]; char *second = (char *)calloc(3, sizeof(char)); second[0] = S[2]; second[1] = S[3]; int f = atoi(first); int s = atoi(second); if (0 < f && f < 13) { if (0 < s && s < 13) ans = "AMBIGUOUS"; else ans = "MMYY"; } else { if (0 < s && s < 13) ans = "YYMM"; else ans = "NA"; } cout << ans << endl; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
857,283
857,284
u944033453
cpp
p03042
#include <bits/stdc++.h> using namespace std; typedef long long ll; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (ll i = 0; i < ll(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (ll i = a; i <= ll(b); i++) #define FORD(i, a, b) for (ll i = a; i >= ll(b); i--) // xにはvectorなどのコンテナ #define ALL(x) x.begin(), x.end() // sortなどの引数を省略したい #define SIZE(x) ll(x.size()) // sizeをsize_tからllに直しておく //定数 #define INF 1000000000000 // 10^12:極めて大きい値,∞ #define MOD 1000000007 // 10^9+7:合同式の法 #define MAXR 100000 // 10^5:配列の最大のrange(素数列挙などで使用) //略記 #define PB emplace_back // vectorヘの挿入 #define MP make_pair // pairのコンストラクタ #define F first // pairの一つ目の要素 #define S second // pairの二つ目の要素 #define Umap unordered_map #define Uset unordered_set int main() { string s; cin >> s; REP(i, 4) s[i] -= '0'; ll a = s[0] * 10 + s[1], b = s[2] * 10 + s[3]; bool ok1 = false, ok2 = false; if (1 <= a && a <= 12) ok1 = true; if (1 <= b && b <= 12) ok2 = true; if (ok1 && ok2) cout << "AMBIGUOUS"; else if (ok1 && !ok2) cout << "YYMM"; else if (!ok1 && ok2) cout << "MMYY"; else cout << "NA"; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (ll i = 0; i < ll(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for (ll i = a; i <= ll(b); i++) #define FORD(i, a, b) for (ll i = a; i >= ll(b); i--) // xにはvectorなどのコンテナ #define ALL(x) x.begin(), x.end() // sortなどの引数を省略したい #define SIZE(x) ll(x.size()) // sizeをsize_tからllに直しておく //定数 #define INF 1000000000000 // 10^12:極めて大きい値,∞ #define MOD 1000000007 // 10^9+7:合同式の法 #define MAXR 100000 // 10^5:配列の最大のrange(素数列挙などで使用) //略記 #define PB emplace_back // vectorヘの挿入 #define MP make_pair // pairのコンストラクタ #define F first // pairの一つ目の要素 #define S second // pairの二つ目の要素 #define Umap unordered_map #define Uset unordered_set int main() { string s; cin >> s; REP(i, 4) s[i] -= '0'; ll a = s[0] * 10 + s[1], b = s[2] * 10 + s[3]; bool ok1 = false, ok2 = false; if (1 <= a && a <= 12) ok1 = true; if (1 <= b && b <= 12) ok2 = true; if (ok1 && ok2) cout << "AMBIGUOUS"; else if (ok1 && !ok2) cout << "MMYY"; else if (!ok1 && ok2) cout << "YYMM"; else cout << "NA"; return 0; }
[ "literal.string.change", "io.output.change" ]
857,287
857,288
u899592602
cpp
p03042
#include <algorithm> #include <fstream> #include <iostream> #include <string> using namespace std; ifstream in("bleach.in"); ofstream out("bleach.out"); int const NMAX = 1e6; int v[1 + NMAX]; int main() { string inp; cin >> inp; if ((inp[0] - '0') * 10 + (inp[1] - '0') <= 12 && (inp[2] - '0') * 10 + (inp[3] - '0') <= 12 && (inp[0] - '0') * 10 + (inp[1] - '0') != 0 && (inp[2] - '0') * 10 + (inp[3] - '0') != 0) { cout << "AMBIGUOS"; } else if ((inp[0] - '0') * 10 + (inp[1] - '0') <= 12 && (inp[0] - '0') * 10 + (inp[1] - '0') != 0) { cout << "MMYY"; } else if ((inp[2] - '0') * 10 + (inp[3] - '0') <= 12 && (inp[2] - '0') * 10 + (inp[3] - '0') != 0) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
#include <algorithm> #include <fstream> #include <iostream> #include <string> using namespace std; ifstream in("bleach.in"); ofstream out("bleach.out"); int const NMAX = 1e6; int v[1 + NMAX]; int main() { string inp; cin >> inp; if ((inp[0] - '0') * 10 + (inp[1] - '0') <= 12 && (inp[2] - '0') * 10 + (inp[3] - '0') <= 12 && (inp[0] - '0') * 10 + (inp[1] - '0') != 0 && (inp[2] - '0') * 10 + (inp[3] - '0') != 0) { cout << "AMBIGUOUS"; } else if ((inp[0] - '0') * 10 + (inp[1] - '0') <= 12 && (inp[0] - '0') * 10 + (inp[1] - '0') != 0) { cout << "MMYY"; } else if ((inp[2] - '0') * 10 + (inp[3] - '0') <= 12 && (inp[2] - '0') * 10 + (inp[3] - '0') != 0) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,292
857,293
u529371621
cpp
p03042
#include <iostream> #include <numeric> #include <string> #include <vector> #define ll long long #define pi (acos(-1)) int main() { int s; std::cin >> s; int a, b; a = s / 100; b = s % 100; if (1 < a && a <= 12) { if (1 < b && b <= 12) { std::cout << "AMBIGUOUS" << std::endl; } else { std::cout << "MMYY" << std::endl; } } else { if (1 < b && b <= 12) { std::cout << "YYMM" << std::endl; } else { std::cout << "NA" << std::endl; } } return 0; }
#include <iostream> #include <numeric> #include <string> #include <vector> #define ll long long #define pi (acos(-1)) // https://atcoder.jp/contests/abc172/tasks/abc172_d int main() { int s; std::cin >> s; int a, b; a = s / 100; b = s % 100; if (1 <= a && a <= 12) { if (1 <= b && b <= 12) { std::cout << "AMBIGUOUS" << std::endl; } else { std::cout << "MMYY" << std::endl; } } else { if (1 <= b && b <= 12) { std::cout << "YYMM" << std::endl; } else { std::cout << "NA" << std::endl; } } return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
857,294
857,295
u430479790
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b; cin >> S; a = S / 100; b = S % 100; if (a != 0 && a <= 12) { if (b != 0 && b <= 12) cout << "AMBIGOUS" << endl; else cout << "MMYY" << endl; } else { if (b != 0 && b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b; cin >> S; a = S / 100; b = S % 100; 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" ]
857,321
857,322
u113287534
cpp
p03042
#include <bits/stdc++.h> #define F first #define S second using namespace std; using ll = long long; typedef pair<int, int> P; ll Mod = 1000000007; int main() { string S; cin >> S; string S1 = S.substr(0, 2); string S2 = S.substr(2, 2); int s1 = atoi(S1.c_str()); int s2 = atoi(S2.c_str()); if (1 <= s1 && s1 <= 12 && 1 <= s2 && s2 <= 12) { cout << "AMBIGUOS" << endl; } else if ((1 > s1 || s1 > 12) && (1 > s2 || s2 > 12)) { cout << "NA" << endl; } else if (1 <= s1 && s1 <= 12) { cout << "MMYY" << endl; } else { cout << "YYMM" << endl; } return 0; }
#include <bits/stdc++.h> #define F first #define S second using namespace std; using ll = long long; typedef pair<int, int> P; ll Mod = 1000000007; int main() { string S; cin >> S; string S1 = S.substr(0, 2); string S2 = S.substr(2, 2); int s1 = atoi(S1.c_str()); int s2 = atoi(S2.c_str()); if (1 <= s1 && s1 <= 12 && 1 <= s2 && s2 <= 12) { cout << "AMBIGUOUS" << endl; } else if ((1 > s1 || s1 > 12) && (1 > s2 || s2 > 12)) { cout << "NA" << endl; } else if (1 <= s1 && s1 <= 12) { cout << "MMYY" << endl; } else { cout << "YYMM" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,329
857,330
u083494782
cpp
p03042
#include <algorithm> #include <bitset> #include <complex> #include <cstdio> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <unordered_map> #include <unordered_set> #endif using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, a, b) for (int i = a; i < (int)b; ++i) typedef long long ll; const int Inf = 1e9; const double EPS = 1e-9; int gcd(int a, int b) { if (b == 0) { return a; } else { return gcd(b, a % b); } } int lcm(int a, int b) { return a * b / gcd(a, b); } int bitCount(long bits) { bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555); bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333); bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f); bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff); return (bits & 0x0000ffff) + (bits >> 16 & 0x0000ffff); } int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; int left, right; right = n % 100; left = n / 100; if ((left > 12 && right > 12) || (left == 0 && right == 0) || (left > 12 && right == 0) || (right > 12 && left == 0)) { cout << "NA" << '\n'; } else if (left > 0 && left < 13 && right > 0 && right < 13) { cout << "AMBIGUOUS" << '\n'; } else if (left > 0 && left < 13 && right < 1 && right > 12) { cout << "MMYY" << '\n'; } else { cout << "YYMM" << '\n'; } return 0; }
#include <algorithm> #include <bitset> #include <complex> #include <cstdio> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <new> #include <numeric> #include <ostream> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <typeinfo> #include <utility> #include <valarray> #include <vector> #if __cplusplus >= 201103L #include <array> #include <atomic> #include <chrono> #include <condition_variable> #include <forward_list> #include <future> #include <initializer_list> #include <mutex> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <unordered_map> #include <unordered_set> #endif using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, a, b) for (int i = a; i < (int)b; ++i) typedef long long ll; const int Inf = 1e9; const double EPS = 1e-9; int gcd(int a, int b) { if (b == 0) { return a; } else { return gcd(b, a % b); } } int lcm(int a, int b) { return a * b / gcd(a, b); } int bitCount(long bits) { bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555); bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333); bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f); bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff); return (bits & 0x0000ffff) + (bits >> 16 & 0x0000ffff); } int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; int left, right; right = n % 100; left = n / 100; if ((left > 12 && right > 12) || (left == 0 && right == 0) || (left > 12 && right == 0) || (right > 12 && left == 0)) { cout << "NA" << '\n'; } else if (left > 0 && left < 13 && right > 0 && right < 13) { cout << "AMBIGUOUS" << '\n'; } else if (left > 0 && left < 13 && (right < 1 || right > 12)) { cout << "MMYY" << '\n'; } else { cout << "YYMM" << '\n'; } return 0; }
[ "control_flow.branch.if.condition.change", "misc.opposites" ]
857,331
857,332
u940569542
cpp
p03042
/* URL_HERE */ /* */ #ifdef _WIN32 #pragma warning(disable : 4996) #endif #include <algorithm> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> using namespace std; FILE *_fin = stdin; FILE *_fout = stdout; #define PI 3.141592653589793238462643383279502884197169399375105820974 #define ten5p1 100001 #define ten6p1 1000001 #define ten8p1 100000001 #define ten9p1 1000000001 #define uint unsigned int #define ll long long #define ull unsigned long long #define rep(var, n) for (int var = 0; var < n; ++var) #define repi(n) rep(i, n) #define repj(n) rep(j, n) #define repi1(n) for (int i = 1; i < n; ++i) #define repj1(n) for (int j = 1; j < n; ++j) int _min(int a, int b) { return a <= b ? a : b; } int _min(ll a, ll b) { return a <= b ? a : b; } int _max(int a, int b) { return a >= b ? a : b; } int _max(ll a, ll b) { return a >= b ? a : b; } void zero(int *data, int n) { memset(data, 0, sizeof(int) * n); } void zero(ll *data, int n) { memset(data, 0, sizeof(ll) * n); } void zero(char *data, int n) { memset(data, 0, sizeof(char) * n); } char readc() { char var; fscanf(_fin, "%c", &var); return var; } int readi() { int var; fscanf(_fin, "%d", &var); return var; } ll readll() { ll var; fscanf(_fin, "%lld", &var); return var; } void repread(int *data, int n) { repi(n) data[i] = readi(); } void repread(ll *data, int n) { repi(n) data[i] = readll(); } int reads(char *str, int maxsize) { for (;;) { if (fgets(str, maxsize, _fin) == NULL) break; if (str[0] != '\n' && str[0] != '\r') break; } int slen = strlen(str); if (slen == 0) return 0; if (str[slen - 1] == '\n' || str[slen - 1] == '\r') str[--slen] = 0; return slen; } #define writec(var) fprintf(_fout, "%c", var) #define writecsp(var) fprintf(_fout, "%c ", var) #define writecln(var) fprintf(_fout, "%c\n", var) #define writei(var) fprintf(_fout, "%d", var) #define writeisp(var) fprintf(_fout, "%d ", var) #define writellsp(var) fprintf(_fout, "%lld ", var) #define writeiln(var) fprintf(_fout, "%d\n", var) #define writellln(var) fprintf(_fout, "%lld\n", var) #define writeulln(var) fprintf(_fout, "%llu\n", var) #define writefln(var) fprintf(_fout, "%f\n", var) #define writes(str) fprintf(_fout, "%s", str) #define writesp() fprintf(_fout, " ") #define writeln() fprintf(_fout, "\n") #define RUN_LOCAL(testfilename) \ { \ _fin = fopen(testfilename, "r"); \ if (_fin == NULL) \ _fin = stdin; \ } #define swap(type, a, b) \ { \ type t = a; \ a = b; \ b = t; \ } #define sort(data, n) std::sort(data, data + n) //#define mod(a,b) b==0 ? 0 : a==0 ? 0 :(a>0 ? a%b : b + a % b) //what the hell //is this... ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } void reverse(char *data, int n) { int k = n >> 1; repi(k) { char tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } void reverse(int *data, int n) { int k = n >> 1; repi(k) { int tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } #define _Vec(type, name) \ struct name { \ type *data; \ int size; \ int n; \ }; \ void init(name *t, int size) { \ t->data = (type *)malloc(sizeof(type) * size); \ t->size = size; \ t->n = 0; \ } \ void resize(name *t) { \ int ns = t->size * 1.2f; \ t->data = (type *)realloc(t->data, sizeof(type) * ns); \ t->size = ns; \ } \ void add(name *t, type val) { \ if (t->n >= t->size) \ resize(t); \ int k = t->n; \ t->data[k] = val; \ t->n = k + 1; \ } \ void free(name *t) { free(t->data); } _Vec(int, Veci) _Vec(long long, Vecll) _Vec(char *, Vecs) #define _ispal(type, name) \ int name(type *a, type *b, int n) { \ repi(n) { \ if (a[i] != b[n - i - 1]) { \ return 0; \ } \ } \ return 1; \ } _ispal(int, ispali) _ispal(char, ispalc) #define _Pair(type, name) \ struct name { \ type x, y; \ }; \ int cmp_##name(const void *_a, const void *_b) { \ name *a = (name *)_a; \ name *b = (name *)_b; \ if (a->x == b->x) { \ if (a->y < b->y) \ return -1; \ else \ return 1; \ } \ if (a->x < b->x) \ return -1; \ else \ return 1; \ } \ void sort_##name(name *d, int n) { qsort(d, n, sizeof(name), cmp_##name); } _Pair(int, Pairi) int cmp_Str(const void *_a, const void *_b) { char *a = *((char **)_a); char *b = *((char **)_b); return strcmp(a, b); } void sort_Str(char **str, int n) { qsort(str, n, sizeof(char *), cmp_Str); } ll expmod(ll x, ll n, ll m) { ll ans = 1; for (; n;) { if (n & 1) ans = (ans * x) % m; x = (x * x) % m; n >>= 1; } return ans; } ll combmod(ll n, ll k, ll m) { ll ret = 1; ll div = 1; for (ll i = 0; i < k; ++i) { ret = (ret * (n - i) % m) % m; div = (div * (i + 1)) % m; } div = expmod(div, m - 2, m) % m; return (ret * div) % m; } //------------------------------------------ //------------ int main() { RUN_LOCAL("xxtestcase_05in.txt"); static char s[100]; reads(s, 100); int s2 = atoi(&s[2]); s[2] = 0; int s1 = atoi(s); if (s1 >= 1 && s1 <= 12) { if (s2 >= 1 && s2 <= 12) { writes("AMBIGIOUS\n"); } else { writes("MMYY\n"); } } else if (s2 >= 1 && s2 <= 12) { if (s1 >= 1 && s1 <= 12) { writes("AMBIGUOUS\n"); } else { writes("YYMM\n"); } } else { writes("NA\n"); } return 0; }
/* URL_HERE */ /* */ #ifdef _WIN32 #pragma warning(disable : 4996) #endif #include <algorithm> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> using namespace std; FILE *_fin = stdin; FILE *_fout = stdout; #define PI 3.141592653589793238462643383279502884197169399375105820974 #define ten5p1 100001 #define ten6p1 1000001 #define ten8p1 100000001 #define ten9p1 1000000001 #define uint unsigned int #define ll long long #define ull unsigned long long #define rep(var, n) for (int var = 0; var < n; ++var) #define repi(n) rep(i, n) #define repj(n) rep(j, n) #define repi1(n) for (int i = 1; i < n; ++i) #define repj1(n) for (int j = 1; j < n; ++j) int _min(int a, int b) { return a <= b ? a : b; } int _min(ll a, ll b) { return a <= b ? a : b; } int _max(int a, int b) { return a >= b ? a : b; } int _max(ll a, ll b) { return a >= b ? a : b; } void zero(int *data, int n) { memset(data, 0, sizeof(int) * n); } void zero(ll *data, int n) { memset(data, 0, sizeof(ll) * n); } void zero(char *data, int n) { memset(data, 0, sizeof(char) * n); } char readc() { char var; fscanf(_fin, "%c", &var); return var; } int readi() { int var; fscanf(_fin, "%d", &var); return var; } ll readll() { ll var; fscanf(_fin, "%lld", &var); return var; } void repread(int *data, int n) { repi(n) data[i] = readi(); } void repread(ll *data, int n) { repi(n) data[i] = readll(); } int reads(char *str, int maxsize) { for (;;) { if (fgets(str, maxsize, _fin) == NULL) break; if (str[0] != '\n' && str[0] != '\r') break; } int slen = strlen(str); if (slen == 0) return 0; if (str[slen - 1] == '\n' || str[slen - 1] == '\r') str[--slen] = 0; return slen; } #define writec(var) fprintf(_fout, "%c", var) #define writecsp(var) fprintf(_fout, "%c ", var) #define writecln(var) fprintf(_fout, "%c\n", var) #define writei(var) fprintf(_fout, "%d", var) #define writeisp(var) fprintf(_fout, "%d ", var) #define writellsp(var) fprintf(_fout, "%lld ", var) #define writeiln(var) fprintf(_fout, "%d\n", var) #define writellln(var) fprintf(_fout, "%lld\n", var) #define writeulln(var) fprintf(_fout, "%llu\n", var) #define writefln(var) fprintf(_fout, "%f\n", var) #define writes(str) fprintf(_fout, "%s", str) #define writesp() fprintf(_fout, " ") #define writeln() fprintf(_fout, "\n") #define RUN_LOCAL(testfilename) \ { \ _fin = fopen(testfilename, "r"); \ if (_fin == NULL) \ _fin = stdin; \ } #define swap(type, a, b) \ { \ type t = a; \ a = b; \ b = t; \ } #define sort(data, n) std::sort(data, data + n) //#define mod(a,b) b==0 ? 0 : a==0 ? 0 :(a>0 ? a%b : b + a % b) //what the hell //is this... ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } void reverse(char *data, int n) { int k = n >> 1; repi(k) { char tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } void reverse(int *data, int n) { int k = n >> 1; repi(k) { int tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } #define _Vec(type, name) \ struct name { \ type *data; \ int size; \ int n; \ }; \ void init(name *t, int size) { \ t->data = (type *)malloc(sizeof(type) * size); \ t->size = size; \ t->n = 0; \ } \ void resize(name *t) { \ int ns = t->size * 1.2f; \ t->data = (type *)realloc(t->data, sizeof(type) * ns); \ t->size = ns; \ } \ void add(name *t, type val) { \ if (t->n >= t->size) \ resize(t); \ int k = t->n; \ t->data[k] = val; \ t->n = k + 1; \ } \ void free(name *t) { free(t->data); } _Vec(int, Veci) _Vec(long long, Vecll) _Vec(char *, Vecs) #define _ispal(type, name) \ int name(type *a, type *b, int n) { \ repi(n) { \ if (a[i] != b[n - i - 1]) { \ return 0; \ } \ } \ return 1; \ } _ispal(int, ispali) _ispal(char, ispalc) #define _Pair(type, name) \ struct name { \ type x, y; \ }; \ int cmp_##name(const void *_a, const void *_b) { \ name *a = (name *)_a; \ name *b = (name *)_b; \ if (a->x == b->x) { \ if (a->y < b->y) \ return -1; \ else \ return 1; \ } \ if (a->x < b->x) \ return -1; \ else \ return 1; \ } \ void sort_##name(name *d, int n) { qsort(d, n, sizeof(name), cmp_##name); } _Pair(int, Pairi) int cmp_Str(const void *_a, const void *_b) { char *a = *((char **)_a); char *b = *((char **)_b); return strcmp(a, b); } void sort_Str(char **str, int n) { qsort(str, n, sizeof(char *), cmp_Str); } ll expmod(ll x, ll n, ll m) { ll ans = 1; for (; n;) { if (n & 1) ans = (ans * x) % m; x = (x * x) % m; n >>= 1; } return ans; } ll combmod(ll n, ll k, ll m) { ll ret = 1; ll div = 1; for (ll i = 0; i < k; ++i) { ret = (ret * (n - i) % m) % m; div = (div * (i + 1)) % m; } div = expmod(div, m - 2, m) % m; return (ret * div) % m; } //------------------------------------------ //------------ int main() { RUN_LOCAL("xxtestcase_05in.txt"); static char s[100]; reads(s, 100); int s2 = atoi(&s[2]); s[2] = 0; int s1 = atoi(s); if (s1 >= 1 && s1 <= 12) { if (s2 >= 1 && s2 <= 12) { writes("AMBIGUOUS\n"); } else { writes("MMYY\n"); } } else if (s2 >= 1 && s2 <= 12) { if (s1 >= 1 && s1 <= 12) { writes("AMBIGUOUS\n"); } else { writes("YYMM\n"); } } else { writes("NA\n"); } return 0; }
[ "literal.string.change", "call.arguments.change" ]
857,333
857,334
u950002813
cpp
p03042
/* URL_HERE */ /* */ #ifdef _WIN32 #pragma warning(disable : 4996) #endif #include <algorithm> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> using namespace std; FILE *_fin = stdin; FILE *_fout = stdout; #define PI 3.141592653589793238462643383279502884197169399375105820974 #define ten5p1 100001 #define ten6p1 1000001 #define ten8p1 100000001 #define ten9p1 1000000001 #define uint unsigned int #define ll long long #define ull unsigned long long #define rep(var, n) for (int var = 0; var < n; ++var) #define repi(n) rep(i, n) #define repj(n) rep(j, n) #define repi1(n) for (int i = 1; i < n; ++i) #define repj1(n) for (int j = 1; j < n; ++j) int _min(int a, int b) { return a <= b ? a : b; } int _min(ll a, ll b) { return a <= b ? a : b; } int _max(int a, int b) { return a >= b ? a : b; } int _max(ll a, ll b) { return a >= b ? a : b; } void zero(int *data, int n) { memset(data, 0, sizeof(int) * n); } void zero(ll *data, int n) { memset(data, 0, sizeof(ll) * n); } void zero(char *data, int n) { memset(data, 0, sizeof(char) * n); } char readc() { char var; fscanf(_fin, "%c", &var); return var; } int readi() { int var; fscanf(_fin, "%d", &var); return var; } ll readll() { ll var; fscanf(_fin, "%lld", &var); return var; } void repread(int *data, int n) { repi(n) data[i] = readi(); } void repread(ll *data, int n) { repi(n) data[i] = readll(); } int reads(char *str, int maxsize) { for (;;) { if (fgets(str, maxsize, _fin) == NULL) break; if (str[0] != '\n' && str[0] != '\r') break; } int slen = strlen(str); if (slen == 0) return 0; if (str[slen - 1] == '\n' || str[slen - 1] == '\r') str[--slen] = 0; return slen; } #define writec(var) fprintf(_fout, "%c", var) #define writecsp(var) fprintf(_fout, "%c ", var) #define writecln(var) fprintf(_fout, "%c\n", var) #define writei(var) fprintf(_fout, "%d", var) #define writeisp(var) fprintf(_fout, "%d ", var) #define writellsp(var) fprintf(_fout, "%lld ", var) #define writeiln(var) fprintf(_fout, "%d\n", var) #define writellln(var) fprintf(_fout, "%lld\n", var) #define writeulln(var) fprintf(_fout, "%llu\n", var) #define writefln(var) fprintf(_fout, "%f\n", var) #define writes(str) fprintf(_fout, "%s", str) #define writesp() fprintf(_fout, " ") #define writeln() fprintf(_fout, "\n") #define RUN_LOCAL(testfilename) \ { \ _fin = fopen(testfilename, "r"); \ if (_fin == NULL) \ _fin = stdin; \ } #define swap(type, a, b) \ { \ type t = a; \ a = b; \ b = t; \ } #define sort(data, n) std::sort(data, data + n) //#define mod(a,b) b==0 ? 0 : a==0 ? 0 :(a>0 ? a%b : b + a % b) //what the hell //is this... ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } void reverse(char *data, int n) { int k = n >> 1; repi(k) { char tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } void reverse(int *data, int n) { int k = n >> 1; repi(k) { int tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } #define _Vec(type, name) \ struct name { \ type *data; \ int size; \ int n; \ }; \ void init(name *t, int size) { \ t->data = (type *)malloc(sizeof(type) * size); \ t->size = size; \ t->n = 0; \ } \ void resize(name *t) { \ int ns = t->size * 1.2f; \ t->data = (type *)realloc(t->data, sizeof(type) * ns); \ t->size = ns; \ } \ void add(name *t, type val) { \ if (t->n >= t->size) \ resize(t); \ int k = t->n; \ t->data[k] = val; \ t->n = k + 1; \ } \ void free(name *t) { free(t->data); } _Vec(int, Veci) _Vec(long long, Vecll) _Vec(char *, Vecs) #define _ispal(type, name) \ int name(type *a, type *b, int n) { \ repi(n) { \ if (a[i] != b[n - i - 1]) { \ return 0; \ } \ } \ return 1; \ } _ispal(int, ispali) _ispal(char, ispalc) #define _Pair(type, name) \ struct name { \ type x, y; \ }; \ int cmp_##name(const void *_a, const void *_b) { \ name *a = (name *)_a; \ name *b = (name *)_b; \ if (a->x == b->x) { \ if (a->y < b->y) \ return -1; \ else \ return 1; \ } \ if (a->x < b->x) \ return -1; \ else \ return 1; \ } \ void sort_##name(name *d, int n) { qsort(d, n, sizeof(name), cmp_##name); } _Pair(int, Pairi) int cmp_Str(const void *_a, const void *_b) { char *a = *((char **)_a); char *b = *((char **)_b); return strcmp(a, b); } void sort_Str(char **str, int n) { qsort(str, n, sizeof(char *), cmp_Str); } ll expmod(ll x, ll n, ll m) { ll ans = 1; for (; n;) { if (n & 1) ans = (ans * x) % m; x = (x * x) % m; n >>= 1; } return ans; } ll combmod(ll n, ll k, ll m) { ll ret = 1; ll div = 1; for (ll i = 0; i < k; ++i) { ret = (ret * (n - i) % m) % m; div = (div * (i + 1)) % m; } div = expmod(div, m - 2, m) % m; return (ret * div) % m; } //------------------------------------------ //------------ int main() { RUN_LOCAL("xxtestcase_05in.txt"); static char s[100]; reads(s, 100); int s2 = atoi(&s[2]); s[2] = 0; int s1 = atoi(s); if (s1 >= 1 && s1 <= 12) { if (s2 >= 1 && s2 <= 12) { writes("AMBIGIOUS\n"); } else { writes("MMYY\n"); } } else if (s2 >= 1 && s2 <= 12) { if (s1 >= 1 && s1 <= 12) { writes("AMBIGIOUS\n"); } else { writes("YYMM\n"); } } else { writes("NA\n"); } return 0; }
/* URL_HERE */ /* */ #ifdef _WIN32 #pragma warning(disable : 4996) #endif #include <algorithm> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> using namespace std; FILE *_fin = stdin; FILE *_fout = stdout; #define PI 3.141592653589793238462643383279502884197169399375105820974 #define ten5p1 100001 #define ten6p1 1000001 #define ten8p1 100000001 #define ten9p1 1000000001 #define uint unsigned int #define ll long long #define ull unsigned long long #define rep(var, n) for (int var = 0; var < n; ++var) #define repi(n) rep(i, n) #define repj(n) rep(j, n) #define repi1(n) for (int i = 1; i < n; ++i) #define repj1(n) for (int j = 1; j < n; ++j) int _min(int a, int b) { return a <= b ? a : b; } int _min(ll a, ll b) { return a <= b ? a : b; } int _max(int a, int b) { return a >= b ? a : b; } int _max(ll a, ll b) { return a >= b ? a : b; } void zero(int *data, int n) { memset(data, 0, sizeof(int) * n); } void zero(ll *data, int n) { memset(data, 0, sizeof(ll) * n); } void zero(char *data, int n) { memset(data, 0, sizeof(char) * n); } char readc() { char var; fscanf(_fin, "%c", &var); return var; } int readi() { int var; fscanf(_fin, "%d", &var); return var; } ll readll() { ll var; fscanf(_fin, "%lld", &var); return var; } void repread(int *data, int n) { repi(n) data[i] = readi(); } void repread(ll *data, int n) { repi(n) data[i] = readll(); } int reads(char *str, int maxsize) { for (;;) { if (fgets(str, maxsize, _fin) == NULL) break; if (str[0] != '\n' && str[0] != '\r') break; } int slen = strlen(str); if (slen == 0) return 0; if (str[slen - 1] == '\n' || str[slen - 1] == '\r') str[--slen] = 0; return slen; } #define writec(var) fprintf(_fout, "%c", var) #define writecsp(var) fprintf(_fout, "%c ", var) #define writecln(var) fprintf(_fout, "%c\n", var) #define writei(var) fprintf(_fout, "%d", var) #define writeisp(var) fprintf(_fout, "%d ", var) #define writellsp(var) fprintf(_fout, "%lld ", var) #define writeiln(var) fprintf(_fout, "%d\n", var) #define writellln(var) fprintf(_fout, "%lld\n", var) #define writeulln(var) fprintf(_fout, "%llu\n", var) #define writefln(var) fprintf(_fout, "%f\n", var) #define writes(str) fprintf(_fout, "%s", str) #define writesp() fprintf(_fout, " ") #define writeln() fprintf(_fout, "\n") #define RUN_LOCAL(testfilename) \ { \ _fin = fopen(testfilename, "r"); \ if (_fin == NULL) \ _fin = stdin; \ } #define swap(type, a, b) \ { \ type t = a; \ a = b; \ b = t; \ } #define sort(data, n) std::sort(data, data + n) //#define mod(a,b) b==0 ? 0 : a==0 ? 0 :(a>0 ? a%b : b + a % b) //what the hell //is this... ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } void reverse(char *data, int n) { int k = n >> 1; repi(k) { char tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } void reverse(int *data, int n) { int k = n >> 1; repi(k) { int tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } } #define _Vec(type, name) \ struct name { \ type *data; \ int size; \ int n; \ }; \ void init(name *t, int size) { \ t->data = (type *)malloc(sizeof(type) * size); \ t->size = size; \ t->n = 0; \ } \ void resize(name *t) { \ int ns = t->size * 1.2f; \ t->data = (type *)realloc(t->data, sizeof(type) * ns); \ t->size = ns; \ } \ void add(name *t, type val) { \ if (t->n >= t->size) \ resize(t); \ int k = t->n; \ t->data[k] = val; \ t->n = k + 1; \ } \ void free(name *t) { free(t->data); } _Vec(int, Veci) _Vec(long long, Vecll) _Vec(char *, Vecs) #define _ispal(type, name) \ int name(type *a, type *b, int n) { \ repi(n) { \ if (a[i] != b[n - i - 1]) { \ return 0; \ } \ } \ return 1; \ } _ispal(int, ispali) _ispal(char, ispalc) #define _Pair(type, name) \ struct name { \ type x, y; \ }; \ int cmp_##name(const void *_a, const void *_b) { \ name *a = (name *)_a; \ name *b = (name *)_b; \ if (a->x == b->x) { \ if (a->y < b->y) \ return -1; \ else \ return 1; \ } \ if (a->x < b->x) \ return -1; \ else \ return 1; \ } \ void sort_##name(name *d, int n) { qsort(d, n, sizeof(name), cmp_##name); } _Pair(int, Pairi) int cmp_Str(const void *_a, const void *_b) { char *a = *((char **)_a); char *b = *((char **)_b); return strcmp(a, b); } void sort_Str(char **str, int n) { qsort(str, n, sizeof(char *), cmp_Str); } ll expmod(ll x, ll n, ll m) { ll ans = 1; for (; n;) { if (n & 1) ans = (ans * x) % m; x = (x * x) % m; n >>= 1; } return ans; } ll combmod(ll n, ll k, ll m) { ll ret = 1; ll div = 1; for (ll i = 0; i < k; ++i) { ret = (ret * (n - i) % m) % m; div = (div * (i + 1)) % m; } div = expmod(div, m - 2, m) % m; return (ret * div) % m; } //------------------------------------------ //------------ int main() { RUN_LOCAL("xxtestcase_05in.txt"); static char s[100]; reads(s, 100); int s2 = atoi(&s[2]); s[2] = 0; int s1 = atoi(s); if (s1 >= 1 && s1 <= 12) { if (s2 >= 1 && s2 <= 12) { writes("AMBIGUOUS\n"); } else { writes("MMYY\n"); } } else if (s2 >= 1 && s2 <= 12) { if (s1 >= 1 && s1 <= 12) { writes("AMBIGUOUS\n"); } else { writes("YYMM\n"); } } else { writes("NA\n"); } return 0; }
[ "literal.string.change", "call.arguments.change" ]
857,335
857,334
u950002813
cpp
p03042
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { string s; cin >> s; int f, b; int ff = 0; f = (s[0] - '0') * 10; f += s[1] - '0'; b = (s[2] - '0') * 10; b += s[3] - '0'; if (f <= 13 && f > 0) { ff = 1; } if (b <= 13 && b > 0) { ff += 10; } switch (ff) { case 11: cout << "AMBIGUOUS" << endl; break; case 0: cout << "NA" << endl; break; case 1: cout << "MMYY" << endl; break; case 10: cout << "YYMM" << endl; break; } return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int main() { string s; cin >> s; int f, b; int ff = 0; f = (s[0] - '0') * 10; f += s[1] - '0'; b = (s[2] - '0') * 10; b += s[3] - '0'; if (f < 13 && f > 0) { ff = 1; } if (b < 13 && b > 0) { ff += 10; } switch (ff) { case 11: cout << "AMBIGUOUS" << endl; break; case 0: cout << "NA" << endl; break; case 1: cout << "MMYY" << endl; break; case 10: cout << "YYMM" << endl; break; } return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
857,355
857,356
u056793408
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP2(i, n) for (int i = 1; i <= (int)(n); i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define ALL(x) (x).begin(), (x).end() #define SUM(x) accumulate(x.begin(), x.end(), 0); #define vint(v, n) \ vector<int> v(n); \ REP(i, n) scanf("%lld", &v[i]); #define vstr(v, n) \ vector<string> v(n); \ REP(i, n) scanf("%lld", &v[i]); struct initon { initon() { cin.tie(0); ios::sync_with_stdio(false); }; }; int k = 0, n = 0, m = 0, l = 0, a = 0, b = 0, c = 0, d = 0, e = 0, ans = 0, ans2 = 0, x = 0, y = 0; string s, t, S; signed main() { cin >> a; ans = a / 100; ans2 = a % 100; if (ans <= 12 && ans > 0) { if (ans <= 12 && ans > 0) cout << "AMBIGUOUS"; else cout << "MMYY"; } else { if (ans2 <= 12 && ans2 > 0) cout << "YYMM"; else cout << "NA"; } }
#include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP2(i, n) for (int i = 1; i <= (int)(n); i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define ALL(x) (x).begin(), (x).end() #define SUM(x) accumulate(x.begin(), x.end(), 0); #define vint(v, n) \ vector<int> v(n); \ REP(i, n) scanf("%lld", &v[i]); #define vstr(v, n) \ vector<string> v(n); \ REP(i, n) scanf("%lld", &v[i]); struct initon { initon() { cin.tie(0); ios::sync_with_stdio(false); }; }; int k = 0, n = 0, m = 0, l = 0, a = 0, b = 0, c = 0, d = 0, e = 0, ans = 0, ans2 = 0, x = 0, y = 0; string s, t, S; signed main() { cin >> a; ans = a / 100; ans2 = a % 100; if (ans <= 12 && ans > 0) { if (ans2 <= 12 && ans2 > 0) cout << "AMBIGUOUS"; else cout << "MMYY"; } else { if (ans2 <= 12 && ans2 > 0) cout << "YYMM"; else cout << "NA"; } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,361
857,362
u379928983
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP2(i, n) for (int i = 1; i <= (int)(n); i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define ALL(x) (x).begin(), (x).end() #define SUM(x) accumulate(x.begin(), x.end(), 0); #define vint(v, n) \ vector<int> v(n); \ REP(i, n) scanf("%lld", &v[i]); #define vstr(v, n) \ vector<string> v(n); \ REP(i, n) scanf("%lld", &v[i]); struct initon { initon() { cin.tie(0); ios::sync_with_stdio(false); }; }; int k = 0, n = 0, m = 0, l = 0, a = 0, b = 0, c = 0, d = 0, e = 0, ans = 0, ans2 = 0, x = 0, y = 0; string s, t, S; signed main() { cin >> a; ans = a / 100; ans2 = a % 100; if (ans <= 12 && ans > 0) { if (ans <= 12 && ans > 0) cout << "AMBIGUOUS"; else cout << "MMYY"; } else { if (ans <= 12 && ans > 0) cout << "YYMM"; else cout << "NA"; } }
#include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REP2(i, n) for (int i = 1; i <= (int)(n); i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define ALL(x) (x).begin(), (x).end() #define SUM(x) accumulate(x.begin(), x.end(), 0); #define vint(v, n) \ vector<int> v(n); \ REP(i, n) scanf("%lld", &v[i]); #define vstr(v, n) \ vector<string> v(n); \ REP(i, n) scanf("%lld", &v[i]); struct initon { initon() { cin.tie(0); ios::sync_with_stdio(false); }; }; int k = 0, n = 0, m = 0, l = 0, a = 0, b = 0, c = 0, d = 0, e = 0, ans = 0, ans2 = 0, x = 0, y = 0; string s, t, S; signed main() { cin >> a; ans = a / 100; ans2 = a % 100; if (ans <= 12 && ans > 0) { if (ans2 <= 12 && ans2 > 0) cout << "AMBIGUOUS"; else cout << "MMYY"; } else { if (ans2 <= 12 && ans2 > 0) cout << "YYMM"; else cout << "NA"; } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,364
857,362
u379928983
cpp
p03042
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define M_PI 3.14159265358979323846 void solve() { string s; cin >> s; string s1 = s.substr(0, 2); string s2 = s.substr(2, 2); int x = stoi(s1); int y = stoi(s2); int ans = 0; if (x >= 1 && x <= 12) ans++; if (y >= 1 && y <= 12) ans += 2; if (ans == 1) cout << "MMYY"; else if (ans == 2) cout << "YYMM"; else if (ans == 3) cout << "AMBIGOUS"; else cout << "NA"; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout << fixed; cout << setprecision(10); int t = 1; // cin>>t; for (int i = 1; i <= t; i++) { solve(); } return 0; }
#include <bits/stdc++.h> #include <math.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define M_PI 3.14159265358979323846 void solve() { string s; cin >> s; string s1 = s.substr(0, 2); string s2 = s.substr(2, 2); int x = stoi(s1); int y = stoi(s2); int ans = 0; if (x >= 1 && x <= 12) ans++; if (y >= 1 && y <= 12) ans += 2; if (ans == 1) cout << "MMYY"; else if (ans == 2) cout << "YYMM"; else if (ans == 3) cout << "AMBIGUOUS"; else cout << "NA"; } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout << fixed; cout << setprecision(10); int t = 1; // cin>>t; for (int i = 1; i <= t; i++) { solve(); } return 0; }
[ "literal.string.change", "io.output.change" ]
857,377
857,378
u395652671
cpp
p03042
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { int n; cin >> n; int a = n / 100; int b = n % 100; if (1 <= a && a <= 12) { if (1 <= b && b <= 12) cout << "AMBIGUOS" << endl; else cout << "MMYY" << endl; } else { if (1 <= b && b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { int n; cin >> n; int a = n / 100; int b = n % 100; if (1 <= a && a <= 12) { if (1 <= b && b <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= b && b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,402
857,403
u534923072
cpp
p03042
#include <bits/stdc++.h> #include <math.h> int n, m, i, j, k, count1 = 0, count2 = 0; using namespace std; void ABC120(void); void ABC121(void); void ABC122(void); void ABC123(void); void ABC124(void); void ABC125(void); void ABC126(void); void ABC127(void); void ABC128(void); void ABC129(void); int main(void) { ABC126(); } void ABC126() { string s; cin >> s; int a, b, ad = 0, bd = 0; a = stoi(s.substr(0, 2)); b = stoi(s.substr(2, 2)); cerr << a << " " << b << endl; if (a > 0 && a <= 12) ad = 1; if (b > 0 && b <= 12) bd = 1; if (ad == 1 && bd == 1) cout << "AMBIGUOS" << endl; if (ad == 1 && bd == 0) cout << "MMYY" << endl; if (ad == 0 && bd == 1) cout << "YYMM" << endl; if (ad == 0 && bd == 0) cout << "NA" << endl; }
#include <bits/stdc++.h> #include <math.h> int n, m, i, j, k, count1 = 0, count2 = 0; using namespace std; void ABC120(void); void ABC121(void); void ABC122(void); void ABC123(void); void ABC124(void); void ABC125(void); void ABC126(void); void ABC127(void); void ABC128(void); void ABC129(void); int main(void) { ABC126(); } void ABC126() { string s; cin >> s; int a, b, ad = 0, bd = 0; a = stoi(s.substr(0, 2)); b = stoi(s.substr(2, 2)); cerr << a << " " << b << endl; if (a > 0 && a <= 12) ad = 1; if (b > 0 && b <= 12) bd = 1; if (ad == 1 && bd == 1) cout << "AMBIGUOUS" << endl; if (ad == 1 && bd == 0) cout << "MMYY" << endl; if (ad == 0 && bd == 1) cout << "YYMM" << endl; if (ad == 0 && bd == 0) cout << "NA" << endl; }
[ "literal.string.change", "io.output.change" ]
857,410
857,411
u225660136
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; bool a = (n % 100 == 0 || n % 100 > 12), b = (n / 100 == 0 || n / 100 > 12); if (a && b) cout << "NA"; if (!a && b) cout << "YYMM"; if (a && !b) cout << "MMYY"; if (!a && !b) cout << "AMBGIOUS"; cout << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; bool a = (n % 100 == 0 || n % 100 > 12), b = (n / 100 == 0 || n / 100 > 12); if (a && b) cout << "NA"; if (!a && b) cout << "YYMM"; if (a && !b) cout << "MMYY"; if (!a && !b) cout << "AMBIGUOUS"; cout << endl; }
[ "literal.string.change", "io.output.change" ]
857,412
857,413
u346324165
cpp
p03042
#include <bits/stdc++.h> using namespace std; int mod = 1000000007; 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 << "AMBIGUOS"; else cout << "YYMM"; } else { if (1 <= R && R <= 12) cout << "MMYY"; else cout << "NA"; } }
#include <bits/stdc++.h> using namespace std; int mod = 1000000007; 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 << "YYMM"; } else { if (1 <= R && R <= 12) cout << "MMYY"; else cout << "NA"; } }
[ "literal.string.change", "io.output.change" ]
857,414
857,415
u058742919
cpp
p03042
#include "bits/stdc++.h" #define FOR(i, a, b) for (int i = a; i < b; i++) #define mFOR(i, a, b) for (int i = a; i > b; i--) #define MP make_pair #define PB push_back #define ALL(v) v.begin(), v.end() #define N 100007 #define INF 1000000007 using namespace std; typedef long long ll; ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); } ll fceil(ll a, ll b) { return (a % b == 0 ? a / b : a / b + 1); } int main() { int s, bmp = 0; string ans[] = {"NA", "MMYY", "YYMM", "AMBIGOUS"}; cin >> s; int fst = s / 100, scd = s % 100; if (1 <= fst and fst <= 12) bmp += 1; if (1 <= scd and scd <= 12) bmp += 2; cout << ans[bmp] << endl; return 0; }
#include "bits/stdc++.h" #define FOR(i, a, b) for (int i = a; i < b; i++) #define mFOR(i, a, b) for (int i = a; i > b; i--) #define MP make_pair #define PB push_back #define ALL(v) v.begin(), v.end() #define N 100007 #define INF 1000000007 using namespace std; typedef long long ll; ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); } ll fceil(ll a, ll b) { return (a % b == 0 ? a / b : a / b + 1); } int main() { int s, bmp = 0; string ans[] = {"NA", "MMYY", "YYMM", "AMBIGUOUS"}; cin >> s; int fst = s / 100, scd = s % 100; if (1 <= fst and fst <= 12) bmp += 1; if (1 <= scd and scd <= 12) bmp += 2; cout << ans[bmp] << endl; return 0; }
[ "literal.string.change" ]
857,416
857,417
u803173123
cpp
p03042
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<int> vi; typedef pair<int, int> pi; typedef pair<ll, ll> pl; #define rep(i, N) for (int i = 0; i < (int)N; i++) #define all(v) (v).begin(), (v).end() const int INF = 1001001001; int main() { int s; cin >> s; int pre = s / 100, post = s % 100; bool f1 = false, f2 = false; if (pre > 12 || pre == 0) f1 = false; if (post > 12 || post == 0) f2 = false; if (f1 && f2) cout << "AMBIGUOUS" << endl; else if (!f1 && !f2) cout << "NA" << endl; else if (!f1) cout << "YYMM" << endl; else cout << "MMYY" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<int> vi; typedef pair<int, int> pi; typedef pair<ll, ll> pl; #define rep(i, N) for (int i = 0; i < (int)N; i++) #define all(v) (v).begin(), (v).end() const int INF = 1001001001; int main() { int s; cin >> s; int pre = s / 100, post = s % 100; bool f1 = true, f2 = true; if (pre > 12 || pre == 0) f1 = false; if (post > 12 || post == 0) f2 = false; if (f1 && f2) cout << "AMBIGUOUS" << endl; else if (!f1 && !f2) cout << "NA" << endl; else if (!f1) cout << "YYMM" << endl; else cout << "MMYY" << endl; }
[ "misc.opposites", "variable_declaration.value.change" ]
857,420
857,421
u160861278
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string fs = s.substr(0, 2); string ls = s.substr(2); bool yymm = false; bool mmyy = false; int f = atoi(fs.c_str()); int l = atoi(ls.c_str()); if (1 <= l && l <= 12) yymm = true; if (f <= l && f <= 12) mmyy = true; if (yymm == true && mmyy == true) cout << "AMBIGUOUS" << endl; else if (yymm == true && mmyy == false) cout << "YYMM" << endl; else if (yymm == false && mmyy == true) cout << "MMYY" << endl; else if (yymm == false && mmyy == false) cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string fs = s.substr(0, 2); string ls = s.substr(2); bool yymm = false; bool mmyy = false; int f = atoi(fs.c_str()); int l = atoi(ls.c_str()); if (1 <= l && l <= 12) yymm = true; if (1 <= f && f <= 12) mmyy = true; if (yymm == true && mmyy == true) cout << "AMBIGUOUS" << endl; else if (yymm == true && mmyy == false) cout << "YYMM" << endl; else if (yymm == false && mmyy == true) cout << "MMYY" << endl; else if (yymm == false && mmyy == false) cout << "NA" << endl; }
[ "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change", "identifier.change" ]
857,426
857,427
u679419784
cpp
p03042
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define All(a) a.begin(), a.end() #define INF 1000000007 const int MOD = 1000000007; // accumulate(vec.begin(), vec.end(), 0) // std::sort(v.begin(), v.end(), std::greater<Type>()); int gcd(int x, int y) { if (x % y == 0) return y; else return gcd(y, x % y); } bool isPrime(int n) { if (n < 2) return false; else if (n == 2) return true; else if (n % 2 == 0) return false; for (int i = 3; i <= sqrt(n); i++) { if (n % i == 0) return false; } return true; } int main() { int a; cin >> a; int l = a / 100; int r = a % 100; if (1 <= l && l <= 9) { if (1 <= r && r <= 9) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= r && r <= 9) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define All(a) a.begin(), a.end() #define INF 1000000007 const int MOD = 1000000007; // accumulate(vec.begin(), vec.end(), 0) // std::sort(v.begin(), v.end(), std::greater<Type>()); int gcd(int x, int y) { if (x % y == 0) return y; else return gcd(y, x % y); } bool isPrime(int n) { if (n < 2) return false; else if (n == 2) return true; else if (n % 2 == 0) return false; for (int i = 3; i <= sqrt(n); i++) { if (n % i == 0) return false; } return true; } int main() { int a; cin >> a; int l = a / 100; int r = a % 100; 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; } }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
857,434
857,435
u229427161
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main(void) { int s; cin >> s; int L = s / 100; int R = s % 100; 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 << "NO" << endl; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int s; cin >> s; int L = s / 100; int R = s % 100; 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; }
[ "literal.string.change", "io.output.change" ]
857,450
857,451
u150155436
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int N, A = 0; cin >> N; if (A / 100 > 0 && A / 100 < 13) { A += 2; } if (A % 100 > 0 && A % 100 < 13) { A++; } if (A == 3) { cout << "AMBIGUOUS" << endl; } if (A == 2) { cout << "MMYY" << endl; } if (A == 1) { cout << "YYMM" << endl; } if (A == 0) { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int N, A = 0; cin >> N; if (N / 100 > 0 && N / 100 < 13) { A += 2; } if (N % 100 > 0 && N % 100 < 13) { A++; } if (A == 3) { cout << "AMBIGUOUS" << endl; } if (A == 2) { cout << "MMYY" << endl; } if (A == 1) { cout << "YYMM" << endl; } if (A == 0) { cout << "NA" << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,456
857,457
u158290747
cpp
p03042
#include <bits/stdc++.h> #define REP(i, n) for (long long i = 0; i < n; i++) #define REPR(i, n) for (long long i = n - 1; i >= 0; i--) #define FOR(i, m, n) for (long long i = m; i <= n; i++) #define FORR(i, m, n) for (long long i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define VSORTR(v) sort(v.rbegin(), v.rend()); #define ALL(v) (v).begin(), (v).end() #define FIN \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); using namespace std; using ll = long long; using vll = vector<ll>; using vvll = vector<vector<ll>>; using P = pair<ll, ll>; const ll mod = 1e9 + 7; int main() { FIN string s; cin >> s; int a = (s[0] - '0') * 10 + (s[1] - '0'); int b = (s[2] - '0') * 10 + (s[3] - '0'); if (0 < a && a < 13 && 0 < b && b < 13) cout << "AMBIGUOUS"; else if (0 < a && a < 13) cout << "YYMM"; else if (0 < b && b < 13) cout << "MMYY"; else cout << "NA"; return 0; }
#include <bits/stdc++.h> #define REP(i, n) for (long long i = 0; i < n; i++) #define REPR(i, n) for (long long i = n - 1; i >= 0; i--) #define FOR(i, m, n) for (long long i = m; i <= n; i++) #define FORR(i, m, n) for (long long i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define VSORTR(v) sort(v.rbegin(), v.rend()); #define ALL(v) (v).begin(), (v).end() #define FIN \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); using namespace std; using ll = long long; using vll = vector<ll>; using vvll = vector<vector<ll>>; using P = pair<ll, ll>; const ll mod = 1e9 + 7; int main() { FIN string s; cin >> s; int a = (s[0] - '0') * 10 + (s[1] - '0'); int b = (s[2] - '0') * 10 + (s[3] - '0'); if (0 < a && a < 13 && 0 < b && b < 13) cout << "AMBIGUOUS"; else if (0 < a && a < 13) cout << "MMYY"; else if (0 < b && b < 13) cout << "YYMM"; else cout << "NA"; return 0; }
[ "literal.string.change", "io.output.change" ]
857,468
857,469
u557565572
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int x = s / 100; int y = x % 100; if (1 <= x && x <= 12) { if (1 <= y && y <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= y && y <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int x = s / 100; int y = s % 100; if (1 <= x && x <= 12) { if (1 <= y && y <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= y && y <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "identifier.change", "expression.operation.binary.change" ]
857,491
857,492
u736265891
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int x = s / 100; int y = x % 100; if (1 <= x && x <= 12) { if (1 <= y && y <= 12) cout << "AMBIGUOUS" << endl; cout << "MMYY" << endl; } else { if (1 <= y && y <= 12) cout << "YYMM" << endl; cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int x = s / 100; int y = s % 100; if (1 <= x && x <= 12) { if (1 <= y && y <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= y && y <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "identifier.change", "expression.operation.binary.change", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
857,493
857,492
u736265891
cpp
p03042
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define init() \ ios::sync_with_stdio(false); \ cin.tie(0) #define MOD 1000000007 using namespace std; using ll = long long; using ull = unsigned long long; template <typename M, typename N> constexpr common_type_t<M, N> gcd(M a, N b) { return a == 0 ? b : b == 0 ? a : gcd(b, a % b); } template <typename M, typename N> constexpr common_type_t<M, N> lcm(M a, N b) { return a * b / gcd(a, b); } template <long long MAX> class CombinationCalculator { long long mod_; long long fac[MAX]; long long finv[MAX]; long long inv[MAX]; public: CombinationCalculator(long long mi = MOD) : fac(), finv(), inv() { mod_ = mi; fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % mod_; inv[i] = mod_ - inv[mod_ % i] * (mod_ / i) % mod_; finv[i] = finv[i - 1] * inv[i] % mod_; } } long long c(long long n, long long k) const { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % mod_) % mod_; } }; template <long long MAX = 210000> using CC = CombinationCalculator<MAX>; template <typename T> T modpow(T a, T n, T mod = MOD) { T res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } template <typename T> T modinv(T a, T m = MOD) { T b = m, u = 1, v = 0; while (b) { T t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } bool inrange(int i) { return 1 <= i && i <= 12; } int main() { init(); string s; cin >> s; int a, b; sscanf(s.c_str(), "%2d%2d", &a, &b); if (inrange(a)) { if (inrange(b)) { cout << "ANBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (inrange(b)) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define init() \ ios::sync_with_stdio(false); \ cin.tie(0) #define MOD 1000000007 using namespace std; using ll = long long; using ull = unsigned long long; template <typename M, typename N> constexpr common_type_t<M, N> gcd(M a, N b) { return a == 0 ? b : b == 0 ? a : gcd(b, a % b); } template <typename M, typename N> constexpr common_type_t<M, N> lcm(M a, N b) { return a * b / gcd(a, b); } template <long long MAX> class CombinationCalculator { long long mod_; long long fac[MAX]; long long finv[MAX]; long long inv[MAX]; public: CombinationCalculator(long long mi = MOD) : fac(), finv(), inv() { mod_ = mi; fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % mod_; inv[i] = mod_ - inv[mod_ % i] * (mod_ / i) % mod_; finv[i] = finv[i - 1] * inv[i] % mod_; } } long long c(long long n, long long k) const { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % mod_) % mod_; } }; template <long long MAX = 210000> using CC = CombinationCalculator<MAX>; template <typename T> T modpow(T a, T n, T mod = MOD) { T res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } template <typename T> T modinv(T a, T m = MOD) { T b = m, u = 1, v = 0; while (b) { T t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } bool inrange(int i) { return 1 <= i && i <= 12; } int main() { init(); string s; cin >> s; int a, b; sscanf(s.c_str(), "%2d%2d", &a, &b); if (inrange(a)) { if (inrange(b)) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (inrange(b)) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "literal.string.change", "io.output.change" ]
857,498
857,499
u887924592
cpp
p03042
#include <bits/stdc++.h> using namespace std; signed main() { int S; cin >> S; int u = S / 100; int l = S % 100; if (u > 12) { // YY** if (l == 0) puts("NA"); else if (l <= 12) puts("YYMM"); else puts("NA"); } else if (u == 0) { // YY** if (l == 0) puts("NA"); else if (l <= 12) puts("YYMM"); else puts("NA"); } else { // 0 < u <= 12 ; MM**, YY** if (l > 12) puts("YYMM"); else if (l == 0) puts("MMYY"); else puts("AMBIGUOUS"); } return 0; }
#include <bits/stdc++.h> using namespace std; signed main() { int S; cin >> S; int u = S / 100; int l = S % 100; if (u > 12) { // YY** if (l == 0) puts("NA"); else if (l <= 12) puts("YYMM"); else puts("NA"); } else if (u == 0) { // YY** if (l == 0) puts("NA"); else if (l <= 12) puts("YYMM"); else puts("NA"); } else { // 0 < u <= 12 ; MM**, YY** if (l > 12) puts("MMYY"); else if (l == 0) puts("MMYY"); else puts("AMBIGUOUS"); } return 0; }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
857,500
857,501
u799164835
cpp
p03042
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vii = vector<vi>; using vs = vector<string>; using in6 = int64_t; using ind = double; using pii = pair<int, int>; using psi = pair<string, int>; using vpi = vector<pii>; using vps = vector<psi>; #define rep(i, n) for (in6 i = 0; i < (in6)(n); i++) #define repa(i, a, n) for (in6 i = a; i < (in6)(n); i++) #define repdown(i, n) for (in6 i = n; i > 0; i--) #define kyun ios::sync_with_stdio(false) #define hinata cout << "\n" #define all(c) (c).begin(), (c).end() #define pb push_back #define inf 2147483647 #define dset(n) cout << fixed << setprecision(n) void yes() { cout << "Yes"; } void no() { cout << "No"; } int main() { kyun; int n; cin >> n; int a, b; a = n % 100; b = n / 100; if (1 <= a && b <= 12) { if (1 <= b && b <= 12) cout << "AMBIGUOUS"; else cout << "YYMM"; } else { if (1 <= b && b <= 12) cout << "MMYY"; else cout << "NA"; } hinata; }
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vii = vector<vi>; using vs = vector<string>; using in6 = int64_t; using ind = double; using pii = pair<int, int>; using psi = pair<string, int>; using vpi = vector<pii>; using vps = vector<psi>; #define rep(i, n) for (in6 i = 0; i < (in6)(n); i++) #define repa(i, a, n) for (in6 i = a; i < (in6)(n); i++) #define repdown(i, n) for (in6 i = n; i > 0; i--) #define kyun ios::sync_with_stdio(false) #define hinata cout << "\n" #define all(c) (c).begin(), (c).end() #define pb push_back #define inf 2147483647 #define dset(n) cout << fixed << setprecision(n) void yes() { cout << "Yes"; } void no() { cout << "No"; } int main() { kyun; int n; cin >> n; int a, b; a = n % 100; b = n / 100; if (1 <= a && a <= 12) { if (1 <= b && b <= 12) cout << "AMBIGUOUS"; else cout << "YYMM"; } else { if (1 <= b && b <= 12) cout << "MMYY"; else cout << "NA"; } hinata; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,502
857,503
u655179794
cpp
p03042
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vii = vector<vi>; using vs = vector<string>; using in6 = int64_t; using ind = double; using pii = pair<int, int>; using psi = pair<string, int>; using vpi = vector<pii>; using vps = vector<psi>; #define rep(i, n) for (in6 i = 0; i < (in6)(n); i++) #define repa(i, a, n) for (in6 i = a; i < (in6)(n); i++) #define repdown(i, n) for (in6 i = n; i > 0; i--) #define kyun ios::sync_with_stdio(false) #define hinata cout << "\n" #define all(c) (c).begin(), (c).end() #define pb push_back #define inf 2147483647 #define dset(n) cout << fixed << setprecision(n) void yes() { cout << "Yes"; } void no() { cout << "No"; } int main() { kyun; int n; cin >> n; int a, b; a = n % 100; b = n / 100; if (1 <= a || b <= 12) { if (1 <= b || b <= 12) cout << "AMBIGUOUS"; else cout << "YYMM"; } else { if (1 <= b || b <= 12) cout << "MMYY"; else cout << "NA"; } hinata; }
#include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vii = vector<vi>; using vs = vector<string>; using in6 = int64_t; using ind = double; using pii = pair<int, int>; using psi = pair<string, int>; using vpi = vector<pii>; using vps = vector<psi>; #define rep(i, n) for (in6 i = 0; i < (in6)(n); i++) #define repa(i, a, n) for (in6 i = a; i < (in6)(n); i++) #define repdown(i, n) for (in6 i = n; i > 0; i--) #define kyun ios::sync_with_stdio(false) #define hinata cout << "\n" #define all(c) (c).begin(), (c).end() #define pb push_back #define inf 2147483647 #define dset(n) cout << fixed << setprecision(n) void yes() { cout << "Yes"; } void no() { cout << "No"; } int main() { kyun; int n; cin >> n; int a, b; a = n % 100; b = n / 100; if (1 <= a && a <= 12) { if (1 <= b && b <= 12) cout << "AMBIGUOUS"; else cout << "YYMM"; } else { if (1 <= b && b <= 12) cout << "MMYY"; else cout << "NA"; } hinata; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
857,504
857,503
u655179794
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; bool x = 1 <= a && a <= 12; bool y = 1 <= b && b <= 12; if (x && y) cout << "AMBIGOUS" << endl; if (!x && y) cout << "YYMM" << endl; if (x && !y) cout << "MMYY" << endl; if (!x && !y) cout << "NA" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; bool x = 1 <= a && a <= 12; bool y = 1 <= b && b <= 12; if (x && y) cout << "AMBIGUOUS" << endl; if (!x && y) cout << "YYMM" << endl; if (x && !y) cout << "MMYY" << endl; if (!x && !y) cout << "NA" << endl; return 0; }
[ "literal.string.change", "io.output.change" ]
857,514
857,515
u101018317
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { int s; cin >> s; int r = s % 100; int l = (s - r) % 1000; 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; } }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { int s; cin >> s; int r = s % 100; int l = s / 100; 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; } }
[ "expression.operation.binary.remove" ]
857,522
857,523
u945761460
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define dbg(a) cerr << __LINE__ << ": " << #a << " = " << a << '\n' int main() { int a, b; scanf("%2d %2d", &a, &b); if (a >= 1 and a <= 12 and b >= 1 and b <= 12) puts("AMBIGUOUS"); else if ((a == 0 or a > 12) or (b == 0 or b > 12)) puts("NA"); else if (a <= 12) puts("MMYY"); else puts("YYMM"); return 0; }
#include <bits/stdc++.h> using namespace std; #define dbg(a) cerr << __LINE__ << ": " << #a << " = " << a << '\n' int main() { int a, b; scanf("%2d %2d", &a, &b); if (a >= 1 and a <= 12 and b >= 1 and b <= 12) puts("AMBIGUOUS"); else if ((a == 0 or a > 12) and (b == 0 or b > 12)) puts("NA"); else if (a <= 12 and a > 0) puts("MMYY"); else puts("YYMM"); return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,526
857,525
u329902718
cpp
p03042
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; signed 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 ((a == 0 || a > 12) && (b == 0 && b > 12)) cout << "NA" << endl; else if (a > 12 && b <= 12 || a == 0) cout << "YYMM" << endl; else if (a <= 12 && b > 12 || b == 0) cout << "MMYY" << endl; else if (a <= 12 && b <= 12) cout << "AMBIGUOUS" << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; signed 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 ((a == 0 || a > 12) && (b == 0 || b > 12)) cout << "NA" << endl; else if (a > 12 && b <= 12 || a == 0) cout << "YYMM" << endl; else if (a <= 12 && b > 12 || b == 0) cout << "MMYY" << endl; else if (a <= 12 && b <= 12) cout << "AMBIGUOUS" << endl; return 0; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
857,542
857,543
u890331732
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main(void) { int n, a, b; cin >> n; a = n / 100; b = n % 100; if (a >= 1 && a <= 12 && b >= 1 && b <= 12) { cout << "AMBIGUOUS" << endl; } else if (a >= 1 && a <= 12) { cout << "MMYY" << endl; } else if (b >= 1 && b <= 12) { cout << "YYMM" << endl; } else { cout << "NG" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int n, a, b; cin >> n; a = n / 100; b = n % 100; if (a >= 1 && a <= 12 && b >= 1 && b <= 12) { cout << "AMBIGUOUS" << endl; } else if (a >= 1 && a <= 12) { cout << "MMYY" << endl; } else if (b >= 1 && b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,544
857,545
u821989875
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int front = (s[1] - '0') + (s[0] - '0') * 10; int back = (s[3] - '0') + (s[2] - '0') * 10; if (1 <= front && front <= 12) { if (1 <= back <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= back && back <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int front = (s[1] - '0') + (s[0] - '0') * 10; int back = (s[3] - '0') + (s[2] - '0') * 10; if (1 <= front && front <= 12) { if (1 <= back && back <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= back && back <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "control_flow.branch.if.condition.change" ]
857,546
857,547
u105533331
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int front = (s[1] - '0') + (s[0] - '0') * 10; int back = (s[3] - '0') + (s[2] - '0') * 10; if (1 <= front <= 12) { if (1 <= back <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= back <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int front = (s[1] - '0') + (s[0] - '0') * 10; int back = (s[3] - '0') + (s[2] - '0') * 10; if (1 <= front && front <= 12) { if (1 <= back && back <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= back && back <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "control_flow.branch.if.condition.change" ]
857,548
857,547
u105533331
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(void) { string S; cin >> S; int f = (S[0] - '0') * 10 + S[1] - '0'; int b = (S[2] - '0') * 10 + S[3] - '0'; if (1 <= f && f <= 12) { if (1 <= b && b <= 12) { puts("AMBIGUOUS"); } else { puts("MMYY"); } } else { if (1 <= b && b <= 12) { puts("YYMM"); } else { puts("Nah"); } } 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(void) { string S; cin >> S; int f = (S[0] - '0') * 10 + S[1] - '0'; int b = (S[2] - '0') * 10 + S[3] - '0'; if (1 <= f && f <= 12) { if (1 <= b && b <= 12) { puts("AMBIGUOUS"); } else { puts("MMYY"); } } else { if (1 <= b && b <= 12) { puts("YYMM"); } else { puts("NA"); } } return 0; }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
857,563
857,564
u058720266
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() { string S; cin >> S; bool f = false, g = false; int a = (S[0] - '0') * 10 + (S[1] - '0'); int b = (S[2] - '0') * 10 + (S[3] - '0'); if (1 <= a && a <= 12) f = true; if (1 <= b && b <= 12) g = true; if (f && g) { cout << "AMBIGUOUS" << endl; } else if (f) { cout << "YYMM" << endl; } else if (g) { cout << "MMYY" << 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() { string S; cin >> S; bool f = false, g = false; int a = (S[0] - '0') * 10 + (S[1] - '0'); int b = (S[2] - '0') * 10 + (S[3] - '0'); if (1 <= a && a <= 12) f = true; if (1 <= b && b <= 12) g = true; if (f && g) { cout << "AMBIGUOUS" << endl; } else if (f) { cout << "MMYY" << endl; } else if (g) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
857,568
857,569
u810388173
cpp
p03042
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; int main() { int s; cin >> s; int x, y; x = (s - s % 100) / 100; y = s % 100; int YYMM = 0; int MMYY = 0; if (x > 1 && y <= 12 && y >= 1) { YYMM++; } if (y > 1 && x <= 12 && x >= 1) { MMYY++; } if (YYMM == 1 && MMYY == 1) { cout << "AMBIGUOUS" << endl; } else if (YYMM == 0 && MMYY == 1) { cout << "MMYY" << endl; } else if (YYMM == 1 && MMYY == 0) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; int main() { int s; cin >> s; int x, y; x = (s - s % 100) / 100; y = s % 100; int YYMM = 0; int MMYY = 0; if (x >= 0 && y <= 12 && y >= 1) { YYMM++; } if (y >= 0 && x <= 12 && x >= 1) { MMYY++; } if (YYMM == 1 && MMYY == 1) { cout << "AMBIGUOUS" << endl; } else if (YYMM == 0 && MMYY == 1) { cout << "MMYY" << endl; } else if (YYMM == 1 && MMYY == 0) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
[]
857,585
857,583
u117737149
cpp
p03042
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; typedef vector<string> vs; typedef vector<char> vc; typedef queue<ll> ql; typedef deque<ll> dql; typedef priority_queue<ll /*, vl, greater<ll>*/> pql; //降順(/*昇順*/) typedef set<ll> sl; typedef pair<ll, ll> pl; typedef vector<vl> vvl; typedef vector<pl> vpl; #define rep(i, n) for (ll i = 0; i < ll(n); i++) #define rep2(i, n) for (ll i = 1; i <= ll(n); i++) //#define rep(i, k, n) for(ll i = k-1; i < ll(n); i++) //#define rep2(i, k, n) for(ll i = k; i <= ll(n); i++) #define all(v) (v).begin(), (v).end() bool chmin(ll &a, ll b) { if (b < a) { a = b; return 1; } return 0; } bool chmax(ll &a, ll b) { if (b > a) { a = b; return 1; } return 0; } const ll INF = 1LL << 60; const ll MOD = 1e9 + 7; // const ll MOD = 998244353; const ll MAX = 1e9; const char newl = '\n'; bool ismonth(ll n) { if (1 <= n and n <= 12) return 1; else return 0; } int main() { ios::sync_with_stdio(false); cin.tie(0); ll s; cin >> s; ll m = s / 100, n = s % 100; if (ismonth(m) and ismonth(n)) cout << "AMBIGUOUS" << newl; if (ismonth(m) and !ismonth(n)) cout << "YYMM" << newl; if (!ismonth(m) and ismonth(n)) cout << "MMYY" << newl; if (!ismonth(m) and !ismonth(n)) cout << "NA" << newl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; typedef vector<string> vs; typedef vector<char> vc; typedef queue<ll> ql; typedef deque<ll> dql; typedef priority_queue<ll /*, vl, greater<ll>*/> pql; //降順(/*昇順*/) typedef set<ll> sl; typedef pair<ll, ll> pl; typedef vector<vl> vvl; typedef vector<pl> vpl; #define rep(i, n) for (ll i = 0; i < ll(n); i++) #define rep2(i, n) for (ll i = 1; i <= ll(n); i++) //#define rep(i, k, n) for(ll i = k-1; i < ll(n); i++) //#define rep2(i, k, n) for(ll i = k; i <= ll(n); i++) #define all(v) (v).begin(), (v).end() bool chmin(ll &a, ll b) { if (b < a) { a = b; return 1; } return 0; } bool chmax(ll &a, ll b) { if (b > a) { a = b; return 1; } return 0; } const ll INF = 1LL << 60; const ll MOD = 1e9 + 7; // const ll MOD = 998244353; const ll MAX = 1e9; const char newl = '\n'; bool ismonth(ll n) { if (1 <= n and n <= 12) return 1; else return 0; } int main() { ios::sync_with_stdio(false); cin.tie(0); ll s; cin >> s; ll m = s / 100, n = s % 100; if (ismonth(m) and ismonth(n)) cout << "AMBIGUOUS" << newl; if (ismonth(m) and !ismonth(n)) cout << "MMYY" << newl; if (!ismonth(m) and ismonth(n)) cout << "YYMM" << newl; if (!ismonth(m) and !ismonth(n)) cout << "NA" << newl; return 0; }
[ "literal.string.change", "io.output.change" ]
857,586
857,587
u682191329
cpp
p03042
#include <bits/stdc++.h> using namespace std; #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdlib> #include <iostream> #include <math.h> #include <numeric> #include <sstream> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) #define SIZE 100005 #define INF 1000000000000000LL using pint = pair<int, int>; using vec = vector<int>; using ll = long long; using vll = vector<ll>; using vvll = vector<vector<ll>>; 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 main() { string s; cin >> s; int AA, BB; if (s[0] != 0) { AA = (s[0] - '0') * 10 + (s[1] - '0'); } else { AA = s[1] - '0'; } if (s[2] != 0) { BB = (s[2] - '0') * 10 + (s[3] - '0'); } else { BB = s[3] - '0'; } if (0 <= AA && AA <= 99 && 1 <= BB && BB <= 12) cout << "YYMM" << endl; else if (1 <= AA && AA <= 12 && 0 <= BB && BB <= 99) cout << "MMYY" << endl; else if (1 <= AA && AA <= 12 && 1 <= BB && BB <= 12) cout << "AMBIGUOUS" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdlib> #include <iostream> #include <math.h> #include <numeric> #include <sstream> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) #define SIZE 100005 #define INF 1000000000000000LL using pint = pair<int, int>; using vec = vector<int>; using ll = long long; using vll = vector<ll>; using vvll = vector<vector<ll>>; 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 main() { string s; cin >> s; int AA, BB; if (s[0] != 0) { AA = (s[0] - '0') * 10 + (s[1] - '0'); } else { AA = s[1] - '0'; } if (s[2] != 0) { BB = (s[2] - '0') * 10 + (s[3] - '0'); } else { BB = s[3] - '0'; } if (1 <= AA && AA <= 12 && 1 <= BB && BB <= 12) cout << "AMBIGUOUS" << endl; else if (1 <= AA && AA <= 12 && 0 <= BB && BB <= 99) cout << "MMYY" << endl; else if (0 <= AA && AA <= 99 && 1 <= BB && BB <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; }
[ "literal.number.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
857,608
857,609
u825601908
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { string s; cin >> s; int s1 = stoi(s.substr(0, 2)); int s2 = stoi(s.substr(2, 2)); bool isM1 = false, isM2 = false; if (s1 >= 0 && s1 <= 12) isM1 = true; if (s2 >= 0 && s2 <= 12) isM2 = true; if (isM1 && isM2) cout << "AMBIGUOUS" << endl; else if (isM1) cout << "MMYY" << endl; else if (isM2) cout << "YYMM" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; int main() { string s; cin >> s; int s1 = stoi(s.substr(0, 2)); int s2 = stoi(s.substr(2, 2)); bool isM1 = false, isM2 = false; if (s1 >= 1 && s1 <= 12) isM1 = true; if (s2 >= 1 && s2 <= 12) isM2 = true; if (isM1 && isM2) cout << "AMBIGUOUS" << endl; else if (isM1) cout << "MMYY" << endl; else if (isM2) cout << "YYMM" << endl; else cout << "NA" << endl; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
857,612
857,613
u425086757
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; int main() { int s; cin >> s; int y, m; y = s / 100; m = s % 100; if (0 < y && y < 13 && 0 < m && m < 13) cout << "AMBIGUOUS" << endl; else if (0 < y && y < 13) cout << "YYMM" << endl; else if (0 < m && m < 13) cout << "MMYY" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; int main() { int s; cin >> s; int y, m; y = s / 100; m = s % 100; if (0 < y && y < 13 && 0 < m && m < 13) cout << "AMBIGUOUS" << endl; else if (0 < y && y < 13) cout << "MMYY" << endl; else if (0 < m && m < 13) cout << "YYMM" << endl; else cout << "NA" << endl; }
[ "literal.string.change", "io.output.change" ]
857,614
857,615
u016334391
cpp
p03042
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var << endl; #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) \ cerr << v[i] << " " using namespace std; typedef long long int ll; typedef vector<ll> llvec; typedef vector<double> dvec; typedef pair<ll, ll> P; typedef long double ld; struct edge { ll x, c; }; ll mod(ll a, ll mod) { ll res = a % mod; if (res < 0) res = res + mod; return res; } ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } ll modinv(ll a, ll mod) { return modpow(a, mod - 2, mod); } ll gcd(ll a, ll b) { ll r = a % b; if (r == 0) return b; else return gcd(b, a % b); } bool is_prime(ll n) { ll i = 2; if (n == 1) return false; if (n == 2) return true; bool res = true; while (i * i < n) { if (n % i == 0) { res = false; } i = i + 1; } // if(i==1)res = false; if (n % i == 0) res = false; return res; } struct UnionFind { ll N; llvec p; llvec cnt; UnionFind(ll n) { N = n; p = llvec(N); cnt = llvec(N, 0); rep(i, N) { p[i] = i; cnt[i] = 1; } } void con(ll a, ll b) { P at = root(a); P bt = root(b); if (at.second != bt.second) { if (at.first > bt.first) { swap(at, bt); swap(a, b); } p[at.second] = bt.second; cnt[bt.second] += cnt[at.second]; p[a] = bt.second; } } P root(ll a) { ll atmp = a; ll c = 0; while (atmp != p[atmp]) { atmp = p[atmp]; c++; } p[a] = atmp; return {c, atmp}; } bool is_con(ll a, ll b) { P at = root(a); P bt = root(b); return at.second == bt.second; } }; struct dijkstra { ll N; llvec d; vector<vector<edge>> e; dijkstra(ll n) { N = n; // d = llvec(N, 1e18); e = vector<vector<edge>>(N); } void add_edge(ll from, ll to, ll cost) { e[from].push_back({to, cost}); } void run(ll start) { priority_queue<P, vector<P>, greater<P>> que; que.push({0, start}); d = llvec(N, 1e18); d[start] = 0; while (!que.empty()) { P q = que.top(); que.pop(); ll dc = q.first; ll x = q.second; if (dc > d[x]) { continue; } else { for (auto ip : e[x]) { if (d[ip.x] <= d[x] + ip.c) { continue; } else { d[ip.x] = d[x] + ip.c; que.push({d[ip.x], ip.x}); } } } } } }; /************************************** ** A main function starts from here ** ***************************************/ int main() { string S; cin >> S; bool f = false; bool g = false; ll d1 = stoi(S.substr(0, 2)); ll d2 = stoi(S.substr(2, 2)); f = (d1 <= 12 and d1 >= 1); g = (d2 >= 1 and d2 <= 12); if (f and g) { cout << "AMBIGOUS"; } else if (f) { cout << "MMYY"; } else if (g) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var << endl; #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) \ cerr << v[i] << " " using namespace std; typedef long long int ll; typedef vector<ll> llvec; typedef vector<double> dvec; typedef pair<ll, ll> P; typedef long double ld; struct edge { ll x, c; }; ll mod(ll a, ll mod) { ll res = a % mod; if (res < 0) res = res + mod; return res; } ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } ll modinv(ll a, ll mod) { return modpow(a, mod - 2, mod); } ll gcd(ll a, ll b) { ll r = a % b; if (r == 0) return b; else return gcd(b, a % b); } bool is_prime(ll n) { ll i = 2; if (n == 1) return false; if (n == 2) return true; bool res = true; while (i * i < n) { if (n % i == 0) { res = false; } i = i + 1; } // if(i==1)res = false; if (n % i == 0) res = false; return res; } struct UnionFind { ll N; llvec p; llvec cnt; UnionFind(ll n) { N = n; p = llvec(N); cnt = llvec(N, 0); rep(i, N) { p[i] = i; cnt[i] = 1; } } void con(ll a, ll b) { P at = root(a); P bt = root(b); if (at.second != bt.second) { if (at.first > bt.first) { swap(at, bt); swap(a, b); } p[at.second] = bt.second; cnt[bt.second] += cnt[at.second]; p[a] = bt.second; } } P root(ll a) { ll atmp = a; ll c = 0; while (atmp != p[atmp]) { atmp = p[atmp]; c++; } p[a] = atmp; return {c, atmp}; } bool is_con(ll a, ll b) { P at = root(a); P bt = root(b); return at.second == bt.second; } }; struct dijkstra { ll N; llvec d; vector<vector<edge>> e; dijkstra(ll n) { N = n; // d = llvec(N, 1e18); e = vector<vector<edge>>(N); } void add_edge(ll from, ll to, ll cost) { e[from].push_back({to, cost}); } void run(ll start) { priority_queue<P, vector<P>, greater<P>> que; que.push({0, start}); d = llvec(N, 1e18); d[start] = 0; while (!que.empty()) { P q = que.top(); que.pop(); ll dc = q.first; ll x = q.second; if (dc > d[x]) { continue; } else { for (auto ip : e[x]) { if (d[ip.x] <= d[x] + ip.c) { continue; } else { d[ip.x] = d[x] + ip.c; que.push({d[ip.x], ip.x}); } } } } } }; /************************************** ** A main function starts from here ** ***************************************/ int main() { string S; cin >> S; bool f = false; bool g = false; ll d1 = stoi(S.substr(0, 2)); ll d2 = stoi(S.substr(2, 2)); f = (d1 <= 12 and d1 >= 1); g = (d2 >= 1 and d2 <= 12); if (f and g) { cout << "AMBIGUOUS"; } else if (f) { cout << "MMYY"; } else if (g) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
[ "literal.string.change", "expression.operation.binary.change" ]
857,624
857,625
u225053756
cpp
p03042
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var << endl; #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) \ cerr << v[i] << " " using namespace std; typedef long long int ll; typedef vector<ll> llvec; typedef vector<double> dvec; typedef pair<ll, ll> P; typedef long double ld; struct edge { ll x, c; }; ll mod(ll a, ll mod) { ll res = a % mod; if (res < 0) res = res + mod; return res; } ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } ll modinv(ll a, ll mod) { return modpow(a, mod - 2, mod); } ll gcd(ll a, ll b) { ll r = a % b; if (r == 0) return b; else return gcd(b, a % b); } bool is_prime(ll n) { ll i = 2; if (n == 1) return false; if (n == 2) return true; bool res = true; while (i * i < n) { if (n % i == 0) { res = false; } i = i + 1; } // if(i==1)res = false; if (n % i == 0) res = false; return res; } struct UnionFind { ll N; llvec p; llvec cnt; UnionFind(ll n) { N = n; p = llvec(N); cnt = llvec(N, 0); rep(i, N) { p[i] = i; cnt[i] = 1; } } void con(ll a, ll b) { P at = root(a); P bt = root(b); if (at.second != bt.second) { if (at.first > bt.first) { swap(at, bt); swap(a, b); } p[at.second] = bt.second; cnt[bt.second] += cnt[at.second]; p[a] = bt.second; } } P root(ll a) { ll atmp = a; ll c = 0; while (atmp != p[atmp]) { atmp = p[atmp]; c++; } p[a] = atmp; return {c, atmp}; } bool is_con(ll a, ll b) { P at = root(a); P bt = root(b); return at.second == bt.second; } }; struct dijkstra { ll N; llvec d; vector<vector<edge>> e; dijkstra(ll n) { N = n; // d = llvec(N, 1e18); e = vector<vector<edge>>(N); } void add_edge(ll from, ll to, ll cost) { e[from].push_back({to, cost}); } void run(ll start) { priority_queue<P, vector<P>, greater<P>> que; que.push({0, start}); d = llvec(N, 1e18); d[start] = 0; while (!que.empty()) { P q = que.top(); que.pop(); ll dc = q.first; ll x = q.second; if (dc > d[x]) { continue; } else { for (auto ip : e[x]) { if (d[ip.x] <= d[x] + ip.c) { continue; } else { d[ip.x] = d[x] + ip.c; que.push({d[ip.x], ip.x}); } } } } } }; /************************************** ** A main function starts from here ** ***************************************/ int main() { string S; cin >> S; bool f = false; bool g = false; ll d1 = stoi(S.substr(0, 2)); ll d2 = stoi(S.substr(0, 2)); f = (d1 <= 12 and d1 >= 1); g = (d2 >= 1 and d2 <= 12); if (f and g) { cout << "AMBIGOUS"; } else if (f) { cout << "MMYY"; } else if (g) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var << endl; #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) \ cerr << v[i] << " " using namespace std; typedef long long int ll; typedef vector<ll> llvec; typedef vector<double> dvec; typedef pair<ll, ll> P; typedef long double ld; struct edge { ll x, c; }; ll mod(ll a, ll mod) { ll res = a % mod; if (res < 0) res = res + mod; return res; } ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } ll modinv(ll a, ll mod) { return modpow(a, mod - 2, mod); } ll gcd(ll a, ll b) { ll r = a % b; if (r == 0) return b; else return gcd(b, a % b); } bool is_prime(ll n) { ll i = 2; if (n == 1) return false; if (n == 2) return true; bool res = true; while (i * i < n) { if (n % i == 0) { res = false; } i = i + 1; } // if(i==1)res = false; if (n % i == 0) res = false; return res; } struct UnionFind { ll N; llvec p; llvec cnt; UnionFind(ll n) { N = n; p = llvec(N); cnt = llvec(N, 0); rep(i, N) { p[i] = i; cnt[i] = 1; } } void con(ll a, ll b) { P at = root(a); P bt = root(b); if (at.second != bt.second) { if (at.first > bt.first) { swap(at, bt); swap(a, b); } p[at.second] = bt.second; cnt[bt.second] += cnt[at.second]; p[a] = bt.second; } } P root(ll a) { ll atmp = a; ll c = 0; while (atmp != p[atmp]) { atmp = p[atmp]; c++; } p[a] = atmp; return {c, atmp}; } bool is_con(ll a, ll b) { P at = root(a); P bt = root(b); return at.second == bt.second; } }; struct dijkstra { ll N; llvec d; vector<vector<edge>> e; dijkstra(ll n) { N = n; // d = llvec(N, 1e18); e = vector<vector<edge>>(N); } void add_edge(ll from, ll to, ll cost) { e[from].push_back({to, cost}); } void run(ll start) { priority_queue<P, vector<P>, greater<P>> que; que.push({0, start}); d = llvec(N, 1e18); d[start] = 0; while (!que.empty()) { P q = que.top(); que.pop(); ll dc = q.first; ll x = q.second; if (dc > d[x]) { continue; } else { for (auto ip : e[x]) { if (d[ip.x] <= d[x] + ip.c) { continue; } else { d[ip.x] = d[x] + ip.c; que.push({d[ip.x], ip.x}); } } } } } }; /************************************** ** A main function starts from here ** ***************************************/ int main() { string S; cin >> S; bool f = false; bool g = false; ll d1 = stoi(S.substr(0, 2)); ll d2 = stoi(S.substr(2, 2)); f = (d1 <= 12 and d1 >= 1); g = (d2 >= 1 and d2 <= 12); if (f and g) { cout << "AMBIGUOUS"; } else if (f) { cout << "MMYY"; } else if (g) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
[ "literal.number.change", "call.arguments.change", "literal.string.change", "expression.operation.binary.change" ]
857,627
857,625
u225053756
cpp
p03042
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var << endl; #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) \ cerr << v[i] << " " using namespace std; typedef long long int ll; typedef vector<ll> llvec; typedef vector<double> dvec; typedef pair<ll, ll> P; typedef long double ld; struct edge { ll x, c; }; ll mod(ll a, ll mod) { ll res = a % mod; if (res < 0) res = res + mod; return res; } ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } ll modinv(ll a, ll mod) { return modpow(a, mod - 2, mod); } ll gcd(ll a, ll b) { ll r = a % b; if (r == 0) return b; else return gcd(b, a % b); } bool is_prime(ll n) { ll i = 2; if (n == 1) return false; if (n == 2) return true; bool res = true; while (i * i < n) { if (n % i == 0) { res = false; } i = i + 1; } // if(i==1)res = false; if (n % i == 0) res = false; return res; } struct UnionFind { ll N; llvec p; llvec cnt; UnionFind(ll n) { N = n; p = llvec(N); cnt = llvec(N, 0); rep(i, N) { p[i] = i; cnt[i] = 1; } } void con(ll a, ll b) { P at = root(a); P bt = root(b); if (at.second != bt.second) { if (at.first > bt.first) { swap(at, bt); swap(a, b); } p[at.second] = bt.second; cnt[bt.second] += cnt[at.second]; p[a] = bt.second; } } P root(ll a) { ll atmp = a; ll c = 0; while (atmp != p[atmp]) { atmp = p[atmp]; c++; } p[a] = atmp; return {c, atmp}; } bool is_con(ll a, ll b) { P at = root(a); P bt = root(b); return at.second == bt.second; } }; struct dijkstra { ll N; llvec d; vector<vector<edge>> e; dijkstra(ll n) { N = n; // d = llvec(N, 1e18); e = vector<vector<edge>>(N); } void add_edge(ll from, ll to, ll cost) { e[from].push_back({to, cost}); } void run(ll start) { priority_queue<P, vector<P>, greater<P>> que; que.push({0, start}); d = llvec(N, 1e18); d[start] = 0; while (!que.empty()) { P q = que.top(); que.pop(); ll dc = q.first; ll x = q.second; if (dc > d[x]) { continue; } else { for (auto ip : e[x]) { if (d[ip.x] <= d[x] + ip.c) { continue; } else { d[ip.x] = d[x] + ip.c; que.push({d[ip.x], ip.x}); } } } } } }; /************************************** ** A main function starts from here ** ***************************************/ int main() { string S; cin >> S; bool f = false; bool g = false; ll d1 = stoi(S.substr(0, 2)); ll d2 = stoi(S.substr(0, 2)); f = (d1 <= 12 and d1 >= 0); g = (d2 >= 0 and d2 <= 12); if (f and g) { cout << "AMBIGOUS"; } else if (f) { cout << "MMYY"; } else if (g) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
#include "bits/stdc++.h" #define MOD 1000000007 #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define rALL(v) v.rbegin(), v.rend() #define FOR(i, j, k) for (ll i = j; i < k; i++) #define debug_print(var) cerr << #var << "=" << var << endl; #define DUMP(i, v) \ for (ll i = 0; i < v.size(); i++) \ cerr << v[i] << " " using namespace std; typedef long long int ll; typedef vector<ll> llvec; typedef vector<double> dvec; typedef pair<ll, ll> P; typedef long double ld; struct edge { ll x, c; }; ll mod(ll a, ll mod) { ll res = a % mod; if (res < 0) res = res + mod; return res; } ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } ll modinv(ll a, ll mod) { return modpow(a, mod - 2, mod); } ll gcd(ll a, ll b) { ll r = a % b; if (r == 0) return b; else return gcd(b, a % b); } bool is_prime(ll n) { ll i = 2; if (n == 1) return false; if (n == 2) return true; bool res = true; while (i * i < n) { if (n % i == 0) { res = false; } i = i + 1; } // if(i==1)res = false; if (n % i == 0) res = false; return res; } struct UnionFind { ll N; llvec p; llvec cnt; UnionFind(ll n) { N = n; p = llvec(N); cnt = llvec(N, 0); rep(i, N) { p[i] = i; cnt[i] = 1; } } void con(ll a, ll b) { P at = root(a); P bt = root(b); if (at.second != bt.second) { if (at.first > bt.first) { swap(at, bt); swap(a, b); } p[at.second] = bt.second; cnt[bt.second] += cnt[at.second]; p[a] = bt.second; } } P root(ll a) { ll atmp = a; ll c = 0; while (atmp != p[atmp]) { atmp = p[atmp]; c++; } p[a] = atmp; return {c, atmp}; } bool is_con(ll a, ll b) { P at = root(a); P bt = root(b); return at.second == bt.second; } }; struct dijkstra { ll N; llvec d; vector<vector<edge>> e; dijkstra(ll n) { N = n; // d = llvec(N, 1e18); e = vector<vector<edge>>(N); } void add_edge(ll from, ll to, ll cost) { e[from].push_back({to, cost}); } void run(ll start) { priority_queue<P, vector<P>, greater<P>> que; que.push({0, start}); d = llvec(N, 1e18); d[start] = 0; while (!que.empty()) { P q = que.top(); que.pop(); ll dc = q.first; ll x = q.second; if (dc > d[x]) { continue; } else { for (auto ip : e[x]) { if (d[ip.x] <= d[x] + ip.c) { continue; } else { d[ip.x] = d[x] + ip.c; que.push({d[ip.x], ip.x}); } } } } } }; /************************************** ** A main function starts from here ** ***************************************/ int main() { string S; cin >> S; bool f = false; bool g = false; ll d1 = stoi(S.substr(0, 2)); ll d2 = stoi(S.substr(2, 2)); f = (d1 <= 12 and d1 >= 1); g = (d2 >= 1 and d2 <= 12); if (f and g) { cout << "AMBIGUOUS"; } else if (f) { cout << "MMYY"; } else if (g) { cout << "YYMM"; } else { cout << "NA"; } return 0; }
[ "literal.number.change", "call.arguments.change", "assignment.value.change", "expression.operation.binary.change", "literal.string.change" ]
857,628
857,625
u225053756
cpp
p03042
#include <algorithm> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; bool yy = false; bool mm = false; if (s[0] == '1' && (s[1] == '0' || s[1] == '1' || s[1] == '2')) { yy = true; } if (s[0] == '0' && s[1] != '0') yy = true; if (s[2] == '1' && (s[3] == '0' || s[3] == '1' || s[3] == '2')) { mm = true; } if (s[2] = '0' && s[3] != '0') mm = true; bool aut = false; if (yy && mm == false) cout << "MMYY"; if (yy == false && mm) cout << "YYMM"; if (yy && mm) cout << "AMBIGUOUS"; if (yy == false && mm == false) cout << "NA"; return 0; }
#include <algorithm> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; bool yy = false; bool mm = false; if (s[0] == '1' && (s[1] == '0' || s[1] == '1' || s[1] == '2')) { yy = true; } if (s[0] == '0' && s[1] != '0') yy = true; if (s[2] == '1' && (s[3] == '0' || s[3] == '1' || s[3] == '2')) { mm = true; } if (s[2] == '0' && s[3] != '0') mm = true; if (yy && mm == false) cout << "MMYY"; if (yy == false && mm) cout << "YYMM"; if (yy && mm) cout << "AMBIGUOUS"; if (yy == false && mm == false) cout << "NA"; return 0; }
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo", "variable_declaration.remove" ]
857,629
857,630
u047572420
cpp
p03042
#include <algorithm> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; bool yy = false; bool mm = false; if (s[0] == '1' && (s[1] == '0' || s[1] == '1' || s[1] == '2')) { yy = true; } if (s[0] == '0' && s[1] != '0') yy = true; if (s[2] == '1' && (s[3] == '0' || s[3] == '1' || s[3] == '2')) { mm = true; } if (s[2] = '0' && s[3] != '0') mm = true; if (yy && mm == false) cout << "MMYY"; if (yy == false && mm) cout << "YYMM"; if (yy && mm) cout << "AMBIGUOUS"; if (yy == false && mm == false) cout << "NA"; return 0; }
#include <algorithm> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; bool yy = false; bool mm = false; if (s[0] == '1' && (s[1] == '0' || s[1] == '1' || s[1] == '2')) { yy = true; } if (s[0] == '0' && s[1] != '0') yy = true; if (s[2] == '1' && (s[3] == '0' || s[3] == '1' || s[3] == '2')) { mm = true; } if (s[2] == '0' && s[3] != '0') mm = true; if (yy && mm == false) cout << "MMYY"; if (yy == false && mm) cout << "YYMM"; if (yy && mm) cout << "AMBIGUOUS"; if (yy == false && mm == false) cout << "NA"; return 0; }
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
857,631
857,630
u047572420
cpp
p03042
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int dig(int x, int y) { rep(i, y - 1) x /= 10; return x % 10; } int main() { string s; cin >> s; int num = stoi(s); int a = dig(num, 1) + 10 * dig(num, 2); int b = dig(num, 3) + 10 * dig(num, 4); if (a == 0) { if (b == 0 || b >= 13) cout << "NA"; else cout << "MMYY"; } else if (b == 0) { if (a >= 13) cout << "NA"; else cout << "YYMM"; } else if (a >= 13 && b >= 13) cout << "WA"; else if (a >= 13 && b < 13) cout << "MMYY"; else if (a < 13 && b >= 13) cout << "YYMM"; else cout << "AMBIGUOUS"; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int dig(int x, int y) { rep(i, y - 1) x /= 10; return x % 10; } int main() { string s; cin >> s; int num = stoi(s); int a = dig(num, 1) + 10 * dig(num, 2); int b = dig(num, 3) + 10 * dig(num, 4); if (a == 0) { if (b == 0 || b >= 13) cout << "NA"; else cout << "MMYY"; } else if (b == 0) { if (a >= 13) cout << "NA"; else cout << "YYMM"; } else if (a >= 13 && b >= 13) cout << "NA"; else if (a >= 13 && b < 13) cout << "MMYY"; else if (a < 13 && b >= 13) cout << "YYMM"; else cout << "AMBIGUOUS"; }
[ "literal.string.change", "io.output.change" ]
857,632
857,633
u826608257
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; if (0 < S / 100 && S / 100 <= 12) if (0 < S % 100 && S % 100 <= 12) cout << "AMBIGUOUS" << endl; else cout << "YYMM" << endl; else if (0 < S % 100 && S % 100 <= 12) cout << "MMYY" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; if (0 < S / 100 && S / 100 <= 12) if (0 < S % 100 && S % 100 <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; else if (0 < S % 100 && S % 100 <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; }
[ "literal.string.change", "io.output.change" ]
857,650
857,651
u306482197
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string A = S.substr(0, 2); string B = S.substr(2, 2); int C = stoi(A); int D = stoi(B); int a = 0; int b = 0; if (0 <= C && C <= 99) { if (1 <= D && D <= 12) { a = 1; } } if (1 <= C && C <= 12) { if (0 <= D && D <= 99) { b = 1; } } if (a == 1 && b == 0) { cout << "YYMMM" << endl; } if (a == 0 && b == 1) { cout << "MMYY" << endl; } if (a == 1 && b == 1) { cout << "AMBIGUOUS" << endl; } if (a == 0 && b == 0) { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string A = S.substr(0, 2); string B = S.substr(2, 2); int C = stoi(A); int D = stoi(B); int a = 0; int b = 0; if (0 <= C && C <= 99) { if (1 <= D && D <= 12) { a = 1; } } if (1 <= C && C <= 12) { if (0 <= D && D <= 99) { b = 1; } } if (a == 1 && b == 0) { cout << "YYMM" << endl; } if (a == 0 && b == 1) { cout << "MMYY" << endl; } if (a == 1 && b == 1) { cout << "AMBIGUOUS" << endl; } if (a == 0 && b == 0) { cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
857,652
857,653
u245412777
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string A = S.substr(0, 2); string B = S.substr(2); int C = stoi(A); int D = stoi(B); int a = 0; int b = 0; if (0 <= C && C <= 99) { if (1 <= D && D <= 12) { a = 1; } } if (1 <= C && C <= 12) { if (0 <= D && D <= 99) { b = 1; } } if (a == 1 && b == 0) { cout << "YYMMM" << endl; } if (a == 0 && b == 1) { cout << "MMYY" << endl; } if (a == 1 && b == 1) { cout << "AMBIGUOUS" << endl; } if (a == 0 && b == 0) { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string A = S.substr(0, 2); string B = S.substr(2, 2); int C = stoi(A); int D = stoi(B); int a = 0; int b = 0; if (0 <= C && C <= 99) { if (1 <= D && D <= 12) { a = 1; } } if (1 <= C && C <= 12) { if (0 <= D && D <= 99) { b = 1; } } if (a == 1 && b == 0) { cout << "YYMM" << endl; } if (a == 0 && b == 1) { cout << "MMYY" << endl; } if (a == 1 && b == 1) { cout << "AMBIGUOUS" << endl; } if (a == 0 && b == 0) { cout << "NA" << endl; } }
[ "call.arguments.add", "literal.string.change", "io.output.change" ]
857,654
857,653
u245412777
cpp
p03042
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> P; typedef unsigned long long int ull; const ll mod = 1000000007; const ll linf = 1LL << 60; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define REP(i, m, n) for (int i = (m); i < (int)n; i++) #define all(a) (a).begin(), (a).end() #define allg(a) (a).begin(), (a).end(), greater<>() #define SUM(a) accumulate((a).begin(), (a).end(), 0) #define d10 std::setprecision(10) #define d20 std::setprecision(20) #define vec vector<int> #define vecb vector<bool> #define vecd vector<double> using str = string; const double PI = 3.14159265359; template <typename T> int len(T tmp) { int res = 0; while (tmp > 0) { res++; tmp /= 10; } return res; } template <typename T> T gcd(T a, T b) { T t; while (b != 0) { t = a % b; a = b; b = t; } return a; } template <typename T> T recfact(T start, T n) { T i; if (n <= 16) { T r = start; for (i = start + 1; i < start + n; i++) r = r * i % mod; return r % mod; } i = n / 2; return recfact(start, i) % mod * recfact(start + i, n - i) % mod; } template <typename T> T lcm(T a, T b) { return a * b / gcd(a, b); } template <typename T> T fct(T n) { return recfact<T>(1, n); } template <typename T> T ncm(T n, T m) { if (n < m) return 0; T x = (fct(n) % mod / (fct(m) * fct(n - m)) % mod) % mod; return x; } std::string sreverse(string str, int firstItr, int secondItr) { if (firstItr < 0 || secondItr > int(str.size() - 1)) return str; while (firstItr < secondItr) { swap(str[firstItr], str[secondItr]); firstItr++; secondItr--; } return str; } std::string RunLengthEncoding(std::string str) { int itr = 0; std::string res; while (itr < int(str.size())) { char tmp = str[itr++]; int length = 1; while (itr < int(str.size()) && str[itr] == tmp) { ++itr; ++length; } res.push_back(tmp); res += to_string(length); } return res; } str split(str str, size_t first_itr, size_t second_itr) { string tmp; for (size_t i = first_itr; i < second_itr + 1; i++) { tmp.push_back(str.at(i)); } return tmp; } int main(void) { int n; cin >> n; int pre = n / 100; int post = n % 100; if (1 <= pre && pre <= 12) { if (1 <= post && post <= 12) { cout << "AMBISIOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (1 <= post && post <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> P; typedef unsigned long long int ull; const ll mod = 1000000007; const ll linf = 1LL << 60; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define REP(i, m, n) for (int i = (m); i < (int)n; i++) #define all(a) (a).begin(), (a).end() #define allg(a) (a).begin(), (a).end(), greater<>() #define SUM(a) accumulate((a).begin(), (a).end(), 0) #define d10 std::setprecision(10) #define d20 std::setprecision(20) #define vec vector<int> #define vecb vector<bool> #define vecd vector<double> using str = string; const double PI = 3.14159265359; template <typename T> int len(T tmp) { int res = 0; while (tmp > 0) { res++; tmp /= 10; } return res; } template <typename T> T gcd(T a, T b) { T t; while (b != 0) { t = a % b; a = b; b = t; } return a; } template <typename T> T recfact(T start, T n) { T i; if (n <= 16) { T r = start; for (i = start + 1; i < start + n; i++) r = r * i % mod; return r % mod; } i = n / 2; return recfact(start, i) % mod * recfact(start + i, n - i) % mod; } template <typename T> T lcm(T a, T b) { return a * b / gcd(a, b); } template <typename T> T fct(T n) { return recfact<T>(1, n); } template <typename T> T ncm(T n, T m) { if (n < m) return 0; T x = (fct(n) % mod / (fct(m) * fct(n - m)) % mod) % mod; return x; } std::string sreverse(string str, int firstItr, int secondItr) { if (firstItr < 0 || secondItr > int(str.size() - 1)) return str; while (firstItr < secondItr) { swap(str[firstItr], str[secondItr]); firstItr++; secondItr--; } return str; } std::string RunLengthEncoding(std::string str) { int itr = 0; std::string res; while (itr < int(str.size())) { char tmp = str[itr++]; int length = 1; while (itr < int(str.size()) && str[itr] == tmp) { ++itr; ++length; } res.push_back(tmp); res += to_string(length); } return res; } str split(str str, size_t first_itr, size_t second_itr) { string tmp; for (size_t i = first_itr; i < second_itr + 1; i++) { tmp.push_back(str.at(i)); } return tmp; } int main(void) { int n; cin >> n; int pre = n / 100; int post = n % 100; if (1 <= pre && pre <= 12) { if (1 <= post && post <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (1 <= post && post <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "literal.string.change", "io.output.change" ]
857,657
857,658
u007099475
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define FAST \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define MAXX 100005 #define PI 3.14159265358979323846264338327950 #define ll signed long long int ll t, n, a[MAXX], b[MAXX], c[MAXX]; signed main() { FAST; cin >> n; ll ay = n / 100, il = n % 100; if (ay >= 1 && ay <= 12) { if (il >= 1 && il <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } return 0; } else { if (il >= 1 && il <= 12) { cout << "YYMM"; } return 0; } cout << "NA"; }
#include <bits/stdc++.h> using namespace std; #define FAST \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define MAXX 100005 #define PI 3.14159265358979323846264338327950 #define ll signed long long int ll t, n, a[MAXX], b[MAXX], c[MAXX]; signed main() { FAST; cin >> n; ll ay = n / 100, il = n % 100; if (ay >= 1 && ay <= 12) { if (il >= 1 && il <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } return 0; } else { if (il >= 1 && il <= 12) { cout << "YYMM"; } else cout << "NA"; } }
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
857,667
857,668
u102842945
cpp
p03042
#include <iostream> using namespace std; int main() { int s; cin >> s; int a, b; b = s % 100; a = s / 100; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (b >= 1 && b <= 12) cout << "MMYY"; else cout << "NA"; } }
#include <iostream> using namespace std; int main() { int s; cin >> s; int a, b; b = s % 100; a = s / 100; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (b >= 1 && b <= 12) cout << "YYMM"; else cout << "NA"; } }
[ "literal.string.change", "io.output.change" ]
857,669
857,670
u140131311
cpp
p03042
#include <iostream> using namespace std; int main() { int s; cin >> s; int a, b; b = s % 100; a = s / 100; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) { cout << "AMBIGOUS"; } else { cout << "MMYY"; } } else { if (b >= 1 && b <= 12) cout << "MMYY"; else cout << "NA"; } }
#include <iostream> using namespace std; int main() { int s; cin >> s; int a, b; b = s % 100; a = s / 100; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (b >= 1 && b <= 12) cout << "YYMM"; else cout << "NA"; } }
[ "literal.string.change", "io.output.change" ]
857,671
857,670
u140131311
cpp
p03042
// ABC 126 B: YYMM or MMYY // https://atcoder.jp/contests/abc126/tasks/abc126_b #include <iostream> #include <vector> int main() { std::vector<int> sequence(4); for (int i = 0; i < sequence.size(); i++) { char tmp; std::cin >> tmp; sequence.at(i) = static_cast<int>(tmp - '0'); } int first_part = sequence.at(0) * 10 + sequence.at(1); int second_part = sequence.at(2) * 10 + sequence.at(3); if (first_part <= 12 && first_part != 0) { if (second_part <= 12 && second_part != 0) { std::cout << "AMBIGUOS" << "\n"; } else { std::cout << "MMYY" << "\n"; } } else { if (second_part <= 12 && second_part != 0) { std::cout << "YYMM" << "\n"; } else { std::cout << "NA" << "\n"; } } }
// ABC 126 B: YYMM or MMYY // https://atcoder.jp/contests/abc126/tasks/abc126_b #include <iostream> #include <vector> int main() { std::vector<int> sequence(4); for (int i = 0; i < sequence.size(); i++) { char tmp; std::cin >> tmp; sequence.at(i) = static_cast<int>(tmp - '0'); } int first_part = sequence.at(0) * 10 + sequence.at(1); int second_part = sequence.at(2) * 10 + sequence.at(3); if (first_part <= 12 && first_part != 0) { if (second_part <= 12 && second_part != 0) { std::cout << "AMBIGUOUS" << "\n"; } else { std::cout << "MMYY" << "\n"; } } else { if (second_part <= 12 && second_part != 0) { std::cout << "YYMM" << "\n"; } else { std::cout << "NA" << "\n"; } } }
[ "literal.string.change", "expression.operation.binary.change" ]
857,680
857,681
u019820084
cpp
p03042
#include <bits/stdc++.h> using namespace std; #include <math.h> const int64_t INF = 9999999999999999; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; if (a >= 1 && b <= 12) { if (b >= 1 && b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (b >= 1 && b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <bits/stdc++.h> using namespace std; #include <math.h> const int64_t INF = 9999999999999999; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (b >= 1 && b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,688
857,689
u209457657
cpp
p03042
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; // Shift+Command+bでデバッグ //その後ターミナルで./a.outを実行 //入力を貼り付ける ////////////////// // A /*int main(void){ int n,k; string s; cin >> n>>k>>s; for(int i=0 ;i<n;i++){ if(i+1==k){ if(s[i]=='A') cout<<'a'; else if(s[i]=='B') cout<<'b'; else cout<<'c'; }else{ cout<<s[i]; } } cout<<endl; return 0; }*/ ////////////////// // B int main(void) { string s; cin >> s; int a = stoi(s) / 100, b = stoi(s) % 100; if (a = 0) { if (b == 0) cout << "NA" << endl; else if (b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } else if (a <= 12) { if (b == 0) cout << "MMYY" << endl; else if (b <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (b == 0) cout << "NA" << endl; else if (b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } return 0; } ////////////////// // C /*int main(void){ return 0; }*/ ////////////////// // D /*int main(void){ return 0; }*/ ////////////////// // E /*int main(void){ return 0; }*/ ////////////////// // F /*int main(void){ return 0; }*/
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; // Shift+Command+bでデバッグ //その後ターミナルで./a.outを実行 //入力を貼り付ける ////////////////// // A /*int main(void){ int n,k; string s; cin >> n>>k>>s; for(int i=0 ;i<n;i++){ if(i+1==k){ if(s[i]=='A') cout<<'a'; else if(s[i]=='B') cout<<'b'; else cout<<'c'; }else{ cout<<s[i]; } } cout<<endl; return 0; }*/ ////////////////// // B int main(void) { string s; cin >> s; int a = stoi(s) / 100, b = stoi(s) % 100; if (a == 0) { if (b == 0) cout << "NA" << endl; else if (b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } else if (a <= 12) { if (b == 0) cout << "MMYY" << endl; else if (b <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (b == 0) cout << "NA" << endl; else if (b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } return 0; } ////////////////// // C /*int main(void){ return 0; }*/ ////////////////// // D /*int main(void){ return 0; }*/ ////////////////// // E /*int main(void){ return 0; }*/ ////////////////// // F /*int main(void){ return 0; }*/
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
857,696
857,697
u317432339
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a = (s[0] - '0') * 10 + (s[1] - '0'); int b = (s[2] - '0') * 10 + (s[3] - '0'); if (a == 0 || a >= 13 && b == 0 || b >= 13) { cout << "NA" << endl; } else if (a == 0 || a >= 13) { cout << "YYMM" << endl; } else if (b == 0 || b >= 13) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a = (s[0] - '0') * 10 + (s[1] - '0'); int b = (s[2] - '0') * 10 + (s[3] - '0'); if ((a == 0 || a >= 13) && (b == 0 || b >= 13)) { cout << "NA" << endl; } else if (a == 0 || a >= 13) { cout << "YYMM" << endl; } else if (b == 0 || b >= 13) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } }
[ "control_flow.branch.if.condition.change" ]
857,700
857,701
u108108663
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int f; cin >> f; int s = f % 100; f /= 100; bool fbl = (1 <= f && 12 >= f), sbl = (1 <= s && 12 >= s); if (fbl && sbl) cout << "AMBIGUOUS"; else if (fbl) cout << "MMYY"; else if (sbl) cout << "YYMM"; else cout << "NAN"; }
#include <bits/stdc++.h> using namespace std; int main() { int f; cin >> f; int s = f % 100; f /= 100; bool fbl = (1 <= f && 12 >= f), sbl = (1 <= s && 12 >= s); if (fbl && sbl) cout << "AMBIGUOUS"; else if (fbl) cout << "MMYY"; else if (sbl) cout << "YYMM"; else cout << "NA"; }
[ "literal.string.change", "io.output.change" ]
857,704
857,705
u369712616
cpp
p03042
#include <cstdio> using namespace std; int main() { int S; scanf("%d", &S); int S1, S2; S1 = S / 100; S2 = S % 100; bool month1 = (1 <= S1 && S1 <= 12) ? true : false; bool month2 = (1 <= S2 && S2 <= 12) ? true : false; if (month1) { if (month2) printf("AMBIGIOUS"); else printf("MMYY"); } else { if (month2) printf("YYMM"); else printf("NA"); } return 0; }
#include <cstdio> using namespace std; int main() { int S; scanf("%d", &S); int S1, S2; S1 = S / 100; S2 = S % 100; bool month1 = (1 <= S1 && S1 <= 12) ? true : false; bool month2 = (1 <= S2 && S2 <= 12) ? true : false; if (month1) { if (month2) printf("AMBIGUOUS"); else printf("MMYY"); } else { if (month2) printf("YYMM"); else printf("NA"); } return 0; }
[ "misc.typo", "literal.string.change", "call.arguments.change", "io.output.change" ]
857,706
857,707
u316549668
cpp
p03042
#include <iostream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { int S; cin >> S; int front = S / 100; int end = S % 100; if (front >= 1 && front <= 12) { if (end >= 1 && front <= 12) cout << "AMBIGUOUS" << endl; else cout << "YYMM" << endl; } else { if (end >= 1 && front <= 12) cout << "MMYY" << endl; else cout << "NA" << endl; } }
#include <iostream> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { int S; cin >> S; int front = S / 100; int end = S % 100; if (front >= 1 && front <= 12) { if (end >= 1 && end <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (end >= 1 && end <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
857,726
857,727
u049740716
cpp
p03042
#include "bits/stdc++.h" using namespace std; ////////////// Prewritten code follows. Look down for solution. //////////////// #define fs first #define sc second #define pb push_back #define mp(a, b) make_pair(a, b) #define len(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() #define fastio \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<vi> vvi; typedef long long ll; typedef pair<ll, ll> pll; template <typename T> const T INF = (is_same<T, int>::value ? 1e9 : 1e18); template <typename T> inline T mod(T n, T mod) { T res = n % mod; if (res < 0) res += mod; return res; } /// command for char arrays with spaces -> scanf(" %[^\n]", text); ////////////////////////// Solution starts below. ////////////////////////////// int main() { fastio; int n; cin >> n; int a = n / 100; int b = n % 100; bool f = false, s = false; if (a <= 12 and a > 0) f = true; if (b <= 12 and b > 0) s = true; if (s and f) cout << "AMBIGUOUS"; else if (!s and !f) cout << "NA"; else if (s and !f) cout << "MMYY"; else cout << "YYMM"; cout << endl; return 0; }
#include "bits/stdc++.h" using namespace std; ////////////// Prewritten code follows. Look down for solution. //////////////// #define fs first #define sc second #define pb push_back #define mp(a, b) make_pair(a, b) #define len(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() #define fastio \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<vi> vvi; typedef long long ll; typedef pair<ll, ll> pll; template <typename T> const T INF = (is_same<T, int>::value ? 1e9 : 1e18); template <typename T> inline T mod(T n, T mod) { T res = n % mod; if (res < 0) res += mod; return res; } /// command for char arrays with spaces -> scanf(" %[^\n]", text); ////////////////////////// Solution starts below. ////////////////////////////// int main() { fastio; int n; cin >> n; int a = n / 100; int b = n % 100; bool f = false, s = false; if (a <= 12 and a > 0) f = true; if (b <= 12 and b > 0) s = true; if (s and f) cout << "AMBIGUOUS"; else if (!s and !f) cout << "NA"; else if (s and !f) cout << "YYMM"; else cout << "MMYY"; cout << endl; return 0; }
[ "control_flow.branch.else.remove", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
857,740
857,741
u567661286
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int N = stoi(s); int d1 = N / 100; int d2 = N % 100; string a = "NA"; if (0 < d1 && d1 <= 12 && 0 < d2 && d2 <= 12) { a = "ANBIGUOUS"; } else if (0 < d1 && d1 <= 12) { a = "MMYY"; } else if (0 < d2 && d2 <= 12) { a = "YYMM"; } cout << a << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int N = stoi(s); int d1 = N / 100; int d2 = N % 100; string a = "NA"; if (0 < d1 && d1 <= 12 && 0 < d2 && d2 <= 12) { a = "AMBIGUOUS"; } else if (0 < d1 && d1 <= 12) { a = "MMYY"; } else if (0 < d2 && d2 <= 12) { a = "YYMM"; } cout << a << endl; return 0; }
[ "literal.string.change", "assignment.value.change" ]
857,742
857,743
u251242696
cpp
p03042
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) FOR(i, 0, n) #define fi first #define se second #define pb push_back #define mp make_pair #define eb emplace_back #define bcnt __builtin_popcountll using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<ll, ll> Pll; typedef pair<int, int> Pin; ll INF = 1e16; int inf = 1e9; ll MOD = 1e9 + 7; template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os << "{ "; REP(i, vec.size()) { os << vec[i] << " "; } os << "}"; return os; } ll pow_mod(ll a, ll p) { ll res = 1; while (p) { if (p & 1) res = (res * a) % MOD; a = (a * a) % MOD; p >>= 1; } return res; } ll mod_inv(ll a, ll m) { ll b = m, u = 0, v = 1; while (a) { ll t = b / a; swap(b -= t * a, a); swap(u -= t * v, v); } return (u % m + m) % m; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } void d_err() { cerr << endl; } template <typename H, typename... T> void d_err(H h, T... t) { cerr << h << " "; d_err(t...); } #ifdef LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__); #else #define debug(...) 83; #endif int main() { cin.tie(0); ios_base::sync_with_stdio(false); int s; cin >> s; int s01 = s / 10 / 10; int s23 = s - s01 * 10 * 10; bool ym = false, my = false; if (s23 > 0 && s23 < 13) ym = true; if (s01 > 0 && s01 < 13) my = true; if (ym && my) { cout << "AMBIGUOUS" << endl; } else if (ym) { cout << "YYMM" << endl; } else if (my) { cout << "MMTT" << endl; } else { cout << "NA" << endl; } cout << fixed << setprecision(20); }
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) FOR(i, 0, n) #define fi first #define se second #define pb push_back #define mp make_pair #define eb emplace_back #define bcnt __builtin_popcountll using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<ll, ll> Pll; typedef pair<int, int> Pin; ll INF = 1e16; int inf = 1e9; ll MOD = 1e9 + 7; template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os << "{ "; REP(i, vec.size()) { os << vec[i] << " "; } os << "}"; return os; } ll pow_mod(ll a, ll p) { ll res = 1; while (p) { if (p & 1) res = (res * a) % MOD; a = (a * a) % MOD; p >>= 1; } return res; } ll mod_inv(ll a, ll m) { ll b = m, u = 0, v = 1; while (a) { ll t = b / a; swap(b -= t * a, a); swap(u -= t * v, v); } return (u % m + m) % m; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } void d_err() { cerr << endl; } template <typename H, typename... T> void d_err(H h, T... t) { cerr << h << " "; d_err(t...); } #ifdef LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__); #else #define debug(...) 83; #endif int main() { cin.tie(0); ios_base::sync_with_stdio(false); int s; cin >> s; int s01 = s / 10 / 10; int s23 = s - s01 * 10 * 10; bool ym = false, my = false; if (s23 > 0 && s23 < 13) ym = true; if (s01 > 0 && s01 < 13) my = true; if (ym && my) { cout << "AMBIGUOUS" << endl; } else if (ym) { cout << "YYMM" << endl; } else if (my) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } cout << fixed << setprecision(20); }
[ "literal.string.change", "io.output.change" ]
857,752
857,753
u089177147
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int down = S % 100; int up = S / 100; if (1 <= up && up <= 12) { if (1 <= down && down <= 12) { cout << "ANBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (1 <= down && down <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int down = S % 100; int up = S / 100; if (1 <= up && up <= 12) { if (1 <= down && down <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (1 <= down && down <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "literal.string.change", "io.output.change" ]
857,756
857,757
u826189900
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; 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'; int num = 10 * a + b; int num2 = 10 * c + d; if (1 <= num && num <= 12) { if (1 <= num2 && num2 <= 12) { cout << "AMBIGOUS" << endl; } else { cout << "MMYY" << endl; } } else if (1 <= num2 && num2 <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; 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'; int num = 10 * a + b; int num2 = 10 * c + d; if (1 <= num && num <= 12) { if (1 <= num2 && num2 <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else if (1 <= num2 && num2 <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,762
857,763
u024191315
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s, a, b, count = 0; cin >> s; a = s / 100; b = s % 100; vector<string> ans{"NA", "MMYY", "YYMM", "ANBIGUOUS"}; if (1 <= a && a <= 12) count += 1; if (1 <= b && b <= 12) count += 2; cout << ans[count] << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int s, a, b, count = 0; cin >> s; a = s / 100; b = s % 100; vector<string> ans{"NA", "MMYY", "YYMM", "AMBIGUOUS"}; if (1 <= a && a <= 12) count += 1; if (1 <= b && b <= 12) count += 2; cout << ans[count] << endl; }
[ "literal.string.change" ]
857,768
857,769
u868580535
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int P1, P2, R; string s; cin >> s; R = stoi(s); P1 = (R / 100); P2 = (R % 100); if ((P1 > 12 && P2 == 0) && (P2 > 12 || P2 == 0)) cout << "NA"; else if (P1 == 0 || P1 > 12) cout << "YYMM"; else if (P2 == 0 || P2 > 12) cout << "MMYY"; else cout << "AMBIGUOUS"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int P1, P2, R; string s; cin >> s; R = stoi(s); P1 = (R / 100); P2 = (R % 100); if ((P1 > 12 || P1 == 0) && (P2 > 12 || P2 == 0)) cout << "NA"; else if (P1 == 0 || P1 > 12) cout << "YYMM"; else if (P2 == 0 || P2 > 12) cout << "MMYY"; else cout << "AMBIGUOUS"; return 0; }
[]
857,777
857,778
u736460212
cpp
p03042
#pragma GCC optimize("O3") #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <algorithm> #include <assert.h> #include <bitset> #include <chrono> #include <cmath> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define ld long double #define pb push_back #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define int long long using namespace std; const int INF = 2e18; const int MOD = 1e9 + 7; const int MB = 20; bool check(int n) { return 1 <= n && n <= 12; } void solve() { string s; cin >> s; int one = (s[0] - '0') * 10 + s[1] - '0'; int two = (s[3] - '0') * 10 + s[4] - '0'; if (check(one) && check(two)) cout << "AMBIGUOUS"; else if (check(one)) cout << "MMYY"; else if (check(two)) cout << "YYMM"; else cout << "NA"; } signed main() { /* freopen("search.in", "r", stdin); freopen("search.out", "w", stdout); */ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.precision(12); solve(); }
#pragma GCC optimize("O3") #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <algorithm> #include <assert.h> #include <bitset> #include <chrono> #include <cmath> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define ld long double #define pb push_back #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define int long long using namespace std; const int INF = 2e18; const int MOD = 1e9 + 7; const int MB = 20; bool check(int n) { return 1 <= n && n <= 12; } void solve() { string s; cin >> s; int one = (s[0] - '0') * 10 + s[1] - '0'; int two = (s[2] - '0') * 10 + s[3] - '0'; if (check(one) && check(two)) cout << "AMBIGUOUS"; else if (check(one)) cout << "MMYY"; else if (check(two)) cout << "YYMM"; else cout << "NA"; } signed main() { /* freopen("search.in", "r", stdin); freopen("search.out", "w", stdout); */ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.precision(12); solve(); }
[ "literal.number.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
857,785
857,786
u782387599
cpp
p03042
#include <bits/stdc++.h> using namespace std; using ll = long long; using llpair = pair<ll, ll>; using llvec = vector<ll>; using llmat = vector<vector<ll>>; #define llmattp(name, a, b, num) name(a, vector<ll>(b, num)) #define LLINF 1LL << 60 #define ABS(x) ((x) > 0 ? (x) : -(x)) 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; } ll gcd(ll a, ll b) { if (a == 0 || b == 0) return 0; if (a < b) swap(a, b); ll tmp = a % b; while (tmp != 0) { a = b; b = tmp; tmp = a % b; } return b; } ll lcm(ll a, ll b) { return a * b / gcd(a, b); } ll factorial(ll x) { ll f = 1; for (ll i = 2; i < x; i++) { f *= i; } return f; } ll nPr(ll n, ll r) { ll result = 1; for (ll i = r + 1; i <= n; i++) result *= i; return result; } ll nCr(ll n, ll r) { if (n == 0) { return 0; } if (r == 0) { return 1; } if (r == 1) { return n; } if (n == r) { return 1; } if (r > n / 2) { r = n / 2; } double result = 1; for (double i = 1; i <= r; i++) { result *= (n - i + 1) / i; } return (ll)result; } bool IsPrime(ll num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; // 偶数はあらかじめ除く double sqrtNum = sqrt(num); for (ll i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { // 素数ではない return false; } } // 素数である return true; } ll GreaterBinarySearch(ll *array, ll key, ll max, ll min) { if (array[max] < array[min]) { return NULL; } else { ll mid = max + (min - max) / 2; if (array[mid] < key) { return GreaterBinarySearch(array, key, max, mid - 1); } if (array[mid] > key) { return GreaterBinarySearch(array, key, mid + 1, min); } else { return mid; } } } int main() { int num; cin >> num; int ab = num / 100, cd = num % 100; if ((ab == 0 && cd == 0) || (ab > 12 && cd > 12) || (ab == 0 && cd > 12) || (ab > 12 && cd == 0)) { cout << "No" << endl; return 0; } if (ab > 12 || (ab == 0 && cd < 13)) { cout << "YYMM" << endl; return 0; } if (cd > 12 || ((cd == 0 && ab < 13))) { cout << "MMYY" << endl; return 0; } cout << "AMBIGUOUS" << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using llpair = pair<ll, ll>; using llvec = vector<ll>; using llmat = vector<vector<ll>>; #define llmattp(name, a, b, num) name(a, vector<ll>(b, num)) #define LLINF 1LL << 60 #define ABS(x) ((x) > 0 ? (x) : -(x)) 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; } ll gcd(ll a, ll b) { if (a == 0 || b == 0) return 0; if (a < b) swap(a, b); ll tmp = a % b; while (tmp != 0) { a = b; b = tmp; tmp = a % b; } return b; } ll lcm(ll a, ll b) { return a * b / gcd(a, b); } ll factorial(ll x) { ll f = 1; for (ll i = 2; i < x; i++) { f *= i; } return f; } ll nPr(ll n, ll r) { ll result = 1; for (ll i = r + 1; i <= n; i++) result *= i; return result; } ll nCr(ll n, ll r) { if (n == 0) { return 0; } if (r == 0) { return 1; } if (r == 1) { return n; } if (n == r) { return 1; } if (r > n / 2) { r = n / 2; } double result = 1; for (double i = 1; i <= r; i++) { result *= (n - i + 1) / i; } return (ll)result; } bool IsPrime(ll num) { if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; // 偶数はあらかじめ除く double sqrtNum = sqrt(num); for (ll i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) { // 素数ではない return false; } } // 素数である return true; } ll GreaterBinarySearch(ll *array, ll key, ll max, ll min) { if (array[max] < array[min]) { return NULL; } else { ll mid = max + (min - max) / 2; if (array[mid] < key) { return GreaterBinarySearch(array, key, max, mid - 1); } if (array[mid] > key) { return GreaterBinarySearch(array, key, mid + 1, min); } else { return mid; } } } int main() { int num; cin >> num; int ab = num / 100, cd = num % 100; if ((ab == 0 && cd == 0) || (ab > 12 && cd > 12) || (ab == 0 && cd > 12) || (ab > 12 && cd == 0)) { cout << "NA" << endl; return 0; } if (ab > 12 || (ab == 0 && cd < 13)) { cout << "YYMM" << endl; return 0; } if (cd > 12 || ((cd == 0 && ab < 13))) { cout << "MMYY" << endl; return 0; } cout << "AMBIGUOUS" << endl; }
[ "literal.string.change", "io.output.change" ]
857,789
857,790
u195036695
cpp
p03042
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> #define rep(X, N) for (ll X = 0; X < (N); X++) #define PI (acos(-1.0)) #define pback push_back #define mpair make_pair #define MODN 1000000007 #define ALL(V) (V).begin(), (V).end() #define CERR \ if (false) \ cerr typedef long long ll; using namespace std; // using namespace boost::multiprecision; int main() { int s; cin >> s; int s1 = s / 100; int s2 = s % 100; if (1 <= s1 && s1 <= 12) { if (1 <= s1 && s1 <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (1 <= s2 && s2 <= 12) { cout << "YYMM"; } else { cout << "NA"; } } cout << endl; return 0; }
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> #define rep(X, N) for (ll X = 0; X < (N); X++) #define PI (acos(-1.0)) #define pback push_back #define mpair make_pair #define MODN 1000000007 #define ALL(V) (V).begin(), (V).end() #define CERR \ if (false) \ cerr typedef long long ll; using namespace std; // using namespace boost::multiprecision; int main() { int s; cin >> s; int s1 = s / 100; int s2 = s % 100; if (1 <= s1 && s1 <= 12) { if (1 <= s2 && s2 <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (1 <= s2 && s2 <= 12) { cout << "YYMM"; } else { cout << "NA"; } } cout << endl; return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,794
857,795
u145078501
cpp
p03042
#include <ctype.h> #include <iostream> #include <string> using namespace std; int main(int argc, char const *argv[]) { int n; cin >> n; int a = n / 100; int b = n % 100; if (a and a <= 12 and b and b <= 12) { cout << "ANBIGUOUS" << endl; } else if (a and a <= 12) { cout << "MMYY" << endl; } else if (b and b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
#include <ctype.h> #include <iostream> #include <string> using namespace std; int main(int argc, char const *argv[]) { int n; cin >> n; int a = n / 100; int b = n % 100; if (a and a <= 12 and b and b <= 12) { cout << "AMBIGUOUS" << endl; } else if (a and a <= 12) { cout << "MMYY" << endl; } else if (b and b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,802
857,803
u534223360
cpp
p03042
// inlclude前用define #define _USE_MATH_DEFINES // include #include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <type_traits> #include <vector> //#include<deque> #include <iomanip> #include <limits> #include <map> #include <set> #include <tuple> using namespace std; // typedef typedef vector<int> VI; typedef vector<string> VS; typedef vector<char> VC; typedef long long int ll; // define #define INF 1e9 #define NUM 1000000007 #define all(x) begin(x), end(x) #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; string prev, back; prev += s[0]; prev += s[1]; back += s[2]; back += s[3]; int pr, ba; pr = stoi(prev); ba = stoi(back); if (12 >= pr && pr >= 1) { if (12 >= ba && ba >= 1) cout << "AMBIGUOUS" << endl; else cout << "YYMM" << endl; } else { if (12 >= pr && pr >= 1) cout << "MMYY" << endl; else cout << "NA" << endl; } }
// inlclude前用define #define _USE_MATH_DEFINES // include #include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <type_traits> #include <vector> //#include<deque> #include <iomanip> #include <limits> #include <map> #include <set> #include <tuple> using namespace std; // typedef typedef vector<int> VI; typedef vector<string> VS; typedef vector<char> VC; typedef long long int ll; // define #define INF 1e9 #define NUM 1000000007 #define all(x) begin(x), end(x) #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; string prev, back; prev += s[0]; prev += s[1]; back += s[2]; back += s[3]; int pr, ba; pr = stoi(prev); ba = stoi(back); if (12 >= pr && pr >= 1) { if (12 >= ba && ba >= 1) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (12 >= ba && ba >= 1) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change", "identifier.change", "control_flow.branch.if.condition.change" ]
857,804
857,805
u226951654
cpp
p03042
// inlclude前用define #define _USE_MATH_DEFINES // include #include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <type_traits> #include <vector> //#include<deque> #include <iomanip> #include <limits> #include <map> #include <set> #include <tuple> using namespace std; // typedef typedef vector<int> VI; typedef vector<string> VS; typedef vector<char> VC; typedef long long int ll; // define #define INF 1e9 #define NUM 1000000007 #define all(x) begin(x), end(x) #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; string prev, back; prev += s[0]; prev += s[1]; back += s[2]; back += s[3]; int pr, ba; pr = stoi(prev); ba = stoi(back); if (12 >= pr && pr >= 1) { if (12 >= ba && ba >= 1) cout << "AMBIGUOUS" << endl; else cout << "YYMM" << endl; } else { if (12 >= ba && ba >= 1) cout << "MMYY" << endl; else cout << "NA" << endl; } }
// inlclude前用define #define _USE_MATH_DEFINES // include #include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <type_traits> #include <vector> //#include<deque> #include <iomanip> #include <limits> #include <map> #include <set> #include <tuple> using namespace std; // typedef typedef vector<int> VI; typedef vector<string> VS; typedef vector<char> VC; typedef long long int ll; // define #define INF 1e9 #define NUM 1000000007 #define all(x) begin(x), end(x) #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; string prev, back; prev += s[0]; prev += s[1]; back += s[2]; back += s[3]; int pr, ba; pr = stoi(prev); ba = stoi(back); if (12 >= pr && pr >= 1) { if (12 >= ba && ba >= 1) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (12 >= ba && ba >= 1) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
857,806
857,805
u226951654
cpp
p03042
#include <algorithm> #include <iostream> #include <map> #include <set> #include <string> #include <vector> using namespace std; int main() { int s; cin >> s; int ym = 0; if (s / 100 > 0 && s / 100 < 13) { ym = 1; } if (s % 100 > 0 && s / 100 < 13) { if (ym == 1) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else { if (ym == 1) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <algorithm> #include <iostream> #include <map> #include <set> #include <string> #include <vector> using namespace std; int main() { int s; cin >> s; int ym = 0; if (s / 100 > 0 && s / 100 < 13) { ym = 1; } if (s % 100 > 0 && s % 100 < 13) { if (ym == 1) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else { if (ym == 1) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
857,809
857,810
u819402602
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int i; cin >> i; if (i % 100 <= 12 && i % 12 != 0 && i / 100 != 0 && i / 100 <= 12) { cout << "AMBIGUOUS" << endl; return 0; } if (i % 100 <= 12 && i % 12 != 0) { cout << "YYMM" << endl; return 0; } if (i / 100 != 0 && i / 100 <= 12) { cout << "MMYY" << endl; return 0; } cout << "NA" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int i; cin >> i; if (i % 100 <= 12 && i % 100 != 0 && i / 100 != 0 && i / 100 <= 12) { cout << "AMBIGUOUS" << endl; return 0; } if (i % 100 <= 12 && i % 100 != 0) { cout << "YYMM" << endl; return 0; } if (i / 100 != 0 && i / 100 <= 12) { cout << "MMYY" << endl; return 0; } cout << "NA" << endl; return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
857,811
857,812
u960779345
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s = 0; cin >> s; int UP = s / 100; int DOWN = s - UP * 100; if (UP >= 0) { if (UP >= 13 || UP == 0) { if (DOWN >= 1 && DOWN <= 12) { cout << "YYMM"; } else { cout << "NA"; } } if (UP <= 12 && UP >= 1) { if (DOWN >= 13 || DOWN == 0) { cout << "MMYY"; } if (DOWN >= 1 && DOWN <= 12) { cout << "AMBIGOUS"; } } } }
#include <bits/stdc++.h> using namespace std; int main() { int s = 0; cin >> s; int UP = s / 100; int DOWN = s - UP * 100; if (UP >= 0) { if (UP >= 13 || UP == 0) { if (DOWN >= 1 && DOWN <= 12) { cout << "YYMM"; } else { cout << "NA"; } } if (UP <= 12 && UP >= 1) { if (DOWN >= 13 || DOWN == 0) { cout << "MMYY"; } if (DOWN >= 1 && DOWN <= 12) { cout << "AMBIGUOUS"; } } } }
[ "literal.string.change", "io.output.change" ]
857,815
857,816
u531790559
cpp
p03042
#include <algorithm> #include <array> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <forward_list> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define ll long long #define ull unsigned long long #define vi vector<int> #define vlli vector<long long int> #define vvi vector<vector<int>> #define vpii vector<pair<int, int>> #define vs vector<string> #define pa(a) cout << a << endl; #define lin1(x) \ ll int x; \ x = scan(); #define lin2(x, y) \ ll int x, y; \ x = scan(), y = scan(); #define lin3(x, y, z) \ ll int x, y, z; \ x = scan(), y = scan(), z = scan(); #define pb(x) push_back(x) #define makep(x, y) make_pair(x, y) #define mx(a, b) (a) > (b) ? (a) : (b) #define mn(a, b) (a) < (b) ? (a) : (b) #define fori(s, e) for (i = s; i <= e; i++) #define forj(s, e) for (j = s; j <= e; j++) #define fork(s, e) for (k = s; k <= e; k++) #define rep(i, s, e) for (int i = s; i <= e; i++) #define brep(i, s, e) for (int i = s; i >= e; i--) #define all(x) x.begin(), x.end() #define mem(x, y) memset(x, y, sizeof(x)); #define bits1(x) __builtin_popcount(x) #define pi 3.14159265358979323846264338327950 #define MOD7 1000000007 #define MOD9 1000000009 #define fast \ std::ios::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) using namespace std; int main() { #ifdef RAHUL freopen("input.txt", "r", stdin); #endif ll t; cin >> t; ll a = t % 100; ll b = t / 100; // 5 // 19 if (1 <= a and a <= 12) { if (1 <= b and b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else { if (1 <= a and a <= 12) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <algorithm> #include <array> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <forward_list> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define ll long long #define ull unsigned long long #define vi vector<int> #define vlli vector<long long int> #define vvi vector<vector<int>> #define vpii vector<pair<int, int>> #define vs vector<string> #define pa(a) cout << a << endl; #define lin1(x) \ ll int x; \ x = scan(); #define lin2(x, y) \ ll int x, y; \ x = scan(), y = scan(); #define lin3(x, y, z) \ ll int x, y, z; \ x = scan(), y = scan(), z = scan(); #define pb(x) push_back(x) #define makep(x, y) make_pair(x, y) #define mx(a, b) (a) > (b) ? (a) : (b) #define mn(a, b) (a) < (b) ? (a) : (b) #define fori(s, e) for (i = s; i <= e; i++) #define forj(s, e) for (j = s; j <= e; j++) #define fork(s, e) for (k = s; k <= e; k++) #define rep(i, s, e) for (int i = s; i <= e; i++) #define brep(i, s, e) for (int i = s; i >= e; i--) #define all(x) x.begin(), x.end() #define mem(x, y) memset(x, y, sizeof(x)); #define bits1(x) __builtin_popcount(x) #define pi 3.14159265358979323846264338327950 #define MOD7 1000000007 #define MOD9 1000000009 #define fast \ std::ios::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) using namespace std; int main() { #ifdef RAHUL freopen("input.txt", "r", stdin); #endif ll t; cin >> t; ll a = t % 100; ll b = t / 100; // 5 // 19 if (1 <= a and a <= 12) { if (1 <= b and b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else { if (1 <= b and b <= 12) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,819
857,820
u113081402
cpp
p03042
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <set> #include <stack> #include <string> #include <vector> #define ll long long #define cint const int #define ld long double #define sz(a) (int)a.size() #define all(a) a.begin(), a.end() #define pb push_back #define ppb pop_back #define fi first #define se second #define add + #define minus - #define squer(a) sqrt(a) #define mod % using namespace std; int n; int main() { cin >> n; int c1 = (n % 10) + (n % 100 / 10); int c2 = (n % 1000 / 100) + (n % 10000 / 1000); if (c1 > 12 || c1 == 0) { if (c2 > 12 || c2 == 0) { cout << "NA"; return 0; } } if (c1 <= 12 && c1 != 0) { if (c2 <= 12 && c2 != 0) { cout << "AMBIGUOUS"; return 0; } } if (c1 <= 12 && c1 != 0) { cout << "YYMM"; return 0; } if (c2 <= 12 && c2 != 0) { cout << "MMYY"; return 0; } return 0; }
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <set> #include <stack> #include <string> #include <vector> #define ll long long #define cint const int #define ld long double #define sz(a) (int)a.size() #define all(a) a.begin(), a.end() #define pb push_back #define ppb pop_back #define fi first #define se second #define add + #define minus - #define squer(a) sqrt(a) #define mod % using namespace std; int n; int main() { cin >> n; int c1 = (n % 10) + (n % 100 / 10) * 10; int c2 = (n % 1000 / 100) + (n % 10000 / 1000) * 10; if (c1 > 12 || c1 == 0) { if (c2 > 12 || c2 == 0) { cout << "NA"; return 0; } } if (c1 <= 12 && c1 != 0) { if (c2 <= 12 && c2 != 0) { cout << "AMBIGUOUS"; return 0; } } if (c1 <= 12 && c1 != 0) { cout << "YYMM"; return 0; } if (c2 <= 12 && c2 != 0) { cout << "MMYY"; return 0; } return 0; }
[ "assignment.change" ]
857,823
857,824
u751518217
cpp
p03042
#include <bits/stdc++.h> #define I int #define S(a) scanf("%d", &a) #define S2(a, b) scanf("%d%d", &a, &b) #define P(a) printf("%d\n", a) #define PL(a) printf("%lld\n", a) #define PT(t) printf("Case %d: ", t) #define PB(a) push_back(a) #define SET(a) memset(a, 0, sizeof a) #define SETR(a) memset(a, -1, sizeof a) #define ll long long using namespace std; #define mx 500004 #define md 1000000007ll typedef pair<int, int> P; typedef vector<ll> V; ////////define value///// template <class T> inline T BM(T p, T e, T M) { ll ret = 1; for (; e > 0; e >>= 1) { if (e & 1) ret = (ret * p) % M; p = (p * p) % M; } return (T)ret; } template <class T> inline T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); } template <class T> inline T mdINV(T a, T M) { return BM(a, M - 2, M); } template <class T> inline T PW(T p, T e) { ll ret = 1; for (; e > 0; e >>= 1) { if (e & 1) ret = (ret * p); p = (p * p); } return (T)ret; } template <class T> bool ISLEFT(T a, T b, T c) { if (((a.xx - b.xx) * (b.yy - c.yy) - (b.xx - c.xx) * (a.yy - b.yy)) < 0.0) return 1; // Uporer dike //A,b,c, x okkher ordera sorted else return 0; } int main() { int n; cin >> n; int f = n / 100; int s = n % 100; if (f >= 1 && f <= 12 && s >= 12 && s <= 12) cout << "AMBIGUOUS" << endl; else if (f >= 1 && f <= 12) cout << "MMYY" << endl; else if (s >= 1 && s <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; return 0; }
#include <bits/stdc++.h> #define I int #define S(a) scanf("%d", &a) #define S2(a, b) scanf("%d%d", &a, &b) #define P(a) printf("%d\n", a) #define PL(a) printf("%lld\n", a) #define PT(t) printf("Case %d: ", t) #define PB(a) push_back(a) #define SET(a) memset(a, 0, sizeof a) #define SETR(a) memset(a, -1, sizeof a) #define ll long long using namespace std; #define mx 500004 #define md 1000000007ll typedef pair<int, int> P; typedef vector<ll> V; ////////define value///// template <class T> inline T BM(T p, T e, T M) { ll ret = 1; for (; e > 0; e >>= 1) { if (e & 1) ret = (ret * p) % M; p = (p * p) % M; } return (T)ret; } template <class T> inline T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); } template <class T> inline T mdINV(T a, T M) { return BM(a, M - 2, M); } template <class T> inline T PW(T p, T e) { ll ret = 1; for (; e > 0; e >>= 1) { if (e & 1) ret = (ret * p); p = (p * p); } return (T)ret; } template <class T> bool ISLEFT(T a, T b, T c) { if (((a.xx - b.xx) * (b.yy - c.yy) - (b.xx - c.xx) * (a.yy - b.yy)) < 0.0) return 1; // Uporer dike //A,b,c, x okkher ordera sorted else return 0; } int main() { int n; cin >> n; int f = n / 100; int s = n % 100; if (f >= 1 && f <= 12 && s >= 1 && s <= 12) cout << "AMBIGUOUS" << endl; else if (f >= 1 && f <= 12) cout << "MMYY" << endl; else if (s >= 1 && s <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
857,835
857,836
u449403739
cpp
p03042
#include <iostream> using namespace std; int main() { string x; cin >> x; int xdigit = atoi(x.c_str()); int hi = xdigit / 100; int lo = xdigit % 100; bool chi = hi > 0 && hi < 13; bool clo = lo > 0 && lo < 13; if (chi && chi) { cout << "AMBIGUOUS" << endl; } else if (chi && !clo) { cout << "MMYY" << endl; } else if (!chi && clo) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
#include <iostream> using namespace std; int main() { string x; cin >> x; // int hi = atoi(x.substr(0, 2).c_str()); // int lo = atoi(x.substr(2).c_str()); int xdigit = atoi(x.c_str()); int hi = xdigit / 100; int lo = xdigit % 100; bool chi = hi > 0 && hi < 13; bool clo = lo > 0 && lo < 13; // cout << hi << endl; // cout << lo << endl; if (chi && clo) { cout << "AMBIGUOUS" << endl; } else if (chi && !clo) { cout << "MMYY" << endl; } else if (!chi && clo) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
857,845
857,846
u774438048
cpp
p03042
#include <iostream> using namespace std; int main() { char num[4]; cin >> num; if (((num[0] == '0' && num[1] != '0') || (num[0] == '1' && (num[1] == '0' || num[1] == '1' || num[1] == '2'))) && ((num[2] == '0' && num[2] != '0') || (num[2] == '1' && (num[3] == '0' || num[3] == '1' || num[3] == '2')))) { cout << "AMBIGUOUS" << endl; } else if ((num[0] == '0' && num[1] != '0') || (num[0] == '1' && (num[1] == '0' || num[1] == '1' || num[1] == '2'))) { cout << "MMYY" << endl; } else if ((num[2] == '0' && num[3] != '0') || (num[2] == '1' && (num[3] == '0' || num[3] == '1' || num[3] == '2'))) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
#include <iostream> using namespace std; int main() { char num[4]; cin >> num; if (((num[0] == '0' && num[1] != '0') || (num[0] == '1' && (num[1] == '0' || num[1] == '1' || num[1] == '2'))) && ((num[2] == '0' && num[3] != '0') || (num[2] == '1' && (num[3] == '0' || num[3] == '1' || num[3] == '2')))) { cout << "AMBIGUOUS" << endl; } else if ((num[0] == '0' && num[1] != '0') || (num[0] == '1' && (num[1] == '0' || num[1] == '1' || num[1] == '2'))) { cout << "MMYY" << endl; } else if ((num[2] == '0' && num[3] != '0') || (num[2] == '1' && (num[3] == '0' || num[3] == '1' || num[3] == '2'))) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
857,851
857,852
u161418539
cpp
p03042
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) const int MOD = 1000000007; const int INF_32 = 1LL << 30; const int64_t INF_64 = 1LL << 60; int main() { string S; cin >> S; int first = stoi(S.substr(0, 2)); int second = stoi(S.substr(2, 2)); string ans; if (first >= 1 && first <= 12 && second >= 1 && second <= 12) { ans = "AMBIGUOUS"; } else if (first >= 0 && first <= 99 && second >= 1 && second <= 12) { ans = "YYMM"; } else if (first >= 1 && first <= 12 && second >= 0 && second <= 12) { ans = "MMYY"; } else { ans = "NA"; } cout << ans << endl; }
#include <bits/stdc++.h> #include <math.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) const int MOD = 1000000007; const int INF_32 = 1LL << 30; const int64_t INF_64 = 1LL << 60; int main() { string S; cin >> S; int first = stoi(S.substr(0, 2)); int second = stoi(S.substr(2, 2)); string ans; if (first >= 1 && first <= 12 && second >= 1 && second <= 12) { ans = "AMBIGUOUS"; } else if (first >= 0 && first <= 99 && second >= 1 && second <= 12) { ans = "YYMM"; } else if (first >= 1 && first <= 12 && second >= 0 && second <= 99) { ans = "MMYY"; } else { ans = "NA"; } cout << ans << endl; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
857,855
857,856
u715366261
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int sh = n / 100, ji = n % 100; string out = "NA"; if (sh <= 12 & sh > 0) { if (ji <= 12 & ji > 0) { out = "UMBIGUOUS"; } else { out = "MMYY"; } } else { if (ji <= 12 & ji > 0) { out = "YYMM"; } } cout << out; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int sh = n / 100, ji = n % 100; string out = "NA"; if (sh <= 12 & sh > 0) { if (ji <= 12 & ji > 0) { out = "AMBIGUOUS"; } else { out = "MMYY"; } } else { if (ji <= 12 & ji > 0) { out = "YYMM"; } } cout << out; }
[ "literal.string.change", "assignment.value.change" ]
857,861
857,862
u431602218
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int sh = n / 100, ji = n % 100; string out = "NA"; if (sh <= 12 & sh > 0) { if (ji <= 12 & ji > 0) { out = "UNBIGUOUS"; } else { out = "MMYY"; } } else { if (ji <= 12 & ji > 0) { out = "YYMM"; } } cout << out; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int sh = n / 100, ji = n % 100; string out = "NA"; if (sh <= 12 & sh > 0) { if (ji <= 12 & ji > 0) { out = "AMBIGUOUS"; } else { out = "MMYY"; } } else { if (ji <= 12 & ji > 0) { out = "YYMM"; } } cout << out; }
[ "literal.string.change", "assignment.value.change" ]
857,863
857,862
u431602218
cpp
p03042
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define CHMAX(a, b) a = std::max(a, b) #define CHMIN(a, b) a = std::min(a, b) #define CHABS(a) a = std::abs(a) #define COUT(a) std::cout << a << std::endl #define CERR(a) std::cerr << a << std::endl #define FOR(n) for (lli i = 0; i < n; i++) using namespace std; using lli = long long int; using pll = pair<lli, lli>; using tlll = tuple<lli, lli, lli>; using vll = vector<lli>; lli mod197 = 1000000007LL; lli INF = 10000000000000; // ax + by = gcd(a,b) 最大公約数 template <typename T> T extgcd(T a, T b, T &x, T &y) { T d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int main(void) { lli a, b; cin >> a; b = a % 100; a /= 100; if (a > 12 || a == 0) { // YYMM if (b > 12 || b == 0) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else if (b > 12 || b == 0) { // MMYY if (a > 12 || a == 0) { cout << "NA" << endl; } else { cout << "MMYY" << endl; } } else { cout << "AMBIGOUS" << endl; } return 0; }
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define CHMAX(a, b) a = std::max(a, b) #define CHMIN(a, b) a = std::min(a, b) #define CHABS(a) a = std::abs(a) #define COUT(a) std::cout << a << std::endl #define CERR(a) std::cerr << a << std::endl #define FOR(n) for (lli i = 0; i < n; i++) using namespace std; using lli = long long int; using pll = pair<lli, lli>; using tlll = tuple<lli, lli, lli>; using vll = vector<lli>; lli mod197 = 1000000007LL; lli INF = 10000000000000; // ax + by = gcd(a,b) 最大公約数 template <typename T> T extgcd(T a, T b, T &x, T &y) { T d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int main(void) { lli a, b; cin >> a; b = a % 100; a /= 100; if (a > 12 || a == 0) { // YYMM if (b > 12 || b == 0) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else if (b > 12 || b == 0) { // MMYY if (a > 12 || a == 0) { cout << "NA" << endl; } else { cout << "MMYY" << endl; } } else { cout << "AMBIGUOUS" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,872
857,873
u155216115
cpp
p03042
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define CHMAX(a, b) a = std::max(a, b) #define CHMIN(a, b) a = std::min(a, b) #define CHABS(a) a = std::abs(a) #define COUT(a) std::cout << a << std::endl #define CERR(a) std::cerr << a << std::endl #define FOR(n) for (lli i = 0; i < n; i++) using namespace std; using lli = long long int; using pll = pair<lli, lli>; using tlll = tuple<lli, lli, lli>; using vll = vector<lli>; lli mod197 = 1000000007LL; lli INF = 10000000000000; // ax + by = gcd(a,b) 最大公約数 template <typename T> T extgcd(T a, T b, T &x, T &y) { T d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int main(void) { lli a, b; cin >> a; b = a % 100; a /= 100; if (a > 12 || a == 0) { // YYMM if (b > 12 || b == 0) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else if (b > 12 || b == 0) { // MMYY if (a > 12 || a == 0) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else { cout << "AMBIGOUS" << endl; } return 0; }
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define CHMAX(a, b) a = std::max(a, b) #define CHMIN(a, b) a = std::min(a, b) #define CHABS(a) a = std::abs(a) #define COUT(a) std::cout << a << std::endl #define CERR(a) std::cerr << a << std::endl #define FOR(n) for (lli i = 0; i < n; i++) using namespace std; using lli = long long int; using pll = pair<lli, lli>; using tlll = tuple<lli, lli, lli>; using vll = vector<lli>; lli mod197 = 1000000007LL; lli INF = 10000000000000; // ax + by = gcd(a,b) 最大公約数 template <typename T> T extgcd(T a, T b, T &x, T &y) { T d = a; if (b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int main(void) { lli a, b; cin >> a; b = a % 100; a /= 100; if (a > 12 || a == 0) { // YYMM if (b > 12 || b == 0) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else if (b > 12 || b == 0) { // MMYY if (a > 12 || a == 0) { cout << "NA" << endl; } else { cout << "MMYY" << endl; } } else { cout << "AMBIGUOUS" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,874
857,873
u155216115
cpp
p03042
#include <algorithm> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; int change(char x) { if (x == '0') { return 0; } if (x == '1') { return 1; } if (x == '2') { return 2; } if (x == '3') { return 3; } if (x == '4') { return 4; } if (x == '5') { return 5; } if (x == '6') { return 6; } if (x == '7') { return 7; } if (x == '8') { return 8; } if (x == '9') { return 9; } } int main() { string S; int ans = 0; cin >> S; char a = S.at(0); char b = S.at(1); char c = S.at(2); char d = S.at(3); int one = change(a) * 10 + change(b); int two = change(c) * 10 + change(d); if (1 <= one && one <= 12) { ans += 1; } if (1 <= two && two <= 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 << "AMBGUOUS" << endl; break; } return 0; }
#include <algorithm> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; int change(char x) { if (x == '0') { return 0; } if (x == '1') { return 1; } if (x == '2') { return 2; } if (x == '3') { return 3; } if (x == '4') { return 4; } if (x == '5') { return 5; } if (x == '6') { return 6; } if (x == '7') { return 7; } if (x == '8') { return 8; } if (x == '9') { return 9; } } int main() { string S; int ans = 0; cin >> S; char a = S.at(0); char b = S.at(1); char c = S.at(2); char d = S.at(3); int one = change(a) * 10 + change(b); int two = change(c) * 10 + change(d); if (1 <= one && one <= 12) { ans += 1; } if (1 <= two && two <= 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; } return 0; }
[ "literal.string.change", "io.output.change" ]
857,875
857,876
u491330513
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int left = s / 100; int right = s % 100; if (1 <= left && 12 >= left) { if (1 <= right && 12 >= right) cout << "AMBIGOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= right && 12 >= right) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int left = s / 100; int right = s % 100; if (1 <= left && 12 >= left) { if (1 <= right && 12 >= right) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= right && 12 >= right) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
857,893
857,894
u372581122
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int left = s / 100; int right = s % 100; if (1 <= left && 12 >= left) { if (1 <= right && 12 >= right) cout << "AMBIGOUS" << endl; else cout << "NA" << endl; } else { if (1 <= right && 12 >= right) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int left = s / 100; int right = s % 100; if (1 <= left && 12 >= left) { if (1 <= right && 12 >= right) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= right && 12 >= right) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
857,895
857,894
u372581122
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main(void) { int s, fir, sec; cin >> s; fir = s / 100; sec = s - fir * 100; if (fir > 12 || fir == 0) { if (sec > 12 || sec == 0) puts("NA"); else puts("YYMM"); } else if (sec > 12 || sec == 0) { puts("YYMM"); } else puts("AMBIGUOUS"); return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int s, fir, sec; cin >> s; fir = s / 100; sec = s - fir * 100; if (fir > 12 || fir == 0) { if (sec > 12 || sec == 0) puts("NA"); else puts("YYMM"); } else if (sec > 12 || sec == 0) { puts("MMYY"); } else puts("AMBIGUOUS"); return 0; }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
857,915
857,916
u326152409
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main(void) { string s; cin >> s; int x = stoi(s.substr(0, 2)); int y = stoi(s.substr(2, 2)); if (1 <= x && x <= 12) { if (1 <= y && y <= 12) cout << "AMBIGIOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= y && y <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main(void) { string s; cin >> s; int x = stoi(s.substr(0, 2)); int y = stoi(s.substr(2, 2)); if (1 <= x && x <= 12) { if (1 <= y && y <= 12) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (1 <= y && y <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "misc.typo", "literal.string.change", "io.output.change" ]
857,917
857,918
u932033261
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a = (s[0] - '0') * 10 + s[1] - '0'; int b = (s[2] - '0') * 10 + s[3] - '0'; if (0 < a && a <= 12 && 0 < b && b <= 12) cout << "AMBIGUOU" << endl; else if (0 < a && a <= 12) cout << "MMYY" << endl; else if (0 < b && b <= 12) cout << "YYMM" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a = (s[0] - '0') * 10 + s[1] - '0'; int b = (s[2] - '0') * 10 + s[3] - '0'; 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; }
[ "literal.string.change", "io.output.change" ]
857,939
857,940
u593459816
cpp
p03042
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int a; cin >> a; int y = a / 100, m = a % 100; if (1 <= y && y <= 12 && 1 <= m && 1 <= 12) { cout << "AMBIGUOUS" << endl; } else if (1 <= y && y <= 12) { cout << "MMYY" << endl; } else if (1 <= m && m <= 12) { cout << "YYMM" << endl; } else cout << "NA" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int a; cin >> a; int y = a / 100, m = a % 100; if (1 <= y && y <= 12 && 1 <= m && m <= 12) { cout << "AMBIGUOUS" << endl; } else if (1 <= y && y <= 12) { cout << "MMYY" << endl; } else if (1 <= m && m <= 12) { cout << "YYMM" << endl; } else cout << "NA" << endl; return 0; }
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
857,941
857,942
u905715926
cpp
p03042
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int a; cin >> a; int y = a / 100, m = a % 100; if (1 <= y && y <= 12 && 1 <= m && 1 <= 12) { cout << "AMBIGOUS" << endl; } else if (1 <= y && y <= 12) { cout << "MMYY" << endl; } else if (1 <= m && m <= 12) { cout << "YYMM" << endl; } else cout << "NA" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int a; cin >> a; int y = a / 100, m = a % 100; if (1 <= y && y <= 12 && 1 <= m && m <= 12) { cout << "AMBIGUOUS" << endl; } else if (1 <= y && y <= 12) { cout << "MMYY" << endl; } else if (1 <= m && m <= 12) { cout << "YYMM" << endl; } else cout << "NA" << endl; return 0; }
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
857,943
857,942
u905715926
cpp