problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k ⌀ | fixed_code stringlengths 12 526k ⌀ | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M ⌀ | fixed_submission_id int64 2 1.54M ⌀ | user_id stringlengths 10 10 ⌀ | language stringclasses 9 values |
|---|---|---|---|---|---|---|---|
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s, a, b;
cin >> s;
a = s / 100;
b = s % 100;
if (a > 0 && a < 13) {
if (b > 0 && a < 13)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (b > 0 && b < 13)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int s, a, b;
cin >> s;
a = s / 100;
b = s % 100;
if (a > 0 && a < 13) {
if (b > 0 && b < 13)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (b > 0 && b < 13)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 857,967 | 857,968 | u072080927 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int sub(vector<int> array) {
int ans = 0;
for (int i = 0; i < array.size(); i++)
ans = max(ans, array.at(i));
return ans;
}
int main() {
int n;
cin >> n;
bool YYMM = 0 < n / 100 && n / 100 <= 12;
bool MMYY = 0 < n % 100 && n % 100 <= 12;
if (YYMM && MMYY)
cout << "AMBIGUOUS" << endl;
else if (YYMM)
cout << "YYMM" << endl;
else if (MMYY)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int sub(vector<int> array) {
int ans = 0;
for (int i = 0; i < array.size(); i++)
ans = max(ans, array.at(i));
return ans;
}
int main() {
int n;
cin >> n;
bool MMYY = 0 < n / 100 && n / 100 <= 12;
bool YYMM = 0 < n % 100 && n % 100 <= 12;
if (YYMM && MMYY)
cout << "AMBIGUOUS" << endl;
else if (YYMM)
cout << "YYMM" << endl;
else if (MMYY)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | [
"variable_declaration.name.change",
"identifier.change"
] | 857,981 | 857,982 | u288432959 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
int pre, end;
pre = (s[0] - '0') * 10 + s[1] - '0';
end = (s[2] - '0') * 10 + s[3] - '0';
if ((end >= 1 && end <= 12) && (pre >= 1 && pre <= 12))
cout << "AMBIGUOUS" << endl;
else if (end >= 1 && end <= 1)
cout << "YYMM" << endl;
else if (pre >= 1 && pre <= 12)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
int pre, end;
pre = (s[0] - '0') * 10 + s[1] - '0';
end = (s[2] - '0') * 10 + s[3] - '0';
if ((end >= 1 && end <= 12) && (pre >= 1 && pre <= 12))
cout << "AMBIGUOUS" << endl;
else if (end >= 1 && end <= 12)
cout << "YYMM" << endl;
else if (pre >= 1 && pre <= 12)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 857,991 | 857,992 | u471144507 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <math.h>
#include <queue>
#include <string.h>
#include <string>
#include <vector>
#define ll long long
#define ull unsigned long long
using namespace std;
const long long mod = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
char s[4];
for (int i = 0; i < 4; ++i) {
cin >> s[i];
}
int first = (int)(s[0] - '0') * 10 + (s[1] - '0');
int second = (int)(s[2] - '0') * 10 + (s[3] - '0');
if (first == 0 || first > 12) {
if (second == 0 || second > 12)
cout << "NA"
<< "\n";
else
cout << "YYMM"
<< "\n";
} else {
if (second == 0 || second > 12)
cout << "MMYY"
<< "\n";
else
cout << "AMBIGOUS"
<< "\n";
}
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <math.h>
#include <queue>
#include <string.h>
#include <string>
#include <vector>
#define ll long long
#define ull unsigned long long
using namespace std;
const long long mod = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
char s[4];
for (int i = 0; i < 4; ++i) {
cin >> s[i];
}
int first = (int)(s[0] - '0') * 10 + (s[1] - '0');
int second = (int)(s[2] - '0') * 10 + (s[3] - '0');
if (first == 0 || first > 12) {
if (second == 0 || second > 12)
cout << "NA"
<< "\n";
else
cout << "YYMM"
<< "\n";
} else {
if (second == 0 || second > 12)
cout << "MMYY"
<< "\n";
else
cout << "AMBIGUOUS"
<< "\n";
}
} | [
"literal.string.change",
"io.output.change"
] | 857,995 | 857,996 | u020230257 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int y = (s[0] - '0') * 10 + (s[1] - '0');
int m = (s[2] - '0') * 10 + (s[3] - '0');
if ((m < 1 || m > 12) && (y < 1 || y > 12))
cout << "NA";
else if ((m > 0 || m < 13) && (y < 1 || y > 12))
cout << "YYMM";
else if ((y > 0 || y < 13) && (m < 1 || m > 12))
cout << "MMYY";
else
cout << "AMBIGOUS";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int y = (s[0] - '0') * 10 + (s[1] - '0');
int m = (s[2] - '0') * 10 + (s[3] - '0');
if ((m < 1 || m > 12) && (y < 1 || y > 12))
cout << "NA";
else if ((m > 0 || m < 13) && (y < 1 || y > 12))
cout << "YYMM";
else if ((y > 0 || y < 13) && (m < 1 || m > 12))
cout << "MMYY";
else
cout << "AMBIGUOUS";
}
| [
"literal.string.change",
"io.output.change"
] | 857,997 | 857,998 | u383681712 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include <set>
#include <string>
#include <vector>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <tuple>
#include <utility>
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define vll vector<ll>
#define vi vector<int>
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define mod 1000000007
using namespace std;
int main() {
string s;
cin >> s;
string a = {s[0], s[1]};
string b = {s[2], s[3]};
if (1 <= atoi(a.c_str()) and atoi(a.c_str()) <= 12) {
if (1 <= atoi(b.c_str()) and atoi(b.c_str()) <= 12) {
cout << "AMBIGUOUS";
} else {
cout << "YYMM";
}
} else {
if (1 <= atoi(b.c_str()) and atoi(b.c_str()) <= 12) {
cout << "MMYY";
} else {
cout << "NA";
}
}
return 0;
}
| #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include <set>
#include <string>
#include <vector>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <tuple>
#include <utility>
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define vll vector<ll>
#define vi vector<int>
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define mod 1000000007
using namespace std;
int main() {
string s;
cin >> s;
string a = {s[0], s[1]};
string b = {s[2], s[3]};
if (1 <= atoi(a.c_str()) and atoi(a.c_str()) <= 12) {
if (1 <= atoi(b.c_str()) and atoi(b.c_str()) <= 12) {
cout << "AMBIGUOUS";
} else {
cout << "MMYY";
}
} else {
if (1 <= atoi(b.c_str()) and atoi(b.c_str()) <= 12) {
cout << "YYMM";
} else {
cout << "NA";
}
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 857,999 | 858,000 | u667375816 | cpp |
p03042 | #include <iostream>
using namespace std;
main() {
string s;
int a, b;
cin >> s;
a = (s[0] ^ 48) * 10 + (s[1] ^ 48);
b = (s[2] ^ 48) * 10 + (s[3] ^ 48);
;
if ((0 < a && a <= 12) && (0 < b && a <= 12)) {
printf("AMBIGUOUS\n");
} else if (0 < b && b <= 12) {
printf("YYMM\n");
} else if (0 < a && a <= 12) {
printf("MMYY\n");
} else {
printf("NA\n");
}
return 0;
} | #include <iostream>
using namespace std;
main() {
string s;
int a, b;
cin >> s;
a = (s[0] ^ 48) * 10 + (s[1] ^ 48);
b = (s[2] ^ 48) * 10 + (s[3] ^ 48);
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
printf("AMBIGUOUS\n");
} else if (0 < b && b <= 12) {
printf("YYMM\n");
} else if (0 < a && a <= 12) {
printf("MMYY\n");
} else {
printf("NA\n");
}
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 858,001 | 858,002 | u468811760 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int s;
cin >> s;
int l = s / 100, r = s % 100;
bool is_yymm = 1 <= r && r <= 12;
bool is_mmyy = 1 <= l && l <= 12;
if (is_yymm && is_mmyy)
cout << "AMBIGUOUS" << endl;
else if (is_yymm)
cout << "YYMM" << endl;
else if (is_yymm)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int s;
cin >> s;
int l = s / 100, r = s % 100;
bool is_yymm = 1 <= r && r <= 12;
bool is_mmyy = 1 <= l && l <= 12;
if (is_yymm && is_mmyy)
cout << "AMBIGUOUS" << endl;
else if (is_yymm)
cout << "YYMM" << endl;
else if (is_mmyy)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 858,008 | 858,009 | u237022500 | cpp |
p03042 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int i[3][110000];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a = 0, b, c, d = 0, e = 0, f, g;
string s;
cin >> c;
a = c / 100, b = c % 100;
if (a <= 12 && a > 0) {
if (b <= 12 && b > 0)
cout << "AMBIIGUOUS\n";
else
cout << "MMYY\n";
} else {
if (b <= 12 && b > 0)
cout << "YYMM\n";
else
cout << "NA\n";
}
return (0);
}
| #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int i[3][110000];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a = 0, b, c, d = 0, e = 0, f, g;
string s;
cin >> c;
a = c / 100, b = c % 100;
if (a <= 12 && a > 0) {
if (b <= 12 && b > 0)
cout << "AMBIGUOUS\n";
else
cout << "MMYY\n";
} else {
if (b <= 12 && b > 0)
cout << "YYMM\n";
else
cout << "NA\n";
}
return (0);
}
| [
"literal.string.change",
"io.output.change"
] | 858,022 | 858,023 | u331081465 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define MAX 300000
typedef long long ll;
typedef pair<ll, int> P;
int main() {
int S, up, down, hup, hdown;
cin >> S;
up = S / 100;
down = S % 100;
hup = up <= 12 && 1 <= up;
hdown = down <= 12 && 1 <= hdown;
if (hdown != 0 && hup != 0)
cout << "AMBIGUOUS" << endl;
else if (hdown != 0)
cout << "YYMM" << endl;
else if (hup != 0)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
}
| #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define MAX 300000
typedef long long ll;
typedef pair<ll, int> P;
int main() {
int S, up, down, hup, hdown;
cin >> S;
up = S / 100;
down = S % 100;
hup = up <= 12 && 1 <= up;
hdown = down <= 12 && 1 <= down;
if (hdown != 0 && hup != 0)
cout << "AMBIGUOUS" << endl;
else if (hdown != 0)
cout << "YYMM" << endl;
else if (hup != 0)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
}
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 858,028 | 858,029 | u591914971 | cpp |
p03042 | #include <iostream>
using namespace std;
int main() {
int s;
cin >> s;
bool flag1 = false, flag2 = false;
int s1 = s / 100, s2 = s % 100;
if (1 <= s1 && s1 <= 12) {
flag1 = true;
}
if (1 <= s2 && s2 <= 12) {
flag2 = true;
}
if (flag1 == true && flag1 == true) {
cout << "AMBIGUOUS" << endl;
} else if (flag2) {
cout << "YYMM" << endl;
} else if (flag1) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int s;
cin >> s;
bool flag1 = false, flag2 = false;
int s1 = s / 100, s2 = s % 100;
if (1 <= s1 && s1 <= 12) {
flag1 = true;
}
if (1 <= s2 && s2 <= 12) {
flag2 = true;
}
if (flag1 == true && flag2 == true) {
cout << "AMBIGUOUS" << endl;
} else if (flag2) {
cout << "YYMM" << endl;
} else if (flag1) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 858,030 | 858,031 | u185037583 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
bool flag1 = 0, flag2 = 0;
if (S.at(0) == '0' && S.at(0) != '0')
flag1 = 1;
else if (S.at(0) == '1') {
if ('0' <= S.at(1) && S.at(1) <= '2')
flag1 = 1;
}
if (S.at(2) == '0' && S.at(2) != '0')
flag2 = 1;
else if (S.at(2) == '1') {
if ('0' <= S.at(3) && S.at(3) <= '2')
flag2 = 1;
}
if (flag1 && flag2)
cout << "AMBIGUOUS" << endl;
else if (flag1 && !flag2)
cout << "MMYY" << endl;
else if (flag2)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
bool flag1 = 0, flag2 = 0;
if (S.at(0) == '0' && S.at(1) != '0')
flag1 = 1;
else if (S.at(0) == '1') {
if ('0' <= S.at(1) && S.at(1) <= '2')
flag1 = 1;
}
if (S.at(2) == '0' && S.at(3) != '0')
flag2 = 1;
else if (S.at(2) == '1') {
if ('0' <= S.at(3) && S.at(3) <= '2')
flag2 = 1;
}
if (flag1 && flag2)
cout << "AMBIGUOUS" << endl;
else if (flag1 && !flag2)
cout << "MMYY" << endl;
else if (flag2)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 858,049 | 858,050 | u347057617 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define RANGE(i, a, b) for (int i = (a); i <= (b); i++)
#define RANGER(i, a, b) for (int i = (b); i >= (a); i++)
#define REP(i, n) FOR(i, 0, n)
#define REPR(i, n) FORR(i, 0, n)
using ll = long long int;
using vi = vector<int>;
using vii = vector<vi>;
using pi = pair<int, int>;
constexpr int INF = 1 << 30;
constexpr ll INTL = 1ll << 60;
int main() {
string S;
cin >> S;
int f, s;
f = stoi(S.substr(0, 2));
s = stoi(S.substr(2, 2));
if (0 < f && f <= 12 && 0 < s && s <= 12) {
cout << "AMBIGOUS" << endl;
} else if (0 < f && f <= 12) {
cout << "MMYY" << endl;
} else if (0 < s && s <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define RANGE(i, a, b) for (int i = (a); i <= (b); i++)
#define RANGER(i, a, b) for (int i = (b); i >= (a); i++)
#define REP(i, n) FOR(i, 0, n)
#define REPR(i, n) FORR(i, 0, n)
using ll = long long int;
using vi = vector<int>;
using vii = vector<vi>;
using pi = pair<int, int>;
constexpr int INF = 1 << 30;
constexpr ll INTL = 1ll << 60;
int main() {
string S;
cin >> S;
int f, s;
f = stoi(S.substr(0, 2));
s = stoi(S.substr(2, 2));
if (0 < f && f <= 12 && 0 < s && s <= 12) {
cout << "AMBIGUOUS" << endl;
} else if (0 < f && f <= 12) {
cout << "MMYY" << endl;
} else if (0 < s && s <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 858,057 | 858,058 | u891876603 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s, a = 0, b = 0;
cin >> s;
if (s / 100 > 0 && s / 100 <= 12)
a = 1;
if (s - (s / 100) * 100 > 0 && s - (s / 100) * 100 <= 12)
b = 1;
if (b == 1 && a == 1)
cout << "AMBIGUOUS";
else if (a + b == 0)
cout << "NO";
else if (a == 1)
cout << "MMYY";
else if (b == 1)
cout << "YYMM";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s, a = 0, b = 0;
cin >> s;
if (s / 100 > 0 && s / 100 <= 12)
a = 1;
if (s - (s / 100) * 100 > 0 && s - (s / 100) * 100 <= 12)
b = 1;
if (b == 1 && a == 1)
cout << "AMBIGUOUS";
else if (a + b == 0)
cout << "NA";
else if (a == 1)
cout << "MMYY";
else if (b == 1)
cout << "YYMM";
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 858,059 | 858,060 | u621527413 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int l = s / 100;
int r = s % 100;
if (l >= 1 || l <= 12) {
if (r > 12 && r == 0) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
} else {
if (r > 12 || r == 0) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int l = s / 100;
int r = s % 100;
if (l >= 1 && l <= 12) {
if (r > 12 || r == 0) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
} else {
if (r > 12 || r == 0) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
}
}
| [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 858,066 | 858,067 | u796877631 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int l = s / 100;
int r = s % 100;
if (l >= 1 || l <= 12) {
if (r > 12 || r == 0) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
} else {
if (r > 12 || r == 0) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int l = s / 100;
int r = s % 100;
if (l >= 1 && l <= 12) {
if (r > 12 || r == 0) {
cout << "MMYY" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
} else {
if (r > 12 || r == 0) {
cout << "NA" << endl;
} else {
cout << "YYMM" << endl;
}
}
}
| [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 858,068 | 858,067 | u796877631 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string s1 = s.substr(0, 2), s2 = s.substr(2, 2);
int zero = '0';
int n = ((int)s1[0] - zero) * 10 + ((int)s1[1] - zero);
int m = ((int)s2[0] - zero) * 10 + ((int)s2[1] - zero);
// cout<<n<<endl<<m<<endl;
if ((n <= 12 && n >= 1) && (m <= 12 && m >= 1))
cout << "AMBIGUOS";
else if ((!(n <= 12 && n >= 1) && !(m <= 12 && m >= 1)))
cout << "NA";
else if (n <= 12 && n >= 1)
cout << "MMYY";
else if (m <= 12 && m >= 1)
cout << "YYMM";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string s1 = s.substr(0, 2), s2 = s.substr(2, 2);
int zero = '0';
int n = ((int)s1[0] - zero) * 10 + ((int)s1[1] - zero);
int m = ((int)s2[0] - zero) * 10 + ((int)s2[1] - zero);
// cout<<n<<endl<<m<<endl;
if ((n <= 12 && n >= 1) && (m <= 12 && m >= 1))
cout << "AMBIGUOUS";
else if ((!(n <= 12 && n >= 1) && !(m <= 12 && m >= 1)))
cout << "NA";
else if (n <= 12 && n >= 1)
cout << "MMYY";
else if (m <= 12 && m >= 1)
cout << "YYMM";
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 858,069 | 858,070 | u844640682 | cpp |
p03042 | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
typedef long l;
typedef pair<int, int> P;
const ll INF = 100000000000000001;
const double PI = 3.141592653589;
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 > 12 || a == 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;
}
| #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
typedef long l;
typedef pair<int, int> P;
const ll INF = 100000000000000001;
const double PI = 3.141592653589;
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 > 12 || a == 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;
}
| [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 858,080 | 858,081 | u634999820 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12)
cout << "AMBIGUOUOS" << endl;
else
cout << "MMYY" << endl;
} else {
if (R >= 1 && R <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (R >= 1 && R <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 858,094 | 858,095 | u297195722 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12)
cout << "AMBIGOUOS" << endl;
else
cout << "YYMM" << endl;
} else {
if (R >= 1 && R <= 12)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (R >= 1 && R <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 858,096 | 858,095 | u297195722 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << #x " = " << (x) << endl
using vint = vector<int>;
using vvint = vector<vint>;
using pint = pair<int, int>;
using vpint = vector<pint>;
template <typename T>
using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>;
constexpr double pi = 3.1415926535897932384626433832795028L;
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int gcd(int a, int b) {
while (b) {
swap(a %= b, b);
}
return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
template <typename T> void fin(T mes) {
cout << mes << endl;
exit(0);
}
template <typename T1, typename T2> bool chmax(T1 &a, const T2 &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T1, typename T2> bool chmin(T1 &a, const T2 &b) {
if (b < a) {
a = b;
return true;
}
return false;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &rhs) {
os << "(" << rhs.first << ", " << rhs.second << ")";
return os;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &rhs) {
os << "{";
for (auto itr = rhs.begin(); itr != rhs.end(); itr++) {
os << *itr << (next(itr) != rhs.end() ? ", " : "");
}
os << "}";
return os;
}
struct setup {
static constexpr int PREC = 20;
setup() {
cout << fixed << setprecision(PREC);
cerr << fixed << setprecision(PREC);
};
} setup;
string S;
signed main() {
cin >> S;
bool f1 = (S[0] == '0' && S[1] != '0' ||
S[0] == '1' && (S[1] == '0' || S[1] == '1' || S[1] == '2'));
bool f2 = (S[2] == '0' && S[3] != '0' ||
S[2] == '1' && (S[3] == '0' || S[3] == '1' || S[3] == '2'));
if (f1 && f2) {
cout << "ANBIGUOUS" << endl;
}
if (!f1 && f2) {
cout << "YYMM" << endl;
}
if (f1 && !f2) {
cout << "MMYY" << endl;
}
if (!f1 && !f2) {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define dump(x) cerr << #x " = " << (x) << endl
using vint = vector<int>;
using vvint = vector<vint>;
using pint = pair<int, int>;
using vpint = vector<pint>;
template <typename T>
using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>;
constexpr double pi = 3.1415926535897932384626433832795028L;
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int gcd(int a, int b) {
while (b) {
swap(a %= b, b);
}
return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
template <typename T> void fin(T mes) {
cout << mes << endl;
exit(0);
}
template <typename T1, typename T2> bool chmax(T1 &a, const T2 &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T1, typename T2> bool chmin(T1 &a, const T2 &b) {
if (b < a) {
a = b;
return true;
}
return false;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &rhs) {
os << "(" << rhs.first << ", " << rhs.second << ")";
return os;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &rhs) {
os << "{";
for (auto itr = rhs.begin(); itr != rhs.end(); itr++) {
os << *itr << (next(itr) != rhs.end() ? ", " : "");
}
os << "}";
return os;
}
struct setup {
static constexpr int PREC = 20;
setup() {
cout << fixed << setprecision(PREC);
cerr << fixed << setprecision(PREC);
};
} setup;
string S;
signed main() {
cin >> S;
bool f1 = (S[0] == '0' && S[1] != '0' ||
S[0] == '1' && (S[1] == '0' || S[1] == '1' || S[1] == '2'));
bool f2 = (S[2] == '0' && S[3] != '0' ||
S[2] == '1' && (S[3] == '0' || S[3] == '1' || S[3] == '2'));
if (f1 && f2) {
cout << "AMBIGUOUS" << endl;
}
if (!f1 && f2) {
cout << "YYMM" << endl;
}
if (f1 && !f2) {
cout << "MMYY" << endl;
}
if (!f1 && !f2) {
cout << "NA" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 858,099 | 858,100 | u450832845 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int m, y;
cin >> s;
string s1 = s.substr(0, 2);
string s2 = s.substr(2, 2);
m = atoi(s1.c_str());
y = atoi(s2.c_str());
if ((m == 0 or m > 12) and (y > 0 and y < 12)) {
cout << "YYMM" << endl;
} else if ((y == 0 or y > 12) and (m > 0 and m < 12)) {
cout << "MMYY" << endl;
} else if ((m < 1 or m > 12) and (y < 1 or y > 12)) {
cout << "NA" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int m, y;
cin >> s;
string s1 = s.substr(0, 2);
string s2 = s.substr(2, 2);
m = atoi(s1.c_str());
y = atoi(s2.c_str());
if ((m == 0 or m > 12) and (y > 0 and y <= 12)) {
cout << "YYMM" << endl;
} else if ((y == 0 or y > 12) and (m > 0 and m <= 12)) {
cout << "MMYY" << endl;
} else if ((m < 1 or m > 12) and (y < 1 or y > 12)) {
cout << "NA" << endl;
} else {
cout << "AMBIGUOUS" << endl;
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,101 | 858,102 | u798678713 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int isMon(string s) {
if (s[0] == '0') {
if (s[1] == '0')
return 0;
return 1;
}
if (s[1] == '1') {
if (s[1] == '0' || s[1] == '1' || s[1] == '2')
return 1;
return 0;
}
return 0;
}
int main() {
string s;
cin >> s;
if (isMon(s.substr(0, 2)) && isMon(s.substr(2))) {
cout << "AMBIGUOUS";
return 0;
}
if (!isMon(s.substr(0, 2)) && isMon(s.substr(2))) {
cout << "YYMM";
return 0;
}
if (isMon(s.substr(0, 2)) && !isMon(s.substr(2))) {
cout << "MMYY";
return 0;
}
cout << "NA";
} | #include <bits/stdc++.h>
using namespace std;
int isMon(string s) {
if (s[0] == '0') {
if (s[1] == '0')
return 0;
return 1;
}
if (s[0] == '1') {
if (s[1] == '0' || s[1] == '1' || s[1] == '2')
return 1;
return 0;
}
return 0;
}
int main() {
string s;
cin >> s;
if (isMon(s.substr(0, 2)) && isMon(s.substr(2))) {
cout << "AMBIGUOUS";
return 0;
}
if (!isMon(s.substr(0, 2)) && isMon(s.substr(2))) {
cout << "YYMM";
return 0;
}
if (isMon(s.substr(0, 2)) && !isMon(s.substr(2))) {
cout << "MMYY";
return 0;
}
cout << "NA";
} | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 858,111 | 858,112 | u952130512 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
#define INF 1001001001
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
using namespace std;
int main() {
int s;
cin >> s;
int first = s / 100, latter = s % 100;
if (1 <= first && first <= 12) {
if (1 <= latter && latter <= 12) {
cout << "AMBIGUOS" << endl;
return 0;
} else {
cout << "MMYY" << endl;
return 0;
}
} else {
if (1 <= latter && latter <= 12) {
cout << "YYMM" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
}
}
| #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
#define INF 1001001001
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
using namespace std;
int main() {
int s;
cin >> s;
int first = s / 100, latter = s % 100;
if (1 <= first && first <= 12) {
if (1 <= latter && latter <= 12) {
cout << "AMBIGUOUS" << endl;
return 0;
} else {
cout << "MMYY" << endl;
return 0;
}
} else {
if (1 <= latter && latter <= 12) {
cout << "YYMM" << endl;
return 0;
} else {
cout << "NA" << endl;
return 0;
}
}
}
| [
"literal.string.change",
"io.output.change"
] | 858,113 | 858,114 | u971166345 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int a, ua, da;
istringstream ss;
cin >> s;
ss = istringstream(s);
ss >> a;
ua = a / 100;
da = a % 100;
if ((ua >= 0 && ua < 100 && da > 0 && da < 13) &&
(ua > 0 && ua < 13 && da >= 0 && da < 100)) {
cout << "AMBIGUOUS" << endl;
} else if ((ua >= 0 && ua < 100 && da > 0 && da < 13)) {
cout << "MMYY" << endl;
} else if ((ua > 0 && ua < 13 && da >= 0 && da < 100)) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int a, ua, da;
istringstream ss;
cin >> s;
ss = istringstream(s);
ss >> a;
ua = a / 100;
da = a % 100;
if ((ua >= 0 && ua < 100 && da > 0 && da < 13) &&
(ua > 0 && ua < 13 && da >= 0 && da < 100)) {
cout << "AMBIGUOUS" << endl;
} else if ((ua >= 0 && ua < 100 && da > 0 && da < 13)) {
cout << "YYMM" << endl;
} else if ((ua > 0 && ua < 13 && da >= 0 && da < 100)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
} | [
"literal.string.change",
"io.output.change"
] | 858,130 | 858,131 | u663775885 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s, yy, mm, y, m;
cin >> s;
y = m = 0;
yy = s / 100;
mm = s % 100;
if (mm > 0 && mm <= 12) {
y = 1;
}
if (yy > 0 && yy <= 12) {
m = 1;
}
if (y == 1 && m == 1) {
cout << "AMBIGUOUS" << endl;
} else if (m == 1) {
cout << "YYMM" << endl;
} else if (y == 1) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int s, yy, mm, y, m;
cin >> s;
y = m = 0;
yy = s / 100;
mm = s % 100;
if (mm > 0 && mm <= 12) {
m = 1;
}
if (yy > 0 && yy <= 12) {
y = 1;
}
if (y == 1 && m == 1) {
cout << "AMBIGUOUS" << endl;
} else if (m == 1) {
cout << "YYMM" << endl;
} else if (y == 1) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
| [
"assignment.variable.change",
"identifier.change"
] | 858,132 | 858,133 | u144029820 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N % 100;
int b = (b - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
} else if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
} else if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N % 100;
int b = (N - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
} else if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
} else if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"identifier.change",
"expression.operation.binary.change"
] | 858,134 | 858,135 | u387371565 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N % 100;
int b = (b - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
}
if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
}
if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N % 100;
int b = (N - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
} else if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
} else if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"identifier.change",
"expression.operation.binary.change",
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 858,136 | 858,135 | u387371565 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N / 100;
int b = (b - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
}
if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "MMYY" << endl;
}
if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N % 100;
int b = (N - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
} else if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
} else if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"expression.operator.arithmetic.change",
"expression.operation.binary.change",
"identifier.change",
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove",
"literal.string.change",
"io.output.change"
] | 858,137 | 858,135 | u387371565 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N / 100;
int b = (N - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
} else if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
} else if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N % 100;
int b = (N - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
} else if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
} else if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 858,138 | 858,135 | u387371565 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N / 100;
int b = (b - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
}
if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
}
if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int a = N % 100;
int b = (N - a) / 100;
if ((0 < a && a <= 12) && (0 < b && b <= 12)) {
cout << "AMBIGUOUS" << endl;
} else if ((0 < a && a <= 12) && (0 == b || b > 12)) {
cout << "YYMM" << endl;
} else if ((0 < b && b <= 12) && (0 == a || a > 12)) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"expression.operator.arithmetic.change",
"expression.operation.binary.change",
"identifier.change",
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 858,139 | 858,135 | u387371565 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int m, u;
m = s / 100;
u = s % 100;
if (m <= 12 && m > 0) {
if (u <= 12 && u > 0) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (u <= 12 && u > 0) {
cout << "YYMM" << endl;
} else {
cout << "NO" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int m, u;
m = s / 100;
u = s % 100;
if (m <= 12 && m > 0) {
if (u <= 12 && u > 0) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (u <= 12 && u > 0) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
| [
"literal.string.change",
"io.output.change"
] | 858,160 | 858,161 | u768638812 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
void ABC126B() {
string S;
cin >> S;
int a = stoi(S.substr(0, 2));
int b = stoi(S.substr(2, 2));
bool a1 = false;
bool b1 = false;
if (0 <= a && a <= 12) {
a1 = true;
}
if (0 <= b && b <= 12) {
b1 = true;
}
if (a1 && b1) {
cout << "AMBIGUOUS" << endl;
}
if (a1 && !b1) {
cout << "MMYY" << endl;
}
if (!a1 && b1) {
cout << "YYMM" << endl;
}
if (!a1 && !b1) {
cout << "NA" << endl;
}
}
int main() {
ABC126B();
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
void ABC126B() {
string S;
cin >> S;
int a = stoi(S.substr(0, 2));
int b = stoi(S.substr(2, 2));
bool a1 = false;
bool b1 = false;
if (0 < a && a <= 12) {
a1 = true;
}
if (0 < b && b <= 12) {
b1 = true;
}
if (a1 && b1) {
cout << "AMBIGUOUS" << endl;
}
if (a1 && !b1) {
cout << "MMYY" << endl;
}
if (!a1 && b1) {
cout << "YYMM" << endl;
}
if (!a1 && !b1) {
cout << "NA" << endl;
}
}
int main() {
ABC126B();
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,162 | 858,163 | u227117171 | cpp |
p03042 | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
typedef long long ll;
#define PB push_back
#define FOR(n) for (int i = 0; i < n; ++i)
#define RFOR(n) for (int i = n; i >= 0; --i)
#define FORR(start, end) for (int i = start; i < end; ++i)
#define COUT(n) cout << n << " " << flush
#define vi(v) vector<int> v
#define vii(v) vector<pair<int, int>> v
#define mkp(a, b) make_pair(a, b)
#define ALL(obj) obj.begin(), obj.end()
using namespace std;
int main() {
int s;
cin >> s;
int f = s / 100;
int se = s % 100;
if (1 <= f && f <= 12) {
if (1 <= se && se <= 12)
cout << "AMBIGOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= se && se <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
typedef long long ll;
#define PB push_back
#define FOR(n) for (int i = 0; i < n; ++i)
#define RFOR(n) for (int i = n; i >= 0; --i)
#define FORR(start, end) for (int i = start; i < end; ++i)
#define COUT(n) cout << n << " " << flush
#define vi(v) vector<int> v
#define vii(v) vector<pair<int, int>> v
#define mkp(a, b) make_pair(a, b)
#define ALL(obj) obj.begin(), obj.end()
using namespace std;
int main() {
int s;
cin >> s;
int f = s / 100;
int se = s % 100;
if (1 <= f && f <= 12) {
if (1 <= se && se <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= se && se <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 858,173 | 858,174 | u273004731 | cpp |
p03042 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int S;
cin >> S;
int A = S / 100;
int B = S % 100;
if (A = 0)
A = 100;
if (B = 0)
B = 100;
if (A <= 12 && B <= 12)
cout << "AMBIGUOUS" << endl;
else if (A > 12 && B <= 12)
cout << "YYMM" << endl;
else if (A <= 12 && B > 12)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int S;
cin >> S;
int A = S / 100;
int B = S % 100;
if (A == 0)
A = 100;
if (B == 0)
B = 100;
if (A <= 12 && B <= 12)
cout << "AMBIGUOUS" << endl;
else if (A > 12 && B <= 12)
cout << "YYMM" << endl;
else if (A <= 12 && B > 12)
cout << "MMYY" << endl;
else
cout << "NA" << endl;
} | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 858,189 | 858,190 | u127314985 | cpp |
p03042 | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL << 60)
#define D double
#define fs first
#define sc second
#define int long long
#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) RFOR(i, 0, (n))
#define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i, a, b) ((a) <= (i) && (i) < (b))
#define debug(x) cout << #x << " = " << (x) << endl;
#define SP << " " <<
typedef pair<int, int> P;
typedef vector<int> vec;
typedef vector<vector<int>> mat;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
string s1 = s.substr(0, 2);
string s2 = s.substr(2, 2);
bool YYMM = false;
bool MMYY = false;
if (s1 <= "12" && s1 >= "01") {
MMYY = true;
}
if (s2 <= "12" && s2 >= "01") {
YYMM = true;
}
if (YYMM && MMYY) {
cout << "AMBIGOUS" << endl;
} else if (YYMM) {
cout << "YYMM" << endl;
} else if (MMYY) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL << 60)
#define D double
#define fs first
#define sc second
#define int long long
#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) RFOR(i, 0, (n))
#define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i, a, b) ((a) <= (i) && (i) < (b))
#define debug(x) cout << #x << " = " << (x) << endl;
#define SP << " " <<
typedef pair<int, int> P;
typedef vector<int> vec;
typedef vector<vector<int>> mat;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
string s1 = s.substr(0, 2);
string s2 = s.substr(2, 2);
bool YYMM = false;
bool MMYY = false;
if (s1 <= "12" && s1 >= "01") {
MMYY = true;
}
if (s2 <= "12" && s2 >= "01") {
YYMM = true;
}
if (YYMM && MMYY) {
cout << "AMBIGUOUS" << endl;
} else if (YYMM) {
cout << "YYMM" << endl;
} else if (MMYY) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 858,191 | 858,192 | u237054088 | cpp |
p03042 | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL << 60)
#define D double
#define fs first
#define sc second
#define int long long
#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) RFOR(i, 0, (n))
#define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i, a, b) ((a) <= (i) && (i) < (b))
#define debug(x) cout << #x << " = " << (x) << endl;
#define SP << " " <<
typedef pair<int, int> P;
typedef vector<int> vec;
typedef vector<vector<int>> mat;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
string s1 = s.substr(0, 2);
string s2 = s.substr(2, 3);
bool YYMM = false;
bool MMYY = false;
if (s1 <= "12" && s1 >= "01") {
MMYY = true;
}
if (s2 <= "12" && s2 >= "01") {
YYMM = true;
}
if (YYMM && MMYY) {
cout << "AMBIGOUS" << endl;
} else if (YYMM) {
cout << "YYMM" << endl;
} else if (MMYY) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL << 60)
#define D double
#define fs first
#define sc second
#define int long long
#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) RFOR(i, 0, (n))
#define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i, a, b) ((a) <= (i) && (i) < (b))
#define debug(x) cout << #x << " = " << (x) << endl;
#define SP << " " <<
typedef pair<int, int> P;
typedef vector<int> vec;
typedef vector<vector<int>> mat;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
string s1 = s.substr(0, 2);
string s2 = s.substr(2, 2);
bool YYMM = false;
bool MMYY = false;
if (s1 <= "12" && s1 >= "01") {
MMYY = true;
}
if (s2 <= "12" && s2 >= "01") {
YYMM = true;
}
if (YYMM && MMYY) {
cout << "AMBIGUOUS" << endl;
} else if (YYMM) {
cout << "YYMM" << endl;
} else if (MMYY) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | [
"literal.number.change",
"call.arguments.change",
"literal.string.change",
"io.output.change"
] | 858,193 | 858,192 | u237054088 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int INF = pow(2, 29);
const int MOD = 1000000007;
int main() {
int S;
cin >> S;
bool x = (S / 100 <= 12 && S / 100 != 0);
bool y = (S % 100 <= 12 && S % 100 != 0);
string result = "NA";
if (x & y)
result = "AMBIGUIOUS";
else if (!x & y)
result = "YYMM";
else if (x & !y)
result = "MMYY";
cout << result << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int INF = pow(2, 29);
const int MOD = 1000000007;
int main() {
int S;
cin >> S;
bool x = (S / 100 <= 12 && S / 100 != 0);
bool y = (S % 100 <= 12 && S % 100 != 0);
string result = "NA";
if (x & y)
result = "AMBIGUOUS";
else if (!x & y)
result = "YYMM";
else if (x & !y)
result = "MMYY";
cout << result << endl;
return 0;
} | [
"literal.string.change",
"assignment.value.change"
] | 858,204 | 858,205 | u680707192 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
int flag1, flag2;
int a = (S[0] - '0') * 10 + (S[1] - '0');
int b = (S[2] - '0') * 10 + (S[3] - '0');
if (0 < a && a <= 12)
flag1 = 1;
else
flag1 = 0;
if (0 < b && b <= 12)
flag2 = 1;
else
flag2 = 0;
if (flag1 == 0 && flag2 == 1)
cout << "YYMM";
else if (flag1 == 1 && flag2 == 0)
cout << "MMYY";
else if (flag1 == 1 && flag2 == 1)
cout << "AMBIGOUS";
else
cout << "NA";
return 0;
} | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
int flag1, flag2;
int a = (S[0] - '0') * 10 + (S[1] - '0');
int b = (S[2] - '0') * 10 + (S[3] - '0');
if (0 < a && a <= 12)
flag1 = 1;
else
flag1 = 0;
if (0 < b && b <= 12)
flag2 = 1;
else
flag2 = 0;
if (flag1 == 0 && flag2 == 1)
cout << "YYMM";
else if (flag1 == 1 && flag2 == 0)
cout << "MMYY";
else if (flag1 == 1 && flag2 == 1)
cout << "AMBIGUOUS";
else
cout << "NA";
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 858,206 | 858,207 | u227379863 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
int flag1, flag2;
int a = (S[0] - '0') * 10 + (S[1] - '0');
int b = (S[2] - '0') * 10 + (S[3] - '0');
if (0 < a && a <= 12)
flag1 = 1;
else
;
flag1 = 0;
if (0 < b && b <= 12)
flag2 = 1;
else
;
flag2 = 0;
if (flag1 == 0 && flag2 == 1)
cout << "YYMM";
else if (flag1 == 1 && flag2 == 0)
cout << "MMYY";
else if (flag1 == 1 && flag2 == 1)
cout << "AMBIGOUS";
else
cout << "NA";
return 0;
} | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <sstream>
#include <stack>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
int flag1, flag2;
int a = (S[0] - '0') * 10 + (S[1] - '0');
int b = (S[2] - '0') * 10 + (S[3] - '0');
if (0 < a && a <= 12)
flag1 = 1;
else
flag1 = 0;
if (0 < b && b <= 12)
flag2 = 1;
else
flag2 = 0;
if (flag1 == 0 && flag2 == 1)
cout << "YYMM";
else if (flag1 == 1 && flag2 == 0)
cout << "MMYY";
else if (flag1 == 1 && flag2 == 1)
cout << "AMBIGUOUS";
else
cout << "NA";
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 858,208 | 858,207 | u227379863 | cpp |
p03042 | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define alfc 32
#define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define scin(a) scanf("%d", &a);
#define scdo(a) scanf("%lf", &a);
#define scch(a) scanf("%s", a);
#define anin(a) printf("%d\n", a);
#define ando(a) printf("%lf\n", a);
#define anch(a) printf("%s\n", a);
int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main(void) {
char tosi[4];
scch(tosi) if (tosi[0] == '1' && tosi[1] <= '2' && tosi[1] >= '0' ||
tosi[0] == '0' && tosi[1] != '0') {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("AMBIGUOUS\n");
} else {
printf("MMYY\n");
}
}
else {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("YYMM1\n");
} else {
printf("NA\n");
}
}
return 0;
} | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define alfc 32
#define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define scin(a) scanf("%d", &a);
#define scdo(a) scanf("%lf", &a);
#define scch(a) scanf("%s", a);
#define anin(a) printf("%d\n", a);
#define ando(a) printf("%lf\n", a);
#define anch(a) printf("%s\n", a);
int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main(void) {
char tosi[4];
scch(tosi) if (tosi[0] == '1' && tosi[1] <= '2' && tosi[1] >= '0' ||
tosi[0] == '0' && tosi[1] != '0') {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("AMBIGUOUS\n");
} else {
printf("MMYY\n");
}
}
else {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("YYMM\n");
} else {
printf("NA\n");
}
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 858,212 | 858,213 | u456658814 | cpp |
p03042 | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define alfc 32
#define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define scin(a) scanf("%d", &a);
#define scdo(a) scanf("%lf", &a);
#define scch(a) scanf("%s", a);
#define anin(a) printf("%d\n", a);
#define ando(a) printf("%lf\n", a);
#define anch(a) printf("%s\n", a);
int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main(void) {
char tosi[4];
scch(tosi) if (tosi[0] == '1' && tosi[1] <= '2' && tosi[1] >= '0' ||
tosi[0] == '0' && tosi[1] != '0') {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("AMBIGUOUS\n");
} else {
printf("YYMM\n");
}
}
else {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("MMYY\n");
} else {
printf("NA\n");
}
}
return 0;
} | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define alfc 32
#define rep(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define scin(a) scanf("%d", &a);
#define scdo(a) scanf("%lf", &a);
#define scch(a) scanf("%s", a);
#define anin(a) printf("%d\n", a);
#define ando(a) printf("%lf\n", a);
#define anch(a) printf("%s\n", a);
int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main(void) {
char tosi[4];
scch(tosi) if (tosi[0] == '1' && tosi[1] <= '2' && tosi[1] >= '0' ||
tosi[0] == '0' && tosi[1] != '0') {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("AMBIGUOUS\n");
} else {
printf("MMYY\n");
}
}
else {
if (tosi[2] == '1' && tosi[3] <= '2' && tosi[3] >= '0' ||
tosi[2] == '0' && tosi[3] != '0') {
printf("YYMM\n");
} else {
printf("NA\n");
}
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 858,214 | 858,213 | u456658814 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int a = s / 100; //上2つ
int b = s % 100; //下2つ
bool aRes;
bool bRes;
if (12 >= a && a >= 1) {
aRes = true;
}
if (12 >= b && b >= 1) {
bRes = true;
}
if (aRes && bRes) {
cout << "AMBIGUOUS" << endl;
} else if (aRes || bRes) {
if (aRes) {
cout << "MMYY" << endl;
} else if (bRes) {
cout << "YYMM" << endl;
}
} else {
cout << "NA" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int a = s / 100; //上2つ
int b = s % 100; //下2つ
bool aRes = false;
bool bRes = false;
if (12 >= a && a >= 1) {
aRes = true;
}
if (12 >= b && b >= 1) {
bRes = true;
}
if (aRes && bRes) {
cout << "AMBIGUOUS" << endl;
} else if (aRes || bRes) {
if (aRes) {
cout << "MMYY" << endl;
} else if (bRes) {
cout << "YYMM" << endl;
}
} else {
cout << "NA" << endl;
}
return 0;
} | [
"variable_declaration.value.change"
] | 858,218 | 858,219 | u318027064 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
rep(i, n) { \
ll x; \
cin >> x; \
v.push_back(x); \
}
const ll INF = 99999999999999;
const ll MOD = 1000000007;
int main() {
string s;
cin >> s;
ll num = stoi(s);
ll a = num % 100;
ll b = num / 100;
if (a == 0 || a > 12) {
if (b == 0 || b > 12) {
cout << "NA";
} else {
cout << "YYMM";
}
} else {
if (b == 0 || b > 12) {
cout << "MMYY";
} else {
cout << "AMBIGUOUS";
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
rep(i, n) { \
ll x; \
cin >> x; \
v.push_back(x); \
}
const ll INF = 99999999999999;
const ll MOD = 1000000007;
int main() {
string s;
cin >> s;
ll num = stoi(s);
ll a = num % 100;
ll b = num / 100;
if (a == 0 || a > 12) {
if (b == 0 || b > 12) {
cout << "NA";
} else {
cout << "MMYY";
}
} else {
if (b == 0 || b > 12) {
cout << "YYMM";
} else {
cout << "AMBIGUOUS";
}
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 858,224 | 858,225 | u478997153 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define Int int64_t
void printVec(std::vector<int> &vec) {
std::cout << "";
for (auto it = vec.begin(); it != vec.end(); ++it) {
std::cout << *it << " ";
}
std::cout << std::endl;
}
void printVec1(std::vector<string> &vec) {
std::cout << "";
for (auto it = vec.begin(); it != vec.end(); ++it) {
std::cout << *it << " ";
}
std::cout << std::endl;
}
template <typename T> void remove(std::vector<T> &vector, unsigned int index) {
vector.erase(vector.begin() + index);
}
int main() {
int x;
cin >> x;
int upper, lower;
int uy = 0, um = 0, ly = 0, lm = 0; // mm-yy
upper = x / 100;
lower = x - upper * 100;
if (1 <= upper && upper <= 12) {
um = 1;
}
if (0 <= upper && upper <= 99) {
uy = 1;
}
if (1 <= lower && lower <= 12) {
lm = 1;
}
if (0 <= lower && lower <= 99) {
ly = 1;
}
// cout << upper << " " << lower;
if ((uy == 1 && lm == 1) && (um == 1 && ly == 1)) {
cout << "AMBIGUOUS" << endl;
} else {
if (uy == 1 && lm == 1)
cout << "YYMM" << endl;
if (um == 1 && ly == 1)
cout << "MMYY" << endl;
if ((um == 1 && ly == 0) || (uy == 1 && lm == 0) || (um == 0 && ly == 1) ||
(uy == 0 && lm == 1) || (um == 0 && ly == 0) || (uy == 0 && lm == 0))
cout << "NA" << endl;
}
return 0;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define Int int64_t
void printVec(std::vector<int> &vec) {
std::cout << "";
for (auto it = vec.begin(); it != vec.end(); ++it) {
std::cout << *it << " ";
}
std::cout << std::endl;
}
void printVec1(std::vector<string> &vec) {
std::cout << "";
for (auto it = vec.begin(); it != vec.end(); ++it) {
std::cout << *it << " ";
}
std::cout << std::endl;
}
template <typename T> void remove(std::vector<T> &vector, unsigned int index) {
vector.erase(vector.begin() + index);
}
int main() {
int x;
cin >> x;
int upper, lower;
int uy = 0, um = 0, ly = 0, lm = 0; // mm-yy
upper = x / 100;
lower = x - upper * 100;
if (1 <= upper && upper <= 12) {
um = 1;
}
if (0 <= upper && upper <= 99) {
uy = 1;
}
if (1 <= lower && lower <= 12) {
lm = 1;
}
if (0 <= lower && lower <= 99) {
ly = 1;
}
// cout << upper << " " << lower;
if ((uy == 1 && lm == 1) && (um == 1 && ly == 1)) {
cout << "AMBIGUOUS" << endl;
} else {
if (uy == 1 && lm == 1)
cout << "YYMM" << endl;
else if (um == 1 && ly == 1)
cout << "MMYY" << endl;
else if ((um == 1 && ly == 0) || (uy == 1 && lm == 0) ||
(um == 0 && ly == 1) || (uy == 0 && lm == 1) ||
(um == 0 && ly == 0) || (uy == 0 && lm == 0))
cout << "NA" << endl;
}
return 0;
} | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 858,228 | 858,229 | u565624841 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int i, L, R;
cin >> i;
L = i / 100;
R = i % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (R >= 1 && R <= 12) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int i, L, R;
cin >> i;
L = i / 100;
R = i % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (R >= 1 && R <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
}
| [
"literal.string.change",
"io.output.change"
] | 858,230 | 858,231 | u995485610 | cpp |
p03042 | #include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = {0, 0, 1, -1};
const int c_Dy[4] = {1, -1, 0, 0};
int main() {
int pred;
scanf("%d", &pred);
int up = pred / 100;
int down = pred % 100;
if (up >= 1 && up <= 12 && down >= 1 && down <= 12)
printf("AMBIGOUS");
else if ((up > 12 || up == 0) && (down > 12 || down == 0))
printf("NA");
else if (up > 0 && up <= 12)
printf("MMYY");
else
printf("YYMM");
}
/* 提出前の確認事項
・デバッグ用の関数は<<コメント化>>しているか?
・すべての<<入力例>>は試したか?
・<<限界値分析>>はしたか?
・<<出力の改行>>の有無は確認したか?
↓
<<提出先>>に注意して提出!!
*/
| #include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = {0, 0, 1, -1};
const int c_Dy[4] = {1, -1, 0, 0};
int main() {
int pred;
scanf("%d", &pred);
int up = pred / 100;
int down = pred % 100;
if (up >= 1 && up <= 12 && down >= 1 && down <= 12)
printf("AMBIGUOUS");
else if ((up > 12 || up == 0) && (down > 12 || down == 0))
printf("NA");
else if (up > 0 && up <= 12)
printf("MMYY");
else
printf("YYMM");
}
/* 提出前の確認事項
・デバッグ用の関数は<<コメント化>>しているか?
・すべての<<入力例>>は試したか?
・<<限界値分析>>はしたか?
・<<出力の改行>>の有無は確認したか?
↓
<<提出先>>に注意して提出!!
*/ | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 858,234 | 858,235 | u433195318 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
bool yymm = 0;
bool mmyy = 0;
if (stoi(s.substr(0, 2)) <= 12 && stoi(s.substr(0, 2)) != 0)
mmyy = 1;
if (stoi(s.substr(2, 2)) <= 12 && stoi(s.substr(2, 2)) != 0)
yymm = 1;
if (mmyy & yymm)
cout << "AMBIGOUS" << endl;
if (mmyy & !yymm)
cout << "MMYY" << endl;
if (yymm & !mmyy)
cout << "YYMM" << endl;
if (!yymm & !mmyy)
cout << "NA" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
bool yymm = 0;
bool mmyy = 0;
if (stoi(s.substr(0, 2)) <= 12 && stoi(s.substr(0, 2)) != 0)
mmyy = 1;
if (stoi(s.substr(2, 2)) <= 12 && stoi(s.substr(2, 2)) != 0)
yymm = 1;
if (mmyy & yymm)
cout << "AMBIGUOUS" << endl;
if (mmyy & !yymm)
cout << "MMYY" << endl;
if (yymm & !mmyy)
cout << "YYMM" << endl;
if (!yymm & !mmyy)
cout << "NA" << endl;
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 858,236 | 858,237 | u168860135 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
int s;
cin >> s;
int a = s / 100, b = s % 100;
bool yymm, mmyy;
if (b >= 1 && b <= 12) {
yymm = true;
}
if (a >= 1 && a <= 12) {
mmyy = true;
}
if (yymm && mmyy) {
cout << "AMBIGUOUS" << endl;
} else if (yymm) {
cout << "YYMM" << endl;
} else if (mmyy) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int s;
cin >> s;
int a = s / 100, b = s % 100;
bool yymm = false, mmyy = false;
if (b >= 1 && b <= 12) {
yymm = true;
}
if (a >= 1 && a <= 12) {
mmyy = true;
}
if (yymm && mmyy) {
cout << "AMBIGUOUS" << endl;
} else if (yymm) {
cout << "YYMM" << endl;
} else if (mmyy) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
return 0;
} | [
"variable_declaration.value.change"
] | 858,238 | 858,239 | u167161639 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
char a[4];
int n, k;
int main() {
scanf("%s", a);
int x = (a[0] - '0') * 10 + (a[1] - '0');
int y = (a[2] - '0') * 10 + (a[1] - '0');
if (x > 0 && x <= 12 && y > 0 && y <= 12)
printf("AMBIGUOUS\n");
else if (y <= 12 && y > 0 && x >= 0 && x < 100)
printf("YYMM\n");
else if (x <= 12 && x > 0 && y >= 0 && y < 100)
printf("MMYY\n");
else
printf("NA\n");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
char a[4];
int n, k;
int main() {
scanf("%s", a);
int x = (a[0] - '0') * 10 + (a[1] - '0');
int y = (a[2] - '0') * 10 + (a[3] - '0');
if (x > 0 && x <= 12 && y > 0 && y <= 12)
printf("AMBIGUOUS\n");
else if (y <= 12 && y > 0 && x >= 0 && x < 100)
printf("YYMM\n");
else if (x <= 12 && x > 0 && y >= 0 && y < 100)
printf("MMYY\n");
else
printf("NA\n");
return 0;
}
| [
"literal.number.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 858,240 | 858,241 | u623136228 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int a, b;
a = (str[0] - '0') * 10 + (str[1] - '0');
b = (str[2] - '0') * 10 + (str[3] - '0');
string ans = "";
if (a > 0 && a <= 12 && b > 0 && b <= 12) {
ans = "AMBIGUOUS";
} else if (a > 0 && a <= 12 && b >= 0 && b < 100) {
ans = "MMYY";
} else if (b >= 0 && b <= 12 && a >= 0 && a < 100) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int a, b;
a = (str[0] - '0') * 10 + (str[1] - '0');
b = (str[2] - '0') * 10 + (str[3] - '0');
string ans = "";
if (a > 0 && a <= 12 && b > 0 && b <= 12) {
ans = "AMBIGUOUS";
} else if (a > 0 && a <= 12 && b >= 0 && b < 100) {
ans = "MMYY";
} else if (b > 0 && b <= 12 && a >= 0 && a < 100) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,242 | 858,243 | u863841238 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int a, b;
a = (str[0] - '0') * 10 + (str[1] - '0');
b = (str[2] - '0') * 10 + (str[3] - '0');
string ans = "";
if (a > 0 && a <= 12 && b > 0 && b <= 12) {
ans = "AMBIGUOUS";
} else if (a > 0 && a <= 12 && b >= 0 && b < 100) {
ans = "MMYY";
} else if (b >= 0 && b <= 12 && a > 0 && a < 100) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int a, b;
a = (str[0] - '0') * 10 + (str[1] - '0');
b = (str[2] - '0') * 10 + (str[3] - '0');
string ans = "";
if (a > 0 && a <= 12 && b > 0 && b <= 12) {
ans = "AMBIGUOUS";
} else if (a > 0 && a <= 12 && b >= 0 && b < 100) {
ans = "MMYY";
} else if (b > 0 && b <= 12 && a >= 0 && a < 100) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,244 | 858,243 | u863841238 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int a, b;
a = (str[0] - '0') * 10 + (str[1] - '0');
b = (str[2] - '0') * 10 + (str[3] - '0');
string ans = "";
if (a > 0 && a <= 12 && b > 0 && b <= 12) {
ans = "AMBIGUOUS";
} else if (a > 0 && a <= 12 && b >= 0 && b > 12) {
ans = "MMYY";
} else if (b >= 0 && b <= 12 && a > 0 && a > 12) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int a, b;
a = (str[0] - '0') * 10 + (str[1] - '0');
b = (str[2] - '0') * 10 + (str[3] - '0');
string ans = "";
if (a > 0 && a <= 12 && b > 0 && b <= 12) {
ans = "AMBIGUOUS";
} else if (a > 0 && a <= 12 && b >= 0 && b < 100) {
ans = "MMYY";
} else if (b > 0 && b <= 12 && a >= 0 && a < 100) {
ans = "YYMM";
} else {
ans = "NA";
}
cout << ans << endl;
}
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,245 | 858,243 | u863841238 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int former = std::stoi(S.substr(0, 2));
int latter = std::stoi(S.substr(2, 2));
// cout << former << endl; //test
// cout << latter << endl; //test
if (former == 0) {
//この時点で前者はY確定
if (latter == 0) {
//後者もYはありえない
cout << "NA" << endl;
} else if (latter < 13) {
cout << "YYMM" << endl;
} else {
//後者もYはありえない
cout << "NA" << endl;
}
} else if (former < 13) {
//前者はYかMかわからない
if (latter == 0) {
cout << "MMYY" << endl;
} else if (latter < 13) {
//どちらもありえる
cout << "AMBIGIOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
//この時点で前者はY確定
if (latter == 0) {
//後者もYはありえない
cout << "NA" << endl;
} else if (latter < 13) {
cout << "YYMM" << endl;
} else {
//後者もYはありえない
cout << "NA" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int former = std::stoi(S.substr(0, 2));
int latter = std::stoi(S.substr(2, 2));
// cout << former << endl; //test
// cout << latter << endl; //test
if (former == 0) {
//この時点で前者はY確定
if (latter == 0) {
//後者もYはありえない
cout << "NA" << endl;
} else if (latter < 13) {
cout << "YYMM" << endl;
} else {
//後者もYはありえない
cout << "NA" << endl;
}
} else if (former < 13) {
//前者はYかMかわからない
if (latter == 0) {
cout << "MMYY" << endl;
} else if (latter < 13) {
//どちらもありえる
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
//この時点で前者はY確定
if (latter == 0) {
//後者もYはありえない
cout << "NA" << endl;
} else if (latter < 13) {
cout << "YYMM" << endl;
} else {
//後者もYはありえない
cout << "NA" << endl;
}
}
}
| [
"misc.typo",
"literal.string.change",
"io.output.change"
] | 858,248 | 858,249 | u132364782 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <sstream>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
long long dp[3][100100] = {};
const long long INF = 1LL << 60;
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;
}
long long int a[3][100001];
int main() {
int a, b, c;
cin >> a;
b = a / 100;
c = a - b * 100;
if (0 < b && b <= 12) {
if (0 < c && c <= 12) {
cout << "AMBIGOUS";
} else {
cout << "MMYY";
}
} else {
if (0 < c && c <= 12) {
cout << "YYMM";
} else {
cout << "NA";
}
}
cout << endl;
} | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <sstream>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
long long dp[3][100100] = {};
const long long INF = 1LL << 60;
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;
}
long long int a[3][100001];
int main() {
int a, b, c;
cin >> a;
b = a / 100;
c = a - b * 100;
if (0 < b && b <= 12) {
if (0 < c && c <= 12) {
cout << "AMBIGUOUS";
} else {
cout << "MMYY";
}
} else {
if (0 < c && c <= 12) {
cout << "YYMM";
} else {
cout << "NA";
}
}
cout << endl;
} | [
"literal.string.change",
"io.output.change"
] | 858,260 | 858,261 | u959822889 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s, s1, s2;
cin >> s;
s1 = s / 100;
s2 = s % 100;
bool flag = true;
if (s1 < 12 && s1 > 0)
if (s2 == 0 || s2 > 12) {
cout << "MMYY" << endl;
flag = false;
}
if (s2 < 12 && s2 > 0)
if (s1 == 0 || s1 > 12) {
cout << "YYMM" << endl;
flag = false;
}
if (s1 <= 12 && s1 > 0 && s2 <= 12 && s2 > 0) {
cout << "AMBIGUOUS" << endl;
flag = false;
}
if (flag)
cout << "NA" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s, s1, s2;
cin >> s;
s1 = s / 100;
s2 = s % 100;
bool flag = true;
if (s1 <= 12 && s1 > 0)
if (s2 == 0 || s2 > 12) {
cout << "MMYY" << endl;
flag = false;
}
if (s2 <= 12 && s2 > 0)
if (s1 == 0 || s1 > 12) {
cout << "YYMM" << endl;
flag = false;
}
if (s1 <= 12 && s1 > 0 && s2 <= 12 && s2 > 0) {
cout << "AMBIGUOUS" << endl;
flag = false;
}
if (flag)
cout << "NA" << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,266 | 858,267 | u366115355 | cpp |
p03042 | #include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
string s;
cin >> s;
string a = s.substr(0, 2);
string b = s.substr(2, 2);
int flag = 0;
if (1 <= stoi(a) && stoi(a) <= 12) {
flag |= 0b10;
}
if (1 <= stoi(b) && stoi(b) <= 12) {
flag |= 0b01;
}
if (flag & 0b11 == 0b11) {
cout << "AMBIGUOUS" << endl;
} else if (flag & 0b10) {
cout << "MMYY" << endl;
} else if (flag & 0b01) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | #include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
string s;
cin >> s;
string a = s.substr(0, 2);
string b = s.substr(2, 2);
int flag = 0;
if (1 <= stoi(a) && stoi(a) <= 12) {
flag |= 0b10;
}
if (1 <= stoi(b) && stoi(b) <= 12) {
flag |= 0b01;
}
if ((flag & 0b11) == 0b11) {
cout << "AMBIGUOUS" << endl;
} else if (flag & 0b10) {
cout << "MMYY" << endl;
} else if (flag & 0b01) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | [
"control_flow.branch.if.condition.change"
] | 858,272 | 858,273 | u680087927 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
string S;
cin >> S;
string first = S.substr(0, 2), second = S.substr(2, 2);
int first_num = atoi(first.c_str()), second_num = atoi(second.c_str());
bool first_month = false, second_month = false;
if (1 <= first_num && first_num <= 12) {
first_month = true;
}
if (1 <= second_num && second_num <= 12) {
second_month = true;
}
if (first_month && second_month) {
cout << "AMBIGUOS" << endl;
} else if (first_month) {
cout << "MMYY" << endl;
} else if (second_month) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
string S;
cin >> S;
string first = S.substr(0, 2), second = S.substr(2, 2);
int first_num = atoi(first.c_str()), second_num = atoi(second.c_str());
bool first_month = false, second_month = false;
if (1 <= first_num && first_num <= 12) {
first_month = true;
}
if (1 <= second_num && second_num <= 12) {
second_month = true;
}
if (first_month && second_month) {
cout << "AMBIGUOUS" << endl;
} else if (first_month) {
cout << "MMYY" << endl;
} else if (second_month) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 858,274 | 858,275 | u380928000 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
cout << (s / 100 >= 1 && s / 100 <= 12
? s % 100 >= 1 && s % 100 <= 12 ? "AMBIGIOUS" : "MMYY"
: s % 100 >= 1 && s % 100 <= 12 ? "YYMM"
: "NA");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
cout << (s / 100 >= 1 && s / 100 <= 12
? s % 100 >= 1 && s % 100 <= 12 ? "AMBIGUOUS" : "MMYY"
: s % 100 >= 1 && s % 100 <= 12 ? "YYMM"
: "NA");
return 0;
} | [
"misc.typo",
"literal.string.change",
"io.output.change"
] | 858,287 | 858,288 | u930561195 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, f, n) for (int i = (f); (i) < (f); i++)
int main() {
int target;
cin >> target;
int head = target / 100;
int tail = target % 100;
if (1 <= head && head <= 12) {
if (1 <= tail && tail <= 12) {
cout << "AMBIGUOUS" << endl;
} else
cout << "MMYY" << endl;
} else if (1 <= tail && tail <= tail)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, f, n) for (int i = (f); (i) < (f); i++)
int main() {
int target;
cin >> target;
int head = target / 100;
int tail = target % 100;
if (1 <= head && head <= 12) {
if (1 <= tail && tail <= 12) {
cout << "AMBIGUOUS" << endl;
} else
cout << "MMYY" << endl;
} else if (1 <= tail && tail <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
| [
"identifier.replace.remove",
"literal.replace.add",
"control_flow.branch.if.condition.change"
] | 858,289 | 858,290 | u873269440 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
bool month(int x) { return x >= 0 && x <= 12; }
int main() {
string str;
cin >> str;
bool first = month(stoi(str.substr(0, 2)));
bool second = month(stoi(str.substr(2, 2)));
if (first && second)
cout << "AMBIGUOUS";
else if (first)
cout << "MMYY";
else if (second)
cout << "YYMM";
else
cout << "NA";
cout << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
bool month(int x) { return x >= 1 && x <= 12; }
int main() {
string str;
cin >> str;
bool first = month(stoi(str.substr(0, 2)));
bool second = month(stoi(str.substr(2, 2)));
if (first && second)
cout << "AMBIGUOUS";
else if (first)
cout << "MMYY";
else if (second)
cout << "YYMM";
else
cout << "NA";
cout << endl;
return 0;
}
| [
"literal.number.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 858,298 | 858,299 | u676654593 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int A, B;
A = S / 100;
B = S % 100;
if (1 <= A, A <= 12) {
if (1 <= B, B <= 12) {
cout << "AMBIGUOUS'" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= B, B <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int A, B;
A = S / 100;
B = S % 100;
if (1 <= A && A <= 12) {
if (1 <= B && B <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= B && B <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change"
] | 858,300 | 858,301 | u816390432 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int A, B;
A = S / 100;
B = S % 100;
if (1 <= A, A <= 12) {
if (1 <= B, B <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= B, B <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int A, B;
A = S / 100;
B = S % 100;
if (1 <= A && A <= 12) {
if (1 <= B && B <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= B && B <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"control_flow.branch.if.condition.change"
] | 858,302 | 858,301 | u816390432 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string S;
cin >> S;
// cout << S;
string c12;
c12[0] = S[0];
c12[1] = S[1];
int i12 = stoi(c12);
string c34;
c34[0] = S[3];
c34[1] = S[4];
int i34 = stoi(c34);
if (1 <= i12 && i12 <= 12) {
if (1 <= i34 && i34 <= 12) {
cout << "AMBIGUOUS"
<< "\n";
} else {
cout << "MMYY"
<< "\n";
}
} else {
if (1 <= i34 && i34 <= 12) {
cout << "YYMM"
<< "\n";
} else {
cout << "NA"
<< "\n";
}
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main(void) {
string S;
cin >> S;
// cout << S;
string c12;
c12[0] = S[0];
c12[1] = S[1];
int i12 = stoi(c12);
string c34;
c34[0] = S[2];
c34[1] = S[3];
int i34 = stoi(c34);
if (1 <= i12 && i12 <= 12) {
if (1 <= i34 && i34 <= 12) {
cout << "AMBIGUOUS"
<< "\n";
} else {
cout << "MMYY"
<< "\n";
}
} else {
if (1 <= i34 && i34 <= 12) {
cout << "YYMM"
<< "\n";
} else {
cout << "NA"
<< "\n";
}
}
return 0;
} | [
"literal.number.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 858,303 | 858,304 | u616901930 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int a, b;
a = S / 100;
b = S % 100;
if (1 <= a <= 12) {
if (1 <= b <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= b <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int a, b;
a = S / 100;
b = S % 100;
if (1 <= a && a <= 12) {
if (1 <= b && b <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (1 <= b && b <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
}
| [
"control_flow.branch.if.condition.change"
] | 858,309 | 858,310 | u469953228 | cpp |
p03042 | #include <iostream>
using namespace std;
int main(void) {
int s;
cin >> s;
if (s / 100 >= 1 && s / 100 <= 12) {
if (s % 100 >= 1 && s / 100 <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (s % 100 >= 1 && s % 100 <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main(void) {
int s;
cin >> s;
if (s / 100 >= 1 && s / 100 <= 12) {
if (s % 100 >= 1 && s % 100 <= 12)
cout << "AMBIGUOUS" << endl;
else
cout << "MMYY" << endl;
} else {
if (s % 100 >= 1 && s % 100 <= 12)
cout << "YYMM" << endl;
else
cout << "NA" << endl;
}
return 0;
}
| [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 858,323 | 858,324 | u297477387 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12) {
printf("AMBIGOUS\n");
} else {
printf("MMYY\n");
}
} else {
if (R >= 1 && R <= 12) {
printf("YYMM\n");
} else {
printf("NA\n");
}
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int S;
cin >> S;
int L = S / 100;
int R = S % 100;
if (L >= 1 && L <= 12) {
if (R >= 1 && R <= 12) {
printf("AMBIGUOUS\n");
} else {
printf("MMYY\n");
}
} else {
if (R >= 1 && R <= 12) {
printf("YYMM\n");
} else {
printf("NA\n");
}
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 858,329 | 858,330 | u456633003 | cpp |
p03042 | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int l, r;
l = s[0] - '0' * 10 + s[1] - '0';
r = s[2] - '0' * 10 + s[3] - '0';
if (1 <= l && l <= 12) {
if (1 <= r && r <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= r && r <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int l, r;
l = (s[0] - '0') * 10 + s[1] - '0';
r = (s[2] - '0') * 10 + s[3] - '0';
if (1 <= l && l <= 12) {
if (1 <= r && r <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= r && r <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [] | 858,335 | 858,336 | u401900157 | cpp |
p03042 | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pair<int, int>> vpii;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define fin(ans) cout << (ans) << endl
#define P 1000000007
#define STI(s) atoi(s.c_str()) // string to int
#define mp(p, q) make_pair(p, q)
#define Sort(a) sort(a.begin(), a.end())
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const int INF = INT_MAX;
const long long LLINF = 1LL << 60;
// g++ -std=c++1z main.cpp
//./a.exe
bool isPrime(int x) {
int i;
if (x < 2)
return 0;
else if (x == 2)
return 1;
if (x % 2 == 0)
return 0;
for (i = 3; i * i <= x; i += 2)
if (x % i == 0)
return 0;
return 1;
}
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
//////////////////////////////////////////////////////
int A, B, C, D;
string s;
cin >> s;
A = s[0] - '0';
B = s[1] - '0';
C = s[2] - '0';
D = s[3] - '0';
if (1 <= C * 10 + D && C * 10 + D <= 12) {
if (1 <= A * 10 + B && A * 10 + B <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
}
else {
if (1 <= A * 10 + B && C * 10 + D <= 12) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
//////////////////////////////////////////////////////
return 0;
} | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pair<int, int>> vpii;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define fin(ans) cout << (ans) << endl
#define P 1000000007
#define STI(s) atoi(s.c_str()) // string to int
#define mp(p, q) make_pair(p, q)
#define Sort(a) sort(a.begin(), a.end())
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const int INF = INT_MAX;
const long long LLINF = 1LL << 60;
// g++ -std=c++1z main.cpp
//./a.exe
bool isPrime(int x) {
int i;
if (x < 2)
return 0;
else if (x == 2)
return 1;
if (x % 2 == 0)
return 0;
for (i = 3; i * i <= x; i += 2)
if (x % i == 0)
return 0;
return 1;
}
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
//////////////////////////////////////////////////////
int A, B, C, D;
string s;
cin >> s;
A = s[0] - '0';
B = s[1] - '0';
C = s[2] - '0';
D = s[3] - '0';
if (1 <= C * 10 + D && C * 10 + D <= 12) {
if (1 <= A * 10 + B && A * 10 + B <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
}
else {
if (1 <= A * 10 + B && A * 10 + B <= 12) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
//////////////////////////////////////////////////////
return 0;
} | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 858,337 | 858,338 | u373984877 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int Y = s / 100, M = s % 100;
if (Y > 0 && Y < 13 && M < 13 && M > 0)
cout << "AMBIGUOUS";
else if (M > 0 && M < 13)
cout << "MMYY";
else if (Y < 13 && Y > 0)
cout << "YYMM";
else
cout << "NA";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int Y = s / 100, M = s % 100;
if (Y > 0 && Y < 13 && M < 13 && M > 0)
cout << "AMBIGUOUS";
else if (M > 0 && M < 13)
cout << "YYMM";
else if (Y < 13 && Y > 0)
cout << "MMYY";
else
cout << "NA";
}
| [
"literal.string.change",
"io.output.change"
] | 858,341 | 858,342 | u532401120 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int L = n / 100;
int R = n % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= R && R <= 12) {
cout << "YYMM" << endl;
}
cout << "NA" << endl;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int L = n / 100;
int R = n % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= R && R <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"control_flow.branch.else.add"
] | 858,350 | 858,351 | u953753178 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int L = n / 100;
int R = n % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS" << endl;
}
cout << "MMYY" << endl;
} else {
if (1 <= R && R <= 12) {
cout << "YYMM" << endl;
}
cout << "NA" << endl;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int L = n / 100;
int R = n % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= R && R <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"control_flow.branch.else.add"
] | 858,352 | 858,351 | u953753178 | cpp |
p03042 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int L = n / 100;
int R = n % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS" << endl;
}
cout << "MMYY" << endl;
} else if (1 <= R && R <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int L = n / 100;
int R = n % 100;
if (1 <= L && L <= 12) {
if (1 <= R && R <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= R && R <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"control_flow.branch.else.add"
] | 858,353 | 858,351 | u953753178 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
if (1 <= s / 100 && s / 100 <= 12) {
if (1 <= s % 100 && s % 100 <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "YYMM" << endl;
}
} else {
if (1 <= s % 100 && s % 100 <= 12) {
cout << "MMYY" << endl;
} else {
cout << "NA" << endl;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
if (1 <= s / 100 && s / 100 <= 12) {
if (1 <= s % 100 && s % 100 <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else {
if (1 <= s % 100 && s % 100 <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
}
} | [
"literal.string.change",
"io.output.change"
] | 858,354 | 858,355 | u244626757 | cpp |
p03042 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int i, x, y;
cin >> i;
x = i % 100;
y = i / 100;
if (x >= 0 && y >= 0) {
if (y >= 1 && y <= 1211111200) {
if (x >= 1 && x <= 12)
cout << "AMBIGUOUS";
if (x > 12 || x == 0)
cout << "MMYY";
}
if (y > 12 || y == 0) {
if (x >= 1 && x <= 12)
cout << "YYMM";
if (x > 12 || x == 0)
cout << "NA";
}
} else
cout << "NA";
return 0;
}
| #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int i, x, y;
cin >> i;
x = i % 100;
y = i / 100;
if (x >= 0 && y >= 0) {
if (y >= 1 && y <= 12) {
if (x >= 1 && x <= 12)
cout << "AMBIGUOUS";
if (x > 12 || x == 0)
cout << "MMYY";
}
if (y > 12 || y == 0) {
if (x >= 1 && x <= 12)
cout << "YYMM";
if (x > 12 || x == 0)
cout << "NA";
}
} else
cout << "NA";
return 0;
}
| [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 858,356 | 858,357 | u218552319 | cpp |
p03042 | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
int main() {
string s;
cin >> s;
int a = (s[0] - '0') * 10 + s[1] - '0';
int b = (s[2] - '0') * 10 + s[3] - '0';
string ans;
if (0 <= a && a <= 12 && 0 <= b && b <= 12)
ans = "AMBIGUOUS";
else if (0 <= a && a <= 12)
ans = "MMYY";
else if (0 <= b && b <= 12)
ans = "YYMM";
else
ans = "NA";
cout << ans << endl;
} | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
int main() {
string s;
cin >> s;
int a = (s[0] - '0') * 10 + s[1] - '0';
int b = (s[2] - '0') * 10 + s[3] - '0';
string ans;
if (0 < a && a <= 12 && 0 < b && b <= 12)
ans = "AMBIGUOUS";
else if (0 < a && a <= 12)
ans = "MMYY";
else if (0 < b && b <= 12)
ans = "YYMM";
else
ans = "NA";
cout << ans << endl;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,358 | 858,359 | u654240084 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int a = s / 100, b = s % 100;
string ans = "NA";
if (a > 0 && a < 13 && b > 0 && b < 13)
ans = "AMBIGUOUS";
if (a > 0 && a < 13 && b == 0 || b > 12)
ans = "MMYY";
if (a == 0 || a > 12 && b > 0 && b < 13)
ans = "YYMM";
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int a = s / 100, b = s % 100;
string ans = "NA";
if (a > 0 && a < 13 && b > 0 && b < 13)
ans = "AMBIGUOUS";
if (a > 0 && a < 13 && (b == 0 || b > 12))
ans = "MMYY";
if ((a == 0 || a > 12) && b > 0 && b < 13)
ans = "YYMM";
cout << ans << endl;
} | [
"control_flow.branch.if.condition.change"
] | 858,360 | 858,361 | u117348081 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, S1, S2;
int A, B;
cin >> S;
S1 = S.substr(0, 2);
S2 = S.substr(2, 2);
A = stoi(S1);
B = stoi(S2);
if (A <= 12 && A != 0 && B <= 12 && B != 0) {
cout << "AMBIGUOUS" << endl;
} else if ((B > 13 || B == 0) && (A > 13 || A == 0)) {
cout << "NA" << endl;
} else if (A > 13 || A == 0) {
cout << "YYMM" << endl;
} else {
cout << "MMYY" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, S1, S2;
int A, B;
cin >> S;
S1 = S.substr(0, 2);
S2 = S.substr(2, 2);
A = stoi(S1);
B = stoi(S2);
if (A <= 12 && A != 0 && B <= 12 && B != 0) {
cout << "AMBIGUOUS" << endl;
} else if ((B > 12 || B == 0) && (A > 12 || A == 0)) {
cout << "NA" << endl;
} else if (A > 12 || A == 0) {
cout << "YYMM" << endl;
} else {
cout << "MMYY" << endl;
}
} | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 858,362 | 858,363 | u170324846 | cpp |
p03042 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int s;
cin >> s;
int l = s / 100;
int r = s % 100;
if (l >= 1 && l <= 12) {
if (r >= 1 && r <= 12)
cout << "AMBIGOUS";
else
cout << "MMYY";
} else if (r >= 1 && r <= 12)
cout << "YYMM";
else
cout << "NA";
}
| #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int s;
cin >> s;
int l = s / 100;
int r = s % 100;
if (l >= 1 && l <= 12) {
if (r >= 1 && r <= 12)
cout << "AMBIGUOUS";
else
cout << "MMYY";
} else if (r >= 1 && r <= 12)
cout << "YYMM";
else
cout << "NA";
}
| [
"literal.string.change",
"io.output.change"
] | 858,370 | 858,371 | u188903786 | cpp |
p03042 | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
int l = s / 100;
int r = s % 100;
if (1 <= l && l <= 12) {
if (1 <= r && r <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (1 <= r && r <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int s;
cin >> s;
int l = s / 100;
int r = s % 100;
if (1 <= l && l <= 12) {
if (1 <= r && r <= 12) {
cout << "AMBIGUOUS" << endl;
} else {
cout << "MMYY" << endl;
}
} else if (1 <= r && r <= 12) {
cout << "YYMM" << endl;
} else {
cout << "NA" << endl;
}
} | [] | 858,372 | 858,373 | u392569193 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
int main() {
int n;
cin >> n;
vector<ll> a(n);
rep(i, n) cin >> a[i];
ll ans = 0;
for (int c = 1; c <= n - 1; c++) {
ll score = 0;
vector<char> v(n, '0');
for (int x = 0; (x + 1) * c < n - 1; x++) {
if (v[x * c] == '1')
break;
score += a[x * c];
v[x * c] = true;
if (v[n - 1 - x * c] == '1')
break;
score += a[n - 1 - x * c];
v[n - 1 - x * c] = '1';
ans = max(ans, score);
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
int main() {
int n;
cin >> n;
vector<ll> a(n);
rep(i, n) cin >> a[i];
ll ans = 0;
for (int c = 1; c <= n - 1; c++) {
ll score = 0;
vector<char> v(n, '0');
for (int x = 0; (x + 1) * c < n - 1; x++) {
if (v[x * c] == '1')
break;
score += a[x * c];
v[x * c] = '1';
if (v[n - 1 - x * c] == '1')
break;
score += a[n - 1 - x * c];
v[n - 1 - x * c] = '1';
ans = max(ans, score);
}
}
cout << ans << endl;
} | [
"assignment.value.change"
] | 858,379 | 858,380 | u562608561 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, l, r) for (long long i = (l); i < (r); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) FOR(i, 1, n + 1)
#define RFOR(i, l, r) for (long long i = (l); i >= (r); --i)
#define RREP(i, n) RFOR(i, n - 1, 0)
#define RREPS(i, n) RFOR(i, n, 1)
#define int long long
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
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;
}
const int INF = 1e18;
const int MOD = 1e9 + 7;
signed main() {
int n;
cin >> n;
int s[n];
REP(i, n) cin >> s[i];
map<pair<int, int>, int> f;
map<int, bool> used;
// f{k,a-b=c}の形にする
// f{1,1....n-2}を求めよう
//
REPS(c, n - 2) {
if (n - 1 - c == c)
continue;
used.clear();
f[{1, c}] = s[n - 1 - c] + s[c];
used[n - 1 - c] = used[c] = true;
for (int k = 2; k * c < n - 1; k++) {
if (n - 1 - k * c == k * c)
break;
if (used[n - 1 - k * c] or used[k * c])
break;
f[{k, c}] = f[{k - 1, c}] + s[n - 1 - k * c] + s[k * c];
used[n - 1 - k * c] = used[k * c] = true;
}
}
int ans = -INF;
for (auto v : f)
chmax(ans, v.second);
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define FOR(i, l, r) for (long long i = (l); i < (r); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) FOR(i, 1, n + 1)
#define RFOR(i, l, r) for (long long i = (l); i >= (r); --i)
#define RREP(i, n) RFOR(i, n - 1, 0)
#define RREPS(i, n) RFOR(i, n, 1)
#define int long long
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
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;
}
const int INF = 1e18;
const int MOD = 1e9 + 7;
signed main() {
int n;
cin >> n;
int s[n];
REP(i, n) cin >> s[i];
map<pair<int, int>, int> f;
map<int, bool> used;
// f(k,c=a-b)の形にする
// f(1,1....n-2)を求めよう
//漸化式でf(k,c)を出そう
REPS(c, n - 2) {
if (n - 1 - c == c)
continue;
used.clear();
f[{1, c}] = s[n - 1 - c] + s[c];
used[n - 1 - c] = used[c] = true;
for (int k = 2; (k + 1) * c < n - 1; k++) {
if (n - 1 - k * c == k * c)
break;
if (used[n - 1 - k * c] or used[k * c])
break;
f[{k, c}] = f[{k - 1, c}] + s[n - 1 - k * c] + s[k * c];
used[n - 1 - k * c] = used[k * c] = true;
}
}
int ans = 0;
for (auto v : f)
chmax(ans, v.second);
cout << ans << endl;
} | [
"control_flow.loop.for.condition.change",
"variable_declaration.value.change",
"expression.operation.unary.remove"
] | 858,408 | 858,409 | u342075214 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
/* y = (A-B)*x
* y = (A-B)*x + b */
int N;
cin >> N;
long long s[N];
for (int i = 0; i < N; i++)
cin >> s[i];
long long ans = 0;
for (int i = 1; i < N - 1; i++) {
long long f = 0;
for (int j = i, k = N - 1 - i; k > 0; j += i, k -= i) {
if ((N - 1) % i && j >= k)
break;
f += s[j] + s[k];
ans = max(ans, f);
}
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
/* y = (A-B)*x
* y = (A-B)*x + b */
int N;
cin >> N;
long long s[N];
for (int i = 0; i < N; i++)
cin >> s[i];
long long ans = 0;
for (int i = 1; i < N - 1; i++) {
long long f = 0;
for (int j = i, k = N - 1 - i; k > i; j += i, k -= i) {
if ((N - 1) % i == 0 && j >= k)
break;
f += s[j] + s[k];
ans = max(ans, f);
}
}
cout << ans << endl;
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change"
] | 858,415 | 858,416 | u018916376 | cpp |
p03034 | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
#define ln '\n'
constexpr long long MOD = 1000000007LL;
// constexpr long long MOD = 998244353LL;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
template <class T, class U> inline bool chmax(T &a, U b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T, class U> inline bool chmin(T &a, U b) {
if (a > b) {
a = b;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
vector<ll> A(N);
rep(i, N) cin >> A[i];
ll ans = 0;
for (int i = 1; i <= N; i++) {
int l = 0, r = N - 1;
ll val = 0;
vector<bool> visited(N);
while (r > i and !visited[l] and !visited[r]) {
visited[l] = visited[r] = 1;
val += A[l] + A[r];
chmax(ans, val);
l += i;
r -= i;
}
}
cout << ans << ln;
} | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
#define ln '\n'
constexpr long long MOD = 1000000007LL;
// constexpr long long MOD = 998244353LL;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
template <class T, class U> inline bool chmax(T &a, U b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T, class U> inline bool chmin(T &a, U b) {
if (a > b) {
a = b;
return true;
}
return false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
vector<ll> A(N);
rep(i, N) cin >> A[i];
ll ans = 0;
for (int i = 1; i <= N; i++) {
int l = 0, r = N - 1;
ll val = 0;
vector<bool> visited(N);
while (r > i and !visited[l] and !visited[r] and l != r) {
visited[l] = visited[r] = 1;
val += A[l] + A[r];
chmax(ans, val);
l += i;
r -= i;
}
}
cout << ans << ln;
} | [
"control_flow.loop.condition.change",
"control_flow.loop.for.condition.change"
] | 858,419 | 858,420 | u842939260 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
#define LL long long int
#define MAXN 100000
#define DEBUG true
int N, s[MAXN + 3];
bool visited[MAXN + 3];
int main() {
scanf("%d", &N);
for (int i = 0; i < N; i++)
scanf("%d", &s[i]);
LL answer = 0;
for (int C = 1; C < N - 1; C++) {
LL currentProfit = 0;
memset(visited, false, sizeof(visited));
for (int k = 0; k * C < N - 1; k++) {
if (N - 1 - k * C <= 1)
break; // A must be > 1
if (N - 1 - k * C - C < 1)
break; // B must be > 0
if (visited[N - 1 - k * C])
break;
visited[N - 1 - k * C] = true;
if (visited[k * C])
break;
visited[k * C] = true;
currentProfit += s[k * C];
currentProfit += s[N - 1 - k * C];
if (DEBUG)
cout << "c, k, p: " << C << " " << k << " " << currentProfit << endl;
answer = max(answer, currentProfit);
}
}
printf("%lld\n", answer);
}
| #include <bits/stdc++.h>
using namespace std;
#define LL long long int
#define MAXN 100000
#define DEBUG false
int N, s[MAXN + 3];
bool visited[MAXN + 3];
int main() {
scanf("%d", &N);
for (int i = 0; i < N; i++)
scanf("%d", &s[i]);
LL answer = 0;
for (int C = 1; C < N - 1; C++) {
LL currentProfit = 0;
memset(visited, false, sizeof(visited));
for (int k = 0; k * C < N - 1; k++) {
if (N - 1 - k * C <= 1)
break; // A must be > 1
if (N - 1 - k * C - C < 1)
break; // B must be > 0
if (visited[N - 1 - k * C])
break;
visited[N - 1 - k * C] = true;
if (visited[k * C])
break;
visited[k * C] = true;
currentProfit += s[k * C];
currentProfit += s[N - 1 - k * C];
if (DEBUG)
cout << "c, k, p: " << C << " " << k << " " << currentProfit << endl;
answer = max(answer, currentProfit);
}
}
printf("%lld\n", answer);
}
| [
"misc.opposites",
"preprocessor.define.value.change"
] | 858,428 | 858,429 | u569149712 | cpp |
p03034 | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> P;
void solve(long long N, std::vector<long long> s) {
LL ret = 0;
for (int i = 1; i < N; i++) {
int x = 0;
int y = N - 1;
LL sum = 0;
while (x + i < N) {
if (x + i == y) {
break;
}
x += i;
y -= i;
if (x == y) {
break;
}
if (y < i) {
break;
}
sum += s[x] + s[y];
}
ret = max(ret, sum);
}
cout << ret << endl;
}
int main() {
long long N;
scanf("%lld", &N);
std::vector<long long> s(N - 1 - 0 + 1);
for (int i = 0; i < N - 1 - 0 + 1; i++) {
scanf("%lld", &s[i]);
}
solve(N, std::move(s));
return 0;
}
| #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<LL, LL> P;
void solve(long long N, std::vector<long long> s) {
LL ret = 0;
for (int i = 1; i < N; i++) {
int x = 0;
int y = N - 1;
LL sum = 0;
while (x + i < N) {
if (x + i == y) {
break;
}
x += i;
y -= i;
if (x == y) {
break;
}
if (y < i) {
break;
}
sum += s[x] + s[y];
ret = max(ret, sum);
}
}
cout << ret << endl;
}
int main() {
long long N;
scanf("%lld", &N);
std::vector<long long> s(N - 1 - 0 + 1);
for (int i = 0; i < N - 1 - 0 + 1; i++) {
scanf("%lld", &s[i]);
}
solve(N, std::move(s));
return 0;
}
| [] | 858,440 | 858,441 | u736004166 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define show(x) \
for (auto i : x) { \
cout << i << " "; \
}
#define showm(m) \
for (auto i : m) { \
cout << m.x << " "; \
}
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n;
cin >> n;
vector<int> s;
rep(i, n) {
int tmp;
cin >> tmp;
s.push_back(tmp);
}
// c-1
ll max_score = 0;
for (int c = 1; c < n; c++) {
ll score = 0;
set<int> hasu;
hasu.insert(0);
hasu.insert(n - 1);
for (int x = 1; c * x < n; x++) {
if (c <= n - 1 - c * x)
break;
int cx = c * x;
int ccx = n - 1 - cx;
score += s[cx];
if (hasu.find(cx) != hasu.end())
break;
hasu.insert(cx);
score += s[ccx];
if (hasu.find(ccx) != hasu.end())
break;
hasu.insert(ccx);
max_score = max(max_score, score);
}
}
cout << max_score << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define show(x) \
for (auto i : x) { \
cout << i << " "; \
}
#define showm(m) \
for (auto i : m) { \
cout << m.x << " "; \
}
typedef long long ll;
typedef pair<int, int> P;
int main() {
int n;
cin >> n;
vector<int> s;
rep(i, n) {
int tmp;
cin >> tmp;
s.push_back(tmp);
}
// c-1
ll max_score = 0;
for (int c = 1; c < n; c++) {
ll score = 0;
set<int> hasu;
hasu.insert(0);
hasu.insert(n - 1);
for (int x = 1; c * x < n; x++) {
if (c >= n - 1 - c * x)
break;
int cx = c * x;
int ccx = n - 1 - cx;
score += s[cx];
if (hasu.find(cx) != hasu.end())
break;
hasu.insert(cx);
score += s[ccx];
if (hasu.find(ccx) != hasu.end())
break;
hasu.insert(ccx);
max_score = max(max_score, score);
}
}
cout << max_score << endl;
}
| [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,442 | 858,443 | u317715099 | cpp |
p03034 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000007)
using namespace std;
typedef long long int Int;
constexpr Int TEN(int n) { return n == 0 ? 1 : 10 * TEN(n - 1); }
vector<Int> s;
int N;
int main(void) {
cin >> N;
for (int i = 0; i < N; i++) {
Int t;
cin >> t;
s.push_back(t);
}
Int ans = 0;
for (int c = 1; c < N; c++) {
if ((N - 1) % c == 0) {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < right; left += c, right -= c) {
score += s[left] + s[right];
}
ans = max(ans, score);
} else {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < N - 1 && right > c; left += c, right -= c) {
score += s[left] + s[right];
}
ans = max(ans, score);
}
}
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000007)
using namespace std;
typedef long long int Int;
constexpr Int TEN(int n) { return n == 0 ? 1 : 10 * TEN(n - 1); }
vector<Int> s;
int N;
int main(void) {
cin >> N;
for (int i = 0; i < N; i++) {
Int t;
cin >> t;
s.push_back(t);
}
Int ans = 0;
for (int c = 1; c < N; c++) {
if ((N - 1) % c == 0) {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < right; left += c, right -= c) {
score += s[left] + s[right];
ans = max(ans, score);
}
} else {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < N - 1 && right > c; left += c, right -= c) {
score += s[left] + s[right];
ans = max(ans, score);
}
}
}
cout << ans << endl;
return 0;
}
| [] | 858,448 | 858,449 | u498141549 | cpp |
p03034 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000007)
using namespace std;
typedef long long int Int;
constexpr Int TEN(int n) { return n == 0 ? 1 : 10 * TEN(n - 1); }
vector<Int> s;
int N;
int main(void) {
cin >> N;
for (int i = 0; i < N; i++) {
int t;
cin >> t;
s.push_back(t);
}
Int ans = 0;
for (int c = 1; c < N; c++) {
if ((N - 1) % c == 0) {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < right; left += c, right -= c) {
score += s[left] + s[right];
}
ans = max(ans, score);
} else {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < N - 1 && right > c; left += c, right -= c) {
score += s[left] + s[right];
}
ans = max(ans, score);
}
}
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000007)
using namespace std;
typedef long long int Int;
constexpr Int TEN(int n) { return n == 0 ? 1 : 10 * TEN(n - 1); }
vector<Int> s;
int N;
int main(void) {
cin >> N;
for (int i = 0; i < N; i++) {
Int t;
cin >> t;
s.push_back(t);
}
Int ans = 0;
for (int c = 1; c < N; c++) {
if ((N - 1) % c == 0) {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < right; left += c, right -= c) {
score += s[left] + s[right];
ans = max(ans, score);
}
} else {
Int score = 0;
int left = 0;
int right = N - 1;
for (; left < N - 1 && right > c; left += c, right -= c) {
score += s[left] + s[right];
ans = max(ans, score);
}
}
}
cout << ans << endl;
return 0;
}
| [
"variable_declaration.type.change"
] | 858,450 | 858,449 | u498141549 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 100100;
int N;
ll s[MAXN];
int main() {
ios_base::sync_with_stdio(0);
cin >> N;
for (int i = 0; i < N; i++)
cin >> s[i];
ll ans = 0;
for (int i = 1; i < N; i++) {
ll res = 0;
for (int j = 0; j < N; j += i) {
if ((N - 1) % i == 0 && 2 * j > (N - 1))
break;
res += s[j];
res += s[N - 1 - j];
ans = max(ans, res);
}
}
cout << ans << "\n";
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 100100;
int N;
ll s[MAXN];
int main() {
ios_base::sync_with_stdio(0);
cin >> N;
for (int i = 0; i < N; i++)
cin >> s[i];
ll ans = 0;
for (int i = 1; i < N; i++) {
ll res = 0;
for (int j = 0; j + i < N; j += i) {
if ((N - 1) % i == 0 && 2 * j >= (N - 1))
break;
res += s[j];
res += s[N - 1 - j];
ans = max(ans, res);
}
}
cout << ans << "\n";
} | [
"control_flow.loop.for.condition.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 858,456 | 858,457 | u409373192 | cpp |
p03034 | /*{{{*/
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define FOR(I, A, B) for (int I = (A); I <= (B); ++I)
#define FORS(I, S) for (int I = 0; S[I]; ++I)
#define RS(X) scanf("%s", (X))
#define SORT_UNIQUE(c) \
(sort(c.begin(), c.end()), \
c.resize(distance(c.begin(), unique(c.begin(), c.end()))))
#define GET_POS(c, x) (lower_bound(c.begin(), c.end(), x) - c.begin())
#define CASET \
int ___T; \
scanf("%d", &___T); \
for (int cs = 1; cs <= ___T; cs++)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<PII> VPII;
typedef pair<LL, LL> PLL;
typedef vector<PLL> VPLL;
template <class T> void _R(T &x) { cin >> x; }
void _R(int &x) { scanf("%d", &x); }
void _R(LL &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U> void R(T &head, U &...tail) {
_R(head);
R(tail...);
}
template <class T> void _W(const T &x) { cout << x; }
void _W(const int &x) { printf("%d", x); }
void _W(const LL &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U> void _W(const pair<T, U> &x) {
_W(x.F);
putchar(' ');
_W(x.S);
}
template <class T> void _W(const vector<T> &x) {
for (auto i = x.begin(); i != x.end(); _W(*i++))
if (i != x.cbegin())
putchar(' ');
}
void W() {}
template <class T, class... U> void W(const T &head, const U &...tail) {
_W(head);
putchar(sizeof...(tail) ? ' ' : '\n');
W(tail...);
}
#ifdef HOME
#define DEBUG(...) \
{ \
printf("# "); \
printf(__VA_ARGS__); \
puts(""); \
}
#else
#define DEBUG(...)
#endif
int MOD = 1e9 + 7;
void ADD(LL &x, LL v) {
x = (x + v) % MOD;
if (x < 0)
x += MOD;
}
/*}}}*/
const int SIZE = 1e6 + 10;
LL s[SIZE];
int u[SIZE], tt;
int main() {
int N;
R(N);
REP(i, N) R(s[i]);
LL an = 0;
REPP(i, 1, N - 1) {
int ll = i, rr = N - 1 - i;
LL now = 0;
tt++;
while (ll < N - 1 && u[ll] != tt && u[rr] != tt && ll != rr && ll > i) {
now += s[ll] + s[rr];
u[ll] = u[rr] = tt;
ll += i;
rr -= i;
an = max(an, now);
}
}
W(an);
return 0;
}
| /*{{{*/
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define FOR(I, A, B) for (int I = (A); I <= (B); ++I)
#define FORS(I, S) for (int I = 0; S[I]; ++I)
#define RS(X) scanf("%s", (X))
#define SORT_UNIQUE(c) \
(sort(c.begin(), c.end()), \
c.resize(distance(c.begin(), unique(c.begin(), c.end()))))
#define GET_POS(c, x) (lower_bound(c.begin(), c.end(), x) - c.begin())
#define CASET \
int ___T; \
scanf("%d", &___T); \
for (int cs = 1; cs <= ___T; cs++)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<PII> VPII;
typedef pair<LL, LL> PLL;
typedef vector<PLL> VPLL;
template <class T> void _R(T &x) { cin >> x; }
void _R(int &x) { scanf("%d", &x); }
void _R(LL &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template <class T, class... U> void R(T &head, U &...tail) {
_R(head);
R(tail...);
}
template <class T> void _W(const T &x) { cout << x; }
void _W(const int &x) { printf("%d", x); }
void _W(const LL &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template <class T, class U> void _W(const pair<T, U> &x) {
_W(x.F);
putchar(' ');
_W(x.S);
}
template <class T> void _W(const vector<T> &x) {
for (auto i = x.begin(); i != x.end(); _W(*i++))
if (i != x.cbegin())
putchar(' ');
}
void W() {}
template <class T, class... U> void W(const T &head, const U &...tail) {
_W(head);
putchar(sizeof...(tail) ? ' ' : '\n');
W(tail...);
}
#ifdef HOME
#define DEBUG(...) \
{ \
printf("# "); \
printf(__VA_ARGS__); \
puts(""); \
}
#else
#define DEBUG(...)
#endif
int MOD = 1e9 + 7;
void ADD(LL &x, LL v) {
x = (x + v) % MOD;
if (x < 0)
x += MOD;
}
/*}}}*/
const int SIZE = 1e6 + 10;
LL s[SIZE];
int u[SIZE], tt;
int main() {
int N;
R(N);
REP(i, N) R(s[i]);
LL an = 0;
REPP(i, 1, N - 1) {
int ll = i, rr = N - 1 - i;
LL now = 0;
tt++;
while (ll < N - 1 && u[ll] != tt && u[rr] != tt && ll != rr && rr > i) {
now += s[ll] + s[rr];
u[ll] = u[rr] = tt;
ll += i;
rr -= i;
an = max(an, now);
}
}
W(an);
return 0;
}
| [
"identifier.change",
"control_flow.loop.condition.change"
] | 858,474 | 858,475 | u284124505 | cpp |
p03034 | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#ifndef LOCAL
#define debug(x) ;
#else
#define debug(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl;
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &p) {
out << "{" << p.first << ", " << p.second << "}";
return out;
}
template <typename T> ostream &operator<<(ostream &out, const vector<T> &v) {
out << '{';
for (const T &item : v)
out << item << ", ";
out << "\b\b}";
return out;
}
#endif
#define mod 1000000007 // 1e9+7(prime number)
#define INF 1000000000 // 1e9
#define LLINF 2000000000000000000LL // 2e18
#define SIZE 200010
int N, s[SIZE];
map<int, ll> suml[SIZE], sumr[SIZE];
int main() {
scanf("%d", &N);
for (int i = 0; i < N; i++) {
scanf("%d", s + i);
}
for (int i = 1; i <= N - 1; i++) {
ll sum = 0;
for (int j = 0; j <= N - 1; j += i) {
sum += s[j];
suml[j][i] = sum;
}
}
for (int i = 1; i <= N - 1; i++) {
ll sum = 0;
for (int j = N - 1; j >= 0; j -= i) {
sum += s[j];
sumr[j][i] = sum;
}
}
ll ans = 0;
for (int A = 1; A < N - 1; A++) {
int r = N - 1 - A;
for (auto p : suml[A]) {
int d = p.first;
int B = A - d;
if (B > 0 && (A % d != 0 || A / d > r / d)) {
ans = max(ans, sumr[A][d] + suml[r][d]);
}
}
}
cout << ans << endl;
return 0;
}
| #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <complex>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <cassert>
#include <functional>
typedef long long ll;
using namespace std;
#ifndef LOCAL
#define debug(x) ;
#else
#define debug(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl;
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &p) {
out << "{" << p.first << ", " << p.second << "}";
return out;
}
template <typename T> ostream &operator<<(ostream &out, const vector<T> &v) {
out << '{';
for (const T &item : v)
out << item << ", ";
out << "\b\b}";
return out;
}
#endif
#define mod 1000000007 // 1e9+7(prime number)
#define INF 1000000000 // 1e9
#define LLINF 2000000000000000000LL // 2e18
#define SIZE 200010
int N, s[SIZE];
map<int, ll> suml[SIZE], sumr[SIZE];
int main() {
scanf("%d", &N);
for (int i = 0; i < N; i++) {
scanf("%d", s + i);
}
for (int i = 1; i <= N - 1; i++) {
ll sum = 0;
for (int j = 0; j <= N - 1; j += i) {
sum += s[j];
suml[j][i] = sum;
}
}
for (int i = 1; i <= N - 1; i++) {
ll sum = 0;
for (int j = N - 1; j >= 0; j -= i) {
sum += s[j];
sumr[j][i] = sum;
}
}
ll ans = 0;
for (int A = 1; A < N - 1; A++) {
int r = N - 1 - A;
for (auto p : sumr[A]) {
int d = p.first;
int B = A - d;
if (B > 0 && (A % d != 0 || A / d > r / d)) {
ans = max(ans, sumr[A][d] + suml[r][d]);
}
}
}
cout << ans << endl;
return 0;
}
| [
"identifier.change"
] | 858,481 | 858,482 | u378419207 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++)
#define rev(i, s, e) for (i64(i) = (e); (i)-- > (s);)
#define all(x) x.begin(), x.end()
int main() {
i64 N;
cin >> N;
vector<i64> s(N);
rep(i, 0, N) cin >> s[i];
i64 ans = s[0] + s[N - 1];
rep(C, 2, N) {
if ((N - 1) % C == 0) {
i64 now = 0;
i64 i = 0;
i64 j = N - 1;
while (i < j) {
now += s[i] + s[j];
i += C;
j -= C;
ans = max(ans, now);
}
} else {
i64 now = 0;
i64 i = 0;
i64 j = N - 1;
while (i < N - 1 && 0 < j) {
now += s[i] + s[j];
i += C;
j -= C;
ans = max(ans, now);
}
}
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++)
#define rev(i, s, e) for (i64(i) = (e); (i)-- > (s);)
#define all(x) x.begin(), x.end()
int main() {
i64 N;
cin >> N;
vector<i64> s(N);
rep(i, 0, N) cin >> s[i];
i64 ans = s[0] + s[N - 1];
rep(C, 1, N) {
if ((N - 1) % C == 0) {
i64 now = 0;
i64 i = 0;
i64 j = N - 1;
while (i < j) {
now += s[i] + s[j];
i += C;
j -= C;
ans = max(ans, now);
}
} else {
i64 now = 0;
i64 i = 0;
i64 j = N - 1;
while (i < N - 1 && C < j) {
now += s[i] + s[j];
i += C;
j -= C;
ans = max(ans, now);
}
}
}
cout << ans << endl;
}
| [
"literal.number.change",
"call.arguments.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.condition.change"
] | 858,485 | 858,486 | u852585808 | cpp |
p03034 | #include "bits/stdc++.h"
using namespace std;
typedef long long li;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
li n;
cin >> n;
vector<li> ss(n);
for (int i = 0; i < n; ++i) {
cin >> ss[i];
}
li ans = 0;
for (int d = 1; d < n; ++d) {
li sum = 0;
set<li> lvisit;
for (int l = 0, r = n - 1; l < n && r >= 0; l += d, r -= d) {
const li a = r;
const li b = a - d;
if (a <= 0 || b <= 0) {
break;
}
lvisit.insert(l);
if (lvisit.find(r) != lvisit.end()) {
break;
}
sum += ss[l] + ss[r];
}
ans = max(sum, ans);
}
cout << ans << endl;
return 0;
} | #include "bits/stdc++.h"
using namespace std;
typedef long long li;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
li n;
cin >> n;
vector<li> ss(n);
for (int i = 0; i < n; ++i) {
cin >> ss[i];
}
li ans = 0;
for (int d = 1; d < n; ++d) {
li sum = 0;
set<li> lvisit;
for (int l = 0, r = n - 1; l < n && r >= 0; l += d, r -= d) {
const li a = r;
const li b = a - d;
if (a <= 0 || b <= 0) {
break;
}
lvisit.insert(l);
if (lvisit.find(r) != lvisit.end()) {
break;
}
sum += ss[l] + ss[r];
ans = max(sum, ans);
}
}
cout << ans << endl;
return 0;
} | [] | 858,491 | 858,492 | u817026203 | cpp |
p03034 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
ll n, a, A[100000], sco, ans;
set<ll> se;
int main(void) {
cin >> n;
for (int i = 0; i < n; i++)
cin >> A[i];
for (ll c = 1; c < n; c++) {
se.clear();
sco = 0;
for (ll x = 1;; x++) {
if (c * x >= n)
break;
se.insert(c * x);
if (se.size() != 2 * x - 1)
break;
se.insert(n - 1 - c * x);
if (se.size() != 2 * x)
break;
sco += A[c * x];
a = n - 1 - c * x;
sco += A[a];
}
// cout<<sco<<a<<c<<endl;
if (a > c)
ans = max(ans, sco);
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
ll n, a, A[100000], sco, ans;
set<ll> se;
int main(void) {
cin >> n;
for (int i = 0; i < n; i++)
cin >> A[i];
for (ll c = 1; c < n; c++) {
se.clear();
sco = 0;
for (ll x = 1;; x++) {
if (c * x >= n)
break;
se.insert(c * x);
if (se.size() != 2 * x - 1)
break;
se.insert(n - 1 - c * x);
if (se.size() != 2 * x)
break;
sco += A[c * x];
a = n - 1 - c * x;
sco += A[a];
// cout<<sco<<a<<c<<endl;
if (a > c)
ans = max(ans, sco);
}
}
cout << ans << endl;
}
| [] | 858,499 | 858,500 | u050428930 | cpp |
p03034 | #include "bits/stdc++.h"
using namespace std;
void solve() {
int n;
cin >> n;
vector<long> as(n);
for (int i = 0; i < n; i++) {
cin >> as[i];
}
long ans = 0;
vector<int> vst(n);
for (int d = 1; d <= (n - 1) / 2; d++) {
long res = 0;
fill(vst.begin(), vst.end(), 0);
for (int k = 0; (k + 1) * d < n; k++) {
int l = k * d, r = n - 1 - l;
if (vst[l] || vst[r])
break;
vst[l] = vst[r] = 1;
res += as[l] + as[r];
ans = max(ans, res);
}
}
cout << ans << endl;
}
int main() {
solve();
cerr << "\"努力不足ですね!\"" << endl;
return 0;
} | #include "bits/stdc++.h"
using namespace std;
void solve() {
int n;
cin >> n;
vector<long> as(n);
for (int i = 0; i < n; i++) {
cin >> as[i];
}
long ans = 0;
vector<int> vst(n);
for (int d = 1; d <= (n - 1) / 2; d++) {
long res = 0;
fill(vst.begin(), vst.end(), 0);
for (int k = 0; (k + 1) * d < n; k++) {
int l = k * d, r = n - 1 - l;
if (vst[l] || vst[r] || l == r)
break;
vst[l] = vst[r] = 1;
res += as[l] + as[r];
ans = max(ans, res);
}
}
cout << ans << endl;
}
int main() {
solve();
cerr << "\"努力不足ですね!\"" << endl;
return 0;
} | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 858,528 | 858,529 | u344412812 | cpp |
p03034 | #include <algorithm>
#include <iostream>
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int inf = 1e18;
int N;
int s[100000];
int calc(int A, int B) {
// printf("A = %lld, B = %lld\n",A,B);
int sum = 0;
int x = 0;
// while(x < N) {
while (true) {
int y = x + A;
sum += s[y];
if (y == N - 1)
return sum;
// printf("a y = %lld\n", y);
y = y - B;
sum += s[y];
x = y;
// printf("b y = %lld\n", y);
}
return -1;
}
int dp[100000];
bool in(int A) { return 0 < A && A < N; }
signed main(void) {
cin >> N;
rep(i, N) { cin >> s[i]; }
rep(C, N) {
if (C == 0)
continue;
dp[C] = (N - 1 - C > 0) ? 0 : -inf;
}
int ans = 0;
for (int k = 1; k < N; k++) {
for (int C = 1; k * C < N; C++) {
int A = N - 1 - k * C;
int B = A - C;
if (!in(A) || !in(B))
continue;
// if (B % C == 0 && N - 1 - A - B > 0) continue;
if ((N - 1) % C == 0 && 2 * N - 1 <= k * C)
continue;
dp[C] += s[N - 1 - k * C] + s[k * C];
ans = max(dp[C], ans);
}
}
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int inf = 1e18;
int N;
int s[100000];
int calc(int A, int B) {
// printf("A = %lld, B = %lld\n",A,B);
int sum = 0;
int x = 0;
// while(x < N) {
while (true) {
int y = x + A;
sum += s[y];
if (y == N - 1)
return sum;
// printf("a y = %lld\n", y);
y = y - B;
sum += s[y];
x = y;
// printf("b y = %lld\n", y);
}
return -1;
}
int dp[100000];
bool in(int A) { return 0 < A && A < N; }
signed main(void) {
cin >> N;
rep(i, N) { cin >> s[i]; }
rep(C, N) {
if (C == 0)
continue;
dp[C] = (N - 1 - C > 0) ? 0 : -inf;
}
int ans = 0;
for (int k = 1; k < N; k++) {
for (int C = 1; k * C < N; C++) {
int A = N - 1 - k * C;
int B = A - C;
if (!in(A) || !in(B))
continue;
// if (B % C == 0 && N - 1 - A - B > 0) continue;
if ((N - 1) % C == 0 && N - 1 <= 2 * k * C)
continue;
dp[C] += s[N - 1 - k * C] + s[k * C];
ans = max(dp[C], ans);
}
}
cout << ans << endl;
return 0;
}
| [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 858,562 | 858,563 | u653699618 | cpp |
p03034 | #include <algorithm>
#include <iostream>
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int inf = 1e18;
int N;
int s[100000];
int calc(int A, int B) {
// printf("A = %lld, B = %lld\n",A,B);
int sum = 0;
int x = 0;
// while(x < N) {
while (true) {
int y = x + A;
sum += s[y];
if (y == N - 1)
return sum;
// printf("a y = %lld\n", y);
y = y - B;
sum += s[y];
x = y;
// printf("b y = %lld\n", y);
}
return -1;
}
int dp[100000];
bool in(int A) { return 0 < A && A < N; }
signed main(void) {
cin >> N;
rep(i, N) { cin >> s[i]; }
rep(C, N) {
if (C == 0)
continue;
dp[C] = (N - 1 - C > 0) ? 0 : -inf;
}
int ans = 0;
for (int k = 1; k < N; k++) {
for (int C = 1; k * C < N; C++) {
int A = N - 1 - k * C;
int B = A - C;
if (!in(A) || !in(B))
continue;
// if (B % C == 0 && N - 1 - A - B > 0) continue;
if ((N - 1) % C == 0 && N - 1 <= k * C)
break;
dp[C] += s[N - 1 - k * C] + s[k * C];
ans = max(dp[C], ans);
}
}
cout << ans << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int inf = 1e18;
int N;
int s[100000];
int calc(int A, int B) {
// printf("A = %lld, B = %lld\n",A,B);
int sum = 0;
int x = 0;
// while(x < N) {
while (true) {
int y = x + A;
sum += s[y];
if (y == N - 1)
return sum;
// printf("a y = %lld\n", y);
y = y - B;
sum += s[y];
x = y;
// printf("b y = %lld\n", y);
}
return -1;
}
int dp[100000];
bool in(int A) { return 0 < A && A < N; }
signed main(void) {
cin >> N;
rep(i, N) { cin >> s[i]; }
rep(C, N) {
if (C == 0)
continue;
dp[C] = (N - 1 - C > 0) ? 0 : -inf;
}
int ans = 0;
for (int k = 1; k < N; k++) {
for (int C = 1; k * C < N; C++) {
int A = N - 1 - k * C;
int B = A - C;
if (!in(A) || !in(B))
continue;
// if (B % C == 0 && N - 1 - A - B > 0) continue;
if ((N - 1) % C == 0 && N - 1 <= 2 * k * C)
continue;
dp[C] += s[N - 1 - k * C] + s[k * C];
ans = max(dp[C], ans);
}
}
cout << ans << endl;
return 0;
}
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"control_flow.break.remove",
"control_flow.continue.add"
] | 858,564 | 858,563 | u653699618 | cpp |
p03034 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int s[N];
for (int i = 0; i < N; i++)
cin >> s[i];
long long ans = 0;
int passed[N] = {};
for (int c = 1; c < N; c++) {
long long point = 0;
for (int k = 0; k < N; k++) {
int s1 = N - 1 - k * c;
int s2 = k * c;
if (s1 = s2)
break;
if ((k + 1) * c >= N - 1)
break;
if (passed[s1] == c)
break;
if (passed[s2] == c)
break;
point += s[s1] + s[s2];
ans = max(ans, point);
passed[s1] = passed[s2] = c;
}
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int s[N];
for (int i = 0; i < N; i++)
cin >> s[i];
long long ans = 0;
int passed[N] = {};
for (int c = 1; c < N; c++) {
long long point = 0;
for (int k = 0; k < N; k++) {
int s1 = N - 1 - k * c;
int s2 = k * c;
if (s1 == s2)
break;
if ((k + 1) * c >= N - 1)
break;
if (passed[s1] == c)
break;
if (passed[s2] == c)
break;
point += s[s1] + s[s2];
ans = max(ans, point);
passed[s1] = passed[s2] = c;
}
}
cout << ans << endl;
return 0;
}
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 858,571 | 858,572 | u303454114 | cpp |
p03034 | #include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr double eps = 1e-9;
constexpr ll MOD = 1000000007LL;
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
};
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
};
template <typename T> ostream &operator<<(ostream &os, vector<T> v) {
for (int i = 0; i < v.size(); i++) {
os << v[i] << (i + 1 == v.size() ? "\n" : " ");
}
return os;
}
template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) {
t = v;
}
template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) {
for (auto &e : t) {
fill_v(e, v);
}
};
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
vector<ll> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
ll ans = a[n - 1];
for (int c = 1; c < n; c++) {
ll s1 = 0, s2 = a[n - 1];
for (int k = 1; k * c < n - 1; k++) {
s1 += a[k * c];
ll t = n - 1 - k * c;
s2 += a[t];
if (t % c == 0 && k * c >= t) {
break;
}
if (t < c) {
chmax(ans, s1 + s2);
}
}
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr double eps = 1e-9;
constexpr ll MOD = 1000000007LL;
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
};
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
};
template <typename T> ostream &operator<<(ostream &os, vector<T> v) {
for (int i = 0; i < v.size(); i++) {
os << v[i] << (i + 1 == v.size() ? "\n" : " ");
}
return os;
}
template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) {
t = v;
}
template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) {
for (auto &e : t) {
fill_v(e, v);
}
};
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
vector<ll> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
ll ans = a[n - 1];
for (int c = 1; c < n; c++) {
ll s1 = 0, s2 = a[n - 1];
for (int k = 1; k * c < n - 1; k++) {
s1 += a[k * c];
ll t = n - 1 - k * c;
s2 += a[t];
if (t % c == 0 && k * c >= t) {
break;
}
if (c < t) {
chmax(ans, s1 + s2);
}
}
}
cout << ans << endl;
}
| [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"control_flow.branch.if.condition.change"
] | 858,573 | 858,574 | u924339359 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.