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
p03034
#include <bits/stdc++.h> int main() { using namespace std; unsigned long N; cin >> N; vector<long> s(N); for (auto &i : s) cin >> i; long ans{0}; for (unsigned long i = 1; i < N; ++i) { long tmp{0}; for (unsigned long j = 0, k = N - 1; k > 0 && (k % i != 0 || j < k); j += i, k -= i) ans = max(ans, tmp += s[j] + s[k]); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> int main() { using namespace std; unsigned long N; cin >> N; vector<long> s(N); for (auto &i : s) cin >> i; long ans{0}; for (unsigned long i = 1; i < N; ++i) { long tmp{0}; for (unsigned long j = 0, k = N - 1; k > i && (k % i != 0 || j < k); j += i, k -= i) ans = max(ans, tmp += s[j] + s[k]); } cout << ans << endl; return 0; }
[ "identifier.replace.add", "literal.replace.remove", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
858,579
858,580
u462437857
cpp
p03034
#include <bits/stdc++.h> int main() { using namespace std; unsigned long N; cin >> N; vector<long> s(N); for (auto &i : s) cin >> i; long ans{0}; for (unsigned long i = 1; i < N; ++i) { long tmp{0}; for (unsigned long j = 0, k = N - 1; (k % i != 0 || j < k); j += i, k -= i) ans = max(ans, tmp += s[j] + s[k]); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> int main() { using namespace std; unsigned long N; cin >> N; vector<long> s(N); for (auto &i : s) cin >> i; long ans{0}; for (unsigned long i = 1; i < N; ++i) { long tmp{0}; for (unsigned long j = 0, k = N - 1; k > i && (k % i != 0 || j < k); j += i, k -= i) ans = max(ans, tmp += s[j] + s[k]); } cout << ans << endl; return 0; }
[ "control_flow.loop.for.condition.change" ]
858,581
858,580
u462437857
cpp
p03034
#include <bits/stdc++.h> using namespace std; using ll = long long; #define forx(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; ll ans = 0; vector<ll> s(n), t(n); rep(i, n) cin >> s[i]; rep(i, n) t[i] = s[i] + s[n - 1 - i]; forx(c, 1, n) { ll d = 0, e = 0; if ((n - 1) % c == 0) { rep(k, n - 1) { if (c * (k + 1) >= (n + 1) / 2) break; e += t[c * (k + 1)]; d = max(d, e); } } else rep(k, n - 1) { if (c * (k + 1) >= n) break; e += t[c * (k + 1)]; d = max(d, e); } ans = max(ans, d); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define forx(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; ll ans = 0; vector<ll> s(n), t(n); rep(i, n) cin >> s[i]; rep(i, n) t[i] = s[i] + s[n - 1 - i]; forx(c, 1, n) { ll d = 0, e = 0; if ((n - 1) % c == 0) { rep(k, n - 1) { if (c * (k + 1) >= (n - 1) / 2) break; e += t[c * (k + 1)]; d = max(d, e); } } else rep(k, n - 1) { if (c * (k + 2) > n) break; e += t[c * (k + 1)]; d = max(d, e); } ans = max(ans, d); } cout << ans << endl; return 0; }
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "literal.number.change", "expression.operator.compare.change" ]
858,590
858,588
u604231488
cpp
p03034
#ifdef LOCAL111 #define _GLIBCXX_DEBUG #else // #define NDEBUG #endif #define _USE_MATH_DEFINES #include <bits/stdc++.h> const int INF = 1e9; using namespace std; template <typename T, typename U> ostream &operator<<(ostream &os, const pair<T, U> &p) { os << '(' << p.first << ' ' << p.second << ')'; return os; } #define endl '\n' #define ALL(a) (a).begin(), (a).end() #define SZ(a) int((a).size()) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define REP(i, n) FOR(i, 0, n) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) #ifdef LOCAL111 #define DEBUG(x) cout << #x << ": " << (x) << endl template <typename T> void dpite(T a, T b) { for (T ite = a; ite != b; ite++) cout << (ite == a ? "" : " ") << *ite; cout << endl; } #else #define DEBUG(x) true template <typename T> void dpite(T a, T b) { return; } #endif #define F first #define S second #define SNP string::npos #define WRC(hoge) cout << "Case #" << (hoge) + 1 << ": " template <typename T> void pite(T a, T b) { for (T ite = a; ite != b; ite++) cout << (ite == a ? "" : " ") << *ite; cout << endl; } template <typename T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <typename T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } typedef long long int LL; typedef unsigned long long ULL; typedef pair<int, int> P; void ios_init() { // cout.setf(ios::fixed); // cout.precision(12); #ifdef LOCAL111 return; #endif ios::sync_with_stdio(false); cin.tie(0); } int main() { ios_init(); int n; while (cin >> n) { vector<LL> a(n); REP(i, n) cin >> a[i]; LL ans = 0; FOR(amb, 1, n) { DEBUG(amb); vector<LL> l; vector<LL> r; { int p = 0; LL sum = 0; while (p < n) { sum += a[p]; l.push_back(sum); p += amb; } } { int p = n - 1; LL sum = 0; while (p >= 0) { sum += a[p]; r.push_back(sum); p -= amb; } } assert(SZ(l) == SZ(r)); REP(i, SZ(l)) { DEBUG(i); int a = n - 1 - amb * i; DEBUG(a); DEBUG(amb); DEBUG(a / amb); if (a <= 0) continue; assert(a < n); int b = a - amb; assert(b > 0); if (a % amb == 0 and -i <= a / amb and a / amb <= i) continue; DEBUG(ans); chmax(ans, l[i] + r[i]); } } cout << ans << endl; } return 0; }
#ifdef LOCAL111 #define _GLIBCXX_DEBUG #else // #define NDEBUG #endif #define _USE_MATH_DEFINES #include <bits/stdc++.h> const int INF = 1e9; using namespace std; template <typename T, typename U> ostream &operator<<(ostream &os, const pair<T, U> &p) { os << '(' << p.first << ' ' << p.second << ')'; return os; } #define endl '\n' #define ALL(a) (a).begin(), (a).end() #define SZ(a) int((a).size()) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define REP(i, n) FOR(i, 0, n) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) #ifdef LOCAL111 #define DEBUG(x) cout << #x << ": " << (x) << endl template <typename T> void dpite(T a, T b) { for (T ite = a; ite != b; ite++) cout << (ite == a ? "" : " ") << *ite; cout << endl; } #else #define DEBUG(x) true template <typename T> void dpite(T a, T b) { return; } #endif #define F first #define S second #define SNP string::npos #define WRC(hoge) cout << "Case #" << (hoge) + 1 << ": " template <typename T> void pite(T a, T b) { for (T ite = a; ite != b; ite++) cout << (ite == a ? "" : " ") << *ite; cout << endl; } template <typename T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <typename T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } typedef long long int LL; typedef unsigned long long ULL; typedef pair<int, int> P; void ios_init() { // cout.setf(ios::fixed); // cout.precision(12); #ifdef LOCAL111 return; #endif ios::sync_with_stdio(false); cin.tie(0); } int main() { ios_init(); int n; while (cin >> n) { vector<LL> a(n); REP(i, n) cin >> a[i]; LL ans = 0; FOR(amb, 1, n) { DEBUG(amb); vector<LL> l; vector<LL> r; { int p = 0; LL sum = 0; while (p < n) { sum += a[p]; l.push_back(sum); p += amb; } } { int p = n - 1; LL sum = 0; while (p >= 0) { sum += a[p]; r.push_back(sum); p -= amb; } } assert(SZ(l) == SZ(r)); REP(i, SZ(l)) { DEBUG(i); int a = n - 1 - amb * i; DEBUG(a); DEBUG(amb); DEBUG(a / amb); if (a <= 0) continue; assert(a < n); int b = a - amb; if (b <= 0) continue; // assert(b > 0); if (a % amb == 0 and -i <= a / amb and a / amb <= i) continue; DEBUG(ans); chmax(ans, l[i] + r[i]); } } cout << ans << endl; } return 0; }
[ "expression.operator.compare.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.continue.add" ]
858,591
858,592
u412820911
cpp
p03034
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pi; typedef pair<ll, ll> pl; const double EPS = 1e-9; const ll mod = 1000000007; const int inf = 1 << 30; const ll linf = 1LL << 60; const double PI = 3.14159265358979323846; int n; ll s[100000]; int main() { cin >> n; rep(i, n) cin >> s[i]; ll ans = 0; for (int c = 1; c <= n - 1; c++) { ll cnt = 0; set<ll> hoge; for (int k = 0; k * c < n - 1; k++) { cnt += s[k * c] + s[n - 1 - k * c]; if (hoge.count(k * c)) break; hoge.insert(k * c); if (hoge.count(n - 1 - k * c)) break; hoge.insert(n - 1 - k * c); if (n - 1 - k * c < c) { ans = max(ans, cnt); } } } cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pi; typedef pair<ll, ll> pl; const double EPS = 1e-9; const ll mod = 1000000007; const int inf = 1 << 30; const ll linf = 1LL << 60; const double PI = 3.14159265358979323846; int n; ll s[100000]; int main() { cin >> n; rep(i, n) cin >> s[i]; ll ans = 0; for (int c = 1; c <= n - 1; c++) { ll cnt = 0; set<int> hoge; for (int k = 0; k * c < n - 1; k++) { cnt += s[k * c] + s[n - 1 - k * c]; if (hoge.count(k * c)) break; hoge.insert(k * c); if (hoge.count(n - 1 - k * c)) break; hoge.insert(n - 1 - k * c); if (c < n - 1 - k * c) { ans = max(ans, cnt); } } } cout << ans << endl; }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
858,608
858,609
u450494974
cpp
p03034
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define REP(i, n) for (ll i = 0; i < (ll)n; i++) #define INF 1000000000000000 using namespace std; typedef long long ll; typedef double db; typedef string str; int main() { int n; cin >> n; ll s[n]; REP(i, n) cin >> s[i]; ll ans = 0; for (int c = 1; c < n - 1; c++) { ll dp = 0; for (int k = 1; k < (n - 1 - c) / c; k++) { if ((n - 1 - k * c) % c == 0 && (n - 1 - k * c) / c <= k) break; dp += s[k * c] + s[n - 1 - k * c]; ans = max(ans, dp); } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define REP(i, n) for (ll i = 0; i < (ll)n; i++) #define INF 1000000000000000 using namespace std; typedef long long ll; typedef double db; typedef string str; int main() { int n; cin >> n; ll s[n]; REP(i, n) cin >> s[i]; ll ans = 0; for (int c = 1; c < n - 1; c++) { ll dp = 0; for (int k = 1; k * c < n - 1 - c; k++) { if ((n - 1 - k * c) % c == 0 && (n - 1 - k * c) / c <= k) break; dp += s[k * c] + s[n - 1 - k * c]; ans = max(ans, dp); } } cout << ans << endl; return 0; }
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
858,622
858,623
u780950519
cpp
p03034
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; long s[n]; for (auto &si : s) cin >> si; long dp, best = 0; for (int c = 1; c < n; c++) { dp = 0; for (int k = 1; k < (n - 1) / c - 1; k++) { if ((n - 1) % c == 0 && n - 1 <= 2 * k * c) break; dp += s[n - k * c - 1] + s[k * c]; best = max(best, dp); // cerr << c << ' ' << k << ' ' << dp << '\n'; } } cout << best << '\n'; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; long s[n]; for (auto &si : s) cin >> si; long dp, best = 0; for (int c = 1; c < n; c++) { dp = 0; for (int k = 1; k <= (n - 1) / c - 1; k++) { if ((n - 1) % c == 0 && n - 1 <= 2 * k * c) break; dp += s[n - k * c - 1] + s[k * c]; best = max(best, dp); // cerr << c << ' ' << k << ' ' << dp << '\n'; } } cout << best << '\n'; return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
858,637
858,638
u956758464
cpp
p03034
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; long s[n]; for (auto &si : s) cin >> si; long dp, best = 0; for (int c = 1; c < n; c++) { dp = 0; for (int k = 1; k < n / c - 1; k++) { if ((n - 1) % c == 0 && n - 1 <= 2 * k * c) break; dp += s[n - k * c - 1] + s[k * c]; best = max(best, dp); // cerr << c << ' ' << k << ' ' << dp << '\n'; } } cout << best << '\n'; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; long s[n]; for (auto &si : s) cin >> si; long dp, best = 0; for (int c = 1; c < n; c++) { dp = 0; for (int k = 1; k <= (n - 1) / c - 1; k++) { if ((n - 1) % c == 0 && n - 1 <= 2 * k * c) break; dp += s[n - k * c - 1] + s[k * c]; best = max(best, dp); // cerr << c << ' ' << k << ' ' << dp << '\n'; } } cout << best << '\n'; return 0; }
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
858,639
858,638
u956758464
cpp
p03042
#include <algorithm> #include <array> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { int S; cin >> S; string answer; int l = S / 100; int r = S / 100; if (l <= 12 && l >= 1) { if (r <= 12 && r >= 1) answer = "AMBIGIOUS"; else answer = "MMYY"; } else { if (r <= 12 && r >= 1) answer = "YYMM"; else answer = "NA"; } cout << answer; return 0; }
#include <algorithm> #include <array> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { int S; cin >> S; string answer; int l = S / 100; int r = S % 100; if (l <= 12 && l >= 1) { if (r <= 12 && r >= 1) answer = "AMBIGUOUS"; else answer = "MMYY"; } else { if (r <= 12 && r >= 1) answer = "YYMM"; else answer = "NA"; } cout << answer; return 0; }
[ "expression.operator.arithmetic.change", "expression.operation.binary.change", "misc.typo", "literal.string.change", "assignment.value.change" ]
858,661
858,662
u038582728
cpp
p03042
#include <iostream> using namespace std; int main() { int n, k; cin >> n; k = n % 100; n /= 100; if (k > 0 && k <= 12 && n > 0 && n <= 12) { cout << "AMBIGIOUS"; } else if (k > 0 && k <= 12) { cout << "YYMM"; } else if (n > 0 && n <= 12) { cout << "MMYY"; } else { cout << "NA"; } return 0; }
#include <iostream> using namespace std; int main() { int n, k; cin >> n; k = n % 100; n /= 100; if (k > 0 && k <= 12 && n > 0 && n <= 12) { cout << "AMBIGUOUS"; } else if (k > 0 && k <= 12) { cout << "YYMM"; } else if (n > 0 && n <= 12) { cout << "MMYY"; } else { cout << "NA"; } return 0; }
[ "misc.typo", "literal.string.change", "io.output.change" ]
858,677
858,678
u162126904
cpp
p03042
#define _USE_MATH_DEFINES #include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <stack> #include <string> #include <vector> int main() { std::string s; std::cin >> s; int month = (s[0] - '0') * 10 + s[1] - '0'; int year = (s[3] - '0') * 10 + s[4] - '0'; if (0 < month && month <= 12 && 0 < year && year <= 12) { std::cout << "AMBIGUOUS" << std::endl; } else if (0 < month && month <= 12) { std::cout << "MMYY" << std::endl; } else if (0 < year && year <= 12) { std::cout << "YYMM" << std::endl; } else { std::cout << "NA" << std::endl; } return 0; }
#define _USE_MATH_DEFINES #include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <stack> #include <string> #include <vector> int main() { std::string s; std::cin >> s; int month = (s[0] - '0') * 10 + s[1] - '0'; int year = (s[2] - '0') * 10 + s[3] - '0'; if (0 < month && month <= 12 && 0 < year && year <= 12) { std::cout << "AMBIGUOUS" << std::endl; } else if (0 < month && month <= 12) { std::cout << "MMYY" << std::endl; } else if (0 < year && year <= 12) { std::cout << "YYMM" << std::endl; } else { std::cout << "NA" << std::endl; } return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
858,689
858,690
u581385507
cpp
p03042
#include <iostream> using namespace std; int main() { int S; cin >> S; int before = S / 100; int after = S - (before * 100); if (before == 0 || before > 12) { if (after == 0 || after > 12) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else { if (after == 0 || before > 12) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int S; cin >> S; int before = S / 100; int after = S - (before * 100); if (before == 0 || before > 12) { if (after == 0 || after > 12) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else { if (after == 0 || after > 12) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
858,698
858,699
u369813073
cpp
p03042
#include <iostream> using namespace std; int main() { int S; cin >> S; int ante = S / 100; int poste = S - (S / 100) * 100; if (ante >= 1 && ante <= 12 && poste >= 1 && poste <= 12) { cout << "AMBIGOUS" << endl; } else if ((ante >= 13 || ante == 0) && poste >= 1 && poste <= 12) { cout << "YYMM" << endl; } else if (ante >= 1 && ante <= 12 && (poste >= 13 || poste == 0)) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } }
#include <iostream> using namespace std; int main() { int S; cin >> S; int ante = S / 100; int poste = S - (S / 100) * 100; if (ante >= 1 && ante <= 12 && poste >= 1 && poste <= 12) { cout << "AMBIGUOUS" << endl; } else if ((ante >= 13 || ante == 0) && poste >= 1 && poste <= 12) { cout << "YYMM" << endl; } else if (ante >= 1 && ante <= 12 && (poste >= 13 || poste == 0)) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
858,709
858,710
u015187377
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; if (0 <= a && a <= 12) { if (0 <= b && b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (0 <= b && b <= 12) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; if (0 < a && a <= 12) { if (0 < b && b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (0 < b && b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
858,711
858,712
u977554186
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; if (0 <= a && a <= 12) { if (0 <= b && b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (0 <= b && b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a = S / 100; int b = S % 100; if (0 < a && a <= 12) { if (0 < b && b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (0 < b && b <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
858,713
858,712
u977554186
cpp
p03042
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main(void) { string str; cin >> str; int ue = stoi(str) / 100; int sita = stoi(str) - ue * 100; string ans = "NA"; if ((ue >= 1 && ue <= 12) && (sita < 1 && sita > 12)) { ans = "MMYY"; } else if ((ue < 1 || ue > 12) && (sita >= 1 && sita <= 12)) { ans = "YYMM"; } else if ((ue >= 1 && ue <= 12) && (sita >= 1 && sita <= 12)) { ans = "AMBIGUOUS"; } cout << ans << endl; return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main(void) { string str; cin >> str; int ue = stoi(str) / 100; int sita = stoi(str) - ue * 100; string ans = "NA"; if ((ue >= 1 && ue <= 12) && (sita < 1 || sita > 12)) { ans = "MMYY"; } else if ((ue < 1 || ue > 12) && (sita >= 1 && sita <= 12)) { ans = "YYMM"; } else if ((ue >= 1 && ue <= 12) && (sita >= 1 && sita <= 12)) { ans = "AMBIGUOUS"; } cout << ans << endl; return 0; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
858,716
858,717
u421782399
cpp
p03042
#include <iostream> using namespace std; int main(void) { string S; cin >> S; // formatcheck int A, B; A = (S[0] - 0x30) * 10 + (S[1] - 0x30); B = (S[2] - 0x30) * 10 + (S[3] - 0x30); while (1) { // AMBIGUOUS ? if ((A > 0 && A <= 12) && (B > 0 && B <= 12)) { cout << "AMBIGUOUS" << endl; break; } // YYMM? if (B > 0 && B < 12) { cout << "YYMM" << endl; break; } // MMYY? if (A > 0 && A < 12) { cout << "MMYY" << endl; break; } // NA cout << "NA" << endl; break; } return 0; }
#include <iostream> using namespace std; int main(void) { string S; cin >> S; // formatcheck int A, B; A = (S[0] - 0x30) * 10 + (S[1] - 0x30); B = (S[2] - 0x30) * 10 + (S[3] - 0x30); while (1) { // AMBIGUOUS ? if ((A > 0 && A <= 12) && (B > 0 && B <= 12)) { cout << "AMBIGUOUS" << endl; break; } // YYMM? if (B > 0 && B <= 12) { cout << "YYMM" << endl; break; } // MMYY? if (A > 0 && A <= 12) { cout << "MMYY" << endl; break; } // NA cout << "NA" << endl; break; } return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
858,722
858,723
u699680099
cpp
p03042
#include <bits/stdc++.h> #define ll long long #define pb push_back #define F first #define S second using namespace std; const int N = 300005; int main() { ios_base ::sync_with_stdio(0); cin.tie(0), cout.tie(0); char a, b, c, d; cin >> a >> b >> c >> d; int x = 10 * (a - '0') + b - 48; int y = 10 * (c - '0') + d - 48; if (x < 1 || x > 12) { if (y >= 1 && y <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } else if (y < 1 || y > 12) { if (x >= 1 && x <= 12) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } else { cout << "AMBIGIOUS" << endl; } return 0; }
#include <bits/stdc++.h> #define ll long long #define pb push_back #define F first #define S second using namespace std; const int N = 300005; int main() { ios_base ::sync_with_stdio(0); cin.tie(0), cout.tie(0); char a, b, c, d; cin >> a >> b >> c >> d; int x = 10 * (a - '0') + b - 48; int y = 10 * (c - '0') + d - 48; if (x < 1 || x > 12) { if (y >= 1 && y <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } else if (y < 1 || y > 12) { if (x >= 1 && x <= 12) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } else { cout << "AMBIGUOUS" << endl; } return 0; }
[ "misc.typo", "literal.string.change", "io.output.change" ]
858,726
858,727
u792984973
cpp
p03042
#include <iostream> using namespace std; int main() { int s, flag = 0; cin >> s; if (s / 100 < 13 && s / 100 >= 1 && s % 100 < 13 && s % 100 > 0) cout << "AMBIGUOUS"; else if (s / 100 < 13 && s / 100 >= 1 && s % 100 > 0) cout << "YYMM"; else if (s / 100 >= 1 && s % 100 < 13 && s % 100 > 0) cout << "MMYY"; else cout << "NA"; return 0; }
#include <iostream> using namespace std; int main() { int s, flag = 0; cin >> s; if (s / 100 < 13 && s / 100 >= 1 && s % 100 < 13 && s % 100 > 0) cout << "AMBIGUOUS"; else if (s / 100 < 13 && s / 100 >= 1 && s % 100 >= 0) cout << "MMYY"; else if (s / 100 >= 0 && s % 100 < 13 && s % 100 > 0) cout << "YYMM"; else cout << "NA"; return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change", "literal.number.change" ]
858,738
858,734
u340494803
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int a = s / 100; int b = s - a * 100; if (a >= 1 && a <= 12 && b <= 12 && b >= 1) cout << "AMBIGOUS" << endl; else if (a >= 1 && a <= 12 && (b > 12 || b == 0)) cout << "MMYY" << endl; else if (b >= 1 && b <= 12 && (a > 12 || a == 0)) cout << "YYMM" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int a = s / 100; int b = s - a * 100; if (a >= 1 && a <= 12 && b <= 12 && b >= 1) cout << "AMBIGUOUS" << endl; else if (a >= 1 && a <= 12 && (b > 12 || b == 0)) cout << "MMYY" << endl; else if (b >= 1 && b <= 12 && (a > 12 || a == 0)) cout << "YYMM" << endl; else cout << "NA" << endl; }
[ "literal.string.change", "io.output.change" ]
858,739
858,740
u535810324
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int a = s / 100; int b = s - a * 100; if (a >= 1 && a <= 12 && b <= 12 && b >= 1) cout << "AMBIGOUS" << endl; else if (a >= 1 && a <= 12 && b > 12 || b == 0) cout << "MMYY" << endl; else if (b >= 1 && b <= 12 && a > 12 || a == 0) cout << "YYMM" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int a = s / 100; int b = s - a * 100; if (a >= 1 && a <= 12 && b <= 12 && b >= 1) cout << "AMBIGUOUS" << endl; else if (a >= 1 && a <= 12 && (b > 12 || b == 0)) cout << "MMYY" << endl; else if (b >= 1 && b <= 12 && (a > 12 || a == 0)) cout << "YYMM" << endl; else cout << "NA" << endl; }
[ "literal.string.change", "io.output.change", "control_flow.branch.if.condition.change" ]
858,742
858,740
u535810324
cpp
p03042
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //------------------------------------------- template <class T> inline T sqr(T x) { return x * x; } // typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; // container util //------------------------------------------ #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define EXISTch(s, c) \ ((((s).find_first_of(c)) != std::string::npos) ? 1 : 0) // cがあれば1 if(1) #define SORT(c) sort((c).begin(), (c).end()) #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) // constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = (int)1000000007; const LL MOD = (LL)1000000007; // 10^9+7 const LL INF2 = (LL)100000000000000000; // 10^18 int main() { string s; cin >> s; int a = stoi(s.substr(0, 2)); int b = stoi(s.substr(2)); bool f = a >= 1 && a <= 12; bool g = b >= 1 && b <= 12; if (f) { if (g) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else { if (f) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } return 0; }
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; // conversion //------------------------------------------ inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; } template <class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); } // math //------------------------------------------- template <class T> inline T sqr(T x) { return x * x; } // typedef //------------------------------------------ typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef long long LL; // container util //------------------------------------------ #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define PB push_back #define MP make_pair #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define EXISTch(s, c) \ ((((s).find_first_of(c)) != std::string::npos) ? 1 : 0) // cがあれば1 if(1) #define SORT(c) sort((c).begin(), (c).end()) #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define FOR(i, c) \ for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) // constant //-------------------------------------------- const double EPS = 1e-10; const double PI = acos(-1.0); const int INF = (int)1000000007; const LL MOD = (LL)1000000007; // 10^9+7 const LL INF2 = (LL)100000000000000000; // 10^18 int main() { string s; cin >> s; int a = stoi(s.substr(0, 2)); int b = stoi(s.substr(2)); bool f = a >= 1 && a <= 12; bool g = b >= 1 && b <= 12; if (f) { if (g) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (g) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "literal.string.change", "io.output.change", "identifier.change", "control_flow.branch.if.condition.change" ]
858,757
858,758
u874996917
cpp
p03042
#include <bits/stdc++.h> #include <numeric> #include <vector> #define PI 3.14159265358979323846 #define MAXINF 1e18L #define INF 1e9L #define EPS 1e-9 #define REP(i, n) for (int i = 0; i < int(n); ++i) #define Rep(i, sta, n) for (int i = sta; i < n; i++) #define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i) #define ALL(v) v.begin(), v.end() #define FIND(v, x) (binary_search(ALL(v), (x))) #define SORT(v) sort(ALL(v)) #define RSORT(v) \ sort(ALL(v)); \ reverse(ALL(v)) #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i = 0; i < v.size(); i++) \ cerr << " " << v[i]; \ cerr << endl #define Yes(n) cout << ((n) ? "Yes" : "No") << endl #define YES(n) cout << ((n) ? "YES" : "NO") << endl #define pb push_back #define fi first #define se second using namespace std; template <class A> void pr(A a) { cout << (a) << endl; } template <class A, class B> void pr(A a, B b) { cout << a << " "; pr(b); } template <class A, class B, class C> void pr(A a, B b, C c) { cout << a << " "; pr(b, c); } template <class A, class B, class C, class D> void pr(A a, B b, C c, D d) { cout << a << " "; pr(b, c, d); } typedef long long ll; typedef pair<int, int> pii; int main(void) { string a; cin >> a; int y = a[0] - '0' * 10 + a[1] - '0'; int m = a[2] - '0' * 10 + a[3] - '0'; if (1 <= y && y <= 12 && 1 <= m && m <= 12) pr("AMBIGUOUS"); else if (1 <= y && y <= 12) pr("YYMM"); else if (1 <= m && m <= 12) pr("MMYY"); else pr("NA"); }
#include <bits/stdc++.h> #include <numeric> #include <vector> #define PI 3.14159265358979323846 #define MAXINF 1e18L #define INF 1e9L #define EPS 1e-9 #define REP(i, n) for (int i = 0; i < int(n); ++i) #define Rep(i, sta, n) for (int i = sta; i < n; i++) #define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i) #define ALL(v) v.begin(), v.end() #define FIND(v, x) (binary_search(ALL(v), (x))) #define SORT(v) sort(ALL(v)) #define RSORT(v) \ sort(ALL(v)); \ reverse(ALL(v)) #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i = 0; i < v.size(); i++) \ cerr << " " << v[i]; \ cerr << endl #define Yes(n) cout << ((n) ? "Yes" : "No") << endl #define YES(n) cout << ((n) ? "YES" : "NO") << endl #define pb push_back #define fi first #define se second using namespace std; template <class A> void pr(A a) { cout << (a) << endl; } template <class A, class B> void pr(A a, B b) { cout << a << " "; pr(b); } template <class A, class B, class C> void pr(A a, B b, C c) { cout << a << " "; pr(b, c); } template <class A, class B, class C, class D> void pr(A a, B b, C c, D d) { cout << a << " "; pr(b, c, d); } typedef long long ll; typedef pair<int, int> pii; int main(void) { string a; cin >> a; int y = (a[0] - '0') * 10 + a[1] - '0'; int m = (a[2] - '0') * 10 + a[3] - '0'; if (1 <= y && y <= 12 && 1 <= m && m <= 12) pr("AMBIGUOUS"); else if (1 <= y && y <= 12) pr("MMYY"); else if (1 <= m && m <= 12) pr("YYMM"); else pr("NA"); }
[ "literal.string.change", "call.arguments.change" ]
858,772
858,773
u528720841
cpp
p03042
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; ll d1 = n % 10; n /= 10; ll d2 = n % 10; n /= 10; ll d3 = n % 10; n /= 10; ll d4 = n % 10; ll x = d4 * 10 + d3; ll y = d2 * 10 + d1; if (0 <= x and x <= 99 and 1 <= y and y <= 12) { if (1 <= x and x <= 12) { cout << "AMBIGOUS" << endl; } else { cout << "YYMM" << endl; } } else if (0 <= y and y <= 99 and 1 <= x and x <= 12) { if (1 <= y and y <= 12) { cout << "AMBIGOUS" << endl; } else { cout << "MMYY" << endl; } } else { cout << "NA" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; ll d1 = n % 10; n /= 10; ll d2 = n % 10; n /= 10; ll d3 = n % 10; n /= 10; ll d4 = n % 10; ll x = d4 * 10 + d3; ll y = d2 * 10 + d1; if (0 <= x and x <= 99 and 1 <= y and y <= 12) { if (1 <= x and x <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else if (0 <= y and y <= 99 and 1 <= x and x <= 12) { if (1 <= y and y <= 12) { cout << "AMBIGOUS" << endl; } else { cout << "MMYY" << endl; } } else { cout << "NA" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
858,778
858,779
u477855214
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a, b; a = (s[0] - '0') * 10 + (s[1] - '0'); b = (s[2] - '0') * 10 + (s[3] - '0'); int y[2], m[2]; y[0] = 0; y[1] = 0; m[0] = 0, m[1] = 0; if (a >= 0) y[0] = 1; if (b >= 0) y[1] = 1; if (a >= 1 && a <= 12) m[0] = 1; if (b >= 1 && b <= 12) m[1] = 1; if (y[0] == 1 && m[0] == 1 && y[1] == 1 && m[1] == 1) { cout << "AMBIGUOUS"; return 0; } if ((y[0] == 0 && y[1] == 0) || (m[1] == 0 && m[0] == 0)) { cout << "NO"; return 0; } if (y[0] == 1 && m[1] == 1) { cout << "YYMM"; return 0; } if (y[1] == 1 && m[0] == 1) { cout << "MMYY"; return 0; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a, b; a = (s[0] - '0') * 10 + (s[1] - '0'); b = (s[2] - '0') * 10 + (s[3] - '0'); int y[2], m[2]; y[0] = 0; y[1] = 0; m[0] = 0, m[1] = 0; if (a >= 0) y[0] = 1; if (b >= 0) y[1] = 1; if (a >= 1 && a <= 12) m[0] = 1; if (b >= 1 && b <= 12) m[1] = 1; if (y[0] == 1 && m[0] == 1 && y[1] == 1 && m[1] == 1) { cout << "AMBIGUOUS"; return 0; } if ((y[0] == 0 && y[1] == 0) || (m[1] == 0 && m[0] == 0)) { cout << "NA"; return 0; } if (y[0] == 1 && m[1] == 1) { cout << "YYMM"; return 0; } if (y[1] == 1 && m[0] == 1) { cout << "MMYY"; return 0; } return 0; }
[ "literal.string.change", "io.output.change" ]
858,791
858,792
u228402731
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; if (s % 100 > 0 && s % 100 < 13) { if (s / 100 > 0 && s / 100 < 13) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (s / 100 > 0 && s / 100 < 13) { cout << "YYMM"; } else { cout << "NA"; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; if (s % 100 > 0 && s % 100 < 13) { if (s / 100 > 0 && s / 100 < 13) { cout << "AMBIGUOUS"; } else { cout << "YYMM"; } } else { if (s / 100 > 0 && s / 100 < 13) { cout << "MMYY"; } else { cout << "NA"; } } return 0; }
[ "literal.string.change", "io.output.change" ]
858,795
858,796
u058348416
cpp
p03042
#include <cstdio> #include <iostream> #include <string> using namespace std; int toInt(char c1, char c2) { return (c1 - '0') * 10 + c2 - '0'; } int main() { string str; cin >> str; bool isYYMM = true; bool isMMYY = true; if (toInt(str[0], str[1]) > 12 || toInt(str[0], str[1]) == 0) { isMMYY = false; } if (toInt(str[3], str[4]) > 12 || toInt(str[0], str[1]) == 0) { isYYMM = false; } if (isYYMM && isMMYY) { cout << "AMBIGUOUS" << endl; } else if (isYYMM) { cout << "YYMM" << endl; } else if (isMMYY) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } return 0; }
#include <cstdio> #include <iostream> #include <string> using namespace std; int toInt(char c1, char c2) { return (c1 - '0') * 10 + c2 - '0'; } int main() { string str; cin >> str; bool isYYMM = true; bool isMMYY = true; if (toInt(str[0], str[1]) > 12 || toInt(str[0], str[1]) == 0) { isMMYY = false; } if (toInt(str[2], str[3]) > 12 || toInt(str[2], str[3]) == 0) { isYYMM = false; } if (isYYMM && isMMYY) { cout << "AMBIGUOUS" << endl; } else if (isYYMM) { cout << "YYMM" << endl; } else if (isMMYY) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
858,797
858,798
u426837411
cpp
p03042
#include <bits/stdc++.h> using namespace std; struct Fast { Fast() { std::cin.tie(0); ios::sync_with_stdio(false); cout.precision(20); } } fast; /* define */ #define FOR(I, X, Y) for (long long(I) = (X); (I) < (Y); (I)++) #define REP(I, X, Y) for (long long(I) = (Y)-1; (I) >= (X); (I)--) #define ALL(X) (X).begin(), (X).end() #define pb push_back #define COUNT(V, X) \ (upper_bound((V).begin(), (V).end(), X) - \ lower_bound((V).begin(), (V).end(), X)) #define debug(x) cerr << #x << ':' << x << endl; #define DEBUG(v) \ { \ cerr << #v << ':'; \ for (auto xv : v) \ cerr << xv << ' '; \ cerr << endl; \ } #define Yes(X) cout << (X ? "Yes" : "No") << endl; #define YES(X) cout << (X ? "YES" : "NO") << endl; #define ctoi(C) (C - '0') #define pow2(x) ((long long)((long long)1 << x)) /* alias */ using ll = long long; using ld = long double; using vi = vector<int>; using vii = vector<vector<int>>; using vl = vector<long long>; using vll = vector<vector<long long>>; using pi = pair<int, int>; using pl = pair<long long, long long>; template <typename T> using PQ = priority_queue<T>; template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>; /* const */ const long long dx[] = {1, 0, -1, 0}; const long long dy[] = {0, 1, 0, -1}; const long long dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}; const long long dy8[] = {0, 1, 1, 1, 0, -1, -1, -1}; const long long dx9[] = {1, 1, 0, -1, -1, -1, 0, 1, 0}; const long long dy9[] = {0, 1, 1, 1, 0, -1, -1, -1, 0}; const int INF = 1000000007; const long long LINF = 1000000000000000007; /* func */ template <typename T1, typename T2> inline bool chmin(T1 &a, const T2 &b) { if (a > b) a = b; return a > b; } template <typename T1, typename T2> inline bool chmax(T1 &a, const T2 &b) { if (a < b) a = b; return a < b; } long long max(long long x, int y) { return max(x, (long long)y); } long long max(int x, long long y) { return max((long long)x, y); } long long min(long long x, int y) { return min(x, (long long)y); } long long min(int x, long long y) { return min((long long)x, y); } /* liblary */ /* main */ signed main() { string S; cin >> S; ll a = stoi(S.substr(0, 2)); ll b = stoi(S.substr(3, 2)); bool mm, mm2; mm = 1 <= a && a <= 12; mm2 = 1 <= b && b <= 12; if (mm && mm2) cout << "AMBIGUOUS" << endl; else if (mm) cout << "MMYY" << endl; else if (mm2) cout << "YYMM" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; struct Fast { Fast() { std::cin.tie(0); ios::sync_with_stdio(false); cout.precision(20); } } fast; /* define */ #define FOR(I, X, Y) for (long long(I) = (X); (I) < (Y); (I)++) #define REP(I, X, Y) for (long long(I) = (Y)-1; (I) >= (X); (I)--) #define ALL(X) (X).begin(), (X).end() #define pb push_back #define COUNT(V, X) \ (upper_bound((V).begin(), (V).end(), X) - \ lower_bound((V).begin(), (V).end(), X)) #define debug(x) cerr << #x << ':' << x << endl; #define DEBUG(v) \ { \ cerr << #v << ':'; \ for (auto xv : v) \ cerr << xv << ' '; \ cerr << endl; \ } #define Yes(X) cout << (X ? "Yes" : "No") << endl; #define YES(X) cout << (X ? "YES" : "NO") << endl; #define ctoi(C) (C - '0') #define pow2(x) ((long long)((long long)1 << x)) /* alias */ using ll = long long; using ld = long double; using vi = vector<int>; using vii = vector<vector<int>>; using vl = vector<long long>; using vll = vector<vector<long long>>; using pi = pair<int, int>; using pl = pair<long long, long long>; template <typename T> using PQ = priority_queue<T>; template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>; /* const */ const long long dx[] = {1, 0, -1, 0}; const long long dy[] = {0, 1, 0, -1}; const long long dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}; const long long dy8[] = {0, 1, 1, 1, 0, -1, -1, -1}; const long long dx9[] = {1, 1, 0, -1, -1, -1, 0, 1, 0}; const long long dy9[] = {0, 1, 1, 1, 0, -1, -1, -1, 0}; const int INF = 1000000007; const long long LINF = 1000000000000000007; /* func */ template <typename T1, typename T2> inline bool chmin(T1 &a, const T2 &b) { if (a > b) a = b; return a > b; } template <typename T1, typename T2> inline bool chmax(T1 &a, const T2 &b) { if (a < b) a = b; return a < b; } long long max(long long x, int y) { return max(x, (long long)y); } long long max(int x, long long y) { return max((long long)x, y); } long long min(long long x, int y) { return min(x, (long long)y); } long long min(int x, long long y) { return min((long long)x, y); } /* liblary */ /* main */ signed main() { string S; cin >> S; ll a = stoi(S.substr(0, 2)); ll b = stoi(S.substr(2, 2)); bool mm, mm2; mm = 1 <= a && a <= 12; mm2 = 1 <= b && b <= 12; if (mm && mm2) cout << "AMBIGUOUS" << endl; else if (mm) cout << "MMYY" << endl; else if (mm2) cout << "YYMM" << endl; else cout << "NA" << endl; }
[ "literal.number.change", "call.arguments.change" ]
858,805
858,806
u205561862
cpp
p03042
#include <algorithm> #include <cassert> #include <iostream> #include <queue> #include <tuple> #include <utility> #include <vector> using namespace std; bool is_maybe_month(int d) { return (1 <= d) && (d <= 12); } bool is_maybe_year(int d) { return (0 <= d) && (d <= 99); } void solve(int fd, int sd) { if (is_maybe_month(fd) && is_maybe_month(sd)) { cout << "AMBIGOUS"; } else if (is_maybe_month(fd) && !is_maybe_month(sd)) { cout << "MMYY"; } else if (is_maybe_month(sd) && !is_maybe_month(fd)) { cout << "YYMM"; } else { cout << "NA"; } } int main(int argc, char const *argv[]) { char fd[3]; char sd[3]; char c[5]; cin >> c; fd[0] = c[0]; fd[1] = c[1]; fd[2] = '\0'; sd[0] = c[2]; sd[1] = c[3]; sd[2] = '\0'; // cout << fd << endl; // cout << sd << endl; // cout << atoi(fd) << endl; // cout << atoi(sd) << endl; solve(atoi(fd), atoi(sd)); return 0; }
#include <algorithm> #include <cassert> #include <iostream> #include <queue> #include <tuple> #include <utility> #include <vector> using namespace std; bool is_maybe_month(int d) { return (1 <= d) && (d <= 12); } bool is_maybe_year(int d) { return (0 <= d) && (d <= 99); } void solve(int fd, int sd) { if (is_maybe_month(fd) && is_maybe_month(sd)) { cout << "AMBIGUOUS"; } else if (is_maybe_month(fd) && !is_maybe_month(sd)) { cout << "MMYY"; } else if (is_maybe_month(sd) && !is_maybe_month(fd)) { cout << "YYMM"; } else { cout << "NA"; } } int main(int argc, char const *argv[]) { char fd[3]; char sd[3]; char c[5]; cin >> c; fd[0] = c[0]; fd[1] = c[1]; fd[2] = '\0'; sd[0] = c[2]; sd[1] = c[3]; sd[2] = '\0'; // cout << fd << endl; // cout << sd << endl; // cout << atoi(fd) << endl; // cout << atoi(sd) << endl; solve(atoi(fd), atoi(sd)); return 0; }
[ "literal.string.change", "io.output.change" ]
858,837
858,838
u767777873
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a, b; a = S % 100; /*simo*/ b = (S - a) / 100; /*kami*/ if ((b > 0 && b < 13) && (a > 0 && a < 13)) { cout << "AMBIGUOUS" << endl; } else if (a > 0 && a < 13) { cout << "MMYY" << endl; } else if (b > 0 && b < 13) { cout << "YYMM" << endl; } /* else if ((a>13 && b==0) || (a==0 && b>13)) {*/ else { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a, b; b = S % 100; /*simo*/ a = (S - b) / 100; /*kami*/ if ((b > 0 && b < 13) && (a > 0 && a < 13)) { cout << "AMBIGUOUS" << endl; } /* else if (((b>0 && b<13) && a==0) || (b==0 && (a>0 && a<13))) { cout << "NA" << endl; }*/ else if (a > 0 && a < 13) { cout << "MMYY" << endl; } else if (b > 0 && b < 13) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "expression.operation.binary.change" ]
858,845
858,846
u508570129
cpp
p03042
#include <algorithm> #include <bitset> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long unsigned int ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) int main(void) { string S; cin >> S; bool yymm = false, mmyy = false; int upper = stoi(S.substr(0, 2)); int lower = stoi(S.substr(2, 2)); if (1 <= upper && upper <= 12 && 1 <= lower && lower <= 12) { cout << "AMBIGUOUS" << endl; } else if (0 <= upper && upper <= 12 && (lower > 12 || lower == 0)) { cout << "MMYY" << endl; } else if ((upper > 12 || upper == 0) && 0 <= lower && lower <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
#include <algorithm> #include <bitset> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long unsigned int ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) int main(void) { string S; cin >> S; bool yymm = false, mmyy = false; int upper = stoi(S.substr(0, 2)); int lower = stoi(S.substr(2, 2)); if (1 <= upper && upper <= 12 && 1 <= lower && lower <= 12) { cout << "AMBIGUOUS" << endl; } else if (1 <= upper && upper <= 12 && (lower > 12 || lower == 0)) { cout << "MMYY" << endl; } else if ((upper > 12 || upper == 0) && 1 <= lower && lower <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
858,855
858,856
u017829142
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mp make_pair int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); 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 x = 10 * a + b; int y = 10 * c + d; if (x >= 1 && x <= 12) { if (y >= 1 && y <= 12) { cout << "AMBIGIOUS"; } else if (y == 0) { cout << "MMYY"; } else { cout << "MMYY"; } return 0; } if (x > 12) { if (y >= 1 && y <= 12) { cout << "YYMM"; } else if (y == 0) { cout << "NA"; } else cout << "NA"; return 0; } if (x == 0) { if (y == 0) { cout << "NA"; } else if (y >= 1 && y <= 12) { cout << "YYMM"; } else cout << "NA"; } }
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mp make_pair int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); 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 x = 10 * a + b; int y = 10 * c + d; if (x >= 1 && x <= 12) { if (y >= 1 && y <= 12) { cout << "AMBIGUOUS"; } else if (y == 0) { cout << "MMYY"; } else { cout << "MMYY"; } return 0; } if (x > 12) { if (y >= 1 && y <= 12) { cout << "YYMM"; } else if (y == 0) { cout << "NA"; } else cout << "NA"; return 0; } if (x == 0) { if (y == 0) { cout << "NA"; } else if (y >= 1 && y <= 12) { cout << "YYMM"; } else cout << "NA"; } }
[ "misc.typo", "literal.string.change", "io.output.change" ]
858,861
858,862
u506112954
cpp
p03042
#include <iostream> #include <stdlib.h> #include <string> using namespace std; int main() { string s; cin >> s; char a1 = (int)(s[0]); char a2 = (int)(s[1]); char a3 = (int)(s[2]); char a4 = (int)(s[3]); int s1 = (a1 - 48) * 10 + (a2 - 48); int s2 = (a3 - 48) * 10 + (a4 - 48); // cout << a1 << a2 << a3 << a4 << endl; // cout << s1 <<" " << s2 << endl; if (s1 > 0 && s1 <= 12 && s2 > 0 && s2 <= 12) cout << "AMBIGUOUS" << endl; else if (s1 == 0 || s1 > 12 && s2 > 0 && s2 <= 12) cout << "YYMM" << endl; else if (s1 > 0 && s1 <= 12 && s2 == 0 || s2 > 12) cout << "MMYY" << endl; else cout << "NA" << endl; return 0; }
#include <iostream> #include <stdlib.h> #include <string> using namespace std; int main() { string s; cin >> s; char a1 = (int)(s[0]); char a2 = (int)(s[1]); char a3 = (int)(s[2]); char a4 = (int)(s[3]); int s1 = (a1 - 48) * 10 + (a2 - 48); int s2 = (a3 - 48) * 10 + (a4 - 48); // cout << a1 << a2 << a3 << a4 << endl; // cout << s1 <<" " << s2 << endl; if (s1 > 0 && s1 <= 12 && s2 > 0 && s2 <= 12) cout << "AMBIGUOUS" << endl; else if ((s1 == 0 || s1 > 12) && s2 > 0 && s2 <= 12) cout << "YYMM" << endl; else if (s1 > 0 && s1 <= 12 && (s2 == 0 || s2 > 12)) cout << "MMYY" << endl; else cout << "NA" << endl; return 0; }
[ "control_flow.branch.if.condition.change" ]
858,876
858,877
u504879924
cpp
p03042
#include <bits/stdc++.h> #include <string> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<int, P> P1; typedef pair<P, P> P2; #define pu push #define pb push_back #define mp make_pair #define eps 1e-7 #define INF 1000000000 #define mod 1000000007 #define fi first #define sc second #define rep(i, x) for (int i = 0; i < x; i++) #define repn(i, x) for (int i = 1; i <= x; i++) #define SORT(x) sort(x.begin(), x.end()) #define ERASE(x) x.erase(unique(x.begin(), x.end()), x.end()) #define POSL(x, v) (lower_bound(x.begin(), x.end(), v) - x.begin()) #define POSU(x, v) (upper_bound(x.begin(), x.end(), v) - x.begin()) int n, h[100005]; ll dp[100005]; #define ALL(v) (v).begin(), (v).end() std::set<int> st; //#define MAX(a,b) if(a>b) #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) /* ペア関連 //vector<pair<long long, long long> > pairs(N); for(long long i=0; i<N; i++){ long long a, b; cin >> a >> b; pairs[i] = make_pair(a, b); } //sort(pairs.begin(), pairs.end(),greater<pair<int,int> >()); sort(pairs.begin(), pairs.end()); */ // stack<int> sta; // queue<int> que; int main() { long long N, M, K; // string s; std::cin >> N; // std::cin >> N >> M; // std::cin >> N >> M >> K; std::vector<long long> v(N); std::vector<long long> w(N); // std::cin >> s; // 配列入力 /* for(long long i=0; i<N; i++){ std::cin >> v[i]; } */ /* for(long long i=0; i<N; i++){ std::cin >> w[i]; } */ //ソート // std::sort(v.begin(),v.end());//昇順ソート // std::sort(v.begin(),v.end(),std::greater<long long>());//降順ソート // std::sort(w.begin(),w.end());//昇順ソート // std::sort(w.begin(),w.end(),std::greater<long long>());//降順ソート /* for(long long i=0; i<N; i++){ std::cin >> v[i]; if(st.find(v[i])==st.end()){ st.insert(v[i]); } else{ st.erase(v[i]); } } */ long long sum, sum1; sum = 0; sum1 = 0; int flg, flg1, cnt, cnt1; flg = 0; flg1 = 0; cnt = 0; cnt1 = 0; int max; int max1; max = 0; max1 = 0; int min; int min1; min = INF; min1 = INF; int work; work = 0; // sum=saiki(N); //文字列入力 // for(long long i=0; i<s.length(); i++){ // if(s[0]<='1' && s[1]<=2){ //} //} int work1, work2, work3, work4; work1 = 0; work2 = 0; work3 = 0; work4 = 0; int a[4]; int value; value = N; a[0] = (value % 10); value /= 10; // 1桁目を取り出す a[1] = (value % 10); value /= 10; // 2桁目を取り出す a[2] = (value % 10); value /= 10; // 3桁目を取り出す a[3] = (value % 10); value /= 10; // 4桁目を取り出す work1 = a[0] + 10 * a[1]; work2 = a[2] + 10 * a[3]; if (1) { if (work1 >= 1 && work1 <= 12 && work2 >= 1 && work2 <= 12) { // printf("%d",work1); // printf("%d",work2); puts("AMBIGUOUS"); } else if (work1 > 1 && work1 < 12 && (work2 == 0 || work2 > 12)) { puts("YYMM"); } else if (work2 > 1 && work2 < 12 && (work1 == 0 || work1 > 12)) { puts("MMYY"); } else { puts("NA"); } // printf("%d",st.size()); //文字列の出力 // std::cout << s << std::endl; // cout << sum/mod << endl; } else { // puts("No"); } return 0; }
#include <bits/stdc++.h> #include <string> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<int, P> P1; typedef pair<P, P> P2; #define pu push #define pb push_back #define mp make_pair #define eps 1e-7 #define INF 1000000000 #define mod 1000000007 #define fi first #define sc second #define rep(i, x) for (int i = 0; i < x; i++) #define repn(i, x) for (int i = 1; i <= x; i++) #define SORT(x) sort(x.begin(), x.end()) #define ERASE(x) x.erase(unique(x.begin(), x.end()), x.end()) #define POSL(x, v) (lower_bound(x.begin(), x.end(), v) - x.begin()) #define POSU(x, v) (upper_bound(x.begin(), x.end(), v) - x.begin()) int n, h[100005]; ll dp[100005]; #define ALL(v) (v).begin(), (v).end() std::set<int> st; //#define MAX(a,b) if(a>b) #define MAX(a, b) (((a) > (b)) ? (a) : (b)) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) /* ペア関連 //vector<pair<long long, long long> > pairs(N); for(long long i=0; i<N; i++){ long long a, b; cin >> a >> b; pairs[i] = make_pair(a, b); } //sort(pairs.begin(), pairs.end(),greater<pair<int,int> >()); sort(pairs.begin(), pairs.end()); */ // stack<int> sta; // queue<int> que; int main() { long long N, M, K; // string s; std::cin >> N; // std::cin >> N >> M; // std::cin >> N >> M >> K; std::vector<long long> v(N); std::vector<long long> w(N); // std::cin >> s; // 配列入力 /* for(long long i=0; i<N; i++){ std::cin >> v[i]; } */ /* for(long long i=0; i<N; i++){ std::cin >> w[i]; } */ //ソート // std::sort(v.begin(),v.end());//昇順ソート // std::sort(v.begin(),v.end(),std::greater<long long>());//降順ソート // std::sort(w.begin(),w.end());//昇順ソート // std::sort(w.begin(),w.end(),std::greater<long long>());//降順ソート /* for(long long i=0; i<N; i++){ std::cin >> v[i]; if(st.find(v[i])==st.end()){ st.insert(v[i]); } else{ st.erase(v[i]); } } */ long long sum, sum1; sum = 0; sum1 = 0; int flg, flg1, cnt, cnt1; flg = 0; flg1 = 0; cnt = 0; cnt1 = 0; int max; int max1; max = 0; max1 = 0; int min; int min1; min = INF; min1 = INF; int work; work = 0; // sum=saiki(N); //文字列入力 // for(long long i=0; i<s.length(); i++){ // if(s[0]<='1' && s[1]<=2){ //} //} int work1, work2, work3, work4; work1 = 0; work2 = 0; work3 = 0; work4 = 0; int a[4]; int value; value = N; a[0] = (value % 10); value /= 10; // 1桁目を取り出す a[1] = (value % 10); value /= 10; // 2桁目を取り出す a[2] = (value % 10); value /= 10; // 3桁目を取り出す a[3] = (value % 10); value /= 10; // 4桁目を取り出す work1 = a[0] + 10 * a[1]; work2 = a[2] + 10 * a[3]; if (1) { if (work1 >= 1 && work1 <= 12 && work2 >= 1 && work2 <= 12) { // printf("%d",work1); // printf("%d",work2); puts("AMBIGUOUS"); } else if (work1 >= 1 && work1 <= 12 && (work2 == 0 || work2 > 12)) { puts("YYMM"); } else if (work2 >= 1 && work2 <= 12 && (work1 == 0 || work1 > 12)) { puts("MMYY"); } else { puts("NA"); } // printf("%d",st.size()); //文字列の出力 // std::cout << s << std::endl; // cout << sum/mod << endl; } else { // puts("No"); } return 0; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
858,882
858,883
u069521477
cpp
p03042
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define FORR(i, m, n) for (int i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define ll long long #define pb(a) push_back(a) #define INF 999999999 #define MOD 1000000007 using namespace std; typedef pair<int, int> P; typedef pair<ll, ll> LP; typedef pair<int, P> PP; typedef pair<ll, LP> LPP; int dy[] = {0, 0, 1, -1}; int dx[] = {1, -1, 0, 0}; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } ll modpow(ll n, ll k) { if (k == 1) { return n; } else if (k == 0) { return 1; } else if (k % 2 == 0) { ll memo = modpow(n, k / 2) % MOD; return memo * memo % MOD; } else { return n * modpow(n, k - 1) % MOD; } } int main() { string s; cin >> s; int a, b, c, d; a = s[0] - '0'; b = s[1] - '0'; c = s[2] - '0'; d = s[3] - '0'; bool left, right; left = false; right = false; if (a == 1) { if (b == 0 || b == 1 || b == 2) { left = true; } } else if (a == 0 && d != 0) { left = true; } if (c == 1) { if (d == 0 || c == 1 || c == 2) { right = true; } } else if (c == 0 && d != 0) { right = true; } if (left) { if (right) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (right) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define FORR(i, m, n) for (int i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); #define ll long long #define pb(a) push_back(a) #define INF 999999999 #define MOD 1000000007 using namespace std; typedef pair<int, int> P; typedef pair<ll, ll> LP; typedef pair<int, P> PP; typedef pair<ll, LP> LPP; int dy[] = {0, 0, 1, -1}; int dx[] = {1, -1, 0, 0}; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } ll modpow(ll n, ll k) { if (k == 1) { return n; } else if (k == 0) { return 1; } else if (k % 2 == 0) { ll memo = modpow(n, k / 2) % MOD; return memo * memo % MOD; } else { return n * modpow(n, k - 1) % MOD; } } int main() { string s; cin >> s; int a, b, c, d; a = s[0] - '0'; b = s[1] - '0'; c = s[2] - '0'; d = s[3] - '0'; bool left, right; left = false; right = false; if (a == 1) { if (b == 0 || b == 1 || b == 2) { left = true; } } else if (a == 0 && b != 0) { left = true; } if (c == 1) { if (d == 0 || d == 1 || d == 2) { right = true; } } else if (c == 0 && d != 0) { right = true; } if (left) { if (right) { cout << "AMBIGUOUS" << endl; } else { cout << "MMYY" << endl; } } else { if (right) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
858,892
858,893
u118846704
cpp
p03042
#include <bits/stdc++.h> using namespace std; char s[105]; int main() { int flag1 = 0; int flag2 = 0; int n; scanf("%d", &n); if (n / 100 > 12 || n / 100 == 0) flag1 = 1; if (n % 100 > 12 || n % 100 == 0) flag2 = 1; if (flag1 == 1 && flag2 == 1) { cout << "AMBIGUOUS" << endl; } else if (flag1 == 1) { cout << "YYMM" << endl; } else if (flag2 == 1) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; char s[105]; int main() { int flag1 = 0; int flag2 = 0; int n; scanf("%d", &n); if (n / 100 > 12 || n / 100 == 0) flag1 = 1; if (n % 100 > 12 || n % 100 == 0) flag2 = 1; if (flag1 == 1 && flag2 == 1) { cout << "NA" << endl; } else if (flag1 == 1) { cout << "YYMM" << endl; } else if (flag2 == 1) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } }
[ "literal.string.change", "io.output.change" ]
858,896
858,897
u818518063
cpp
p03042
#include <bits/stdc++.h> using namespace std; char s[105]; int main() { int flag1 = 0; int flag2 = 0; int n; scanf("%d", &n); if (n / 100 > 12 && n / 100 == 0) flag1 = 1; if (n % 100 > 12 && n % 100 == 0) flag2 = 1; if (flag1 == 1 && flag2 == 1) { cout << "AMBIGUOUS" << endl; } else if (flag1 == 1) { cout << "YYMM" << endl; } else if (flag2 == 1) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; char s[105]; int main() { int flag1 = 0; int flag2 = 0; int n; scanf("%d", &n); if (n / 100 > 12 || n / 100 == 0) flag1 = 1; if (n % 100 > 12 || n % 100 == 0) flag2 = 1; if (flag1 == 1 && flag2 == 1) { cout << "NA" << endl; } else if (flag1 == 1) { cout << "YYMM" << endl; } else if (flag2 == 1) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } }
[ "misc.opposites", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
858,898
858,897
u818518063
cpp
p03042
#include "bits/stdc++.h" using namespace std; namespace ORIGIN { #define LL long long #define VLL vector<long long> #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define rep(i, n) for (int i = 0; i < n; i++) #define COUT(x) cout << x << endl #define WHOLE(x) x.begin(), x.end() double pai = 3.1415926535; string atc = "atcoder"; typedef pair<long long, long long> data_t; string strnum = "0123456789"; string alpS = "abcdefghijklmnopqrstuvwxyz"; string alpL = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int sizealp = (int)(alpS.size()); int mod = 1e9 + 7; bool test = false; } // namespace ORIGIN using namespace ORIGIN; void Test(char a) { if (test) { printf("%c", a); } } int gcd(LL a, LL b) { if (a == 0 || b == 0) return 0; if (a < b) swap(a, b); if (a % b == 0) return b; else gcd(b, a % b); } vector<int> nsinsuu(int base, int keta) {} int main() { string s; cin >> s; bool MMYY = false, YYMM = false; if ((s[2] == '0' && s[3] != '0') || (s[2] == '1' && (s[3] == '0' || s[3] == '1' || s[3] == '2'))) MMYY = true; if ((s[0] == '0' && s[1] != '0') || (s[0] == '1' && (s[1] == '0' || s[1] == '1' || s[1] == '2'))) YYMM = true; if (MMYY) { if (YYMM) { COUT("AMBIGUOUS"); } else COUT("MMYY"); } else if (YYMM) COUT("YYMM"); else COUT("NA"); return 0; }
#include "bits/stdc++.h" using namespace std; namespace ORIGIN { #define LL long long #define VLL vector<long long> #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x.begin(), x.end()) #define rep(i, n) for (int i = 0; i < n; i++) #define COUT(x) cout << x << endl #define WHOLE(x) x.begin(), x.end() double pai = 3.1415926535; string atc = "atcoder"; typedef pair<long long, long long> data_t; string strnum = "0123456789"; string alpS = "abcdefghijklmnopqrstuvwxyz"; string alpL = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; int sizealp = (int)(alpS.size()); int mod = 1e9 + 7; bool test = false; } // namespace ORIGIN using namespace ORIGIN; void Test(char a) { if (test) { printf("%c", a); } } int gcd(LL a, LL b) { if (a == 0 || b == 0) return 0; if (a < b) swap(a, b); if (a % b == 0) return b; else gcd(b, a % b); } vector<int> nsinsuu(int base, int keta) {} int main() { string s; cin >> s; bool MMYY = false, YYMM = false; if ((s[2] == '0' && s[3] != '0') || (s[2] == '1' && (s[3] == '0' || s[3] == '1' || s[3] == '2'))) MMYY = true; if ((s[0] == '0' && s[1] != '0') || (s[0] == '1' && (s[1] == '0' || s[1] == '1' || s[1] == '2'))) YYMM = true; if (MMYY) { if (YYMM) { COUT("AMBIGUOUS"); } else COUT("YYMM"); } else if (YYMM) COUT("MMYY"); else COUT("NA"); return 0; }
[ "literal.string.change", "call.arguments.change" ]
858,901
858,902
u196798307
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a, b; a = S / 100; b = S % 100; bool a1, b1; if (a >= 1 && a <= 12) { a1 = 1; } else { a1 = 0; } if (b >= 1 && b <= 12) { b1 = 1; } else { b1 = 0; } if (a1 == 1 && b1 == 1) { cout << "AMBIGUOUS" << endl; } if (a1 == 0 && b1 == 0) { cout << "NA" << endl; } if (a1 == 1 && b1 == 0) { cout << "YYMM" << endl; } if (a1 == 0 && b1 == 1) { cout << "MMYY" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a, b; a = S / 100; b = S % 100; bool a1, b1; if (a >= 1 && a <= 12) { a1 = 1; } else { a1 = 0; } if (b >= 1 && b <= 12) { b1 = 1; } else { b1 = 0; } if (a1 == 1 && b1 == 1) { cout << "AMBIGUOUS" << endl; } if (a1 == 0 && b1 == 0) { cout << "NA" << endl; } if (a1 == 0 && b1 == 1) { cout << "YYMM" << endl; } if (a1 == 1 && b1 == 0) { cout << "MMYY" << endl; } }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
858,914
858,915
u973991908
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a, b; a = S / 100; b = S % 100; bool a1, b1; if (a >= 1 || a <= 12) { a1 = 1; } else { a1 = 0; } if (b >= 1 || b <= 12) { b1 = 1; } else { b1 = 0; } if (a1 == 1 && b1 == 1) { cout << "AMBIGUOUS" << endl; } if (a1 == 0 && b1 == 0) { cout << "NA" << endl; } if (a1 == 1 && b1 == 0) { cout << "YYMM" << endl; } if (a1 == 0 && b1 == 1) { cout << "MMYY" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int a, b; a = S / 100; b = S % 100; bool a1, b1; if (a >= 1 && a <= 12) { a1 = 1; } else { a1 = 0; } if (b >= 1 && b <= 12) { b1 = 1; } else { b1 = 0; } if (a1 == 1 && b1 == 1) { cout << "AMBIGUOUS" << endl; } if (a1 == 0 && b1 == 0) { cout << "NA" << endl; } if (a1 == 0 && b1 == 1) { cout << "YYMM" << endl; } if (a1 == 1 && b1 == 0) { cout << "MMYY" << endl; } }
[ "misc.opposites", "control_flow.branch.if.condition.change", "literal.number.change" ]
858,916
858,915
u973991908
cpp
p03042
#include <bits/stdc++.h> #define lli long long int #define mod 1000000007 #define pb push_back #define ulli unsigned long long int #define what_is(x) cerr << #x << " is " << x << endl; #define pi 2 * acos(0.0) #define F first #define S second #define endl '\n' #define all(x) x.begin(), x.end() using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); /// freopen("input.txt","r",stdin); /// freopen("output.txt","w",stdout); lli t = 1; // cin>>t; while (t--) { lli n, k, i, j; string s; cin >> s; lli f = (int(s[0]) - 48) * 10 + (int(s[1]) - 48); lli sc = 10 * (int(s[2]) - 48) + (int(s[3]) - 48); if (f > 12 && sc > 12) { cout << "NA" << endl; } else if (f <= 12 && f > 00 && sc > 12 || sc == 0) { cout << "MMYY" << endl; } else if (sc <= 12 && sc > 0 && f > 12 || f == 0) { cout << "YYMM" << endl; } else if (f > 0 && f <= 12 && sc > 0 && sc <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "NA" << endl; } } } /* 1 8 2 1 0 1 0 0 1 0 0 */
#include <bits/stdc++.h> #define lli long long int #define mod 1000000007 #define pb push_back #define ulli unsigned long long int #define what_is(x) cerr << #x << " is " << x << endl; #define pi 2 * acos(0.0) #define F first #define S second #define endl '\n' #define all(x) x.begin(), x.end() using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); /// freopen("input.txt","r",stdin); /// freopen("output.txt","w",stdout); lli t = 1; // cin>>t; while (t--) { lli n, k, i, j; string s; cin >> s; lli f = (int(s[0]) - 48) * 10 + (int(s[1]) - 48); lli sc = 10 * (int(s[2]) - 48) + (int(s[3]) - 48); if (f > 12 && sc > 12) { cout << "NA" << endl; } else if (f <= 12 && f > 00 && (sc > 12 || sc == 0)) { cout << "MMYY" << endl; } else if (sc <= 12 && sc > 0 && (f > 12 || f == 0)) { cout << "YYMM" << endl; } else if (f > 0 && f <= 12 && sc > 0 && sc <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "NA" << endl; } } } /* 1 8 2 1 0 1 0 0 1 0 0 */
[ "control_flow.branch.if.condition.change" ]
858,917
858,918
u909375072
cpp
p03042
#include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define mod 1000000007 #define FOR(x, to) for (int x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ALL(a) (a.begin()), (a.end()) #define ZERO(a) memset(a, 0, sizeof(a)) #define MINUS(a) memset(a, 0xff, sizeof(a)) #define long long long inline int rei() { int x; cin >> x; return x; } inline long rel() { long x; cin >> x; return x; } inline string res() { string x; cin >> x; return x; } //------------------------------------------------------- void Calc() { string S = res(); int A = (S[0] - '0') * 10 + S[1] - '0'; int B = (S[2] - '0') * 10 + S[3] - '0'; if (1 <= A && A <= 12 && 1 <= B && B <= 12) { cout << "AMBIGOUS" << endl; } else if (1 <= A && A <= 12) { cout << "MMYY" << endl; } else if (1 <= B && B <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } int main(int argc, char **argv) { ios::sync_with_stdio(false), cin.tie(0); cout.tie(0); Calc(); return 0; }
#include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; #define mod 1000000007 #define FOR(x, to) for (int x = 0; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ALL(a) (a.begin()), (a.end()) #define ZERO(a) memset(a, 0, sizeof(a)) #define MINUS(a) memset(a, 0xff, sizeof(a)) #define long long long inline int rei() { int x; cin >> x; return x; } inline long rel() { long x; cin >> x; return x; } inline string res() { string x; cin >> x; return x; } //------------------------------------------------------- void Calc() { string S = res(); int A = (S[0] - '0') * 10 + S[1] - '0'; int B = (S[2] - '0') * 10 + S[3] - '0'; if (1 <= A && A <= 12 && 1 <= B && B <= 12) { cout << "AMBIGUOUS" << endl; } else if (1 <= A && A <= 12) { cout << "MMYY" << endl; } else if (1 <= B && B <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } int main(int argc, char **argv) { ios::sync_with_stdio(false), cin.tie(0); cout.tie(0); Calc(); return 0; }
[ "literal.string.change", "io.output.change" ]
858,921
858,922
u387013436
cpp
p03042
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < n; i++) #define Rep(i, a, b) for (int i = 0; i < b; i++) #define REP(i, a, b) for (int i = 0; i <= b; i++) #define rev(i, n) for (int i = n - 1; i >= 0; i--) #define vi vector<int> #define vvi vector<vi> #define pb push_back #define pi pair<int, int> #define vp vector<pair<int, int>> #define mp make_pair #define all(v) (v).begin(), (v).end() #define fi first #define se second #define MEMSET(a) memset(a, 0, sizeof(a)) #define inf (1ll << 60) #define Yes(f) \ cout << (f ? "Yes" : "No") << endl // fが真の場合Yesを出力、偽の場合Noを出力 #define yes(f) cout << (f ? "yes" : "no") << endl #define YES(f) cout << (f ? "YES" : "NO") << endl #define SORT(v) sort(all(v)) #define RSORT(v) sort(all(v), greater<int>()) using namespace std; const int mod = 1e9 + 7; signed main() { string s; cin >> s; vi k(4); rep(i, 4) { switch (s[i]) { case '0': k[i] = 0; break; case '1': k[i] = 1; break; case '2': k[i] = 2; break; case '3': k[i] = 3; break; case '4': k[i] = 4; break; case '5': k[i] = 5; break; case '6': k[i] = 6; break; case '7': k[i] = 7; break; case '8': k[i] = 8; break; case '9': k[i] = 9; break; } } int ans = 0b00; string a; int month = 0; month += k[0] * 10 + k[1]; if (month > 12 && month == 0) ans += 0b10; month = 0; month += k[2] * 10 + k[3]; if (month > 12 && month == 0) ans += 0b01; if (ans == 0b00) a = "AMBIGUOUS"; if (ans == 0b01) a = "YYMM"; if (ans == 0b10) a = "MMYY"; if (ans == 0b11) a = "NA"; cout << a << endl; }
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < n; i++) #define Rep(i, a, b) for (int i = 0; i < b; i++) #define REP(i, a, b) for (int i = 0; i <= b; i++) #define rev(i, n) for (int i = n - 1; i >= 0; i--) #define vi vector<int> #define vvi vector<vi> #define pb push_back #define pi pair<int, int> #define vp vector<pair<int, int>> #define mp make_pair #define all(v) (v).begin(), (v).end() #define fi first #define se second #define MEMSET(a) memset(a, 0, sizeof(a)) #define inf (1ll << 60) #define Yes(f) \ cout << (f ? "Yes" : "No") << endl // fが真の場合Yesを出力、偽の場合Noを出力 #define yes(f) cout << (f ? "yes" : "no") << endl #define YES(f) cout << (f ? "YES" : "NO") << endl #define SORT(v) sort(all(v)) #define RSORT(v) sort(all(v), greater<int>()) using namespace std; const int mod = 1e9 + 7; signed main() { string s; cin >> s; vi k(4); rep(i, 4) { switch (s[i]) { case '0': k[i] = 0; break; case '1': k[i] = 1; break; case '2': k[i] = 2; break; case '3': k[i] = 3; break; case '4': k[i] = 4; break; case '5': k[i] = 5; break; case '6': k[i] = 6; break; case '7': k[i] = 7; break; case '8': k[i] = 8; break; case '9': k[i] = 9; break; } } int ans = 0b00; string a; int month = 0; month += k[0] * 10 + k[1]; // MMYYの可能性がない場合 if (month > 12 || month == 0) ans += 0b10; month = 0; month += k[2] * 10 + k[3]; // YYMMの可能性がない場合 if (month > 12 || month == 0) ans += 0b01; if (ans == 0b00) a = "AMBIGUOUS"; if (ans == 0b01) a = "MMYY"; if (ans == 0b10) a = "YYMM"; if (ans == 0b11) a = "NA"; cout << a << endl; }
[ "misc.opposites", "control_flow.branch.if.condition.change", "literal.string.change", "assignment.value.change" ]
858,923
858,924
u775507068
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int front, back; front = S / 100; back = S - front; string SS; bool f = false, b = false; if (front <= 12 && 0 < front) f = true; if (back <= 12 && 0 < back) b = true; if (f && b) SS = "AMBIGUOUS"; else if (f) SS = "MMYY"; else if (b) SS = "YYMM"; else SS = "NA"; cout << SS << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int S; cin >> S; int front, back; front = S / 100; back = S - front * 100; string SS; bool f = false, b = false; if (front <= 12 && 0 < front) f = true; if (back <= 12 && 0 < back) b = true; if (f && b) SS = "AMBIGUOUS"; else if (f) SS = "MMYY"; else if (b) SS = "YYMM"; else SS = "NA"; cout << SS << endl; }
[ "assignment.change" ]
858,934
858,935
u607746177
cpp
p03042
#include <bits/stdc++.h> #define ll long long #define rep(i, a, b) for (i = a; i < b; i++) #define all(v) v.begin(), v.end() #define F first #define S second #define pb push_back #define hell 1000000007 using namespace std; void solve() { ll int m, i, j, k, d = 1, b, c = 0, sum = 0, z = 0, q, x = 0, y = 0, n; cin >> n; m = n % 100; n /= 100; if (!m and n > 12) { cout << "NA"; return; } if (!n and m > 12) { cout << "NA"; return; } if (!m and !n) { cout << "NA"; return; } if (!n and m <= 12) { cout << "YYMM"; return; } if (!m and n <= 12) { cout << "MMYY"; return; } if ((m > 12 and n > 12)) { cout << "NA"; return; } // if( m>12 and n>12 ) {cout<<"NA"; return;} if (m > 12 and n <= 12) { cout << "MMYY"; return; } if (n > 12 and m <= 12) { cout << "YYMM"; return; } if (n <= 12 and m <= 12) cout << "AMBIGOUS"; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin>>t; while (t--) solve(); }
#include <bits/stdc++.h> #define ll long long #define rep(i, a, b) for (i = a; i < b; i++) #define all(v) v.begin(), v.end() #define F first #define S second #define pb push_back #define hell 1000000007 using namespace std; void solve() { ll int m, i, j, k, d = 1, b, c = 0, sum = 0, z = 0, q, x = 0, y = 0, n; cin >> n; m = n % 100; n /= 100; if (!m and n > 12) { cout << "NA"; return; } if (!n and m > 12) { cout << "NA"; return; } if (!m and !n) { cout << "NA"; return; } if (!n and m <= 12) { cout << "YYMM"; return; } if (!m and n <= 12) { cout << "MMYY"; return; } if ((m > 12 and n > 12)) { cout << "NA"; return; } // if( m>12 and n>12 ) {cout<<"NA"; return;} if (m > 12 and n <= 12) { cout << "MMYY"; return; } if (n > 12 and m <= 12) { cout << "YYMM"; return; } if (n <= 12 and m <= 12) cout << "AMBIGUOUS"; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin>>t; while (t--) solve(); }
[ "literal.string.change", "io.output.change" ]
858,938
858,939
u216069198
cpp
p03042
#include <stdio.h> int main(void) { int s; scanf("%d", &s); int YY, MM; YY = s / 100; MM = s % 100; if (MM == 0 || MM > 12) { if (YY == 0 || YY > 12) { printf("NA"); } else { printf("MMYY"); } } else { if (MM > 0 && MM < 13) { printf("AMBIGUOUS"); } else { printf("YYMM"); } } }
#include <stdio.h> int main(void) { int s; scanf("%d", &s); int YY, MM; YY = s / 100; MM = s % 100; if (MM == 0 || MM > 12) { if (YY == 0 || YY > 12) { printf("NA"); } else { printf("MMYY"); } } else { if (YY > 0 && YY < 13) { printf("AMBIGUOUS"); } else { printf("YYMM"); } } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
858,952
858,953
u711238850
cpp
p03042
#include <stdio.h> int main(void) { int s; scanf("%d", &s); int YY, MM; YY = s / 100; MM = s % 100; if (MM == 0 || MM > 12) { if (YY == 0 || YY > 12) { printf("NA"); } else { printf("MMYY"); } } else { if (YY > 0 || YY < 13) { printf("AMBIGUOUS"); } else { printf("YYMM"); } } }
#include <stdio.h> int main(void) { int s; scanf("%d", &s); int YY, MM; YY = s / 100; MM = s % 100; if (MM == 0 || MM > 12) { if (YY == 0 || YY > 12) { printf("NA"); } else { printf("MMYY"); } } else { if (YY > 0 && YY < 13) { printf("AMBIGUOUS"); } else { printf("YYMM"); } } }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
858,954
858,953
u711238850
cpp
p03042
#include <stdio.h> int main(void) { int s; scanf("%d", &s); int YY, MM; YY = s / 100; MM = s % 100; if (MM == 0 || MM > 12) { if (YY == 0 || YY > 12) { printf("NA"); } else { printf("MMYY"); } } else { if (MM > 1 || MM < 13) { printf("AMBIGUOUS"); } else { printf("YYMM"); } } }
#include <stdio.h> int main(void) { int s; scanf("%d", &s); int YY, MM; YY = s / 100; MM = s % 100; if (MM == 0 || MM > 12) { if (YY == 0 || YY > 12) { printf("NA"); } else { printf("MMYY"); } } else { if (YY > 0 && YY < 13) { printf("AMBIGUOUS"); } else { printf("YYMM"); } } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
858,955
858,953
u711238850
cpp
p03042
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define SORT(c) sort((c).begin(), (c).end()) #define DSORT(c, type) sort(ALL(c), greater<type>()) #define MAX(v) *max_element(ALL(v)) #define MIN(v) *min_element(ALL(v)) #define SUM(v) accumulate(ALL(v), 0) #define AVE(v) SUM(v) / (v).size() // 入力eと同じ値の要素の数 #define COUNT(v, e) count(ALL(v), e) using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; bool mtop = false, mbottom = false; if (int(s[0] - '0') * 10 + int(s[1] - '0') > 0 and int(s[0] - '0') * 10 + int(s[1] - '0') < 13) { mtop = true; } if (int(s[2] - '0') * 10 + int(s[3] - '0') > 0 and int(s[2] - '0') * 10 + int(s[3] - '0') < 13) { mbottom = true; } if (mtop and !mbottom) cout << "YYMM\n"; else if (!mtop and mbottom) cout << "MMYY\n"; else if (mtop and mbottom) cout << "AMBIGUOUS\n"; else cout << "NA\n"; return 0; }
#include <algorithm> #include <bitset> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> #define ALL(a) (a).begin(), (a).end() #define RALL(a) (a).rbegin(), (a).rend() #define SZ(a) int((a).size()) #define EACH(i, c) \ for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i) #define EXIST(s, e) ((s).find(e) != (s).end()) #define SORT(c) sort((c).begin(), (c).end()) #define DSORT(c, type) sort(ALL(c), greater<type>()) #define MAX(v) *max_element(ALL(v)) #define MIN(v) *min_element(ALL(v)) #define SUM(v) accumulate(ALL(v), 0) #define AVE(v) SUM(v) / (v).size() // 入力eと同じ値の要素の数 #define COUNT(v, e) count(ALL(v), e) using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; bool mtop = false, mbottom = false; if (int(s[0] - '0') * 10 + int(s[1] - '0') > 0 and int(s[0] - '0') * 10 + int(s[1] - '0') < 13) { mtop = true; } if (int(s[2] - '0') * 10 + int(s[3] - '0') > 0 and int(s[2] - '0') * 10 + int(s[3] - '0') < 13) { mbottom = true; } if (mtop and !mbottom) cout << "MMYY\n"; else if (!mtop and mbottom) cout << "YYMM\n"; else if (mtop and mbottom) cout << "AMBIGUOUS\n"; else cout << "NA\n"; return 0; }
[ "literal.string.change", "io.output.change" ]
858,958
858,959
u952843849
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b, c, d; cin >> S; a = S / 100; b = S - a * 100; if (a < 13 && 0 < a) c = 1; else if (12 < a) c = 2; else c = 2; if (b < 13 && 0 < b) d = 1; else if (12 < b) d = 2; else d = 2; if (d == 1 & c == 2) cout << "YYMM" << endl; else if (d == 2 && d == 1) cout << "MMYY" << endl; else if (c == 1 && d == 1) cout << "AMBIGUOUS" << endl; else if (c == 2 && d == 2) cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b, c, d; cin >> S; a = S / 100; b = S - a * 100; if (a < 13 && 0 < a) c = 1; else if (12 < a) c = 2; else c = 2; if (b < 13 && 0 < b) d = 1; else if (12 < b) d = 2; else d = 2; if (d == 1 & c == 2) cout << "YYMM" << endl; else if (d == 2 && c == 1) cout << "MMYY" << endl; else if (c == 1 && d == 1) cout << "AMBIGUOUS" << endl; else if (c == 2 && d == 2) cout << "NA" << endl; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
858,966
858,967
u618604643
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b, c, d; cin >> S; a = S / 100; b = S - a * 100; if (a < 13 && 0 < a) c = 1; else if (12 < a) c = 2; else c = 2; if (b < 13 && 0 < b) d = 1; else if (12 < b) d = 2; else d = 2; if (d == 1 & c == 2) cout << "YYMM" << endl; else if (d == 2 && d == c) cout << "MMYY" << endl; else if (c == 1 && d == 1) cout << "AMBIGUOUS" << endl; else if (c == 2 && d == 2) cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b, c, d; cin >> S; a = S / 100; b = S - a * 100; if (a < 13 && 0 < a) c = 1; else if (12 < a) c = 2; else c = 2; if (b < 13 && 0 < b) d = 1; else if (12 < b) d = 2; else d = 2; if (d == 1 & c == 2) cout << "YYMM" << endl; else if (d == 2 && c == 1) cout << "MMYY" << endl; else if (c == 1 && d == 1) cout << "AMBIGUOUS" << endl; else if (c == 2 && d == 2) cout << "NA" << endl; }
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
858,968
858,967
u618604643
cpp
p03042
#include <iostream> using namespace std; int main() { int S; cin >> S; if (((S % 100 <= 12) && (S % 100 > 0)) && ((S / 100 <= 12) && (S / 100 > 0))) cout << "AMBIGUOUS"; else if ((S / 100 < 12) && (S / 100 > 0)) cout << "MMYY"; else if ((S % 100 < 12) && (S % 100 > 0)) cout << "YYMM"; else cout << "NA"; }
#include <iostream> using namespace std; int main() { int S; cin >> S; if (((S % 100 <= 12) && (S % 100 > 0)) && ((S / 100 <= 12) && (S / 100 > 0))) cout << "AMBIGUOUS"; else if ((S / 100 <= 12) && (S / 100 > 0)) cout << "MMYY"; else if ((S % 100 <= 12) && (S % 100 > 0)) cout << "YYMM"; else cout << "NA"; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
858,983
858,984
u313403396
cpp
p03042
#include <algorithm> #include <functional> #include <iostream> #include <list> #include <math.h> #include <string> #include <vector> using namespace std; int main() { int S; cin >> S; int left = S / 100; int right = S % 100; int YYMM_f = 1; int MMYY_f = 1; if ((left > 13 || left == 0) && (right < 13 && right > 0)) { YYMM_f = 1; MMYY_f = 0; std::cout << "YYMM"; } else if ((left < 13 && left > 0) && (right > 13 || right == 0)) { YYMM_f = 0; MMYY_f = 1; std::cout << "MMYY"; } else if ((left > 13 || left == 0) && (right > 13 || right == 0)) { YYMM_f = 0; MMYY_f = 0; std::cout << "NA"; } else { std::cout << "AMBIGUOUS"; } }
#include <algorithm> #include <functional> #include <iostream> #include <list> #include <math.h> #include <string> #include <vector> using namespace std; int main() { int S; cin >> S; int left = S / 100; int right = S % 100; int YYMM_f = 1; int MMYY_f = 1; if ((left > 12 || left == 0) && (right < 13 && right > 0)) { YYMM_f = 1; MMYY_f = 0; std::cout << "YYMM"; } else if ((left < 13 && left > 0) && (right > 12 || right == 0)) { YYMM_f = 0; MMYY_f = 1; std::cout << "MMYY"; } else if ((left > 12 || left == 0) && (right > 12 || right == 0)) { YYMM_f = 0; MMYY_f = 0; std::cout << "NA"; } else { std::cout << "AMBIGUOUS"; } }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
858,985
858,986
u866119355
cpp
p03042
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> #define SORT(a) sort(a.begin(), a.end()) #define RSORT(a) sort(a.rbegin(), a.rend()) #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; 0 <= i; i--) #define FOR(i, start, end) for (int i = start; i < end; i++) #define FORSTEP(i, start, end, step) for (int i = start; i < end; i += step) #define RFOR(i, start, end) for (int i = start; end <= i; i--) #define ALL(a) a.begin(), a.end() #define MOD(a) a %= 1000000007 typedef long long ll; using namespace std; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int yy = (s[0] - '0') * 10 + (s[1] - '0'); int mm = (s[2] - '0') * 10 + (s[3] - '0'); if (0 < yy && yy <= 12 && 0 < mm && mm <= 12) { std::cout << "AMBIGUOUS" << std::endl; } else if (0 < yy && yy <= 12 && 12 < mm || mm == 0) { std::cout << "MMYY" << std::endl; } else if (0 < mm && mm <= 12 && 12 < yy || yy == 0) { std::cout << "YYMM" << std::endl; } else { std::cout << "NA" << std::endl; } return 0; }
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> #define SORT(a) sort(a.begin(), a.end()) #define RSORT(a) sort(a.rbegin(), a.rend()) #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n; 0 <= i; i--) #define FOR(i, start, end) for (int i = start; i < end; i++) #define FORSTEP(i, start, end, step) for (int i = start; i < end; i += step) #define RFOR(i, start, end) for (int i = start; end <= i; i--) #define ALL(a) a.begin(), a.end() #define MOD(a) a %= 1000000007 typedef long long ll; using namespace std; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int yy = (s[0] - '0') * 10 + (s[1] - '0'); int mm = (s[2] - '0') * 10 + (s[3] - '0'); if (0 < yy && yy <= 12 && 0 < mm && mm <= 12) { std::cout << "AMBIGUOUS" << std::endl; } else if (0 < yy && yy <= 12 && (12 < mm || mm == 0)) { std::cout << "MMYY" << std::endl; } else if (0 < mm && mm <= 12 && (12 < yy || yy == 0)) { std::cout << "YYMM" << std::endl; } else { std::cout << "NA" << std::endl; } return 0; }
[ "control_flow.branch.if.condition.change" ]
858,991
858,992
u324303263
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int MMYY = 0; int YYMM = 0; if (S.at(0) == '0') { if (S.at(1) = !'0') { MMYY++; } } if (S.at(0) == '1') { if (S.at(1) == '0') { MMYY++; } else if (S.at(1) == '1') { MMYY++; } else if (S.at(1) == '2') { MMYY++; } } if (S.at(2) == '0') { if (S.at(3) = !'0') { YYMM++; } } if (S.at(2) == '1') { if (S.at(3) == '0') { YYMM++; } else if (S.at(3) == '1') { YYMM++; } else if (S.at(3) == '2') { YYMM++; } } if (MMYY == 0 && YYMM == 0) { cout << "NA" << endl; } if (MMYY == 1 && YYMM == 0) { cout << "MMYY" << endl; } if (MMYY == 0 && YYMM == 1) { cout << "YYMM" << endl; } if (MMYY == 1 && YYMM == 1) { cout << "AMBIGUOUS" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int MMYY = 0; int YYMM = 0; if (S.at(0) == '0') { if (S.at(1) != '0') { MMYY++; } } if (S.at(0) == '1') { if (S.at(1) == '0') { MMYY++; } else if (S.at(1) == '1') { MMYY++; } else if (S.at(1) == '2') { MMYY++; } } if (S.at(2) == '0') { if (S.at(3) != '0') { YYMM++; } } if (S.at(2) == '1') { if (S.at(3) == '0') { YYMM++; } else if (S.at(3) == '1') { YYMM++; } else if (S.at(3) == '2') { YYMM++; } } if (MMYY == 0 && YYMM == 0) { cout << "NA" << endl; } if (MMYY == 1 && YYMM == 0) { cout << "MMYY" << endl; } if (MMYY == 0 && YYMM == 1) { cout << "YYMM" << endl; } if (MMYY == 1 && YYMM == 1) { cout << "AMBIGUOUS" << endl; } }
[ "control_flow.branch.if.condition.change", "expression.operation.unary.logical.remove" ]
859,001
859,002
u332310326
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int y = s[1] - '0'; int m = s[3] - '0'; bool yymm = false; if (s[2] == '0' && m != 0) { yymm = true; } else if (s[2] == '1') { if (0 <= m && m <= 2) { yymm = true; } } bool mmyy = false; if (s[0] == '0' && y != 0) { mmyy = true; } else if (s[3] == '1') { if (0 <= y && y <= 2) { mmyy = true; } } if (yymm) { if (mmyy) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else { if (mmyy) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int y = s[1] - '0'; int m = s[3] - '0'; bool yymm = false; if (s[2] == '0' && m != 0) { yymm = true; } else if (s[2] == '1') { if (0 <= m && m <= 2) { yymm = true; } } bool mmyy = false; if (s[0] == '0' && y != 0) { mmyy = true; } else if (s[0] == '1') { if (0 <= y && y <= 2) { mmyy = true; } } if (yymm) { if (mmyy) { cout << "AMBIGUOUS" << endl; } else { cout << "YYMM" << endl; } } else { if (mmyy) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
859,003
859,004
u627431737
cpp
p03042
#include <bits/stdc++.h> #include <math.h> #include <string> using namespace std; int main(void) { int s, result = 0; cin >> s; if (s / 100 <= 12 && s % 12 >= 1) { result += 10; } if (s % 100 <= 12 && s % 12 >= 1) { result += 1; } if (result == 0) { cout << "NA" << endl; } else if (result == 1) { cout << "YYMM" << endl; } else if (result == 10) { cout << "MMYY" << endl; } else if (result == 11) { cout << "AMBIGUOUS" << endl; } return 0; }
#include <bits/stdc++.h> #include <math.h> #include <string> using namespace std; int main(void) { int s, result = 0; cin >> s; if (s / 100 <= 12 && s / 100 >= 1) { result += 10; } if (s % 100 <= 12 && s % 100 >= 1) { result += 1; } if (result == 0) { cout << "NA" << endl; } else if (result == 1) { cout << "YYMM" << endl; } else if (result == 10) { cout << "MMYY" << endl; } else if (result == 11) { cout << "AMBIGUOUS" << endl; } return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
859,014
859,015
u894950682
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 && (b == 0 || b >= 13)) { cout << "NA" << endl; } else if (b == 0 && (a == 0 || a >= 13)) { cout << "NA" << endl; } else if (a == 0) cout << "YYMM" << endl; else if (b == 0) cout << "MMYY" << endl; else if (a >= 13 && b <= 12) { cout << "YYMM" << endl; } else if (b >= 13 && b <= 12) { cout << "MMYY" << endl; } else if (a <= 12 && b <= 12) { cout << "AMBIGUOUS" << 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 (a == 0 && (b == 0 || b >= 13)) { cout << "NA" << endl; } else if (b == 0 && (a == 0 || a >= 13)) { cout << "NA" << endl; } else if (a == 0) cout << "YYMM" << endl; else if (b == 0) cout << "MMYY" << endl; else if (a >= 13 && b <= 12) { cout << "YYMM" << endl; } else if (b >= 13 && a <= 12) { cout << "MMYY" << endl; } else if (a <= 12 && b <= 12) { cout << "AMBIGUOUS" << endl; } else { cout << "NA" << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
859,033
859,034
u812498271
cpp
p03042
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i)) #define rer(i, l, u) for (int(i) = (int)(l); (i) <= (int)(u); ++(i)) #define reu(i, l, u) for (int(i) = (int)(l); (i) < (int)(u); ++(i)) static const int dy[4] = {0, 1, 0, -1}; static const int dx[4] = {1, 0, -1, 0}; using namespace std; void check(string s) { int a = (s[0] - '0') * 10 + (s[1] - '0'); int b = (s[2] - '0') * 10 + (s[3] - '0'); bool flag1 = false; bool flag2 = false; if (a >= 1 && a <= 19) { if (b >= 1 && b <= 12) { flag1 = true; } } swap(a, b); if (a >= 1 && a <= 19) { if (b >= 1 && b <= 12) { flag2 = true; } } if (flag1 && flag2) { cout << "AMBIGUOUS" << endl; } else if (flag1) { cout << "YYMM" << endl; } else if (flag2) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } int main() { string s; cin >> s; check(s); return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i)) #define rer(i, l, u) for (int(i) = (int)(l); (i) <= (int)(u); ++(i)) #define reu(i, l, u) for (int(i) = (int)(l); (i) < (int)(u); ++(i)) static const int dy[4] = {0, 1, 0, -1}; static const int dx[4] = {1, 0, -1, 0}; using namespace std; void check(string s) { int a = (s[0] - '0') * 10 + (s[1] - '0'); int b = (s[2] - '0') * 10 + (s[3] - '0'); bool flag1 = false; bool flag2 = false; if (a >= 0 && a <= 99) { if (b >= 1 && b <= 12) { flag1 = true; } } swap(a, b); if (a >= 0 && a <= 99) { if (b >= 1 && b <= 12) { flag2 = true; } } if (flag1 && flag2) { cout << "AMBIGUOUS" << endl; } else if (flag1) { cout << "YYMM" << endl; } else if (flag2) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } } int main() { string s; cin >> s; check(s); return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
859,037
859,038
u484962958
cpp
p03042
#include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; // YYMM const int ab = (int)(s[0] - '0') * 10 + (int)(s[1] - '0'); const int cd = (int)(s[2] - '0') * 10 + (int)(s[3] - '0'); bool ab_mm = false, cd_mm = false; if (1 <= ab && ab <= 12) ab_mm = true; // MM ok if (1 <= cd && cd <= 12) cd_mm = true; // MM ok string ans = "AMBIGUOUS"; if (!ab_mm) { if (!cd_mm) { // FF ans = "NA"; } else { // FT ans = "YYMM"; } } else { // TF if (!cd_mm) { ans = "MMTT"; } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; // YYMM const int ab = (int)(s[0] - '0') * 10 + (int)(s[1] - '0'); const int cd = (int)(s[2] - '0') * 10 + (int)(s[3] - '0'); bool ab_mm = false, cd_mm = false; if (1 <= ab && ab <= 12) ab_mm = true; // MM ok if (1 <= cd && cd <= 12) cd_mm = true; // MM ok string ans = "AMBIGUOUS"; if (!ab_mm) { if (!cd_mm) { // FF ans = "NA"; } else { // FT ans = "YYMM"; } } else { // TF if (!cd_mm) { ans = "MMYY"; } } cout << ans << endl; return 0; }
[ "literal.string.change", "assignment.value.change" ]
859,039
859,040
u017293723
cpp
p03042
#include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; // YYMM int ab = (int)(s[0] - '0') * 10 + (int)(s[1] - '0'); int cd = (int)(s[2] - '0') * 10 + (int)(s[3] - '0'); bool ab_mm = false, cd_mm = false; if (1 <= ab && ab <= 12) ab_mm = true; // MM ok if (1 <= cd && cd <= 12) cd_mm = true; // MM ok string ans = "AMBIGUOUS"; if (!ab_mm) { if (!cd_mm) { // FF ans = "NA"; } else { // FT ans = "YYMM"; } } else { // TF if (!cd_mm) { ans = "MMTT"; } } cout << ans << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <numeric> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; // YYMM const int ab = (int)(s[0] - '0') * 10 + (int)(s[1] - '0'); const int cd = (int)(s[2] - '0') * 10 + (int)(s[3] - '0'); bool ab_mm = false, cd_mm = false; if (1 <= ab && ab <= 12) ab_mm = true; // MM ok if (1 <= cd && cd <= 12) cd_mm = true; // MM ok string ans = "AMBIGUOUS"; if (!ab_mm) { if (!cd_mm) { // FF ans = "NA"; } else { // FT ans = "YYMM"; } } else { // TF if (!cd_mm) { ans = "MMYY"; } } cout << ans << endl; return 0; }
[ "literal.string.change", "assignment.value.change" ]
859,041
859,040
u017293723
cpp
p03042
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <sstream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; string x = ""; x += s.at(0); x += s.at(1); string y = ""; y += s.at(2); y += s.at(3); int xx = stoi(x); int yy = stoi(y); int a = 0, b = 0, c = 0, d = 0; if (1 <= xx && xx <= 12) { a++; } else { b++; } if (1 <= yy && yy <= 12) { c++; } else { d++; } if (b == 1 && c == 1) { cout << "YYMM" << endl; } else if (a == 1 && b == 1) { cout << "MMYY" << endl; } else if (a == 1 && c == 1) { cout << "AMBIGUOUS" << endl; } else { cout << "NA" << endl; } }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <sstream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; string x = ""; x += s.at(0); x += s.at(1); string y = ""; y += s.at(2); y += s.at(3); int xx = stoi(x); int yy = stoi(y); int a = 0, b = 0, c = 0, d = 0; if (1 <= xx && xx <= 12) { a++; } else { b++; } if (1 <= yy && yy <= 12) { c++; } else { d++; } if (b == 1 && c == 1) { cout << "YYMM" << endl; } else if (a == 1 && d == 1) { cout << "MMYY" << endl; } else if (a == 1 && c == 1) { cout << "AMBIGUOUS" << endl; } else { cout << "NA" << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
859,052
859,053
u566640130
cpp
p03042
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <sstream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; string x = ""; x += s.at(0); x += s.at(1); string y = ""; y += s.at(2); y += s.at(3); int xx = stoi(x); int yy = stoi(y); int a = 0, b = 0, c = 0, d = 0; if (1 <= xx && xx <= 12) { a++; } else { b++; } if (1 <= yy && yy <= 12) { c++; } else { d++; } if (b == 1 && c == 1) { cout << "YYMM" << endl; } else if (a == 1 && b == 1) { cout << "YYMM" << endl; } else if (a == 1 && c == 1) { cout << "AMBIGUOUS" << endl; } else { cout << "NA" << endl; } }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <sstream> #include <string> #include <vector> using namespace std; int main() { string s; cin >> s; string x = ""; x += s.at(0); x += s.at(1); string y = ""; y += s.at(2); y += s.at(3); int xx = stoi(x); int yy = stoi(y); int a = 0, b = 0, c = 0, d = 0; if (1 <= xx && xx <= 12) { a++; } else { b++; } if (1 <= yy && yy <= 12) { c++; } else { d++; } if (b == 1 && c == 1) { cout << "YYMM" << endl; } else if (a == 1 && d == 1) { cout << "MMYY" << endl; } else if (a == 1 && c == 1) { cout << "AMBIGUOUS" << endl; } else { cout << "NA" << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
859,054
859,053
u566640130
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a = 0; a += 10 * (s[0] - '0') + (s[1] - '0'); int b = 0; b += 10 * (s[2] - '0') + (s[3] - '0'); if ((min(a, b) == 0 && max(a, b) > 12) || (a > 12 && b > 12) || (a == 0 && b == 0)) cout << "NA" << endl; else { if (a == 0) cout << "YYMM" << endl; else if (b == 0) cout << "MMYY" << endl; else { if (a <= 12 && b <= 12) cout << "AMBIGIOUS" << endl; else { if (a > 12) cout << "YYMM" << endl; else cout << "MMYY" << endl; } } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int a = 0; a += 10 * (s[0] - '0') + (s[1] - '0'); int b = 0; b += 10 * (s[2] - '0') + (s[3] - '0'); if ((min(a, b) == 0 && max(a, b) > 12) || (a > 12 && b > 12) || (a == 0 && b == 0)) cout << "NA" << endl; else { if (a == 0) cout << "YYMM" << endl; else if (b == 0) cout << "MMYY" << endl; else { if (a <= 12 && b <= 12) cout << "AMBIGUOUS" << endl; else { if (a > 12) cout << "YYMM" << endl; else cout << "MMYY" << endl; } } } return 0; }
[ "misc.typo", "literal.string.change", "io.output.change" ]
859,058
859,059
u055447809
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b; cin >> S; a = S / 100; b = S % 100; bool am = true; bool bm = true; if (a > 12 || a == 0) { am = false; } if (b > 12 || b == 0) { bm = false; } if (am && bm) { cout << "AMBIGUOUS" << endl; } if (am == true && bm == false) { cout << "MMYY" << endl; } if (bm == true && am == false) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int S, a, b; cin >> S; a = S / 100; b = S % 100; bool am = true; bool bm = true; if (a > 12 || a == 0) { am = false; } if (b > 12 || b == 0) { bm = false; } if (am && bm) { cout << "AMBIGUOUS" << endl; } else if (am == true && bm == false) { cout << "MMYY" << endl; } else if (bm == true && am == false) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
859,062
859,063
u276588887
cpp
p03042
#include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <string> #include <typeinfo> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> VI; typedef vector<ll> VL; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i < (int)(n); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int pre = atoi(s.substr(0, 2).c_str()); int su = atoi(s.substr(2, 2).c_str()); if (pre > 12 || pre == 0) { if (su <= 12) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } else { if (su > 12 || su == 0) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } } }
#include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <string> #include <typeinfo> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> VI; typedef vector<ll> VL; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i < (int)(n); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int pre = atoi(s.substr(0, 2).c_str()); int su = atoi(s.substr(2, 2).c_str()); if (pre > 12 || pre == 0) { if (su <= 12 && su > 0) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } } else { if (su > 12 || su == 0) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } } }
[ "control_flow.branch.if.condition.change" ]
859,066
859,067
u134576652
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < int(b); ++i) #define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i) #define rep(i, n) FOR(i, 0, n) #define rep1(i, n) FOR(i, 1, int(n) + 1) #define rrep(i, n) RFOR(i, 0, n) #define rrep1(i, n) RFOR(i, 1, int(n) + 1) #define all(c) begin(c), end(c) #define al(d) d.begin(), d.end() #define fill(n) std::setfill('0') << std::right << std::setw(n) #define intmax 2147483647 #define llmax 9223372036854775807 #define mod 1000000007 template <typename T> using vec = std::vector<T>; using vi = vec<int>; using vvi = vec<vi>; using pii = std::pair<int, int>; using ll = long long; using vll = vec<ll>; using ld = long double; #define pair(a, b) "(" << a << "," << b << ")" #define pairr(a, b, c) "(" << a << "," << b << "," << c << ")" #define lmin(a, b) (a < b) ? a : b template <typename T> void putv(vector<T> &V) { // cout << "The elements in the vector are: " << endl; for (auto x : V) cout << x << " "; cout << endl; } template <class T> vector<T> getv(int n) { vector<T> vec; rep(i, n) { T input; cin >> input; vec.emplace_back(input); } return vec; } ////Graph using Weight = ll; using Flow = int; struct Edge { int src, dst; Weight weight; Flow cap; Edge() : src(0), dst(0), weight(0) {} Edge(int s, int d, Weight w) : src(s), dst(d), weight(w) {} }; using Edges = std::vector<Edge>; using Graph = std::vector<Edges>; using Array = std::vector<Weight>; using Matrix = std::vector<Array>; void add_edge(Graph &g, int a, int b, Weight w = 1) { g[a].emplace_back(a, b, w); g[b].emplace_back(b, a, w); } void add_arc(Graph &g, int a, int b, Weight w = 1) { g[a].emplace_back(a, b, w); } void init_weighted_graph(Graph &g, int N, int M) { vector<Edge> empty_Edges; g = Graph(N, empty_Edges); rep(i, M) { int a, b, w; cin >> a >> b >> w; add_edge(g, a - 1, b - 1, w); } // 例えば //// 3 3 //// 1 2 1 //// 1 3 1 //// 2 3 3 // から //// The Adjacency List of //// G=(V,E) (n=3,m=6) //// 0: (1,1)(2,1) //// 1: (0,1)(2,3) //// 2: (0,1)(1,3) // を得る. } void init_weighted_directed_graph(Graph &g, int N, int M) { vector<Edge> empty_Edges; g = Graph(N, empty_Edges); rep(i, M) { int a, b, w; cin >> a >> b >> w; add_arc(g, a - 1, b - 1, w); } } void show_weighted_graph(const Graph &g) { int N = g.size(); int M = 0; rep(s, N) M += g[s].size(); cout << "///////////////////////" << endl; cout << "The Adjacency List of" << endl << "G=(V,E) (n=" << N << "," << "m=" << M << ")" << endl; rep(s, N) { cout << s << ": "; int size = g[s].size(); rep(t, size) cout << pair(g[s][t].dst, g[s][t].weight); cout << endl; } cout << "////////////////////////" << endl << endl; } // a->bが存在するか bool is_adj(Graph &g, int a, int b) { for (auto e : g[a]) if (b == e.dst) return true; return false; } // O(V^3) Matrix warshallFloyd(const Graph &g) { auto const inf = numeric_limits<Weight>::max() / 8; int n = g.size(); Matrix d(n, Array(n, inf)); rep(i, n) d[i][i] = 0; rep(i, n) for (auto &e : g[i]) d[e.src][e.dst] = min(d[e.src][e.dst], e.weight); rep(k, n) rep(i, n) rep(j, n) if (d[i][k] != inf && d[k][j] != inf) d[i][j] = min(d[i][j], d[i][k] + d[k][j]); return d; } ////////// void out(bool ans) { if (ans == true) cout << "yes" << endl; else cout << "no" << endl; } void Out(bool ans) { if (ans == true) cout << "Yes" << endl; else cout << "No" << endl; } void OUT(bool ans) { if (ans == true) cout << "YES" << endl; else cout << "NO" << endl; } //// Mathematical functions ll gcd(const ll a, const ll b) { return (b == 0) ? a : gcd(b, a % b); } ll lcm(const ll a, const ll b) { return a * (b / gcd(a, b)); } ll Manhattan_dist(ll x1, ll y1, ll x2, ll y2) { return abs(x1 - x2) + abs(y1 - y2); } // nをpで何回割れるか ll hmt_p_divides_n(ll p, ll n) { ll s = 0; while (n % p == 0) { n /= p; s++; } return s; } int digit(ll n) { int cntr = 0; while (n > 0) { n /= 10; cntr++; } return cntr; } // generarized absolute value template <class T> T gabs(const T &x) { return max(x, -x); } #define abs gabs ll memo[100][100] = {}; ll binom(const int n, const int r) { if (n < r) return 0; if (r == 0 || n == r) return 1; if (memo[n][r] > 0) return memo[n][r]; else return memo[n][r] = binom(n - 1, r) + binom(n - 1, r - 1); } ll pw(ll x, int y) { ll a = 1; while (y) { if (y & 1) a = (a * x) % mod; x = (x * x) % mod; y >>= 1; } return a; } ll modinv(ll x) { return pw(x, mod - 2); } bool is_prime(int p) { if (p <= 1) return false; for (int n = 2; n <= pow(p, 0.5); ++n) if (p % n == 0) return false; return true; } // n以下の最大の素因数を求める int max_prime_divisor(int n) { for (int x = n; x > 1; --x) if (is_prime(x) && n % x == 0) return x; return -1; } vi factorize(int n) { vi factors; while (n > 1) { int p = max_prime_divisor(n); factors.emplace_back(p); n /= p; } sort(factors.begin(), factors.end()); putv(factors); return factors; } // b進数での各桁の合計 ll f(ll b, ll n) { if (n < b) return n; return f(b, n / b) + n % b; } ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// void field_table(int p) { // 素数pに対して // 0..p-1の和と // 1..p-1の積テーブルを作る cout << "MOD = " << p << endl << endl; cout << " + | "; for (int a = 0; a <= p - 1; ++a) cout << fill(2) << a << " "; cout << endl; cout << "----"; for (int i = 0; i < p; ++i) cout << "---"; cout << endl; for (int a = 0; a <= p - 1; ++a) { cout << fill(2) << a << " | "; for (int b = 0; b <= p - 1; ++b) cout << fill(2) << (a + b) % p << " "; cout << endl; } cout << endl << " * | "; for (int a = 1; a <= p - 1; ++a) cout << fill(2) << a << " "; cout << endl; cout << "----"; for (int i = 0; i < p - 1; ++i) cout << "---"; cout << endl; for (int a = 1; a <= p - 1; ++a) { cout << fill(2) << a << " | "; for (int b = 1; b <= p - 1; ++b) cout << fill(2) << (a * b) % p << " "; cout << endl; } } // mod p で見て nのマイナスの逆元を調べる int minus_inverse(int p, int n) { int a = p - n; for (int b = 1; b < p; ++b) if ((a * b) % p == 1) return b; return -1; } int inverse(int p, int n) { int a = 1; while ((n * a) % p != 1) a++; return a; } int inverse_minus_inverese(int p, int n) { int a = inverse(p, n); return inverse(p, p - a); } // int main(){ // int p = 7; // field_table(p); // for(int n=1; n<p; ++n){ // cout << n << ": "<< inverse(p,n); // cout << " " << p-inverse(p,n); // cout << " " << inverse_minus_inverese(p,n) << endl; // } // } int main() { string s; cin >> s; int a = 10 * (int(s[0]) - 48) + (int(s[1]) - 48); int b = 10 * (int(s[2]) - 48) + (int(s[3]) - 48); // cout << pair(a,b) <<endl; string ret; if (1 <= a && a <= 12) { if (1 <= b && b <= 12) ret = "AMBIGOUS"; else ret = "MMYY"; } else { if (1 <= b && b <= 12) ret = "YYMM"; else ret = "NA"; } cout << ret << endl; }
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < int(b); ++i) #define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i) #define rep(i, n) FOR(i, 0, n) #define rep1(i, n) FOR(i, 1, int(n) + 1) #define rrep(i, n) RFOR(i, 0, n) #define rrep1(i, n) RFOR(i, 1, int(n) + 1) #define all(c) begin(c), end(c) #define al(d) d.begin(), d.end() #define fill(n) std::setfill('0') << std::right << std::setw(n) #define intmax 2147483647 #define llmax 9223372036854775807 #define mod 1000000007 template <typename T> using vec = std::vector<T>; using vi = vec<int>; using vvi = vec<vi>; using pii = std::pair<int, int>; using ll = long long; using vll = vec<ll>; using ld = long double; #define pair(a, b) "(" << a << "," << b << ")" #define pairr(a, b, c) "(" << a << "," << b << "," << c << ")" #define lmin(a, b) (a < b) ? a : b template <typename T> void putv(vector<T> &V) { // cout << "The elements in the vector are: " << endl; for (auto x : V) cout << x << " "; cout << endl; } template <class T> vector<T> getv(int n) { vector<T> vec; rep(i, n) { T input; cin >> input; vec.emplace_back(input); } return vec; } ////Graph using Weight = ll; using Flow = int; struct Edge { int src, dst; Weight weight; Flow cap; Edge() : src(0), dst(0), weight(0) {} Edge(int s, int d, Weight w) : src(s), dst(d), weight(w) {} }; using Edges = std::vector<Edge>; using Graph = std::vector<Edges>; using Array = std::vector<Weight>; using Matrix = std::vector<Array>; void add_edge(Graph &g, int a, int b, Weight w = 1) { g[a].emplace_back(a, b, w); g[b].emplace_back(b, a, w); } void add_arc(Graph &g, int a, int b, Weight w = 1) { g[a].emplace_back(a, b, w); } void init_weighted_graph(Graph &g, int N, int M) { vector<Edge> empty_Edges; g = Graph(N, empty_Edges); rep(i, M) { int a, b, w; cin >> a >> b >> w; add_edge(g, a - 1, b - 1, w); } // 例えば //// 3 3 //// 1 2 1 //// 1 3 1 //// 2 3 3 // から //// The Adjacency List of //// G=(V,E) (n=3,m=6) //// 0: (1,1)(2,1) //// 1: (0,1)(2,3) //// 2: (0,1)(1,3) // を得る. } void init_weighted_directed_graph(Graph &g, int N, int M) { vector<Edge> empty_Edges; g = Graph(N, empty_Edges); rep(i, M) { int a, b, w; cin >> a >> b >> w; add_arc(g, a - 1, b - 1, w); } } void show_weighted_graph(const Graph &g) { int N = g.size(); int M = 0; rep(s, N) M += g[s].size(); cout << "///////////////////////" << endl; cout << "The Adjacency List of" << endl << "G=(V,E) (n=" << N << "," << "m=" << M << ")" << endl; rep(s, N) { cout << s << ": "; int size = g[s].size(); rep(t, size) cout << pair(g[s][t].dst, g[s][t].weight); cout << endl; } cout << "////////////////////////" << endl << endl; } // a->bが存在するか bool is_adj(Graph &g, int a, int b) { for (auto e : g[a]) if (b == e.dst) return true; return false; } // O(V^3) Matrix warshallFloyd(const Graph &g) { auto const inf = numeric_limits<Weight>::max() / 8; int n = g.size(); Matrix d(n, Array(n, inf)); rep(i, n) d[i][i] = 0; rep(i, n) for (auto &e : g[i]) d[e.src][e.dst] = min(d[e.src][e.dst], e.weight); rep(k, n) rep(i, n) rep(j, n) if (d[i][k] != inf && d[k][j] != inf) d[i][j] = min(d[i][j], d[i][k] + d[k][j]); return d; } ////////// void out(bool ans) { if (ans == true) cout << "yes" << endl; else cout << "no" << endl; } void Out(bool ans) { if (ans == true) cout << "Yes" << endl; else cout << "No" << endl; } void OUT(bool ans) { if (ans == true) cout << "YES" << endl; else cout << "NO" << endl; } //// Mathematical functions ll gcd(const ll a, const ll b) { return (b == 0) ? a : gcd(b, a % b); } ll lcm(const ll a, const ll b) { return a * (b / gcd(a, b)); } ll Manhattan_dist(ll x1, ll y1, ll x2, ll y2) { return abs(x1 - x2) + abs(y1 - y2); } // nをpで何回割れるか ll hmt_p_divides_n(ll p, ll n) { ll s = 0; while (n % p == 0) { n /= p; s++; } return s; } int digit(ll n) { int cntr = 0; while (n > 0) { n /= 10; cntr++; } return cntr; } // generarized absolute value template <class T> T gabs(const T &x) { return max(x, -x); } #define abs gabs ll memo[100][100] = {}; ll binom(const int n, const int r) { if (n < r) return 0; if (r == 0 || n == r) return 1; if (memo[n][r] > 0) return memo[n][r]; else return memo[n][r] = binom(n - 1, r) + binom(n - 1, r - 1); } ll pw(ll x, int y) { ll a = 1; while (y) { if (y & 1) a = (a * x) % mod; x = (x * x) % mod; y >>= 1; } return a; } ll modinv(ll x) { return pw(x, mod - 2); } bool is_prime(int p) { if (p <= 1) return false; for (int n = 2; n <= pow(p, 0.5); ++n) if (p % n == 0) return false; return true; } // n以下の最大の素因数を求める int max_prime_divisor(int n) { for (int x = n; x > 1; --x) if (is_prime(x) && n % x == 0) return x; return -1; } vi factorize(int n) { vi factors; while (n > 1) { int p = max_prime_divisor(n); factors.emplace_back(p); n /= p; } sort(factors.begin(), factors.end()); putv(factors); return factors; } // b進数での各桁の合計 ll f(ll b, ll n) { if (n < b) return n; return f(b, n / b) + n % b; } ////////////////////////////////////////////////// ////////////////////////////////////////////////// ////////////////////////////////////////////////// void field_table(int p) { // 素数pに対して // 0..p-1の和と // 1..p-1の積テーブルを作る cout << "MOD = " << p << endl << endl; cout << " + | "; for (int a = 0; a <= p - 1; ++a) cout << fill(2) << a << " "; cout << endl; cout << "----"; for (int i = 0; i < p; ++i) cout << "---"; cout << endl; for (int a = 0; a <= p - 1; ++a) { cout << fill(2) << a << " | "; for (int b = 0; b <= p - 1; ++b) cout << fill(2) << (a + b) % p << " "; cout << endl; } cout << endl << " * | "; for (int a = 1; a <= p - 1; ++a) cout << fill(2) << a << " "; cout << endl; cout << "----"; for (int i = 0; i < p - 1; ++i) cout << "---"; cout << endl; for (int a = 1; a <= p - 1; ++a) { cout << fill(2) << a << " | "; for (int b = 1; b <= p - 1; ++b) cout << fill(2) << (a * b) % p << " "; cout << endl; } } // mod p で見て nのマイナスの逆元を調べる int minus_inverse(int p, int n) { int a = p - n; for (int b = 1; b < p; ++b) if ((a * b) % p == 1) return b; return -1; } int inverse(int p, int n) { int a = 1; while ((n * a) % p != 1) a++; return a; } int inverse_minus_inverese(int p, int n) { int a = inverse(p, n); return inverse(p, p - a); } // int main(){ // int p = 7; // field_table(p); // for(int n=1; n<p; ++n){ // cout << n << ": "<< inverse(p,n); // cout << " " << p-inverse(p,n); // cout << " " << inverse_minus_inverese(p,n) << endl; // } // } int main() { string s; cin >> s; int a = 10 * (int(s[0]) - 48) + (int(s[1]) - 48); int b = 10 * (int(s[2]) - 48) + (int(s[3]) - 48); // cout << pair(a,b) <<endl; string ret; if (1 <= a && a <= 12) { if (1 <= b && b <= 12) ret = "AMBIGUOUS"; else ret = "MMYY"; } else { if (1 <= b && b <= 12) ret = "YYMM"; else ret = "NA"; } cout << ret << endl; }
[ "literal.string.change", "assignment.value.change" ]
859,079
859,080
u153846982
cpp
p03042
#include <algorithm> #include <assert.h> #include <bits/stdc++.h> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <ios> #include <iostream> #include <list> #include <map> #include <math.h> #include <memory> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdlib.h> #include <time.h> #include <utility> #include <vector> using namespace std; int main() { string s; cin >> s; int a = (s[0] - '0') * 10 + s[1] - '0', b = (s[2] - '0') * 10 + s[3] - '0'; if (a == 0 && b == 0) cout << "NA"; else if (a == 0 && b > 12) cout << "NA"; else if (a < 12 && b == 0) cout << "NA"; else if (a > 12 && b > 12) cout << "NA"; else if ((a <= 12 && a != 0) && (b <= 12 && b != 0)) cout << "AMBIGUOUS"; else if (a <= 12 && a != 0) cout << "MMYY"; else cout << "YYMM"; }
#include <algorithm> #include <assert.h> #include <bits/stdc++.h> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iomanip> #include <ios> #include <iostream> #include <list> #include <map> #include <math.h> #include <memory> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdlib.h> #include <time.h> #include <utility> #include <vector> using namespace std; int main() { string s; cin >> s; int a = (s[0] - '0') * 10 + s[1] - '0', b = (s[2] - '0') * 10 + s[3] - '0'; if (a == 0 && b == 0) cout << "NA"; else if (a == 0 && b > 12) cout << "NA"; else if (a > 12 && b == 0) cout << "NA"; else if (a > 12 && b > 12) cout << "NA"; else if ((a <= 12 && a != 0) && (b <= 12 && b != 0)) cout << "AMBIGUOUS"; else if (a <= 12 && a != 0) cout << "MMYY"; else cout << "YYMM"; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
859,096
859,097
u937608388
cpp
p03042
/////////////////////////////////////////Info///////////////////////////////////////////////// // Problem: // Date: // Skill: // Bug: /////////////////////////////////////////Definations///////////////////////////////////////////////// //循环控制 #define CLR(a) memset((a), 0, sizeof(a)) #define F(i, a, b) for (int i = a; i <= int(b); ++i) #define F2(i, a, b) for (int i = a; i >= int(b); --i) #define RE(i, n) for (int i = 0; i < int(n); i++) #define RE2(i, n) for (int i = 1; i <= int(n); i++) //简化敲击 #define PII pair<int, int> #define PLL pari<long long, long long> #define PB push_back #define ENDL '\n' #define x first #define y second using namespace std; typedef long long ll; const int inf = 0x3f3f3f3f; const long long llinf = 0x3f3f3f3f3f3f3f3f; ////////////////////////////////////////Options////////////////////////////////////////////////////// #define stdcpph #define CPP_IO #ifdef stdcpph #include <bits/stdc++.h> #else #include <algorithm> #include <ctype.h> #include <functional> #include <map> #include <math.h> #include <string.h> #include <vector> #ifdef CPP_IO #include <iomanip> #include <iostream> #include <string> #else #include <stdio.h> #endif #endif ////////////////////////////////////////Basic ///Functions////////////////////////////////////////////// template <typename INint> inline void IN(INint &x) { x = 0; int f = 1; char c; cin.get(c); while (c < '0' || c > '9') { if (c == '-') f = -1; cin.get(c); } while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; cin.get(c); } x *= f; } template <typename INint> inline void OUT(INint x) { if (x > 9) OUT(x / 10); cout.put(x % 10 + '0'); } ////////////////////////////////////////Added ///Functions////////////////////////////////////////////// const int maxn = int(20); bool yymm(string s) { int m = (s[2] - '0') * 10 + s[3] - '0'; if (m <= 12 && m >= 1) return 1; } bool mmyy(string s) { int m = (s[0] - '0') * 10 + s[1] - '0'; return m <= 12 && m >= 1; } ////////////////////////////////////////////Code///////////////////////////////////////////////////// int main() { // freopen("C:\\Users\\VULCAN\\Desktop\\data.in", "r", stdin); int T(1), times(0); #ifdef CPP_IO // CPP_IO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // cin >> T; #else // IN(T); #endif ///////////////////////////////////////////////////////////////////////////////////////////////// while (++times, T--) { string s; cin >> s; if (yymm(s) && mmyy(s)) cout << "AMBIGUOUS"; else if (yymm(s) && !mmyy(s)) cout << "YYMM"; else if (mmyy(s) && !yymm(s)) cout << "MMYY"; else cout << "NA"; } /////////////////////////////////////////////////////////////////////////////////////////////////// return 0; }
/////////////////////////////////////////Info///////////////////////////////////////////////// // Problem: // Date: // Skill: // Bug: /////////////////////////////////////////Definations///////////////////////////////////////////////// //循环控制 #define CLR(a) memset((a), 0, sizeof(a)) #define F(i, a, b) for (int i = a; i <= int(b); ++i) #define F2(i, a, b) for (int i = a; i >= int(b); --i) #define RE(i, n) for (int i = 0; i < int(n); i++) #define RE2(i, n) for (int i = 1; i <= int(n); i++) //简化敲击 #define PII pair<int, int> #define PLL pari<long long, long long> #define PB push_back #define ENDL '\n' #define x first #define y second using namespace std; typedef long long ll; const int inf = 0x3f3f3f3f; const long long llinf = 0x3f3f3f3f3f3f3f3f; ////////////////////////////////////////Options////////////////////////////////////////////////////// #define stdcpph #define CPP_IO #ifdef stdcpph #include <bits/stdc++.h> #else #include <algorithm> #include <ctype.h> #include <functional> #include <map> #include <math.h> #include <string.h> #include <vector> #ifdef CPP_IO #include <iomanip> #include <iostream> #include <string> #else #include <stdio.h> #endif #endif ////////////////////////////////////////Basic ///Functions////////////////////////////////////////////// template <typename INint> inline void IN(INint &x) { x = 0; int f = 1; char c; cin.get(c); while (c < '0' || c > '9') { if (c == '-') f = -1; cin.get(c); } while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; cin.get(c); } x *= f; } template <typename INint> inline void OUT(INint x) { if (x > 9) OUT(x / 10); cout.put(x % 10 + '0'); } ////////////////////////////////////////Added ///Functions////////////////////////////////////////////// const int maxn = int(20); bool yymm(string s) { int m = (s[2] - '0') * 10 + s[3] - '0'; if (m <= 12 && m >= 1) return 1; else return 0; } bool mmyy(string s) { int m = (s[0] - '0') * 10 + s[1] - '0'; return m <= 12 && m >= 1; } ////////////////////////////////////////////Code///////////////////////////////////////////////////// int main() { // freopen("C:\\Users\\VULCAN\\Desktop\\data.in", "r", stdin); int T(1), times(0); #ifdef CPP_IO // CPP_IO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // cin >> T; #else // IN(T); #endif ///////////////////////////////////////////////////////////////////////////////////////////////// while (++times, T--) { string s; cin >> s; if (yymm(s) && mmyy(s)) cout << "AMBIGUOUS"; else if (yymm(s) && !mmyy(s)) cout << "YYMM"; else if (mmyy(s) && !yymm(s)) cout << "MMYY"; else cout << "NA"; } /////////////////////////////////////////////////////////////////////////////////////////////////// return 0; }
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "control_flow.return.add", "control_flow.return.0.add" ]
859,109
859,110
u738285256
cpp
p03042
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> using namespace std; int main() { int a = 0, b = 0; char c; cin >> c; a = a * 10 + c - '0'; cin >> c; a = a * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; if (a <= 12 && a >= 1 && b >= 1 && b <= 12) { cout << "AMBIGUOUS"; } else if (a >= 1 && a <= 12) { cout << "MMYY"; } else if (b >= 1 && b <= 12) { cout << "YYMM"; } else { cout << 'NA'; } getchar(); getchar(); return 0; }
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> using namespace std; int main() { int a = 0, b = 0; char c; cin >> c; a = a * 10 + c - '0'; cin >> c; a = a * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; if (a <= 12 && a >= 1 && b >= 1 && b <= 12) { cout << "AMBIGUOUS"; } else if (a >= 1 && a <= 12) { cout << "MMYY"; } else if (b >= 1 && b <= 12) { cout << "YYMM"; } else { cout << "NA"; } getchar(); getchar(); return 0; }
[ "literal.string.change", "io.output.change" ]
859,111
859,112
u866339621
cpp
p03042
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> using namespace std; int main() { int a = 0, b = 0; char c; cin >> c; a = a * 10 + c - '0'; cin >> c; a = a * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; if (a <= 12 && a >= 1 && b >= 1 && b <= 12) { cout << "AMBIGUOUS"; } else if (a >= 1 && a <= 12) { cout << "YYMM"; } else if (b >= 1 && b <= 12) { cout << "MMYY"; } else { cout << 'NA'; } getchar(); getchar(); return 0; }
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> using namespace std; int main() { int a = 0, b = 0; char c; cin >> c; a = a * 10 + c - '0'; cin >> c; a = a * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; cin >> c; b = b * 10 + c - '0'; if (a <= 12 && a >= 1 && b >= 1 && b <= 12) { cout << "AMBIGUOUS"; } else if (a >= 1 && a <= 12) { cout << "MMYY"; } else if (b >= 1 && b <= 12) { cout << "YYMM"; } else { cout << "NA"; } getchar(); getchar(); return 0; }
[ "literal.string.change", "io.output.change" ]
859,113
859,112
u866339621
cpp
p03042
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int maxn = 1e5 + 10; ld pw[40]; bool X(string t) { int k = 0; k += (int)(t[1] - '0') + 10 * (int)(t[0] - '0'); if (k >= 1 and k <= 12) return 1; return 0; } int main() { ios_base::sync_with_stdio(false); string s; cin >> s; string t = s.substr(0, 2); string p = s.substr(2, 2); bool XXYY = 0, YYXX = 0; if (X(t)) YYXX = 1; if (X(p)) XXYY = 1; if (XXYY and YYXX) return cout << "AMBIGUOUS" << endl, 0; if (XXYY) cout << "YYXX" << endl; else if (YYXX) cout << "XXYY" << endl; else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int maxn = 1e5 + 10; ld pw[40]; bool X(string t) { int k = 0; k += (int)(t[1] - '0') + 10 * (int)(t[0] - '0'); if (k >= 1 and k <= 12) return 1; return 0; } int main() { ios_base::sync_with_stdio(false); string s; cin >> s; string t = s.substr(0, 2); string p = s.substr(2, 2); bool XXYY = 0, YYXX = 0; if (X(t)) YYXX = 1; if (X(p)) XXYY = 1; if (XXYY and YYXX) return cout << "AMBIGUOUS" << endl, 0; if (XXYY) cout << "YYMM" << endl; else if (YYXX) cout << "MMYY" << endl; else cout << "NA" << endl; }
[ "literal.string.change", "io.output.change" ]
859,119
859,120
u001596356
cpp
p03042
#include <stdio.h> int main() { int in; int higher, lower; scanf("%d", &in); higher = in / 100; lower = in - higher; // AMBIGUOUS if ((1 <= higher && higher <= 12) && (1 <= lower && lower <= 12)) { puts("AMBIGUOUS"); return 0; } // NA if ((higher == 0 || 13 <= higher) && (lower == 0 || 13 <= lower)) { puts("NA"); return 0; } // MMYY if ((1 <= higher && higher <= 12) && (lower == 0 || 13 <= lower)) { puts("MMYY"); return 0; } // YYMM puts("YYMM"); return 0; }
#include <stdio.h> int main() { int in; int higher, lower; scanf("%d", &in); higher = in / 100; lower = in - higher * 100; // AMBIGUOUS if ((1 <= higher && higher <= 12) && (1 <= lower && lower <= 12)) { puts("AMBIGUOUS"); return 0; } // NA if ((higher == 0 || 13 <= higher) && (lower == 0 || 13 <= lower)) { puts("NA"); return 0; } // MMYY if ((1 <= higher && higher <= 12) && (lower == 0 || 13 <= lower)) { puts("MMYY"); return 0; } // YYMM puts("YYMM"); return 0; }
[ "assignment.change" ]
859,131
859,132
u362728536
cpp
p03042
#include <cstdio> int main() { int a, b; a = (getchar() - '0') * 10; a += (getchar() - '0'); b = (getchar() - '0') * 10; b += (getchar() - '0'); bool ayy = a >= 1 && a <= 12; bool byy = b >= 1 && b <= 12; if (ayy && !byy) printf("YYMM"); else if (!ayy && byy) printf("MMYY"); else if (ayy && byy) printf("AMBIGUOUS"); else printf("NA"); }
#include <cstdio> int main() { int a, b; a = (getchar() - '0') * 10; a += (getchar() - '0'); b = (getchar() - '0') * 10; b += (getchar() - '0'); bool ayy = a >= 1 && a <= 12; bool byy = b >= 1 && b <= 12; if (ayy && !byy) printf("MMYY"); else if (!ayy && byy) printf("YYMM"); else if (ayy && byy) printf("AMBIGUOUS"); else printf("NA"); }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
859,142
859,143
u081249228
cpp
p03042
#include <iostream> #include <string> using namespace std; int main() { string raw; cin >> raw; int a = stoi(raw.substr(0, 2)); int b = stoi(raw.substr(2, 2)); bool ma = 0 < a && a < 13; bool mb = 0 < b && b < 13; if (ma && mb) { cout << "Ambiguous" << endl; } else if (ma) { cout << "MMYY" << endl; } else if (mb) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
#include <iostream> #include <string> using namespace std; int main() { string raw; cin >> raw; int a = stoi(raw.substr(0, 2)); int b = stoi(raw.substr(2, 2)); bool ma = 0 < a && a < 13; bool mb = 0 < b && b < 13; if (ma && mb) { cout << "AMBIGUOUS" << endl; } else if (ma) { cout << "MMYY" << endl; } else if (mb) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
859,152
859,153
u166275104
cpp
p03042
#include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n - 1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define pb push_back #define mp make_pair #define F first #define S second #define UNIQUE(v) \ do { \ sort(v.begin(), v.end()); \ v.erase(unique(v.begin(), v.end()), v.end()); \ } while (0) #define y0 y3487465 #define y1 y8687969 #define m0(x) memset(x, 0, sizeof(x)) #define m1(x) memset(x, 63, sizeof(x)) typedef long long ll; typedef pair<int, int> pi; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pi> vpi; typedef vector<ll> vll; typedef vector<vll> vvll; double EPS = 1e-9; int INFi = 1000000005; long long INFll = 1000000000000000005ll; double PI = acos(-1); int dirx[8] = {-1, 0, 0, 1, -1, -1, 1, 1}; int diry[8] = {0, 1, -1, 0, -1, 1, -1, 1}; ll MOD = 1000000007; string S; int main() { cin >> S; int f = stoi(S.substr(0, 2)); int b = stoi(S.substr(2, 2)); if (f > 12 || f == 0) { if (b > 12 || b == 0) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else { if (f > 12 || f == 0) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } } return 0; }
#include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) #define RREP(i, n) for (int i = n - 1; i >= 0; i--) #define ALL(v) v.begin(), v.end() #define pb push_back #define mp make_pair #define F first #define S second #define UNIQUE(v) \ do { \ sort(v.begin(), v.end()); \ v.erase(unique(v.begin(), v.end()), v.end()); \ } while (0) #define y0 y3487465 #define y1 y8687969 #define m0(x) memset(x, 0, sizeof(x)) #define m1(x) memset(x, 63, sizeof(x)) typedef long long ll; typedef pair<int, int> pi; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pi> vpi; typedef vector<ll> vll; typedef vector<vll> vvll; double EPS = 1e-9; int INFi = 1000000005; long long INFll = 1000000000000000005ll; double PI = acos(-1); int dirx[8] = {-1, 0, 0, 1, -1, -1, 1, 1}; int diry[8] = {0, 1, -1, 0, -1, 1, -1, 1}; ll MOD = 1000000007; string S; int main() { cin >> S; int f = stoi(S.substr(0, 2)); int b = stoi(S.substr(2, 2)); if (f > 12 || f == 0) { if (b > 12 || b == 0) { cout << "NA" << endl; } else { cout << "YYMM" << endl; } } else { if (b > 12 || b == 0) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
859,161
859,162
u505831576
cpp
p03042
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; int a, b; a = (s[0] - '0') * 10 + s[1] - '0'; b = (s[2] - '0') * 10 + s[3] - '0'; bool yymm = (b <= 12) && (b > 0); // YYMMになる必要条件 bool mmyy = (a <= 12) && (a > 0); // MMYYになる必要条件 if (yymm && mmyy) { cout << "AMBIGUOUS" << endl; } else if (yymm) { cout << "YYMM" << endl; } else if (mmyy) { cout << "YYMM" << endl; } else cout << "NA" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; int a, b; a = (s[0] - '0') * 10 + s[1] - '0'; b = (s[2] - '0') * 10 + s[3] - '0'; bool yymm = (b <= 12) && (b > 0); // YYMMになる必要条件 bool mmyy = (a <= 12) && (a > 0); // MMYYになる必要条件 if (yymm && mmyy) { cout << "AMBIGUOUS" << endl; } else if (yymm) { cout << "YYMM" << endl; } else if (mmyy) { cout << "MMYY" << endl; } else cout << "NA" << endl; }
[ "literal.string.change", "io.output.change" ]
859,163
859,164
u123896133
cpp
p03042
#include <algorithm> #include <cctype> #include <cmath> #include <ctype.h> #include <iostream> #include <map> #include <queue> #include <stdio.h> #include <stdlib.h> #include <string> #include <vector> #define INF 100000000; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define REP1(j, n) for (int j = 0; j < (int)n; ++j) #define REPD(i, n) for (int i = n; i >= 0; --i) #define REPD1(j, n) for (int j = n; j = > 0; --j) #define REPS(i, n) for (int i = 1; i <= (int)n; ++i) #define REPS1(j, n) for (int j = 1; j <= (int)n; ++j) #define rep(i, a, n) for (int i = a; i <= (int)n; ++i) #define SZ(x) ((int)(x).size()) // size() unsigned -> int #define DescSort(a) sort(a.begin(), a.end(), std::greater<int>()) using namespace std; typedef long long ll; int main(void) { int yymm; cin >> yymm; int yy = yymm / 100, mm = yymm % 100; // cout << yy << " " << mm; bool can1, can2; can1 = can2 = false; // YYMMの判定 if (1 <= mm && mm <= 12) { if (1 <= yy && yy <= 12) { cout << "AMBIGUOUS" << endl; } else cout << "YYMM" << endl; } else { if (1 <= yy && yy <= 12) { cout << "YYMM" << endl; } else cout << "NA" << endl; } return 0; }
#include <algorithm> #include <cctype> #include <cmath> #include <ctype.h> #include <iostream> #include <map> #include <queue> #include <stdio.h> #include <stdlib.h> #include <string> #include <vector> #define INF 100000000; #define REP(i, n) for (int i = 0; i < (int)n; ++i) #define REP1(j, n) for (int j = 0; j < (int)n; ++j) #define REPD(i, n) for (int i = n; i >= 0; --i) #define REPD1(j, n) for (int j = n; j = > 0; --j) #define REPS(i, n) for (int i = 1; i <= (int)n; ++i) #define REPS1(j, n) for (int j = 1; j <= (int)n; ++j) #define rep(i, a, n) for (int i = a; i <= (int)n; ++i) #define SZ(x) ((int)(x).size()) // size() unsigned -> int #define DescSort(a) sort(a.begin(), a.end(), std::greater<int>()) using namespace std; typedef long long ll; int main(void) { int yymm; cin >> yymm; int yy = yymm / 100, mm = yymm % 100; // cout << yy << " " << mm; bool can1, can2; can1 = can2 = false; // YYMMの判定 if (1 <= mm && mm <= 12) { if (1 <= yy && yy <= 12) { cout << "AMBIGUOUS" << endl; } else cout << "YYMM" << endl; } else { if (1 <= yy && yy <= 12) { cout << "MMYY" << endl; } else cout << "NA" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
859,165
859,166
u817523595
cpp
p03042
#include <stdio.h> int n, a, b; int main() { scanf("%d", &n); a = n / 100; b = n % 100; if ((1 <= a) && (a <= 12) && (1 <= b) && (b <= 12)) printf("AMBIGIOUS"); else if ((1 <= a) && (a <= 12)) printf("MMYY"); else if ((1 <= b) && (b <= 12)) printf("YYMM"); else printf("NA"); }
#include <stdio.h> int n, a, b; int main() { scanf("%d", &n); a = n / 100; b = n % 100; if ((1 <= a) && (a <= 12) && (1 <= b) && (b <= 12)) printf("AMBIGUOUS"); else if ((1 <= a) && (a <= 12)) printf("MMYY"); else if ((1 <= b) && (b <= 12)) printf("YYMM"); else printf("NA"); }
[ "misc.typo", "literal.string.change", "call.arguments.change", "io.output.change" ]
859,176
859,177
u076504136
cpp
p03042
#include <stdio.h> int main() { int a, b, c, d, e; scanf("%d", &e); a = e / 100; b = e - 100 * a; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) printf("AMBIGOUS"); else printf("MMYY"); } else { if (b >= 1 && b <= 12) printf("YYMM"); else printf("NA"); } }
#include <stdio.h> int main() { int a, b, c, d, e; scanf("%d", &e); a = e / 100; b = e - 100 * a; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) printf("AMBIGUOUS"); else printf("MMYY"); } else { if (b >= 1 && b <= 12) printf("YYMM"); else printf("NA"); } }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
859,178
859,179
u362840243
cpp
p03042
#include <stdio.h> int main() { int a, b, c, d, e; scanf("%d", &e); a = e / 100; b = e - 100 * a; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) printf("AMBIGOUS"); else printf("MMYY"); } else { if (b >= 1 && b <= 12) printf("YYMM"); else printf("NA"); } }
#include <stdio.h> int main() { int a, b, c, d, e; scanf("%d", &e); a = e / 100; b = e - 100 * a; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) printf("AMBIGUOUS"); else printf("MMYY"); } else { if (b >= 1 && b <= 12) printf("YYMM"); else printf("NA"); } }
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
859,180
859,179
u362840243
cpp
p03042
#include <stdio.h> int main() { int a, b, c, d, e, f; scanf("%d", &e); a = e / 100; b = e - 100 * a; if (a >= 1 && a <= 12) { if (b >= 1 && a <= 12) printf("AMBIGOUS"); else printf("MMYY"); } else { if (b >= 1 && a <= 12) printf("YYMM"); else printf("NA"); } }
#include <stdio.h> int main() { int a, b, c, d, e; scanf("%d", &e); a = e / 100; b = e - 100 * a; if (a >= 1 && a <= 12) { if (b >= 1 && b <= 12) printf("AMBIGUOUS"); else printf("MMYY"); } else { if (b >= 1 && b <= 12) printf("YYMM"); else printf("NA"); } }
[ "variable_declaration.remove", "identifier.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
859,181
859,179
u362840243
cpp
p03042
#include <stdio.h> int main() { int n; int a = 0; int b = 0; scanf("%d", &n); if (n % 100 <= 12 && n % 100 >= 12) { a++; } if ((n / 100) <= 12 && n / 100 >= 1) { b++; } if ((a + b) == 2) { printf("AMBIGUOUS"); } else if (a == 1) { printf("YYMM"); } else if (b == 1) { printf("MMYY"); } else { printf("NA"); } return 0; }
#include <stdio.h> int main() { int n; int a = 0; int b = 0; scanf("%d", &n); if (n % 100 <= 12 && n % 100 >= 1) { a++; } if ((n / 100) <= 12 && n / 100 >= 1) { b++; } if ((a + b) == 2) { printf("AMBIGUOUS"); } else if (a == 1) { printf("YYMM"); } else if (b == 1) { printf("MMYY"); } else { printf("NA"); } return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
859,182
859,183
u484935146
cpp
p03042
#include <iostream> using namespace std; int main() { string s; int a = 0; int b = 0; cin >> s; if ((s[0] == '0' && s[1] != '0') || (s[0] == '1' && s[1] >= '0' && s[1] <= '2\ ')) a++; if ((s[2] == '0' && s[3] != '0') || (s[2] == '1' && s[3] >= '0' && s[3] <= '2\ ')) b++; if (a == 0 && b == 0) cout << "NA" << endl; else if (a == 1 && b == 0) cout << "YYMM" << endl; else if (a == 0 && b == 1) cout << "MMYY" << endl; else cout << "AMBIGUOUS" << endl; }
#include <iostream> using namespace std; int main() { string s; int a = 0; int b = 0; cin >> s; if ((s[0] == '0' && s[1] != '0') || (s[0] == '1' && s[1] >= '0' && s[1] <= '2\ ')) a++; if ((s[2] == '0' && s[3] != '0') || (s[2] == '1' && s[3] >= '0' && s[3] <= '2\ ')) b++; if (a == 0 && b == 0) cout << "NA" << endl; else if (a == 1 && b == 0) cout << "MMYY" << endl; else if (a == 0 && b == 1) cout << "YYMM" << endl; else cout << "AMBIGUOUS" << endl; }
[ "literal.string.change", "io.output.change" ]
859,184
859,185
u035009844
cpp
p03042
#include <iostream> using namespace std; int main() { string s; int a = 0; int b = 0; cin >> s; if ((s[0] == '0' && s[1] != '0') || (s[0] == '1' && s[1] >= '0' && s[1] <= '2')) a++; if ((s[2] == '0' && s[3] != '0') || (s[2] == '1' && s[3] >= '0' && s[3] <= '2')) b++; if (a == 0 && b == 0) cout << "NA" << endl; else if (a == 1 && b == 0) cout << "YYMM" << endl; else if (a == 0 && b == 1) cout << "YYMM" << endl; else cout << "AMBIGUOUS" << endl; }
#include <iostream> using namespace std; int main() { string s; int a = 0; int b = 0; cin >> s; if ((s[0] == '0' && s[1] != '0') || (s[0] == '1' && s[1] >= '0' && s[1] <= '2\ ')) a++; if ((s[2] == '0' && s[3] != '0') || (s[2] == '1' && s[3] >= '0' && s[3] <= '2\ ')) b++; if (a == 0 && b == 0) cout << "NA" << endl; else if (a == 1 && b == 0) cout << "MMYY" << endl; else if (a == 0 && b == 1) cout << "YYMM" << endl; else cout << "AMBIGUOUS" << endl; }
[ "literal.string.change", "control_flow.branch.if.condition.change", "io.output.change" ]
859,186
859,185
u035009844
cpp
p03042
#include <iostream> #include <vector> using namespace std; int main() { int s; cin >> s; int s1 = s / 100, s2 = s % 100; if (s1 < 13 && s1 > 0) { if (s2 < 13 && s2 > 0) cout << "AMBIGUOUS" << endl; else cout << "YYMM" << endl; } else { if (s2 < 13 && s2 > 0) cout << "MMYY" << endl; else cout << "NA" << endl; } }
#include <iostream> #include <vector> using namespace std; int main() { int s; cin >> s; int s1 = s / 100, s2 = s % 100; if (s1 < 13 && s1 > 0) { if (s2 < 13 && s2 > 0) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (s2 < 13 && s2 > 0) cout << "YYMM" << endl; else cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
859,189
859,190
u389766217
cpp
p03042
#include <bits/stdc++.h> using namespace std; #define LL long long bool chk(int x) { if (x > 0 && x <= 12) { return true; } return false; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); string s; cin >> s; int x = (s[0] - '0') * 10 + (s[1] - '0'); int y = (s[2] - '0') * 10 + (s[3] - '0'); if (chk(x) && chk(y)) { cout << "AMBIGIOUS" << endl; } else if (chk(x) && y > 0) { cout << "MMYY" << endl; } else if (x > 0 && chk(y)) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; #define LL long long bool chk(int x) { if (x > 0 && x <= 12) { return true; } return false; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); string s; cin >> s; int x = (s[0] - '0') * 10 + (s[1] - '0'); int y = (s[2] - '0') * 10 + (s[3] - '0'); if (chk(x) && chk(y)) { cout << "AMBIGUOUS" << endl; } else if (chk(x) && y >= 0) { cout << "MMYY" << endl; } else if (x >= 0 && chk(y)) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
[ "misc.typo", "literal.string.change", "io.output.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
859,204
859,203
u212176064
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { long long int p, q, s, t, u, v, w, x; string r; while (cin >> r) { p = r[0] - 48; q = r[1] - 48; s = (p * 10) + (q); t = r[2] - 48; u = r[3] - 48; v = (t * 10) + u; if (s >= 1 && s <= 12 && v >= 1 && v <= 12) { cout << "AMBIGUOUS" << endl; } else if (v >= 1 && v <= 12) { cout << "YYMM" << endl; } else if (u >= 1 && u <= 12) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } // cout<<r<<endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int p, q, s, t, u, v, w, x; string r; while (cin >> r) { p = r[0] - 48; q = r[1] - 48; s = (p * 10) + (q); t = r[2] - 48; u = r[3] - 48; v = (t * 10) + u; // cout<<s<<" "<<v<<endl; if (s >= 1 && s <= 12 && v >= 1 && v <= 12) { cout << "AMBIGUOUS" << endl; } else if (v >= 1 && v <= 12) { cout << "YYMM" << endl; } else if (s >= 1 && s <= 12) { cout << "MMYY" << endl; } else { cout << "NA" << endl; } // cout<<r<<endl; } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
859,205
859,206
u970127238
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; bool MMYY = false; bool YYMM = false; string ans; if (s / 100 > 1 && s / 100 < 13) { MMYY = true; if (s % 100 > 1 && s % 100 < 13) { YYMM = true; } } else { if (s % 100 > 1 && s % 100 < 13) { YYMM = true; } } if (MMYY == true) { ans = "MMYY"; if (YYMM == true) { ans = "AMBIGUOUS"; } } else { ans = "NA"; if (YYMM == true) { ans = "YYMM"; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; bool MMYY = false; bool YYMM = false; string ans; if (s / 100 >= 1 && s / 100 < 13) { MMYY = true; if (s % 100 >= 1 && s % 100 < 13) { YYMM = true; } } else { if (s % 100 >= 1 && s % 100 < 13) { YYMM = true; } } if (MMYY == true) { ans = "MMYY"; if (YYMM == true) { ans = "AMBIGUOUS"; } } else { ans = "NA"; if (YYMM == true) { ans = "YYMM"; } } cout << ans << endl; }
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
859,219
859,220
u370447425
cpp
p03042
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) Rep(i, 0, n) #define Rep(i, k, n) for (int i = k; i < n; i++) #define rep1(i, n) for (int i = 1; i <= n; i++) #define Rep1(i, k, n) for (int i = k; i <= n; i++) #define vi vector<int> #define vii vector<vector<int>> #define mii map<int, int> #define Sort(v) sort(v.begin(), v.end()) #define Reverse(v) reverse(v.begin(), v.end()) #define ALL(a) (a).begin(), (a).end() #define pb push_back //#define int ll typedef long long ll; const int md = 1000000007; const int INF = 1 << 30; using namespace std; int main() { int n; cin >> n; int r = n % 100; int l = n / 100; if ((r > 12 or l == 0) and (l > 12 or l == 0)) cout << "NA" << endl; else if (r > 12 or r == 0) cout << "MMYY" << endl; else if (l > 12 or l == 0) cout << "YYMM" << endl; else cout << "AMBIGUOUS" << endl; }
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, n) Rep(i, 0, n) #define Rep(i, k, n) for (int i = k; i < n; i++) #define rep1(i, n) for (int i = 1; i <= n; i++) #define Rep1(i, k, n) for (int i = k; i <= n; i++) #define vi vector<int> #define vii vector<vector<int>> #define mii map<int, int> #define Sort(v) sort(v.begin(), v.end()) #define Reverse(v) reverse(v.begin(), v.end()) #define ALL(a) (a).begin(), (a).end() #define pb push_back //#define int ll typedef long long ll; const int md = 1000000007; const int INF = 1 << 30; using namespace std; int main() { int n; cin >> n; int r = n % 100; int l = n / 100; if ((r > 12 or r == 0) and (l > 12 or l == 0)) cout << "NA" << endl; else if (r > 12 or r == 0) cout << "MMYY" << endl; else if (l > 12 or l == 0) cout << "YYMM" << endl; else cout << "AMBIGUOUS" << endl; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
859,225
859,226
u381585104
cpp
p03042
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <unordered_set> #include <vector> using namespace std; #define ll long long #define in(x) cin >> x #define out(x) cout << x << endl #define PI acos(-1) #define pp push_back #define Yes cout << "Yes" << endl #define YES cout << "YES" << endl #define No cout << "No" << endl #define NO cout << "NO" << endl #define vec2(type) vector<vector<type>> #define vec3(type) vector<vector<vector<type>>> #define For(i, n) for (int i = 0; i < n; i++) #define inRange(x, a, b) (a <= x && x <= b) #define between(x, a, b) (a < x && x < b) template <typename T> void swap(T &a, T &b) { T temp = a; a = b; b = temp; } template <typename T> void input(T *data, int n) { For(i, n) { cin >> data[i]; } } template <typename T> void input(vector<T> &vec, int n) { T temp; For(i, n) { cin >> temp; vec.push_back(temp); } } template <typename T> void sort(vector<T> &ary) { sort(ary.begin(), ary.end()); } template <typename T> void rsort(vector<T> &ary) { sort(ary.rbegin(), ary.rend()); } void rstring(string &str) { string temp = str; For(i, (int)str.size()) { str[i] = temp[(str.size() - 1) - i]; } } struct Vec { int x, y; Vec() : x(0), y(0) {} Vec(int _x, int _y) : x(_x), y(_y) {} }; template <typename T> void print(T *x, int n) { For(i, n) { cout << x[i] << " "; } cout << endl; } template <typename T> void print(vector<T> &x) { For(i, (int)x.size()) { cout << x[i] << " "; } cout << endl; } int gcd(int n, int m) { if (n % m == 0) { return m; } else { return gcd(m, n % m); } } template <typename T> T binarySearch(vector<T> a, T target) { int cur = (int)a.size() / 2; int upper = (int)a.size() - 1; int buttom = 0; while (1) { if (a[cur] == target) { return a[cur]; } else if (a[cur] > target) { upper = cur; cur = (buttom + cur) / 2; } else { buttom = cur; cur = (cur + upper) / 2; } } } template <typename T> T binarySearch(vector<T> a, T func(T), T target) { int cur = (int)a.size() / 2; int upper = (int)a.size() - 1; int buttom = 0; while (1) { int value = func(a[cur]); if (value == target) { return a[cur]; } else if (value > target) { upper = cur; cur = (buttom + cur) / 2; } else { buttom = cur; cur = (cur + upper) / 2; } } } template <typename T> class UnionFind { public: vector<set<T>> unit_unit; int getUnionNumber(T elm) { for (int i = 0; i < (int)unit_unit.size(); i++) { int number = unit_unit[i].find(); if (number != unit_unit[i].end()) { return i; } } return -1; } void mergeUnion(int baseUnitNum, int absorvedUnitNum) {} }; int main() { string s; in(s); if ((stoi(s) / 100 > 12 || stoi(s) / 100 == 0) && stoi(s) % 100 > 0 && stoi(s) % 100 <= 12) { out("YYMM"); } else if (stoi(s) / 100 > 0 && stoi(s) / 100 <= 12 && (stoi(s) % 100 == 0 && stoi(s) % 100 > 12)) { out("MMYY"); } else if ((stoi(s) / 100 > 12 || stoi(s) / 100 == 0) && (stoi(s) % 100 > 12 || stoi(s) % 100 == 0)) { out("NA"); } else { out("AMBIGUOUS"); } return 0; }
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <unordered_set> #include <vector> using namespace std; #define ll long long #define in(x) cin >> x #define out(x) cout << x << endl #define PI acos(-1) #define pp push_back #define Yes cout << "Yes" << endl #define YES cout << "YES" << endl #define No cout << "No" << endl #define NO cout << "NO" << endl #define vec2(type) vector<vector<type>> #define vec3(type) vector<vector<vector<type>>> #define For(i, n) for (int i = 0; i < n; i++) #define inRange(x, a, b) (a <= x && x <= b) #define between(x, a, b) (a < x && x < b) template <typename T> void swap(T &a, T &b) { T temp = a; a = b; b = temp; } template <typename T> void input(T *data, int n) { For(i, n) { cin >> data[i]; } } template <typename T> void input(vector<T> &vec, int n) { T temp; For(i, n) { cin >> temp; vec.push_back(temp); } } template <typename T> void sort(vector<T> &ary) { sort(ary.begin(), ary.end()); } template <typename T> void rsort(vector<T> &ary) { sort(ary.rbegin(), ary.rend()); } void rstring(string &str) { string temp = str; For(i, (int)str.size()) { str[i] = temp[(str.size() - 1) - i]; } } struct Vec { int x, y; Vec() : x(0), y(0) {} Vec(int _x, int _y) : x(_x), y(_y) {} }; template <typename T> void print(T *x, int n) { For(i, n) { cout << x[i] << " "; } cout << endl; } template <typename T> void print(vector<T> &x) { For(i, (int)x.size()) { cout << x[i] << " "; } cout << endl; } int gcd(int n, int m) { if (n % m == 0) { return m; } else { return gcd(m, n % m); } } template <typename T> T binarySearch(vector<T> a, T target) { int cur = (int)a.size() / 2; int upper = (int)a.size() - 1; int buttom = 0; while (1) { if (a[cur] == target) { return a[cur]; } else if (a[cur] > target) { upper = cur; cur = (buttom + cur) / 2; } else { buttom = cur; cur = (cur + upper) / 2; } } } template <typename T> T binarySearch(vector<T> a, T func(T), T target) { int cur = (int)a.size() / 2; int upper = (int)a.size() - 1; int buttom = 0; while (1) { int value = func(a[cur]); if (value == target) { return a[cur]; } else if (value > target) { upper = cur; cur = (buttom + cur) / 2; } else { buttom = cur; cur = (cur + upper) / 2; } } } template <typename T> class UnionFind { public: vector<set<T>> unit_unit; int getUnionNumber(T elm) { for (int i = 0; i < (int)unit_unit.size(); i++) { int number = unit_unit[i].find(); if (number != unit_unit[i].end()) { return i; } } return -1; } void mergeUnion(int baseUnitNum, int absorvedUnitNum) {} }; int main() { string s; in(s); if ((stoi(s) / 100 > 12 || stoi(s) / 100 == 0) && stoi(s) % 100 > 0 && stoi(s) % 100 <= 12) { out("YYMM"); } else if (stoi(s) / 100 > 0 && stoi(s) / 100 <= 12 && (stoi(s) % 100 == 0 || stoi(s) % 100 > 12)) { out("MMYY"); } else if ((stoi(s) / 100 > 12 || stoi(s) / 100 == 0) && (stoi(s) % 100 > 12 || stoi(s) % 100 == 0)) { out("NA"); } else { out("AMBIGUOUS"); } return 0; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
859,234
859,235
u153867760
cpp
p03042
#include <iostream> using namespace std; int main() { int s; cin >> s; int x = s / 100; int y = s % 100; int f1 = 1 <= x && x <= 12; int f2 = 1 <= y && y <= 12; if (f1) { cout << (f2 ? "AMbIGUOUS" : "MMYY") << endl; } else { cout << (f2 ? "YYMM" : "NA") << endl; } return 0; }
#include <iostream> using namespace std; int main() { int s; cin >> s; int x = s / 100; int y = s % 100; int f1 = 1 <= x && x <= 12; int f2 = 1 <= y && y <= 12; if (f1) { cout << (f2 ? "AMBIGUOUS" : "MMYY") << endl; } else { cout << (f2 ? "YYMM" : "NA") << endl; } return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
859,240
859,241
u976817999
cpp
p03042
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; const long long N = 1e6 + 17; ll cnt, ans, lnt, n, l1, x, y, a[N]; pair<ll, ll> pr[N]; vector<ll> v, v2, v3; map<ll, ll> mp; bool used[N], t1, t2; vector<string> sv; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); cin >> n; x = n / 100; y = n % 100; if (1 <= x and x <= 12) { if (1 <= y and y <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (1 <= x and x <= 12) { cout << "YYMM"; } else { cout << "NA"; } } }
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; const long long N = 1e6 + 17; ll cnt, ans, lnt, n, l1, x, y, a[N]; pair<ll, ll> pr[N]; vector<ll> v, v2, v3; map<ll, ll> mp; bool used[N], t1, t2; vector<string> sv; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); cin >> n; x = n / 100; y = n % 100; if (1 <= x and x <= 12) { if (1 <= y and y <= 12) { cout << "AMBIGUOUS"; } else { cout << "MMYY"; } } else { if (1 <= y and y <= 12) { cout << "YYMM"; } else { cout << "NA"; } } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
859,245
859,246
u361768313
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int sw; cin >> sw; int y = sw / 10; int m = sw % 10; if ((m >= 1 && m <= 12) && (y >= 1 && y <= 12)) printf("AMBIGUOUS\n"); else if (y >= 1 && y <= 12) printf("MMYY\n"); else if (m >= 1 && m <= 12) printf("YYMM\n"); else printf("NA\n"); }
#include <bits/stdc++.h> using namespace std; int main() { int sw; cin >> sw; int y = sw / 100; int m = sw % 100; if ((m >= 1 && m <= 12) && (y >= 1 && y <= 12)) printf("AMBIGUOUS\n"); else if (y >= 1 && y <= 12) printf("MMYY\n"); else if (m >= 1 && m <= 12) printf("YYMM\n"); else printf("NA\n"); }
[ "literal.number.change", "expression.operation.binary.change" ]
859,249
859,250
u542846759
cpp
p03042
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define f(i, x, n) for (ll int i = x; i < n; i++) #define re(j, x, n) for (ll int j = x; j >= n; j--) #define f1(k, x, n) for (ll int k = x; k <= n; k++) #define mp make_pair #define pb push_back using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s, s1, s2; cin >> s; ll int a, b; s1 = s.substr(0, 1); s2 = s.substr(2, 3); a = stoll(s1); b = stoll(s2); if (a > 0 && a <= 12 && (b >= 13 || b == 0)) cout << "MMYY"; else if ((a == 0 || a > 12) && b <= 12 && b > 0) cout << "YYMM"; else if ((a > 0 && a <= 12) && (b <= 12 && b > 0)) cout << "AMBIGUOUS"; else cout << "NA"; }
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define f(i, x, n) for (ll int i = x; i < n; i++) #define re(j, x, n) for (ll int j = x; j >= n; j--) #define f1(k, x, n) for (ll int k = x; k <= n; k++) #define mp make_pair #define pb push_back using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string s, s1, s2; cin >> s; ll int a, b; s1 = s.substr(0, 2); s2 = s.substr(2, 3); a = stoll(s1); b = stoll(s2); if (a > 0 && a <= 12 && (b >= 13 || b == 0)) cout << "MMYY"; else if ((a == 0 || a > 12) && b <= 12 && b > 0) cout << "YYMM"; else if ((a > 0 && a <= 12) && (b <= 12 && b > 0)) cout << "AMBIGUOUS"; else cout << "NA"; }
[ "literal.number.change", "assignment.value.change", "call.arguments.change" ]
859,251
859,252
u430650458
cpp
p03042
#include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) int main() { int S; cin >> S; int a, b; a = S / 100; b = S % 100; int flag = 0; if (a < 13 and a > 0) { ++flag; } if (b < 13 and b > 0) { ++flag; ++flag; } if (flag == 0) { cout << "NA" << endl; } else if (flag == 1) { cout << "YYMM" << endl; } else if (flag == 2) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } return 0; }
#include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) int main() { int S; cin >> S; int a, b; a = S / 100; b = S % 100; int flag = 0; if (a < 13 and a > 0) { ++flag; } if (b < 13 and b > 0) { ++flag; ++flag; } if (flag == 0) { cout << "NA" << endl; } else if (flag == 1) { cout << "MMYY" << endl; } else if (flag == 2) { cout << "YYMM" << endl; } else { cout << "AMBIGUOUS" << endl; } return 0; }
[ "literal.string.change", "io.output.change" ]
859,253
859,254
u908393090
cpp
p03042
#include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int S; cin >> S; int MM = S % 100; int YY = S / 100; if ((MM < 1 || 12 < MM) && (YY < 1 || 12 << YY)) { cout << "NA" << endl; } else if ((1 <= MM && MM <= 12) && (YY < 1 || 12 < YY)) { cout << "YYMM" << endl; } else if ((1 > MM || MM > 12) && (1 <= YY && YY <= 12)) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } return 0; }
#include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int S; cin >> S; int MM = S % 100; int YY = S / 100; if ((MM < 1 || 12 < MM) && (YY < 1 || 12 < YY)) { cout << "NA" << endl; } else if ((1 <= MM && MM <= 12) && (YY < 1 || 12 < YY)) { cout << "YYMM" << endl; } else if ((1 > MM || MM > 12) && (1 <= YY && YY <= 12)) { cout << "MMYY" << endl; } else { cout << "AMBIGUOUS" << endl; } return 0; }
[ "misc.typo", "control_flow.branch.if.condition.change" ]
859,258
859,259
u692207013
cpp
p03042
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <sstream> #include <string> #include <vector> #ifdef _DEBUG #define DMP(x) cerr << #x << ": " << x << "\n" #else #define DMP(x) ((void)0) #endif const int MOD = 1000000007, INF = 1111111111; using namespace std; typedef long long lint; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int S; cin >> S; bool flag1 = 1 <= S / 100 && S / 100 <= 12; bool flag2 = 1 <= S % 100 && S % 100 <= 12; if (flag1 && flag2) cout << "AMBIGUOUS" << "\n"; else if (flag1) cout << "MMYY" << "\n"; else if (flag2) cout << "YYMM" << "\n"; else cout << "AMBIGUOUS" << "\n"; return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <sstream> #include <string> #include <vector> #ifdef _DEBUG #define DMP(x) cerr << #x << ": " << x << "\n" #else #define DMP(x) ((void)0) #endif const int MOD = 1000000007, INF = 1111111111; using namespace std; typedef long long lint; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int S; cin >> S; bool flag1 = 1 <= S / 100 && S / 100 <= 12; bool flag2 = 1 <= S % 100 && S % 100 <= 12; if (flag1 && flag2) cout << "AMBIGUOUS" << "\n"; else if (flag1) cout << "MMYY" << "\n"; else if (flag2) cout << "YYMM" << "\n"; else cout << "NA" << "\n"; return 0; }
[ "literal.string.change", "io.output.change" ]
859,260
859,261
u532573979
cpp
p03042
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int tmp; int a = s / 1000; tmp = s % 1000; int b = tmp / 100; tmp = tmp % 100; int c = tmp / 10; int d = tmp % 10; bool ab, cd; ab = false; cd = false; if ((a == 0 && b <= 9 && b >= 1) || (a == 1 && b <= 2 && b >= 0)) { ab = true; } if ((c == 0 && d <= 9 && d >= 1) || (c == 1 && d <= 2 && d >= 0)) { cd = true; } if (ab && cd) { cout << "AMBIGUOU" << endl; } else if (ab) { cout << "MMYY" << endl; } else if (cd) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int s; cin >> s; int tmp; int a = s / 1000; tmp = s % 1000; int b = tmp / 100; tmp = tmp % 100; int c = tmp / 10; int d = tmp % 10; bool ab, cd; ab = false; cd = false; if ((a == 0 && b <= 9 && b >= 1) || (a == 1 && b <= 2 && b >= 0)) { ab = true; } if ((c == 0 && d <= 9 && d >= 1) || (c == 1 && d <= 2 && d >= 0)) { cd = true; } if (ab && cd) { cout << "AMBIGUOUS" << endl; } else if (ab) { cout << "MMYY" << endl; } else if (cd) { cout << "YYMM" << endl; } else { cout << "NA" << endl; } }
[ "literal.string.change", "io.output.change" ]
859,265
859,266
u985208127
cpp
p03042
#include <iostream> #include <string> using namespace std; int main() { // string s; // cin >> s; // int num = stoi(s); int num; cin >> num; int f = num / 100; int b = num % 100; // cout << "num " << num << "f " << f << "b " << b << endl; if (0 < f && f < 13) { if (0 < b && b < 13) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { } if (0 < b && b < 13) cout << "YYMM" << endl; else cout << "NA" << endl; return 0; }
#include <iostream> #include <string> using namespace std; int main() { // string s; // cin >> s; // int num = stoi(s); int num; cin >> num; int f = num / 100; int b = num % 100; // cout << "num " << num << "f " << f << "b " << b << endl; if (0 < f && f < 13) { if (0 < b && b < 13) cout << "AMBIGUOUS" << endl; else cout << "MMYY" << endl; } else { if (0 < b && b < 13) cout << "YYMM" << endl; else cout << "NA" << endl; } return 0; }
[]
859,269
859,270
u070471279
cpp