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 |
|---|---|---|---|---|---|---|---|
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1]) {
cout << "Bad" << endl;
break;
} else if (i = 2) {
cout << "Good" << endl;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1]) {
cout << "Bad" << endl;
break;
} else if (i == 2) {
cout << "Good" << endl;
}
}
}
| [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 801,802 | 801,803 | u201743726 | cpp |
p02993 | #include <iostream>
#include <string>
using namespace std;
int main() {
char c;
string s;
int j = 0;
cin >> s;
for (int i = 0; i < s.length(); i++) {
c = s[i];
if (c != 0) {
if (c == s[i - 1]) {
cout << "bad" << endl;
break;
} else {
j++;
}
} else {
j++;
}
}
if (j == s.length()) {
cout << "good" << endl;
}
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
char c;
string s;
int j = 0;
cin >> s;
for (int i = 0; i < s.length(); i++) {
c = s[i];
if (c != 0) {
if (c == s[i - 1]) {
cout << "Bad" << endl;
break;
} else {
j++;
}
} else {
j++;
}
}
if (j == s.length()) {
cout << "Good" << endl;
}
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,804 | 801,805 | u286539644 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
for (int i = 0; i < 4; i++) {
cin >> str[i];
}
if (str[0] == str[1] || str[1] == str[2] || str[2] == str[3]) {
cout << "bad" << endl;
} else {
cout << "good" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
for (int i = 0; i < 4; i++) {
cin >> str[i];
}
if (str[0] == str[1] || str[1] == str[2] || str[2] == str[3]) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,808 | 801,809 | u136685537 | cpp |
p02993 | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
for (int i = 0; i < 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
for (int i = 0; i <= 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 801,812 | 801,813 | u192912097 | cpp |
p02993 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string flag("good");
cin >> str;
for (int i = 1; i < 4; ++i)
if (str[i] == str[i - 1]) {
flag = "bad";
break;
}
cout << flag << endl;
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string flag("Good");
cin >> str;
for (int i = 1; i < 4; ++i)
if (str[i] == str[i - 1]) {
flag = "Bad";
break;
}
cout << flag << endl;
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"assignment.value.change"
] | 801,814 | 801,815 | u568120967 | cpp |
p02993 | #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string flag("good");
cin >> str;
for (int i = 1; i < 4; ++i)
if (str[i] == str[i - 1]) {
flag = "bad";
break;
}
cout << flag;
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
string flag("Good");
cin >> str;
for (int i = 1; i < 4; ++i)
if (str[i] == str[i - 1]) {
flag = "Bad";
break;
}
cout << flag << endl;
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"assignment.value.change",
"io.output.newline.add"
] | 801,816 | 801,815 | u568120967 | cpp |
p02993 | #include <iostream>
int main(int argc, char **argv) {
std::string S;
std::cin >> S;
int ans = 0;
const char *wp = S.c_str();
for (int i = 1; i < S.length() - 1; i++) {
if (*(wp + i - 1) == *(wp + i)) {
ans = 1;
break;
}
}
std::printf("%s\n", ans == 0 ? "Good" : "Bad");
return 0;
} | #include <iostream>
int main(int argc, char **argv) {
std::string S;
std::cin >> S;
int ans = 0;
const char *wp = S.c_str();
for (int i = 1; i < S.length(); i++) {
if (*(wp + i - 1) == *(wp + i)) {
ans = 1;
break;
}
}
std::printf("%s\n", ans == 0 ? "Good" : "Bad");
return 0;
} | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 801,831 | 801,832 | u842396874 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
char a[5];
scanf("%s", a);
for (int i = 0; i < 2; i++) {
if (a[i] == a[i + 1]) {
printf("Bad");
return 0;
}
}
printf("Good");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
char a[5];
scanf("%s", a);
for (int i = 0; i < 3; i++) {
if (a[i] == a[i + 1]) {
printf("Bad");
return 0;
}
}
printf("Good");
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 801,840 | 801,841 | u858741867 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i - 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
}
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 801,853 | 801,854 | u557831058 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int flag = 1;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1]) {
flag = 0;
break;
}
}
if (flag == 0) {
cout << "BAD" << endl;
} else {
cout << "GOOD" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int flag = 1;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1]) {
flag = 0;
break;
}
}
if (flag == 0) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,855 | 801,856 | u425436575 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int flag = 1;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1]) {
flag = 0;
}
}
if (flag == 0) {
cout << "BAD" << endl;
} else {
cout << "GOOD" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int flag = 1;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1]) {
flag = 0;
break;
}
}
if (flag == 0) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,857 | 801,856 | u425436575 | cpp |
p02993 | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < 2; ++i) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < 3; ++i) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 801,879 | 801,880 | u582817680 | cpp |
p02993 | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <valarray>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
int main() {
string s;
cin >> s;
bool flag = true;
for (int i = 0; i < s.size() - 1; ++i)
if (s[i] == s[i + 1])
flag = false;
if (flag)
cout << "Good" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <valarray>
#include <vector>
using namespace std;
using ll = long long;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
int main() {
string s;
cin >> s;
bool flag = true;
for (int i = 0; i < s.size() - 1; ++i)
if (s[i] == s[i + 1])
flag = false;
if (flag)
cout << "Good" << endl;
else
cout << "Bad" << endl;
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 801,885 | 801,886 | u054652697 | cpp |
p02993 | #include <iostream>
using namespace std;
int main() {
string s;
bool a = false;
cin >> s;
for (int i = 0; i < 2; ++i) {
if (s[i] == s[i + 1]) {
a = true;
}
}
if (a) {
cout << "Bad";
} else {
cout << "Good";
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
string s;
bool a = false;
cin >> s;
for (int i = 0; i < 3; ++i) {
if (s[i] == s[i + 1]) {
a = true;
}
}
if (a) {
cout << "Bad";
} else {
cout << "Good";
}
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 801,887 | 801,888 | u915047926 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
int main() {
SPEED
string s;
cin >> s;
bool flag = true;
for (int i = 0; i <= 3; ++i) {
if (s[0] == s[i + 1]) {
cout << "Bad" << '\n';
flag = false;
break;
}
}
if (flag) {
cout << "Good" << '\n';
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define SPEED \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
int main() {
SPEED
string s;
cin >> s;
bool flag = true;
for (int i = 0; i <= 3; ++i) {
if (s[i] == s[i + 1]) {
cout << "Bad" << '\n';
flag = false;
break;
}
}
if (flag) {
cout << "Good" << '\n';
}
return 0;
} | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 801,893 | 801,894 | u119996667 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
// Data types macros
typedef long long ll;
typedef vector<int> vec;
typedef unsigned long long ull;
typedef unsigned int ui;
// loop macros
#define f(i, s, e) for (long long i = s; i < e; i++)
#define fe(i, s, e) for (long long i = s; i <= e; i++)
#define fr(i, s, e) for (long long i = e; i > s; i--)
#define fre(i, s, e) for (long long i = e; i >= s; i--)
// Input macros
#define get1(n) cin >> n;
#define get2(n, m) cin >> n >> m;
#define get3(t, n, m) cin >> t >> n >> m;
#define wez(n) \
ll(n); \
cin >> (n);
#define wez2(n, m) \
ll(n), (m); \
cin >> (n) >> (m);
#define wez3(n, m, k) \
ll(n), (m), (k); \
cin >> (t) >> (n) >> (m);
// Action macro
#define allv(c) (c).begin(), (c).end()
#define setmax(a, b) (a) = max((a), (b))
#define setmin(a, b) (a) = min((a), (b))
#define pb push_back
// Specific values macros
#define min -
#define mod 100000000
#define max 1e9
// output macros
#define outa(a, s, e) f(i, s, e) cout << a[i] << (i == e - 1 ? '\n' : ' ')
#define oute(n) cout << n << "\n"
#define outc(n) cout << n << " "
#define out2e(n, m) cout << n << " " << m << "\n"
#define out3e(n, m, o) cout << n << " " << m << " " << o << "\n"
// your work
//
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
for (int i = 0; i < (int)(s.size()); i++) {
if (s[i] == s[i + 1]) {
cout << "BAD\n";
return 0;
}
}
cout << "GOOD\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// Data types macros
typedef long long ll;
typedef vector<int> vec;
typedef unsigned long long ull;
typedef unsigned int ui;
// loop macros
#define f(i, s, e) for (long long i = s; i < e; i++)
#define fe(i, s, e) for (long long i = s; i <= e; i++)
#define fr(i, s, e) for (long long i = e; i > s; i--)
#define fre(i, s, e) for (long long i = e; i >= s; i--)
// Input macros
#define get1(n) cin >> n;
#define get2(n, m) cin >> n >> m;
#define get3(t, n, m) cin >> t >> n >> m;
#define wez(n) \
ll(n); \
cin >> (n);
#define wez2(n, m) \
ll(n), (m); \
cin >> (n) >> (m);
#define wez3(n, m, k) \
ll(n), (m), (k); \
cin >> (t) >> (n) >> (m);
// Action macro
#define allv(c) (c).begin(), (c).end()
#define setmax(a, b) (a) = max((a), (b))
#define setmin(a, b) (a) = min((a), (b))
#define pb push_back
// Specific values macros
#define min -
#define mod 100000000
#define max 1e9
// output macros
#define outa(a, s, e) f(i, s, e) cout << a[i] << (i == e - 1 ? '\n' : ' ')
#define oute(n) cout << n << "\n"
#define outc(n) cout << n << " "
#define out2e(n, m) cout << n << " " << m << "\n"
#define out3e(n, m, o) cout << n << " " << m << " " << o << "\n"
// your work
//
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
for (int i = 0; i < (int)(s.size()); i++) {
if (s[i] == s[i + 1]) {
cout << "Bad\n";
return 0;
}
}
cout << "Good\n";
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,899 | 801,900 | u797339743 | cpp |
p02993 | #include <iostream>
using namespace std;
int main() {
string s;
bool good = false;
cin >> s;
if (s[0] == s[1]) {
} else if (s[1] == s[2]) {
} else if (s[2] == s[3]) {
} else {
good = true;
}
cout << (good == true ? "good" : "bad");
} | #include <iostream>
using namespace std;
int main() {
string s;
bool good = false;
cin >> s;
if (s[0] == s[1]) {
} else if (s[1] == s[2]) {
} else if (s[2] == s[3]) {
} else {
good = true;
}
cout << (good == true ? "Good" : "Bad");
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,910 | 801,911 | u492321750 | cpp |
p02993 | #include <iostream>
#include <string>
using namespace std;
int main() {
string in;
cin >> in;
bool is_bad = false;
for (int i = 1; i < 3; ++i) {
if (in[i] == in[i - 1])
is_bad = true;
}
if (is_bad)
cout << "Bad";
else
cout << "Good";
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string in;
cin >> in;
bool is_bad = false;
for (int i = 1; i < 4; ++i) {
if (in[i] == in[i - 1])
is_bad = true;
}
if (is_bad)
cout << "Bad";
else
cout << "Good";
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 801,922 | 801,923 | u115641970 | cpp |
p02993 | #include <cstring>
#include <iostream>
using namespace std;
int main() {
char n[5];
cin >> n;
if (n[0] == n[1] || n[1] == n[2] || n[2] == n[3])
cout << "Good";
else
cout << "Bad";
return 0;
} | #include <cstring>
#include <iostream>
using namespace std;
int main() {
char n[5];
cin >> n;
if (n[0] == n[1] || n[1] == n[2] || n[2] == n[3])
cout << "Bad";
else
cout << "Good";
return 0;
} | [
"control_flow.branch.else.remove",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 801,926 | 801,927 | u387480576 | cpp |
p02993 | // shan61916
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define endl "\n"
typedef long long ll;
typedef unsigned long long ull;
typedef double dll;
int main() {
IOS
#ifdef SHAN
freopen("input.txt", "r", stdin);
#endif
string s;
for (ll i = 0; i < 3; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
} // good night. | // shan61916
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define endl "\n"
typedef long long ll;
typedef unsigned long long ull;
typedef double dll;
int main() {
IOS
#ifdef SHAN
freopen("input.txt", "r", stdin);
#endif
string s;
cin >> s;
for (ll i = 0; i < 3; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
} // good night. | [] | 801,928 | 801,929 | u032226420 | cpp |
p02993 | /*
Mbak Rose Dong
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, i, j, k, x, y, ans, curr, temp;
string a;
cin >> a;
bool can = 1;
for (i = 0; i < 3; i++) {
if (a[i] == a[i + 1])
can = 0;
}
if (can)
cout << "good";
else
cout << "bad";
return 0;
}
| /*
Mbak Rose Dong
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, i, j, k, x, y, ans, curr, temp;
string a;
cin >> a;
bool can = 1;
for (i = 0; i < 3; i++) {
if (a[i] == a[i + 1])
can = 0;
}
if (can)
cout << "Good";
else
cout << "Bad";
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,934 | 801,935 | u389388073 | cpp |
p02993 | // A
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
bool isgood = true;
cin >> s;
for (int i = 0; i < 4; i++) {
if (s[i] == s[i + 1])
isgood = false;
}
if (isgood) {
cout << 'Good' << endl;
} else {
cout << 'Bad' << endl;
}
} | // A
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
bool isgood = true;
cin >> s;
for (int i = 0; i < 4; i++) {
if (s[i] == s[i + 1])
isgood = false;
}
if (isgood) {
cout << "Good" << endl;
} else {
cout << "Bad" << endl;
}
} | [
"io.output.change",
"literal.string.change"
] | 801,936 | 801,937 | u295656477 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string n, ret = "Good";
cin >> n;
for (int i = 1; i < 3; ++i)
if (n[i] == n[i - 1])
ret = "Bad";
cout << ret << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string n, ret = "Good";
cin >> n;
for (int i = 1; i < 4; ++i)
if (n[i] == n[i - 1])
ret = "Bad";
cout << ret << endl;
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 801,938 | 801,939 | u343441882 | cpp |
p02993 | /// ..:: In The Name Of God ::..
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define endl '\n'
#define INF 2e9
#define int ll
#define vi vector<int>
#define vii vector<pii>
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
signed main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(false);
string X;
ll flag = 0;
cin >> X;
for (int i = 0; i <= X.length(); i++) {
if (X[i] != X[i + 1]) {
flag += 0;
} else if (X[i] == X[i + 1]) {
flag += 1;
}
}
if (flag == 0) {
cout << "Good" << endl;
} else
cout << "Bad" << endl;
}
| /// ..:: In The Name Of God ::..
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define endl '\n'
#define INF 2e9
#define int ll
#define vi vector<int>
#define vii vector<pii>
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
signed main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(false);
string X;
ll flag = 0;
cin >> X;
for (int i = 0; i < 4; i++) {
if (X[i] != X[i + 1]) {
flag += 0;
} else if (X[i] == X[i + 1]) {
flag += 1;
}
}
if (flag == 0) {
cout << "Good" << endl;
} else
cout << "Bad" << endl;
}
| [
"control_flow.loop.for.condition.change",
"call.remove"
] | 801,972 | 801,973 | u809816772 | cpp |
p02993 |
#include <bits/stdc++.h>
using namespace std;
char S[10];
int main() {
int i;
ios::sync_with_stdio(false);
cin.tie(0);
cin >> S;
for (i = 0; i < 0; i++) {
if (S[i] == S[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
char S[10];
int main() {
int i;
ios::sync_with_stdio(false);
cin.tie(0);
cin >> S;
for (i = 0; i < 3; i++) {
if (S[i] == S[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 801,984 | 801,985 | u627562722 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(v) (v).begin(), (v).end()
const int M = 1e6 + 7;
int main() {
string s;
cin >> s;
int f = 0;
for (int i = 0; i + 1 < s.size(); i++) {
if (s[i] == s[i + 1]) {
f = 1;
break;
}
}
cout << (f ? "BAD" : "GOOD");
}
| #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(v) (v).begin(), (v).end()
const int M = 1e6 + 7;
int main() {
string s;
cin >> s;
int f = 0;
for (int i = 0; i + 1 < s.size(); i++) {
if (s[i] == s[i + 1]) {
f = 1;
break;
}
}
cout << (f ? "Bad" : "Good");
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 801,993 | 801,994 | u149999193 | cpp |
p02993 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int counter = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1])
++counter;
}
if (counter == 0)
cout << "good" << endl;
else
cout << "bad" << endl;
return 0;
}
| #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int counter = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1])
++counter;
}
if (counter == 0)
cout << "Good" << endl;
else
cout << "Bad" << endl;
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,001 | 802,002 | u923435485 | cpp |
p02993 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int counter = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1])
++counter;
}
if (counter == 0)
cout << 'good' << endl;
else
cout << 'bad' << endl;
return 0;
} | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int counter = 0;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1])
++counter;
}
if (counter == 0)
cout << "Good" << endl;
else
cout << "Bad" << endl;
return 0;
}
| [] | 802,003 | 802,002 | u923435485 | cpp |
p02993 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a[4];
int c = 0;
string str;
cin >> str;
for (int i = 0; i < 4; i++) {
a[i] = (int)(str[i] - '0');
}
for (int j = 1; j < 4; j++) {
if (a[j] - a[j - 1] == 0) {
cout << "bad" << endl;
break;
} else {
c++;
}
}
if (c == 3) {
cout << "good" << endl;
}
}
| #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a[4];
int c = 0;
string str;
cin >> str;
for (int i = 0; i < 4; i++) {
a[i] = (int)(str[i] - '0');
}
for (int j = 1; j < 4; j++) {
if (a[j] - a[j - 1] == 0) {
cout << "Bad" << endl;
break;
} else {
c++;
}
}
if (c == 3) {
cout << "Good" << endl;
}
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,004 | 802,005 | u267434042 | cpp |
p02993 | #include <iostream>
using namespace std;
int main() {
char a, b;
cin >> a;
for (int i = 0; i < 2; i++) {
cin >> b;
if (b == a) {
cout << "Bad" << endl;
return 0;
}
a = b;
}
cout << "Good" << endl;
} | #include <iostream>
using namespace std;
int main() {
char a, b;
cin >> a;
for (int i = 0; i < 3; i++) {
cin >> b;
if (b == a) {
cout << "Bad" << endl;
return 0;
}
a = b;
}
cout << "Good" << endl;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,008 | 802,009 | u505825680 | cpp |
p02993 | #include <iostream>
using namespace std;
int main() {
char a, b;
cin >> a;
for (int i = 0; i < 3; i++) {
cin >> b;
if (b == a) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
} | #include <iostream>
using namespace std;
int main() {
char a, b;
cin >> a;
for (int i = 0; i < 3; i++) {
cin >> b;
if (b == a) {
cout << "Bad" << endl;
return 0;
}
a = b;
}
cout << "Good" << endl;
} | [
"assignment.add"
] | 802,010 | 802,009 | u505825680 | cpp |
p02993 | #include <iostream>
using namespace std;
int main() {
char str[10];
cin >> str;
int sign;
sign = 0;
if ((str[0] == str[1]) || (str[1] == str[2]) || (str[2] == str[3])) {
cout << "bad\n";
} else {
cout << "good\n";
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
char str[10];
cin >> str;
int sign;
sign = 0;
if ((str[0] == str[1]) || (str[1] == str[2]) || (str[2] == str[3])) {
cout << "Bad\n";
} else {
cout << "Good\n";
}
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,018 | 802,019 | u477710819 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
char a[N];
int main() {
cin >> a;
int flag = 0;
for (int i = 1; i < 3; i++) {
if (a[i] == a[i - 1])
flag = 1;
}
if (flag)
cout << "Bad" << endl;
else
cout << "Good" << endl;
// cout << "Hello world!" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
char a[N];
int main() {
cin >> a;
int flag = 0;
for (int i = 1; i <= 3; i++) {
if (a[i] == a[i - 1])
flag = 1;
}
if (flag)
cout << "Bad" << endl;
else
cout << "Good" << endl;
// cout << "Hello world!" << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,021 | 802,022 | u469341018 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[10];
scanf("%s", s);
for (int i = 0; i < 2; i++)
if (s[i] == s[i + 1])
return puts("Bad"), 0;
puts("Good");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
char s[10];
scanf("%s", s);
for (int i = 0; i <= 2; i++)
if (s[i] == s[i + 1])
return puts("Bad"), 0;
puts("Good");
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,030 | 802,031 | u699602362 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string s;
cin >> s;
if (s[0] == s[1])
cout << "Bad" << endl;
else if (s[1] == s[2])
cout << "Bad" << endl;
else if (s[3] == s[4])
cout << "Bad" << endl;
else
cout << "Good" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string s;
cin >> s;
if (s[0] == s[1])
cout << "Bad" << endl;
else if (s[1] == s[2])
cout << "Bad" << endl;
else if (s[2] == s[3])
cout << "Bad" << endl;
else
cout << "Good" << endl;
return 0;
} | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,035 | 802,036 | u335770593 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
bool jud = false;
for (int i = 0; i < s.size() - 1; i++) {
if (s.at(i) == s.at(i + 1)) {
cout << "Bad" << endl;
jud = true;
}
}
if (!jud)
cout << "Good" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
bool jud = false;
for (int i = 0; i < s.size() - 1; i++) {
if (s.at(i) == s.at(i + 1)) {
cout << "Bad" << endl;
jud = true;
break;
}
}
if (!jud)
cout << "Good" << endl;
}
| [
"control_flow.break.add"
] | 802,045 | 802,046 | u222866518 | cpp |
p02993 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
char a = s[0];
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3])
cout << "Bad" << endl;
return 0;
cout << "Good" << endl;
return 0;
}
| #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
char a = s[0];
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3])
cout << "Bad" << endl;
else
cout << "Good" << endl;
return 0;
}
| [
"function.return_value.change"
] | 802,068 | 802,069 | u679071799 | cpp |
p02993 | #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 REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
using ll = long long;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;
string s;
bool a = true;
int main() {
cin >> s;
rep(i, s.size() - 1) {
if (s[i] == s[i + 1])
a = false;
}
if (a)
cout << "Good" << endl;
else
cout << "Bud" << 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 REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
using ll = long long;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
const ll mod = 1e9 + 7;
string s;
bool a = true;
int main() {
cin >> s;
rep(i, s.size() - 1) {
if (s[i] == s[i + 1])
a = false;
}
if (a)
cout << "Good" << endl;
else
cout << "Bad" << endl;
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 802,074 | 802,075 | u519950235 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string S;
if (S[0] != S[1] && S[1] != S[2] && S[2] != S[3])
cout << "Good" << endl;
else
cout << "Bad" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S[0] != S[1] && S[1] != S[2] && S[2] != S[3])
cout << "Good" << endl;
else
cout << "Bad" << endl;
} | [] | 802,089 | 802,090 | u221582238 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
REP(i, v.size()) {
if (i)
os << " ";
os << v[i];
}
return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<vector<T>> &v) {
REP(i, v.size()) {
if (i)
os << endl;
os << v[i];
}
return os;
}
int main() {
string S;
cin >> S;
if (S[0] == S[1]) {
cout << "Bad" << endl;
} else if (S[1] == S[2]) {
cout << "Bad" << endl;
} else if (S[3] == S[4]) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##i = (a); i >= __last_##i; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
REP(i, v.size()) {
if (i)
os << " ";
os << v[i];
}
return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<vector<T>> &v) {
REP(i, v.size()) {
if (i)
os << endl;
os << v[i];
}
return os;
}
int main() {
string S;
cin >> S;
if (S[0] == S[1]) {
cout << "Bad" << endl;
} else if (S[1] == S[2]) {
cout << "Bad" << endl;
} else if (S[2] == S[3]) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
}
| [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,091 | 802,092 | u983540695 | cpp |
p02993 | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
string S;
cin >> S;
for (int i(0); i < 2; i++) {
if (S[i] == S[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
string S;
cin >> S;
for (int i(0); i <= 2; i++) {
if (S[i] == S[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,093 | 802,094 | u991846372 | cpp |
p02993 | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
string S;
cin >> S;
bool bad = false;
for (int i = 0; i < 2; i++) {
if (S[i] == S[i + 1])
bad = true;
}
if (bad)
cout << "Bad" << endl;
else {
cout << "Good" << endl;
}
} | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
#define REP(i, n) for (int i = 0; i < n; i++)
int main() {
string S;
cin >> S;
bool bad = false;
for (int i = 0; i <= 2; i++) {
if (S[i] == S[i + 1])
bad = true;
}
if (bad)
cout << "Bad" << endl;
else
cout << "Good" << endl;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,109 | 802,110 | u027284591 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
#define pb push_back
#define endl '\n'
///(Moan) ey (hoe) pakhi jeno (Oral) dibe <3
void fuck() {
string s;
int i, flag = 1;
cin >> s;
for (i = 0; i < 2; i++) {
if (s[i] == s[i + 1]) {
flag = 0;
break;
}
}
if (flag == 1)
cout << "Good" << endl;
else
cout << "Bad" << endl;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
fuck();
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
#define pb push_back
#define endl '\n'
///(Moan) ey (hoe) pakhi jeno (Oral) dibe <3
void fuck() {
string s;
int i, flag = 1;
cin >> s;
for (i = 0; i <= 2; i++) {
if (s[i] == s[i + 1]) {
flag = 0;
break;
}
}
if (flag == 1)
cout << "Good" << endl;
else
cout << "Bad" << endl;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
fuck();
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,114 | 802,115 | u100452936 | cpp |
p02993 | #include <iostream>
#include <vector>
using namespace std;
int main() {
string num;
cin >> num;
bool ans = false;
for (int i = 0; i < 2; i++) {
if (num.at(i) == num.at(i + 1)) {
ans = true;
break;
}
}
if (ans == true) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
string num;
cin >> num;
bool ans = false;
for (int i = 0; i < 3; i++) {
if (num.at(i) == num.at(i + 1)) {
ans = true;
break;
}
}
if (ans == true) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,116 | 802,117 | u229148215 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int flag = 0;
for (int i = 0; i < 4; i++) {
if (S[i] == S[i + 1]) {
flag = 1;
} else {
}
}
if (flag == 1) {
cout << "Good" << endl;
} else {
cout << "Bad" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int flag = 0;
for (int i = 0; i < 4; i++) {
if (S[i] == S[i + 1]) {
flag = 1;
} else {
}
}
if (flag == 1) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 802,124 | 802,125 | u453634104 | cpp |
p02993 | // Last Change: 06/22/2019 21:11:48.
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
namespace NS {
void LoopUntilZeroInpput() {
int hogegegege = 0;
while (cin >> hogegegege && hogegegege != 0) {
}
}
} // namespace NS
int main() {
string S;
cin >> S;
bool ans = true;
for (int i = 0; i < 3; ++i) {
if (S[i] == S[i + 1]) {
ans = false;
}
}
if (ans) {
cout << "Yes" << endl;
} else {
cout << "Bad" << endl;
}
}
| // Last Change: 06/22/2019 21:12:19.
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
namespace NS {
void LoopUntilZeroInpput() {
int hogegegege = 0;
while (cin >> hogegegege && hogegegege != 0) {
}
}
} // namespace NS
int main() {
string S;
cin >> S;
bool ans = true;
for (int i = 0; i < 3; ++i) {
if (S[i] == S[i + 1]) {
ans = false;
}
}
if (ans) {
cout << "Good" << endl;
} else {
cout << "Bad" << endl;
}
}
| [
"literal.string.change",
"io.output.change"
] | 802,132 | 802,133 | u915934642 | cpp |
p02993 |
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
string str;
bool check() {
REP(i, 3) {
if (str[i] == str[i + 1])
return true;
}
return false;
}
int main() {
cin >> str;
if (check())
cout << "Bad" << endl;
else
cout << "Yes" << endl;
}
|
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
string str;
bool check() {
REP(i, 3) {
if (str[i] == str[i + 1])
return true;
}
return false;
}
int main() {
cin >> str;
if (check())
cout << "Bad" << endl;
else
cout << "Good" << endl;
}
| [
"literal.string.change",
"io.output.change"
] | 802,145 | 802,146 | u538853954 | cpp |
p02993 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
bool flag;
for (int i = 1; i < s.size(); i++) {
if (s.at(i) == s.at(i - 1)) {
flag = 1;
}
}
if (flag) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
}
| #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
bool flag = 0;
for (int i = 1; i < s.size(); i++) {
if (s.at(i) == s.at(i - 1)) {
flag = 1;
}
}
if (flag) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
}
| [
"variable_declaration.value.change"
] | 802,153 | 802,154 | u066926272 | cpp |
p02993 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
typedef long long int lli;
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<pair<int, int>> vp;
typedef pair<int, pair<int, int>> ddp;
typedef pair<long long, pll> ldp;
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi(n) for (int i = 0; i < (n); i++)
#define fj(n) for (int j = 0; j < (n); j++)
#define fk(n) for (int k = 0; k < (n); k++)
#define mod 1000000007
#define MAX 100000 + 5;
int main() {
fastio string a;
cin >> a;
if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3])
cout << "BAD";
else
cout << "GOOD";
return 0;
} | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update>
indexed_set;
typedef long long int lli;
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<pair<int, int>> vp;
typedef pair<int, pair<int, int>> ddp;
typedef pair<long long, pll> ldp;
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define all(v) v.begin(), v.end()
#define fi(n) for (int i = 0; i < (n); i++)
#define fj(n) for (int j = 0; j < (n); j++)
#define fk(n) for (int k = 0; k < (n); k++)
#define mod 1000000007
#define MAX 100000 + 5;
int main() {
fastio string a;
cin >> a;
if (a[0] == a[1] || a[1] == a[2] || a[2] == a[3])
cout << "Bad";
else
cout << "Good";
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,157 | 802,158 | u802406405 | cpp |
p02993 | #define _CRT_SECURE_NO_WARNINGS
/* include ***********************/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* define *************************/
// for
#define REP(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define REPS(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define RREP(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define RREPS(i, n) for (int i = (int)(n); i > 0; i--)
#define FOR(i, s, n) \
for (int i = (int)(s), i##_len = (int)(n); i < i##_len; i++)
#define RFOR(i, s, n) \
for (int i = (int)(n)-1, i##_len = (int)(s); i >= i##_len; i--)
// printf
#define PRINTD(d) printf("%d\n", (d))
#define PRINTL(d) printf("%lld\n", (d))
// memset
#define m0(s) memset(s, 0, sizeof(s))
#define ml(s) memset(s, 63, sizeof(s))
#define fill(s, c) memset(s, c, sizeof(s))
#define INF 1e9
#define MOD 1000000007
typedef long long ll;
typedef unsigned long long ull;
int diff[4][2] = {
{0, -1},
{-1, 0},
{1, 0},
{0, 1},
};
//今回の変数
int Min(int a, int b) { return (a) < (b) ? (a) : (b); }
int Max(int a, int b) { return (a) > (b) ? (a) : (b); }
ll Minl(ll a, ll b) { return (a) < (b) ? (a) : (b); }
ll Maxl(ll a, ll b) { return (a) > (b) ? (a) : (b); }
int main() {
char s[5];
scanf("%s", &s);
REP(i, 3) {
if (s[i] == s[i + 1]) {
puts("Bad");
return 0;
}
puts("Good");
}
}
| #define _CRT_SECURE_NO_WARNINGS
/* include ***********************/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* define *************************/
// for
#define REP(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define REPS(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define RREP(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define RREPS(i, n) for (int i = (int)(n); i > 0; i--)
#define FOR(i, s, n) \
for (int i = (int)(s), i##_len = (int)(n); i < i##_len; i++)
#define RFOR(i, s, n) \
for (int i = (int)(n)-1, i##_len = (int)(s); i >= i##_len; i--)
// printf
#define PRINTD(d) printf("%d\n", (d))
#define PRINTL(d) printf("%lld\n", (d))
// memset
#define m0(s) memset(s, 0, sizeof(s))
#define ml(s) memset(s, 63, sizeof(s))
#define fill(s, c) memset(s, c, sizeof(s))
#define INF 1e9
#define MOD 1000000007
typedef long long ll;
typedef unsigned long long ull;
int diff[4][2] = {
{0, -1},
{-1, 0},
{1, 0},
{0, 1},
};
//今回の変数
int Min(int a, int b) { return (a) < (b) ? (a) : (b); }
int Max(int a, int b) { return (a) > (b) ? (a) : (b); }
ll Minl(ll a, ll b) { return (a) < (b) ? (a) : (b); }
ll Maxl(ll a, ll b) { return (a) > (b) ? (a) : (b); }
int main() {
char s[5];
scanf("%s", &s);
REP(i, 3) {
if (s[i] == s[i + 1]) {
puts("Bad");
return 0;
}
}
puts("Good");
}
| [] | 802,166 | 802,167 | u539339654 | cpp |
p02993 | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < x; i++)
#define SORT(x) sort(x.begin(), x.end())
#define pb(x) push_back(x)
#define int long long
signed main(void) {
string str = "good";
string S;
cin >> S;
for (int i = 1; i < 4; i++) {
if (S[i] == S[i - 1]) {
str = "bad";
}
}
cout << str << endl;
return 0;
}
| #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, x) for (int i = 0; i < x; i++)
#define SORT(x) sort(x.begin(), x.end())
#define pb(x) push_back(x)
#define int long long
signed main(void) {
string str = "Good";
string S;
cin >> S;
for (int i = 1; i < 4; i++) {
if (S[i] == S[i - 1]) {
str = "Bad";
}
}
cout << str << endl;
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 802,172 | 802,173 | u785975381 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define SORT(x) sort(x.begin(), x.end())
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1000000000
#define mod 1000000007
typedef long long ll;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int main() {
int a, b, c, n, m, ans = 0;
string s, t, u;
cin >> s;
bool flag = true;
rep(i, 2) {
if (s[i] == s[i + 1])
flag = false;
}
if (flag)
cout << "Good" << endl;
else
cout << "Bad" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define SORT(x) sort(x.begin(), x.end())
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1000000000
#define mod 1000000007
typedef long long ll;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int main() {
int a, b, c, n, m, ans = 0;
string s, t, u;
cin >> s;
bool flag = true;
rep(i, 3) {
if (s[i] == s[i + 1])
flag = false;
}
if (flag)
cout << "Good" << endl;
else
cout << "Bad" << endl;
return 0;
}
| [
"literal.number.change",
"call.arguments.change"
] | 802,176 | 802,177 | u022832318 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
string a;
int main() {
cin >> a;
for (int i = 0; i < a.size(); i++) {
if (a[i] == a[i + 1]) {
cout << "bad";
return 0;
}
}
cout << "good";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
string a;
int main() {
cin >> a;
for (int i = 0; i < a.size(); i++) {
if (a[i] == a[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,180 | 802,181 | u730153732 | cpp |
p02993 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <sstream>
#include <stdexcept>
#include <stdio.h>
#include <string>
#include <vector>
// for(int i=0;i<n;i++)
#define cinf(n, x) \
for (int i = 0; i < n; i++) \
cin >> x[i];
#define pi pair<int, int>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a == b || b == c || c == d) {
cout << "Bad";
} else
cout << "Good";
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <sstream>
#include <stdexcept>
#include <stdio.h>
#include <string>
#include <vector>
// for(int i=0;i<n;i++)
#define cinf(n, x) \
for (int i = 0; i < n; i++) \
cin >> x[i];
#define pi pair<int, int>
using namespace std;
int main() {
char a, b, c, d;
cin >> a >> b >> c >> d;
if (a == b || b == c || c == d) {
cout << "Bad";
} else
cout << "Good";
} | [
"variable_declaration.type.primitive.change"
] | 802,186 | 802,187 | u139300044 | cpp |
p02993 | #include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
bool good = false;
for (int i = 0; i < s.size() - 1; ++i) {
good |= (s[i] == s[i + 1]);
}
cout << (good ? "Good" : "Bad") << endl;
} | #include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
string s;
cin >> s;
bool good = false;
for (int i = 0; i < s.size() - 1; ++i) {
good |= (s[i] == s[i + 1]);
}
cout << (good ? "Bad" : "Good") << endl;
} | [
"literal.string.change",
"io.output.change"
] | 802,190 | 802,191 | u169848474 | cpp |
p02993 |
#include <bits/stdc++.h>
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 9999999999;
#define all(c) c.begin(), c.end()
#define mp(x, y) make_pair(x, y)
#define pb push_back
#define f first
#define s second
#define pi 3.141592653589793238
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
string s;
cin >> s;
if (s[0] == s[1] || s[1] == s[2] || s[3] == s[4])
return cout << "Bad\n", 0;
cout << "Good\n";
return 0;
}
|
#include <bits/stdc++.h>
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 9999999999;
#define all(c) c.begin(), c.end()
#define mp(x, y) make_pair(x, y)
#define pb push_back
#define f first
#define s second
#define pi 3.141592653589793238
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
string s;
cin >> s;
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3])
return cout << "Bad\n", 0;
cout << "Good\n";
return 0;
}
| [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,192 | 802,193 | u435416250 | cpp |
p02993 | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include <vector>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <chrono>
#include <random>
#include <thread>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define all(c) c.begin(), c.end()
#define repeat(i, n) for (int i = 0; i < static_cast<int>(n); i++)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define dump(x)
#endif
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
os << "{";
for (auto it = v.begin(); it != v.end(); ++it) {
if (it != v.begin())
os << ",";
os << *it;
}
return os << "}";
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &v) {
os << "{";
os << v.first << ", " << v.second;
return os << "}";
}
// ---------------------------------------------------------------------------
using point = complex<double>;
using ll = int64_t;
int my_main(int argc, char **argv) {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
bool good = true;
for (int i = 0; i < s.size() - 1; i++) {
good = good && s[i] == s[i + 1];
}
cout << (good ? "Good" : "Bad") << endl;
return 0;
}
// ----------------------------------------------------------------------------
// Test driver
#ifdef DEBUG
#define MAY_RUN_TESTCASE
#endif
#ifdef MAY_RUN_TESTCASE
#include <fstream>
#if __has_include(<unistd.h>)
// Mac, Linux
#include <unistd.h>
#elif __has_include(<io.h>)
// Windows
#include <io.h>
#else
// Other?
#error "unistd.h or io.h not found"
#endif
bool test_file_exists(const std::string &str) {
std::ifstream fs(str);
return fs.is_open();
}
#endif
int main(int argc, char **argv) {
#ifndef MAY_RUN_TESTCASE
return my_main(argc, argv);
#else
if (argc == 1) {
return my_main(argc, argv);
} else if (argc == 2) {
char *stdin_file = argv[1];
freopen(stdin_file, "r", stdin);
return my_main(argc, argv);
} else if (argc == 5) {
std::string stdin_file = argv[1];
std::string expected_file = argv[2];
std::string stdout_file = argv[3];
std::string stderr_file = argv[4];
if (!test_file_exists(stdin_file)) {
std::cerr << stdin_file << " not found" << std::endl;
return 3;
}
if (!test_file_exists(expected_file)) {
std::cerr << expected_file << " not found" << std::endl;
return 3;
}
int original_stdin = dup(fileno(stdin));
int original_stdout = dup(fileno(stdout));
int original_stderr = dup(fileno(stderr));
freopen(stdin_file.c_str(), "r", stdin);
freopen(stdout_file.c_str(), "w", stdout);
freopen(stderr_file.c_str(), "w", stderr);
int ret = my_main(argc, argv);
fflush(stdout);
fflush(stderr);
dup2(original_stderr, fileno(stderr));
dup2(original_stdout, fileno(stdout));
dup2(original_stdin, fileno(stdin));
if (ret != 0) {
std::cerr << "main returns " << ret << std::endl;
return ret;
}
std::ifstream inp(stdin_file);
std::ifstream out(stdout_file);
std::ifstream err(stderr_file);
std::ifstream exp(expected_file);
// Clear is needed if the file is empty.
std::cout << "----- input -----" << std::endl;
std::cout << inp.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl << std::endl;
std::cout << "----- output ----" << std::endl;
std::cout << out.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl << std::endl;
std::cout << "---- expected ---" << std::endl;
std::cout << exp.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl << std::endl;
std::cout << "----- stderr ----" << std::endl;
std::cout << err.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl;
inp.seekg(0);
out.seekg(0);
exp.seekg(0);
err.seekg(0);
std::string output_str, expected_str;
{
std::stringstream output_ss;
output_ss << out.rdbuf();
output_str = output_ss.str();
std::stringstream expected_ss;
expected_ss << exp.rdbuf();
expected_str = expected_ss.str();
}
// Remove trailing spaces
output_str.erase(output_str.find_last_not_of(" \n\r\t") + 1);
expected_str.erase(expected_str.find_last_not_of(" \n\r\t") + 1);
if (output_str == expected_str)
return 0;
else
return 1;
}
return 1;
#endif
}
| #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include <vector>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <chrono>
#include <random>
#include <thread>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define all(c) c.begin(), c.end()
#define repeat(i, n) for (int i = 0; i < static_cast<int>(n); i++)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define dump(x)
#endif
template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
os << "{";
for (auto it = v.begin(); it != v.end(); ++it) {
if (it != v.begin())
os << ",";
os << *it;
}
return os << "}";
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &v) {
os << "{";
os << v.first << ", " << v.second;
return os << "}";
}
// ---------------------------------------------------------------------------
using point = complex<double>;
using ll = int64_t;
int my_main(int argc, char **argv) {
ios::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
bool good = true;
for (int i = 0; i < s.size() - 1; i++) {
good = good && s[i] != s[i + 1];
}
cout << (good ? "Good" : "Bad") << endl;
return 0;
}
// ----------------------------------------------------------------------------
// Test driver
#ifdef DEBUG
#define MAY_RUN_TESTCASE
#endif
#ifdef MAY_RUN_TESTCASE
#include <fstream>
#if __has_include(<unistd.h>)
// Mac, Linux
#include <unistd.h>
#elif __has_include(<io.h>)
// Windows
#include <io.h>
#else
// Other?
#error "unistd.h or io.h not found"
#endif
bool test_file_exists(const std::string &str) {
std::ifstream fs(str);
return fs.is_open();
}
#endif
int main(int argc, char **argv) {
#ifndef MAY_RUN_TESTCASE
return my_main(argc, argv);
#else
if (argc == 1) {
return my_main(argc, argv);
} else if (argc == 2) {
char *stdin_file = argv[1];
freopen(stdin_file, "r", stdin);
return my_main(argc, argv);
} else if (argc == 5) {
std::string stdin_file = argv[1];
std::string expected_file = argv[2];
std::string stdout_file = argv[3];
std::string stderr_file = argv[4];
if (!test_file_exists(stdin_file)) {
std::cerr << stdin_file << " not found" << std::endl;
return 3;
}
if (!test_file_exists(expected_file)) {
std::cerr << expected_file << " not found" << std::endl;
return 3;
}
int original_stdin = dup(fileno(stdin));
int original_stdout = dup(fileno(stdout));
int original_stderr = dup(fileno(stderr));
freopen(stdin_file.c_str(), "r", stdin);
freopen(stdout_file.c_str(), "w", stdout);
freopen(stderr_file.c_str(), "w", stderr);
int ret = my_main(argc, argv);
fflush(stdout);
fflush(stderr);
dup2(original_stderr, fileno(stderr));
dup2(original_stdout, fileno(stdout));
dup2(original_stdin, fileno(stdin));
if (ret != 0) {
std::cerr << "main returns " << ret << std::endl;
return ret;
}
std::ifstream inp(stdin_file);
std::ifstream out(stdout_file);
std::ifstream err(stderr_file);
std::ifstream exp(expected_file);
// Clear is needed if the file is empty.
std::cout << "----- input -----" << std::endl;
std::cout << inp.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl << std::endl;
std::cout << "----- output ----" << std::endl;
std::cout << out.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl << std::endl;
std::cout << "---- expected ---" << std::endl;
std::cout << exp.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl << std::endl;
std::cout << "----- stderr ----" << std::endl;
std::cout << err.rdbuf() << std::endl;
std::cout.clear();
std::cout << "-----------------" << std::endl;
inp.seekg(0);
out.seekg(0);
exp.seekg(0);
err.seekg(0);
std::string output_str, expected_str;
{
std::stringstream output_ss;
output_ss << out.rdbuf();
output_str = output_ss.str();
std::stringstream expected_ss;
expected_ss << exp.rdbuf();
expected_str = expected_ss.str();
}
// Remove trailing spaces
output_str.erase(output_str.find_last_not_of(" \n\r\t") + 1);
expected_str.erase(expected_str.find_last_not_of(" \n\r\t") + 1);
if (output_str == expected_str)
return 0;
else
return 1;
}
return 1;
#endif
}
| [
"misc.opposites",
"expression.operator.compare.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 802,194 | 802,195 | u419874471 | cpp |
p02993 | #include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unrolled-loops")
using namespace std;
#define inp "TestCode.inp"
#define out "TestCode.out"
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define FileInOut \
freopen(inp, "r", stdin); \
freopen(out, "w", stdout);
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define pi acos(-1)
#define pii pair<int, int>
#define ppiii pair<pair<int, int>, int>
#define INF 1000000
#define endl '\n'
#define ll long long
#define pq priority_queue
const int mod = 1e9 + 7;
int test = 1;
/*-----------------------------------------------*/
void nathan_on_osu(){FAST
#ifndef ONLINE_JUDGE
FileInOut
#endif // ONLINE_JUDGE
} /*-----------------------------------------------*/
string s;
int main() {
nathan_on_osu();
cin >> s;
for (int i = 0; i <= 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
}
| #include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unrolled-loops")
using namespace std;
#define inp "TestCode.inp"
#define out "TestCode.out"
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define FileInOut \
freopen(inp, "r", stdin); \
freopen(out, "w", stdout);
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define pi acos(-1)
#define pii pair<int, int>
#define ppiii pair<pair<int, int>, int>
#define INF 1000000
#define endl '\n'
#define ll long long
#define pq priority_queue
const int mod = 1e9 + 7;
int test = 1;
/*-----------------------------------------------*/
void nathan_on_osu(){FAST
#ifndef ONLINE_JUDGE
// FileInOut
#endif // ONLINE_JUDGE
} /*-----------------------------------------------*/
string s;
int main() {
nathan_on_osu();
cin >> s;
for (int i = 0; i <= 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
}
| [] | 802,196 | 802,197 | u421588660 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
#define REP(i, x, n) for (ll i = x; i < (ll)n; ++i)
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
int main() {
string s;
cin >> s;
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3]) {
cout << "BAD" << endl;
} else
cout << "GOOD" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
#define REP(i, x, n) for (ll i = x; i < (ll)n; ++i)
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
int main() {
string s;
cin >> s;
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3]) {
cout << "Bad" << endl;
} else
cout << "Good" << endl;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,198 | 802,199 | u059082716 | cpp |
p02993 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define endl '\n'
#define ll long long
#define mod 1000000007
#define NCONS 200001
//#define NCONS 100001
//#define NCONS 1001
//#define NCONS 101
#define MCONS 2001
#define LIMIT 1000000000
#define TRUE 1
#define FALSE 0
#define toRadian(degree) ((degree) * (M_PI / 180.))
#define toDegree(radian) ((radian) * (180. / M_PI))
using namespace std;
struct Point {
int x;
int y;
};
struct PPoint {
Point x;
Point y;
};
ll gcd(ll a, ll b) {
if (a < b)
swap(a, b);
if (b <= 0)
return a;
return gcd(b, a % b);
}
int main(void) {
cin.tie(NULL);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
bool flag = false;
for (int i = 0; i < 2; i++)
if (s[i] == s[i + 1])
flag = true;
if (flag)
cout << "Bad";
else
cout << "Good";
return 0;
}
| #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define endl '\n'
#define ll long long
#define mod 1000000007
#define NCONS 200001
//#define NCONS 100001
//#define NCONS 1001
//#define NCONS 101
#define MCONS 2001
#define LIMIT 1000000000
#define TRUE 1
#define FALSE 0
#define toRadian(degree) ((degree) * (M_PI / 180.))
#define toDegree(radian) ((radian) * (180. / M_PI))
using namespace std;
struct Point {
int x;
int y;
};
struct PPoint {
Point x;
Point y;
};
ll gcd(ll a, ll b) {
if (a < b)
swap(a, b);
if (b <= 0)
return a;
return gcd(b, a % b);
}
int main(void) {
cin.tie(NULL);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
bool flag = false;
for (int i = 0; i <= 2; i++)
if (s[i] == s[i + 1])
flag = true;
if (flag)
cout << "Bad";
else
cout << "Good";
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,200 | 802,201 | u285118720 | cpp |
p02993 | //#typedef int ll
// include
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
// namespace
using namespace std;
// typedef
typedef long long ll;
typedef long double ld;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef pair<int, int> pint;
// const
const int inf = 1e9;
const int mod = ((int)1e9 + 7);
// loop
#define rep(i, n) for (int i = 0, i##_mx = n; i < i##_mx; i++)
#define brep(i, b, e) for (int i = b; i < e; i++)
#define erep(i, b, e) for (int i = b; i <= e; i++)
#define rrep(i, b, e) for (int i = b; i >= e; i--)
// STL
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define all(x) (x).begin(), (x).end()
// function
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void prime(vint &v, int n) {
brep(i, 2, n) {
bool fg = false;
for (auto e : v) {
if (i % e == 0) {
fg = true;
}
}
if (fg) {
continue;
}
v.pb(i);
}
}
void in(vint &v) {
for (auto &i : v) {
cin >> i;
}
}
void in(vll &v) {
for (auto &i : v) {
cin >> i;
}
}
signed main() {
string s;
cin >> s;
for (int i = 0; i < 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
} | //#typedef int ll
// include
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <vector>
// namespace
using namespace std;
// typedef
typedef long long ll;
typedef long double ld;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef pair<int, int> pint;
// const
const int inf = 1e9;
const int mod = ((int)1e9 + 7);
// loop
#define rep(i, n) for (int i = 0, i##_mx = n; i < i##_mx; i++)
#define brep(i, b, e) for (int i = b; i < e; i++)
#define erep(i, b, e) for (int i = b; i <= e; i++)
#define rrep(i, b, e) for (int i = b; i >= e; i--)
// STL
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define all(x) (x).begin(), (x).end()
// function
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void prime(vint &v, int n) {
brep(i, 2, n) {
bool fg = false;
for (auto e : v) {
if (i % e == 0) {
fg = true;
}
}
if (fg) {
continue;
}
v.pb(i);
}
}
void in(vint &v) {
for (auto &i : v) {
cin >> i;
}
}
void in(vll &v) {
for (auto &i : v) {
cin >> i;
}
}
signed main() {
string s;
cin >> s;
for (int i = 0; i <= 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
}
| [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,202 | 802,203 | u178152729 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
bool f = true;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1])
f = false;
}
cout << (f ? "Good" : "Bad") << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
bool f = true;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1])
f = false;
}
cout << (f ? "Good" : "Bad") << endl;
} | [] | 802,210 | 802,211 | u339937125 | cpp |
p02993 | #include "bits/stdc++.h"
#define rep(i, N) for (int(i) = 0; (i) < (N); (i)++)
#define debug(var) std::cout << #var << " : " << var;
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
std::string S;
std::cin >> S;
bool flag = true;
rep(i, 3) {
if (S[i] == S[i + 1]) {
bool flag = false;
}
}
if (flag)
std::cout << "Good";
else
std::cout << "Bad";
return 0;
} | #include "bits/stdc++.h"
#define rep(i, N) for (int(i) = 0; (i) < (N); (i)++)
#define debug(var) std::cout << #var << " : " << var;
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
std::string S;
std::cin >> S;
bool flag = true;
rep(i, 3) {
if (S[i] == S[i + 1]) {
flag = false;
}
}
if (flag)
std::cout << "Good";
else
std::cout << "Bad";
return 0;
} | [] | 802,212 | 802,213 | u575279726 | cpp |
p02993 | #include <algorithm>
#include <float.h>
#include <iostream>
#include <math.h>
using namespace ::std;
int main() {
string S;
cin >> S;
int check = 0;
if (S[0] == S[1]) {
check = 1;
} else if (S[1] == S[2]) {
check = 1;
} else if (S[2] == S[3]) {
check = 1;
}
if (check == 1) {
cout << "bad";
} else {
cout << "good";
}
} | #include <algorithm>
#include <float.h>
#include <iostream>
#include <math.h>
using namespace ::std;
int main() {
string S;
cin >> S;
int check = 0;
if (S[0] == S[1]) {
check = 1;
} else if (S[1] == S[2]) {
check = 1;
} else if (S[2] == S[3]) {
check = 1;
}
if (check == 1) {
cout << "Bad";
} else {
cout << "Good";
}
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,220 | 802,221 | u319945100 | cpp |
p02993 | #include <cstdio>
using namespace std;
int main() {
char s[9];
scanf("%s", s);
for (int i = 0; i < 3; ++i) {
if (s[i] == s[i + 1]) {
puts("bad");
return 0;
}
}
puts("good");
}
| #include <cstdio>
using namespace std;
int main() {
char s[9];
scanf("%s", s);
for (int i = 0; i < 3; ++i) {
if (s[i] == s[i + 1]) {
puts("Bad");
return 0;
}
}
puts("Good");
}
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 802,224 | 802,225 | u127130661 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
string S;
int main() {
int s, i;
cin >> S, s = S.length();
for (i = 0; i < s; i++)
if (S[i] == S[i + 1]) {
cout << "bad";
return 0;
}
cout << "good";
} | #include <bits/stdc++.h>
using namespace std;
string S;
int main() {
int s, i;
cin >> S, s = S.length();
for (i = 0; i < s; i++)
if (S[i] == S[i + 1]) {
cout << "Bad";
return 0;
}
cout << "Good";
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,235 | 802,236 | u680068823 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
for (int i = 0; i < 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
;
return 0;
}
}
cout << "Good" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
;
return 0;
}
}
cout << "Good" << endl;
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,239 | 802,240 | u172369914 | cpp |
p02993 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
#define FOR(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR1(i, n) for (int(i) = 1; (i) < (n); (i)++)
#define eFOR(i, n) for (int(i) = 0; (i) <= (n); (i)++)
#define eFOR1(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define SORT(i) sort((i).begin(), (i).end())
#define rSORT(i) sort((i).begin(), (i).end(), greater<int>());
#define YES(i) cout << ((i) ? "Yes" : "No") << endl;
constexpr auto INF = 1000000000;
constexpr auto LLINF = 1LL << 62;
constexpr auto mod = 1000000007;
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;
}
int main() {
string s;
cin >> s;
string ans = "Good";
FOR(i, 3) if (s[i] == s[i] + 1) ans = "Bad";
cout << ans << endl;
}
| #include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
#define FOR(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR1(i, n) for (int(i) = 1; (i) < (n); (i)++)
#define eFOR(i, n) for (int(i) = 0; (i) <= (n); (i)++)
#define eFOR1(i, n) for (int(i) = 1; (i) <= (n); (i)++)
#define SORT(i) sort((i).begin(), (i).end())
#define rSORT(i) sort((i).begin(), (i).end(), greater<int>());
#define YES(i) cout << ((i) ? "Yes" : "No") << endl;
constexpr auto INF = 1000000000;
constexpr auto LLINF = 1LL << 62;
constexpr auto mod = 1000000007;
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;
}
int main() {
string s;
cin >> s;
string ans = "Good";
FOR(i, 3) if (s[i] == s[i + 1]) ans = "Bad";
cout << ans << endl;
}
| [
"control_flow.branch.if.condition.change"
] | 802,241 | 802,242 | u863044225 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define f(i, q) for (int i = 0; i < q; i++)
typedef long long ll;
int main() {
string s;
cin >> s;
bool flg = true;
for (int i = 1; i < s.size(); i++) {
if (s.at(i - 1) == s.at(i)) {
flg = false;
break;
}
}
if (flg) {
puts("Goods");
} else {
puts("Bad");
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define f(i, q) for (int i = 0; i < q; i++)
typedef long long ll;
int main() {
string s;
cin >> s;
bool flg = true;
for (int i = 1; i < s.size(); i++) {
if (s.at(i - 1) == s.at(i)) {
flg = false;
break;
}
}
if (flg) {
puts("Good");
} else {
puts("Bad");
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 802,245 | 802,246 | u279545555 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main() {
string s;
cin >> s;
for (int i = 1; i < 4; ++i) {
if (s[i] == s[i - 1]) {
cout << "Bad" << endl;
break;
}
}
cout << "Good" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main() {
string s;
cin >> s;
for (int i = 1; i < 4; ++i) {
if (s[i] == s[i - 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
return 0;
} | [
"control_flow.break.remove",
"control_flow.return.add",
"function.return_value.change"
] | 802,257 | 802,258 | u554964974 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define pb push_back
#define size(v) (int)v.size()
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
ll power_mod(ll a, ll x) {
if (x == 0)
return 1;
ll y = power_mod(a, x / 2);
ll ans = (y * y) % mod;
if (x % 2)
ans = (ans * a) % mod;
return ans;
}
ll inv(ll a) { return power_mod(a, mod - 2); }
ll power(ll a, ll x) {
if (x == 0)
return 1;
ll y = power(a, x / 2);
ll ans = (y * y);
if (x % 2)
ans *= a;
return ans;
}
int main() {
string s;
cin >> s;
for (int i = 0; i < 2; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mod 1000000007
#define all(v) v.begin(), v.end()
#define pb push_back
#define size(v) (int)v.size()
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
ll power_mod(ll a, ll x) {
if (x == 0)
return 1;
ll y = power_mod(a, x / 2);
ll ans = (y * y) % mod;
if (x % 2)
ans = (ans * a) % mod;
return ans;
}
ll inv(ll a) { return power_mod(a, mod - 2); }
ll power(ll a, ll x) {
if (x == 0)
return 1;
ll y = power(a, x / 2);
ll ans = (y * y);
if (x % 2)
ans *= a;
return ans;
}
int main() {
string s;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,259 | 802,260 | u742642200 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[5];
int flag = 1;
cin >> s;
for (int i = 0; i < strlen(s) - 1; i++) {
if (s[i] == s[i + 1])
flag = 0;
}
if (flag == 0)
cout << "bad";
else
cout << "good";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[5];
int flag = 1;
cin >> s;
for (int i = 0; i < strlen(s) - 1; i++) {
if (s[i] == s[i + 1])
flag = 0;
}
if (flag == 0)
cout << "Bad";
else
cout << "Good";
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,261 | 802,262 | u828835146 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
for (ll i = 0; i < 3; i++) {
if (s[i] == s[i + 1]) {
cout << "BAD" << endl;
return 0;
}
}
cout << "GOOD" << endl;
} | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
for (ll i = 0; i < 3; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,268 | 802,269 | u955243910 | cpp |
p02993 | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
char tmp = 0;
for (int i = 0; i < s.size(); i++) {
if (tmp == s[i]) {
cout << "Bad" << endl;
return 0;
}
tmp = s[i];
}
cout << "Good" << endl;
return 0;
} | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
char tmp = 0;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (tmp == s[i]) {
cout << "Bad" << endl;
return 0;
}
tmp = s[i];
}
cout << "Good" << endl;
return 0;
} | [] | 802,270 | 802,271 | u675512317 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define Re register
#define U unsigned
#define forn(i, a, b) for (Re int i = a; i <= b; ++i)
#define nfor(i, a, b) for (Re int i = a; i >= b; --i)
#define CLR(i, a) memset(i, a, sizeof(i))
#define BR printf("--------------------\n")
#define pb push_back
#define Rep(i, a, b) for (int i = a; i <= b; i++)
#define DEBUG(x) std::cerr << #x << '=' << x << std::endl
const double PI = atan(1.) * 4.;
const int maxn = 1e6 + 5;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double e = 2.71828182845904523536;
int dir[4][2] = {1, 0, 0, 1, -1, 0, 0, -1};
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
bool f = true;
for (int i = 1; i <= 3; i++) {
if (s[i] == s[i - 1]) {
f = false;
}
}
if (f)
cout << "good";
else
cout << "bad";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define Re register
#define U unsigned
#define forn(i, a, b) for (Re int i = a; i <= b; ++i)
#define nfor(i, a, b) for (Re int i = a; i >= b; --i)
#define CLR(i, a) memset(i, a, sizeof(i))
#define BR printf("--------------------\n")
#define pb push_back
#define Rep(i, a, b) for (int i = a; i <= b; i++)
#define DEBUG(x) std::cerr << #x << '=' << x << std::endl
const double PI = atan(1.) * 4.;
const int maxn = 1e6 + 5;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double e = 2.71828182845904523536;
int dir[4][2] = {1, 0, 0, 1, -1, 0, 0, -1};
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
bool f = true;
for (int i = 1; i <= 3; i++) {
if (s[i] == s[i - 1]) {
f = false;
}
}
if (f)
cout << "Good";
else
cout << "Bad";
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,272 | 802,273 | u696356788 | cpp |
p02993 | #include <algorithm>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define ll long long
#define rep2(i, a, b) for (int i = a; i <= b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep3(i, a, b) for (int i = a; i >= b; i--)
#define REP(e, v) for (auto e : v)
#define queint queue<int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pq priority_queue<int> //大きい順
#define pqg priority_queue<int, vec, greater<int>> //小さい順
#define pb push_back
#define vec vector<int>
#define vecvec vector<vector<int>>
#define vecll vector<ll>
#define vecvecll vector<vector<ll>>
#define bs binary_search
#define All(c) (c).begin(), (c).end()
#define mp make_pair
using namespace std;
int in() {
int x;
scanf("%d", &x);
return x;
}
string stin() {
string s;
cin >> s;
return s;
}
ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
int main() {
string s = stin();
rep(i, 3) {
if (s[i] == s[i + 1])
cout << "Bad" << endl;
return 0;
}
cout << "Good" << endl;
} | #include <algorithm>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define ll long long
#define rep2(i, a, b) for (int i = a; i <= b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep3(i, a, b) for (int i = a; i >= b; i--)
#define REP(e, v) for (auto e : v)
#define queint queue<int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pq priority_queue<int> //大きい順
#define pqg priority_queue<int, vec, greater<int>> //小さい順
#define pb push_back
#define vec vector<int>
#define vecvec vector<vector<int>>
#define vecll vector<ll>
#define vecvecll vector<vector<ll>>
#define bs binary_search
#define All(c) (c).begin(), (c).end()
#define mp make_pair
using namespace std;
int in() {
int x;
scanf("%d", &x);
return x;
}
string stin() {
string s;
cin >> s;
return s;
}
ll lin() {
ll x;
scanf("%lld", &x);
return x;
}
int main() {
string s = stin();
rep(i, 3) {
if (s[i] == s[i + 1]) {
cout << "Bad" << endl;
return 0;
}
}
cout << "Good" << endl;
}
| [] | 802,278 | 802,279 | u434662823 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
#define maxn 300005
#define ll long long
int n, m, flag;
char a[10];
int main() {
scanf("%s", a);
for (int i = 2; i < strlen(a); i++)
if (a[i] == a[i - 1]) {
flag = 1;
break;
}
if (flag == 0)
printf("Good");
else
printf("Bad");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define maxn 300005
#define ll long long
int n, m, flag;
char a[10];
int main() {
scanf("%s", a);
for (int i = 1; i < strlen(a); i++)
if (a[i] == a[i - 1]) {
flag = 1;
break;
}
if (flag == 0)
printf("Good");
else
printf("Bad");
return 0;
} | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 802,282 | 802,283 | u354176216 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
;
int main() {
int v;
string A;
cin >> A;
int j = A.size();
for (int i = 0; i < j - 1; i++) {
if (A[i] == A[i + 1]) {
cout << "Bad" << endl;
v = 0;
break;
}
}
if (v != 0)
cout << "Good" << endl;
} | #include <bits/stdc++.h>
using namespace std;
;
int main() {
int v = 0;
string A;
cin >> A;
int j = A.size();
for (int i = 0; i < j - 1; i++) {
if (A[i] == A[i + 1]) {
cout << "Bad" << endl;
v = 1;
break;
}
}
if (v != 1)
cout << "Good" << endl;
}
| [
"variable_declaration.value.change",
"literal.number.change",
"assignment.value.change",
"control_flow.branch.if.condition.change"
] | 802,284 | 802,285 | u618604643 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Yes";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
}
| [
"literal.string.change",
"io.output.change"
] | 802,288 | 802,289 | u265392294 | cpp |
p02993 | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define ll long long int
#define INF INT_MAX
#define mod
#define chutiyaap \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
using namespace std;
bool sortbysec(const pair<ll, ll> &a, const pair<ll, ll> &b) {
return (a.second < b.second);
}
ll gcd(ll a, ll b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
int main() {
chutiyaap;
string s;
cin >> s;
for (ll i = 0; i < 3; i++) {
if (s[i] == s[i - 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
}
| #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define ll long long int
#define INF INT_MAX
#define mod
#define chutiyaap \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
using namespace std;
bool sortbysec(const pair<ll, ll> &a, const pair<ll, ll> &b) {
return (a.second < b.second);
}
ll gcd(ll a, ll b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
int main() {
chutiyaap;
string s;
cin >> s;
for (ll i = 1; i < 4; i++) {
if (s[i] == s[i - 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
}
| [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 802,298 | 802,299 | u776675173 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3])
cout << "BAD";
else
cout << "GOOD";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3])
cout << "Bad";
else
cout << "Good";
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,300 | 802,301 | u229370339 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3])
co("Bad");
else
co("Good");
Would you please return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3])
co("Bad");
else
co("Good");
Would you please return 0;
} | [] | 802,302 | 802,303 | u096883693 | cpp |
p02993 | #include <iostream>
using namespace std;
int main() {
string S;
cin >> S;
if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3]) {
cout << "Bad" << endl;
} else {
cout << "Nice" << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
string S;
cin >> S;
if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3]) {
cout << "Bad" << endl;
} else {
cout << "Good" << endl;
}
return 0;
} | [
"literal.string.change",
"io.output.change"
] | 802,304 | 802,305 | u188117876 | cpp |
p02993 | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi 3.141592653589793
using namespace std;
int main() {
// cout << setprecision(10);
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s;
cin >> s;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == s[i - 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
} | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define pi 3.141592653589793
using namespace std;
int main() {
// cout << setprecision(10);
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s;
cin >> s;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
} | [
"misc.opposites",
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,306 | 802,307 | u188208110 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ldb = long double;
using pa = pair<ll, ll>;
using vec = vector<ll>;
#define pb push_back
#define po pop_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define f(i, x, n) for (ll i = x; i < n; i++)
#define unique_sort(x) \
sort(all(x)), x.resize(distance(x.begin(), unique(all(x))))
#define all(c) c.begin(), c.end()
#define str string
#define edl "\n"
#define add insert
#define cot continue
#define fast() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
const int MOD = 1e9 + 7, INF = INT_MAX, N = 1e5 + 10;
const double PI = acos(-1);
const ll LINF = LLONG_MAX;
int main() {
fast();
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt","w",stdout);
// #endif
str s;
cin >> s;
f(i, 1, 4) {
if (s[i] == s[i + 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
cerr << "Time taken: " << int((clock() * 1000.) / CLOCKS_PER_SEC) << "ms\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ldb = long double;
using pa = pair<ll, ll>;
using vec = vector<ll>;
#define pb push_back
#define po pop_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
#define f(i, x, n) for (ll i = x; i < n; i++)
#define unique_sort(x) \
sort(all(x)), x.resize(distance(x.begin(), unique(all(x))))
#define all(c) c.begin(), c.end()
#define str string
#define edl "\n"
#define add insert
#define cot continue
#define fast() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
const int MOD = 1e9 + 7, INF = INT_MAX, N = 1e5 + 10;
const double PI = acos(-1);
const ll LINF = LLONG_MAX;
int main() {
fast();
// #ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt","w",stdout);
// #endif
str s;
cin >> s;
f(i, 1, 4) {
if (s[i] == s[i - 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
cerr << "Time taken: " << int((clock() * 1000.) / CLOCKS_PER_SEC) << "ms\n";
return 0;
}
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,314 | 802,315 | u063404629 | cpp |
p02993 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
bool check;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1])
check = true;
}
if (check)
cout << "Bad" << endl;
else
cout << "Good" << endl;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
bool check = false;
for (int i = 0; i < 3; i++) {
if (S[i] == S[i + 1])
check = true;
}
if (check)
cout << "Bad" << endl;
else
cout << "Good" << endl;
} | [
"variable_declaration.value.change"
] | 802,318 | 802,319 | u650243369 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
// g++ -g -o yourexe yourfile.cpp
//./yourexe < yourinput.in > youroutput.out
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define M 200001
#define ll long long
#define ld long double
#define vi vector<ll>
#define pi pair<ll, ll>
#define vii vector<pi>
#define vvi vector<vi>
#define pb push_back
#define endl "\n"
#define REP(i, s, e) for (ll i = s; i < e; i++)
#define RREP(i, s, e) for (ll i = s; i > e; i--)
#define all(v) v.begin(), v.end()
#define part(v, s, e) v.begin() + s, v.begin() + e
#define print(v) \
for (auto i : v) \
cout << i << " ";
int main() {
fast;
string s;
cin >> s;
ll p = 1;
REP(i, 1, s.size()) {
if (s[i] == s[i + 1]) {
p = 0;
break;
}
}
if (p)
cout << "Good\n";
else
cout << "Bad\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// g++ -g -o yourexe yourfile.cpp
//./yourexe < yourinput.in > youroutput.out
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define M 200001
#define ll long long
#define ld long double
#define vi vector<ll>
#define pi pair<ll, ll>
#define vii vector<pi>
#define vvi vector<vi>
#define pb push_back
#define endl "\n"
#define REP(i, s, e) for (ll i = s; i < e; i++)
#define RREP(i, s, e) for (ll i = s; i > e; i--)
#define all(v) v.begin(), v.end()
#define part(v, s, e) v.begin() + s, v.begin() + e
#define print(v) \
for (auto i : v) \
cout << i << " ";
int main() {
fast;
string s;
cin >> s;
ll p = 1;
REP(i, 1, s.size()) {
if (s[i] == s[i - 1]) {
p = 0;
break;
}
}
if (p)
cout << "Good\n";
else
cout << "Bad\n";
return 0;
}
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,327 | 802,328 | u760200622 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[5];
cin >> s;
for (int i = 3; i >= 0; i--) {
if (s[i] == s[i - 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[5];
cin >> s;
for (int i = 3; i >= 1; i--) {
if (s[i] == s[i - 1]) {
cout << "Bad";
return 0;
}
}
cout << "Good";
return 0;
} | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,329 | 802,330 | u973152737 | cpp |
p02993 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define llong long long
#define INF (__INT32_MAX__ / 2)
using namespace std;
typedef pair<int, int> ipair;
llong modulo(llong left, llong right) { return (left % right + right) % right; }
string S;
int main(int argc, char **argv) {
cin >> S;
bool res = false;
for (int i = 0; i < S.size() - 1; ++i)
if (S[i] == S[i - 1])
res = true;
cout << (res ? "Bad" : "Good") << endl;
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define llong long long
#define INF (__INT32_MAX__ / 2)
using namespace std;
typedef pair<int, int> ipair;
llong modulo(llong left, llong right) { return (left % right + right) % right; }
string S;
int main(int argc, char **argv) {
cin >> S;
bool res = false;
for (int i = 0; i < S.size() - 1; ++i)
if (S[i] == S[i + 1])
res = true;
cout << (res ? "Bad" : "Good") << endl;
} | [
"misc.opposites",
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,333 | 802,334 | u777137418 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
// type alias
typedef long long LL;
typedef pair<int, int> II;
typedef tuple<int, int, int> III;
typedef vector<int> VI;
typedef vector<string> VS;
typedef unordered_map<int, int> MAPII;
typedef unordered_set<int> SETI;
template <class T> using VV = vector<vector<T>>;
// minmax
template <class T> inline T SMIN(T &a, const T b) {
return a = (a > b) ? b : a;
}
template <class T> inline T SMAX(T &a, const T b) {
return a = (a < b) ? b : a;
}
// repetition
#define FORE(i, a, b) for (int i = (a); i <= (b); ++i)
#define REPE(i, n) for (int i = 0; i <= (n); ++i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define FORR(x, arr) for (auto &x : arr)
#define SZ(a) int((a).size())
// collection
#define ALL(c) (c).begin(), (c).end()
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// stdout
#define println(args...) fprintf(stdout, ##args), putchar('\n');
// debug cerr
template <class Iter> void __kumaerrc(Iter begin, Iter end) {
for (; begin != end; ++begin) {
cerr << *begin << ',';
}
cerr << endl;
}
void __kumaerr(istream_iterator<string> it) {
(void)it;
cerr << endl;
}
template <typename T, typename... Args>
void __kumaerr(istream_iterator<string> it, T a, Args... args) {
cerr << *it << "=" << a << ", ", __kumaerr(++it, args...);
}
template <typename S, typename T>
std::ostream &operator<<(std::ostream &_os, const std::pair<S, T> &_p) {
return _os << "{" << _p.first << ',' << _p.second << "}";
}
#define __KUMATRACE__ true
#ifdef __KUMATRACE__
#define dump(args...) \
{ \
string _s = #args; \
replace(_s.begin(), _s.end(), ',', ' '); \
stringstream _ss(_s); \
istream_iterator<string> _it(_ss); \
__kumaerr(_it, args); \
}
#define dumpc(ar) \
{ \
cerr << #ar << ": "; \
FORR(x, (ar)) { cerr << x << ','; } \
cerr << endl; \
}
#define dumpC(beg, end) \
{ \
cerr << "~" << #end << ": "; \
__kumaerrc(beg, end); \
}
#else
#define dump(args...)
#define dumpc(ar)
#define dumpC(beg, end)
#endif
// $ cp-batch Security | diff Security.out -
// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG -fsanitize=address Security.cpp
// && ./a.out
/*
6/22/2019
5:01-
*/
string S;
bool solve() {
REP(i, 3) if (S[i - 1] == S[i]) return false;
return true;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(12) << fixed;
cin >> S;
cout << (solve() ? "Good" : "Bad") << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// type alias
typedef long long LL;
typedef pair<int, int> II;
typedef tuple<int, int, int> III;
typedef vector<int> VI;
typedef vector<string> VS;
typedef unordered_map<int, int> MAPII;
typedef unordered_set<int> SETI;
template <class T> using VV = vector<vector<T>>;
// minmax
template <class T> inline T SMIN(T &a, const T b) {
return a = (a > b) ? b : a;
}
template <class T> inline T SMAX(T &a, const T b) {
return a = (a < b) ? b : a;
}
// repetition
#define FORE(i, a, b) for (int i = (a); i <= (b); ++i)
#define REPE(i, n) for (int i = 0; i <= (n); ++i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define FORR(x, arr) for (auto &x : arr)
#define SZ(a) int((a).size())
// collection
#define ALL(c) (c).begin(), (c).end()
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// stdout
#define println(args...) fprintf(stdout, ##args), putchar('\n');
// debug cerr
template <class Iter> void __kumaerrc(Iter begin, Iter end) {
for (; begin != end; ++begin) {
cerr << *begin << ',';
}
cerr << endl;
}
void __kumaerr(istream_iterator<string> it) {
(void)it;
cerr << endl;
}
template <typename T, typename... Args>
void __kumaerr(istream_iterator<string> it, T a, Args... args) {
cerr << *it << "=" << a << ", ", __kumaerr(++it, args...);
}
template <typename S, typename T>
std::ostream &operator<<(std::ostream &_os, const std::pair<S, T> &_p) {
return _os << "{" << _p.first << ',' << _p.second << "}";
}
#define __KUMATRACE__ true
#ifdef __KUMATRACE__
#define dump(args...) \
{ \
string _s = #args; \
replace(_s.begin(), _s.end(), ',', ' '); \
stringstream _ss(_s); \
istream_iterator<string> _it(_ss); \
__kumaerr(_it, args); \
}
#define dumpc(ar) \
{ \
cerr << #ar << ": "; \
FORR(x, (ar)) { cerr << x << ','; } \
cerr << endl; \
}
#define dumpC(beg, end) \
{ \
cerr << "~" << #end << ": "; \
__kumaerrc(beg, end); \
}
#else
#define dump(args...)
#define dumpc(ar)
#define dumpC(beg, end)
#endif
// $ cp-batch Security | diff Security.out -
// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG -fsanitize=address Security.cpp
// && ./a.out
/*
6/22/2019
5:01-
*/
string S;
bool solve() {
REP(i, 3) if (S[i + 1] == S[i]) return false;
return true;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(12) << fixed;
cin >> S;
cout << (solve() ? "Good" : "Bad") << endl;
return 0;
}
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 802,337 | 802,338 | u465317453 | cpp |
p02993 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <ciso646>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#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 (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define inf 0x3f3f3f3f3f3f3f3f
#define ALL(a) (a).begin(), (a).end()
#define DEBUG(x) // cerr<<#x<<": "<<x<<endl
#define ll long long
#define ull unsigned long long
using pii = pair<ll, ll>;
#define eps 1e-14
#define SETUP \
cin.tie(0), ios::sync_with_stdio(false), \
cout << setprecision(15) << std::fixed;
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
template <class T> using vec2 = std::vector<vector<T>>;
//// bit ////
#ifdef _MSC_VER
#ifdef _WIN32
inline unsigned int __builtin_ctz(unsigned int x) {
unsigned long r;
_BitScanForward(&r, x);
return r;
}
inline unsigned int __builtin_clz(unsigned int x) {
unsigned long r;
_BitScanReverse(&r, x);
return 31 - r;
}
inline unsigned int __builtin_ffs(unsigned int x) {
unsigned long r;
return _BitScanForward(&r, x) ? r + 1 : 0;
}
// inline unsigned int __builtin_popcount(unsigned int x){ return __popcnt(x); }
#ifdef _WIN64
inline unsigned long long __builtin_ctzll(unsigned long long x) {
unsigned long r;
_BitScanForward64(&r, x);
return r;
}
inline unsigned long long __builtin_clzll(unsigned long long x) {
unsigned long r;
_BitScanReverse64(&r, x);
return 63 - r;
}
inline unsigned long long __builtin_ffsll(unsigned long long x) {
unsigned long r;
return _BitScanForward64(&r, x) ? r + 1 : 0;
}
inline unsigned long long __builtin_popcountll(unsigned long long x) {
return __popcnt64(x);
}
#else
inline unsigned int hidword(unsigned long long x) {
return static_cast<unsigned int>(x >> 32);
}
inline unsigned int lodword(unsigned long long x) {
return static_cast<unsigned int>(x & 0xFFFFFFFF);
}
inline unsigned long long __builtin_ctzll(unsigned long long x) {
return lodword(x) ? __builtin_ctz(lodword(x))
: __builtin_ctz(hidword(x)) + 32;
}
inline unsigned long long __builtin_clzll(unsigned long long x) {
return hidword(x) ? __builtin_clz(hidword(x))
: __builtin_clz(lodword(x)) + 32;
}
inline unsigned long long __builtin_ffsll(unsigned long long x) {
return lodword(x) ? __builtin_ffs(lodword(x))
: hidword(x) ? __builtin_ffs(hidword(x)) + 32
: 0;
}
// inline unsigned long long __builtin_popcountll(unsigned long long x) { return
// __builtin_popcount(lodword(x)) + __builtin_popcount(hidword(x)); }
#endif // _WIN64
#endif // _WIN32
#endif // _MSC_VER
namespace {
struct input_returnner {
ll N;
input_returnner(ll N_ = 0) : N(N_) {}
template <typename T> operator vector<T>() const {
vector<T> res(N);
for (auto &a : res)
cin >> a;
return std::move(res);
}
template <typename T> operator T() const {
T res;
cin >> res;
return res;
}
template <typename T> T operator-(T right) {
return T(input_returnner()) - right;
}
template <typename T> T operator+(T right) {
return T(input_returnner()) + right;
}
template <typename T> T operator*(T right) {
return T(input_returnner()) * right;
}
template <typename T> T operator/(T right) {
return T(input_returnner()) / right;
}
template <typename T> T operator<<(T right) {
return T(input_returnner()) << right;
}
template <typename T> T operator>>(T right) {
return T(input_returnner()) >> right;
}
};
template <typename T> input_returnner in() { return in<T>(); }
input_returnner in() { return input_returnner(); }
input_returnner in(ll N) { return std::move(input_returnner(N)); }
} // namespace
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
template <typename T> struct is_vector : std::false_type {};
template <typename T> struct is_vector<std::vector<T>> : std::true_type {};
template <typename T> constexpr bool is_vector_v = is_vector<T>::value;
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
if (!v.empty()) {
for (int i = 0; i < v.size(); ++i) {
out << v[i] << (i == v.size() - 1 ? "\n" : (is_vector_v<T> ? "" : ", "));
}
}
return out;
}
namespace std {
// ref:
// https://stackoverflow.com/questions/7110301/generic-hash-for-tuples-in-unordered-map-unordered-set
template <class T> inline void hash_combine(std::size_t &seed, T const &v) {
seed ^= std::hash<T>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
// Recursive template code derived from Matthieu M.
template <class Tuple, size_t Index = std::tuple_size<Tuple>::value - 1>
struct HashValueImpl {
static void apply(size_t &seed, Tuple const &tuple) {
HashValueImpl<Tuple, Index - 1>::apply(seed, tuple);
hash_combine(seed, std::get<Index>(tuple));
}
};
template <class Tuple> struct HashValueImpl<Tuple, 0> {
static void apply(size_t &seed, Tuple const &tuple) {
hash_combine(seed, std::get<0>(tuple));
}
};
template <typename... TT> struct hash<std::tuple<TT...>> {
size_t operator()(std::tuple<TT...> const &tt) const {
size_t seed = 0;
HashValueImpl<std::tuple<TT...>>::apply(seed, tt);
return seed;
}
};
template <class T, class U> class hash<std::pair<T, U>> {
public:
size_t operator()(const std::pair<T, U> &x) const {
return hash<std::tuple<T, U>>()(std::tie(x.first, x.second));
}
};
} // namespace std
// ref: https://stackoverflow.com/questions/6245735/pretty-print-stdtuple
namespace aux {
template <std::size_t...> struct seq {};
template <std::size_t N, std::size_t... Is>
struct gen_seq : gen_seq<N - 1, N - 1, Is...> {};
template <std::size_t... Is> struct gen_seq<0, Is...> : seq<Is...> {};
template <class Ch, class Tr, class Tuple, std::size_t... Is>
void print_tuple(std::basic_ostream<Ch, Tr> &os, Tuple const &t, seq<Is...>) {
using swallow = int[];
(void)swallow{0,
(void(os << (Is == 0 ? "" : ", ") << std::get<Is>(t)), 0)...};
}
} // namespace aux
template <class Ch, class Tr, class... Args>
auto operator<<(std::basic_ostream<Ch, Tr> &os, std::tuple<Args...> const &t)
-> std::basic_ostream<Ch, Tr> & {
os << "(";
aux::print_tuple(os, t, aux::gen_seq<sizeof...(Args)>());
return os << ")";
}
template <class S, class T>
std::ostream &operator<<(std::ostream &os, const std::pair<S, T> &p) {
return os << "(" << p.first << ", " << p.second << ")";
}
// ref:
// https://stackoverflow.com/questions/8542591/c11-reverse-range-based-for-loo�Fp
template <typename T> struct reversion_wrapper { T &iterable; };
template <typename T> auto begin(reversion_wrapper<T> w) {
return std::rbegin(w.iterable);
}
template <typename T> auto end(reversion_wrapper<T> w) {
return std::rend(w.iterable);
}
template <typename T> reversion_wrapper<T> REV(T &&iterable) {
return {iterable};
}
template <class T> bool inside(T left, T val, T right) {
return left <= val and val < right;
}
template <class T> T bitCount(T num) {
T res = 0;
while (num > 0) {
if (num & 1)
++res;
num >>= 1;
}
return res;
}
ll MOD = 1e9 + 7;
// ll MOD = 998244353;
void solve();
signed main() {
SETUP;
#ifdef _DEBUG
while (true) {
#endif
solve();
#ifdef _DEBUG
cout << "-------" << endl;
}
#endif
#ifdef _DEBUG
system("pause");
#endif
return 0;
}
#define int ll
// template
void solve() {
string S;
cin >> S;
FOR(i, 1, S.size()) {
if (S[i - 1] == S[i]) {
cout << "Bad" << endl;
return;
}
}
cout << "good" << endl;
}
| #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <ciso646>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#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 (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define inf 0x3f3f3f3f3f3f3f3f
#define ALL(a) (a).begin(), (a).end()
#define DEBUG(x) // cerr<<#x<<": "<<x<<endl
#define ll long long
#define ull unsigned long long
using pii = pair<ll, ll>;
#define eps 1e-14
#define SETUP \
cin.tie(0), ios::sync_with_stdio(false), \
cout << setprecision(15) << std::fixed;
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
template <class T> using vec2 = std::vector<vector<T>>;
//// bit ////
#ifdef _MSC_VER
#ifdef _WIN32
inline unsigned int __builtin_ctz(unsigned int x) {
unsigned long r;
_BitScanForward(&r, x);
return r;
}
inline unsigned int __builtin_clz(unsigned int x) {
unsigned long r;
_BitScanReverse(&r, x);
return 31 - r;
}
inline unsigned int __builtin_ffs(unsigned int x) {
unsigned long r;
return _BitScanForward(&r, x) ? r + 1 : 0;
}
// inline unsigned int __builtin_popcount(unsigned int x){ return __popcnt(x); }
#ifdef _WIN64
inline unsigned long long __builtin_ctzll(unsigned long long x) {
unsigned long r;
_BitScanForward64(&r, x);
return r;
}
inline unsigned long long __builtin_clzll(unsigned long long x) {
unsigned long r;
_BitScanReverse64(&r, x);
return 63 - r;
}
inline unsigned long long __builtin_ffsll(unsigned long long x) {
unsigned long r;
return _BitScanForward64(&r, x) ? r + 1 : 0;
}
inline unsigned long long __builtin_popcountll(unsigned long long x) {
return __popcnt64(x);
}
#else
inline unsigned int hidword(unsigned long long x) {
return static_cast<unsigned int>(x >> 32);
}
inline unsigned int lodword(unsigned long long x) {
return static_cast<unsigned int>(x & 0xFFFFFFFF);
}
inline unsigned long long __builtin_ctzll(unsigned long long x) {
return lodword(x) ? __builtin_ctz(lodword(x))
: __builtin_ctz(hidword(x)) + 32;
}
inline unsigned long long __builtin_clzll(unsigned long long x) {
return hidword(x) ? __builtin_clz(hidword(x))
: __builtin_clz(lodword(x)) + 32;
}
inline unsigned long long __builtin_ffsll(unsigned long long x) {
return lodword(x) ? __builtin_ffs(lodword(x))
: hidword(x) ? __builtin_ffs(hidword(x)) + 32
: 0;
}
// inline unsigned long long __builtin_popcountll(unsigned long long x) { return
// __builtin_popcount(lodword(x)) + __builtin_popcount(hidword(x)); }
#endif // _WIN64
#endif // _WIN32
#endif // _MSC_VER
namespace {
struct input_returnner {
ll N;
input_returnner(ll N_ = 0) : N(N_) {}
template <typename T> operator vector<T>() const {
vector<T> res(N);
for (auto &a : res)
cin >> a;
return std::move(res);
}
template <typename T> operator T() const {
T res;
cin >> res;
return res;
}
template <typename T> T operator-(T right) {
return T(input_returnner()) - right;
}
template <typename T> T operator+(T right) {
return T(input_returnner()) + right;
}
template <typename T> T operator*(T right) {
return T(input_returnner()) * right;
}
template <typename T> T operator/(T right) {
return T(input_returnner()) / right;
}
template <typename T> T operator<<(T right) {
return T(input_returnner()) << right;
}
template <typename T> T operator>>(T right) {
return T(input_returnner()) >> right;
}
};
template <typename T> input_returnner in() { return in<T>(); }
input_returnner in() { return input_returnner(); }
input_returnner in(ll N) { return std::move(input_returnner(N)); }
} // namespace
template <typename T> istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
template <typename T> struct is_vector : std::false_type {};
template <typename T> struct is_vector<std::vector<T>> : std::true_type {};
template <typename T> constexpr bool is_vector_v = is_vector<T>::value;
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
if (!v.empty()) {
for (int i = 0; i < v.size(); ++i) {
out << v[i] << (i == v.size() - 1 ? "\n" : (is_vector_v<T> ? "" : ", "));
}
}
return out;
}
namespace std {
// ref:
// https://stackoverflow.com/questions/7110301/generic-hash-for-tuples-in-unordered-map-unordered-set
template <class T> inline void hash_combine(std::size_t &seed, T const &v) {
seed ^= std::hash<T>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
// Recursive template code derived from Matthieu M.
template <class Tuple, size_t Index = std::tuple_size<Tuple>::value - 1>
struct HashValueImpl {
static void apply(size_t &seed, Tuple const &tuple) {
HashValueImpl<Tuple, Index - 1>::apply(seed, tuple);
hash_combine(seed, std::get<Index>(tuple));
}
};
template <class Tuple> struct HashValueImpl<Tuple, 0> {
static void apply(size_t &seed, Tuple const &tuple) {
hash_combine(seed, std::get<0>(tuple));
}
};
template <typename... TT> struct hash<std::tuple<TT...>> {
size_t operator()(std::tuple<TT...> const &tt) const {
size_t seed = 0;
HashValueImpl<std::tuple<TT...>>::apply(seed, tt);
return seed;
}
};
template <class T, class U> class hash<std::pair<T, U>> {
public:
size_t operator()(const std::pair<T, U> &x) const {
return hash<std::tuple<T, U>>()(std::tie(x.first, x.second));
}
};
} // namespace std
// ref: https://stackoverflow.com/questions/6245735/pretty-print-stdtuple
namespace aux {
template <std::size_t...> struct seq {};
template <std::size_t N, std::size_t... Is>
struct gen_seq : gen_seq<N - 1, N - 1, Is...> {};
template <std::size_t... Is> struct gen_seq<0, Is...> : seq<Is...> {};
template <class Ch, class Tr, class Tuple, std::size_t... Is>
void print_tuple(std::basic_ostream<Ch, Tr> &os, Tuple const &t, seq<Is...>) {
using swallow = int[];
(void)swallow{0,
(void(os << (Is == 0 ? "" : ", ") << std::get<Is>(t)), 0)...};
}
} // namespace aux
template <class Ch, class Tr, class... Args>
auto operator<<(std::basic_ostream<Ch, Tr> &os, std::tuple<Args...> const &t)
-> std::basic_ostream<Ch, Tr> & {
os << "(";
aux::print_tuple(os, t, aux::gen_seq<sizeof...(Args)>());
return os << ")";
}
template <class S, class T>
std::ostream &operator<<(std::ostream &os, const std::pair<S, T> &p) {
return os << "(" << p.first << ", " << p.second << ")";
}
// ref:
// https://stackoverflow.com/questions/8542591/c11-reverse-range-based-for-loo�Fp
template <typename T> struct reversion_wrapper { T &iterable; };
template <typename T> auto begin(reversion_wrapper<T> w) {
return std::rbegin(w.iterable);
}
template <typename T> auto end(reversion_wrapper<T> w) {
return std::rend(w.iterable);
}
template <typename T> reversion_wrapper<T> REV(T &&iterable) {
return {iterable};
}
template <class T> bool inside(T left, T val, T right) {
return left <= val and val < right;
}
template <class T> T bitCount(T num) {
T res = 0;
while (num > 0) {
if (num & 1)
++res;
num >>= 1;
}
return res;
}
ll MOD = 1e9 + 7;
// ll MOD = 998244353;
void solve();
signed main() {
SETUP;
#ifdef _DEBUG
while (true) {
#endif
solve();
#ifdef _DEBUG
cout << "-------" << endl;
}
#endif
#ifdef _DEBUG
system("pause");
#endif
return 0;
}
#define int ll
// template
void solve() {
string S;
cin >> S;
FOR(i, 1, S.size()) {
if (S[i - 1] == S[i]) {
cout << "Bad" << endl;
return;
}
}
cout << "Good" << endl;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 802,339 | 802,340 | u579875569 | cpp |
p02993 | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
bool good = true;
for (int i = 0; i < 2; ++i) {
if (s[i] == s[i + 1])
good = false;
}
cout << (good ? "Good" : "Bad") << endl;
}
| #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
bool good = true;
for (int i = 0; i < 3; ++i) {
if (s[i] == s[i + 1])
good = false;
}
cout << (good ? "Good" : "Bad") << endl;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 802,343 | 802,344 | u532096498 | cpp |
p02993 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string ans = "Good";
if (s[0] == s[1] || s[1] == s[2] || s[2 == s[3]]) {
ans = "Bad";
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string ans = "Good";
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3]) {
ans = "Bad";
}
cout << ans << endl;
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 802,345 | 802,346 | u954976049 | cpp |
p02994 | #include <iostream>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
int ans = 0;
if (l >= 0) {
for (int i = 1; i < n; i++) {
ans += l + i;
}
} else if (l <= 0 && n + l >= 0) {
for (int j = 0; j < n; j++) {
if (l + j != 0)
ans += l + j;
}
} else {
for (int k = 0; k < n - 1; k++) {
ans += l + k;
}
}
cout << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
int ans = 0;
if (l >= 0) {
for (int i = 1; i < n; i++) {
ans += l + i;
}
} else if (l < 0 && n + l > 0) {
for (int j = 0; j < n; j++) {
if (l + j != 0)
ans += l + j;
}
} else {
for (int k = 0; k < n - 1; k++) {
ans += l + k;
}
}
cout << ans << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 802,352 | 802,353 | u415325136 | cpp |
p02994 | #include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
// container util
//------------------------------------------
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c) \
for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())
// repetition
//------------------------------------------
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int main() {
int N, L, S = 0, T = 300, ans;
cin >> N >> L;
VI A(N), B(N);
vector<PII> P;
REP(i, N) {
A.at(i) = L + i;
S += A.at(i);
}
REP(i, N) {
B.at(i) = S - A.at(i);
if (T > abs(B.at(i))) {
T = abs(B.at(i));
ans = B.at(i);
}
}
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
// container util
//------------------------------------------
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c) \
for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())
// repetition
//------------------------------------------
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
int main() {
int N, L, S = 0, T = 300, ans;
cin >> N >> L;
VI A(N), B(N);
vector<PII> P;
REP(i, N) {
A.at(i) = L + i;
S += A.at(i);
}
REP(i, N) {
B.at(i) = S - A.at(i);
if (T > abs(A.at(i))) {
T = abs(A.at(i));
ans = B.at(i);
}
}
cout << ans << endl;
return 0;
}
| [
"identifier.change",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"call.arguments.change"
] | 802,354 | 802,355 | u276588887 | cpp |
p02994 | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, l, x = 1000, s;
cin >> n >> l;
for (int i = 0; i < n; i++) {
if (abs(l + i) < abs(x)) {
x = l + i;
}
}
s = n * l + (n * (n - 1)) / 2 - x;
cout << x << endl << s << endl;
}
| #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, l, x = 1000, s;
cin >> n >> l;
for (int i = 0; i < n; i++) {
if (abs(l + i) < abs(x)) {
x = l + i;
}
}
s = n * l + (n * (n - 1)) / 2 - x;
cout << endl << s << endl;
}
| [
"expression.operation.binary.remove"
] | 802,356 | 802,357 | u000113982 | cpp |
p02994 | #include <bits/stdc++.h>
using namespace std;
int main() {
int L;
int N;
int sum = 0;
int a;
int b = 1000000;
scanf("%d %d", &L, &N);
for (int i = 1; i <= N; i++) {
a = 0;
a = L + i - 1;
sum += a;
if (abs(a) < abs(b)) {
b = a;
}
}
printf("%d", sum - b);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int L;
int N;
int sum = 0;
int a;
int b = 1000000;
scanf("%d %d", &N, &L);
for (int i = 1; i <= N; i++) {
a = 0;
a = L + i - 1;
sum += a;
if (abs(a) < abs(b)) {
b = a;
}
}
printf("%d", sum - b);
} | [
"identifier.change",
"call.arguments.change"
] | 802,365 | 802,366 | u863370423 | cpp |
p02994 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep1(i, n) for (ll i = 1; i < n; i++)
using P = pair<ll, ll>;
int main() {
ll n, l;
cin >> n >> l;
ll a[n], ans = 0;
rep(i, n) {
a[i] = i + l;
ans += a[i];
}
if (-1 * n > l)
ans -= a[n - 1];
else if (l > 0)
ans -= a[0];
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep1(i, n) for (ll i = 1; i < n; i++)
using P = pair<ll, ll>;
int main() {
ll n, l;
cin >> n >> l;
ll a[n], ans = 0;
rep(i, n) {
a[i] = i + l;
ans += a[i];
}
if (-1 * n >= l)
ans -= a[n - 1];
else if (l > 0)
ans -= a[0];
cout << ans << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 802,367 | 802,368 | u395125142 | cpp |
p02994 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
if (l <= 0 && n + l - 1 >= 0)
cout << ((n + 2 * l - 1) * n) / 2;
else if (l < 0)
cout << ((n + 2 * l - 1) * n) / 2 - n + l - 1;
else
cout << ((n + 2 * l - 1) * n) / 2 - l;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
if (l <= 0 && n + l - 1 >= 0)
cout << ((n + 2 * l - 1) * n) / 2;
else if (l < 0)
cout << ((n + 2 * l - 1) * n) / 2 - (n + l - 1);
else
cout << ((n + 2 * l - 1) * n) / 2 - l;
return 0;
} | [] | 802,379 | 802,380 | u054782559 | cpp |
p02994 | #include <algorithm>
#include <cmath> //abs()かfabs()で少数絶対値
#include <cstdlib> //abs()で整数絶対値
#include <deque>
#include <functional> //sort第三引数greater<型名>()で降順
#include <iomanip> //cout<<setw(数字) で空白による桁揃え
#include <iostream> //cout<<right で右揃え
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
int main() {
int N, L;
cin >> N >> L;
int _min = 1e9;
int ans = 0;
for (int i = 0; i < N; i++) {
ans += L + i;
if (abs(L + i) < _min)
_min = abs(L + i);
}
cout << (L < 0 ? ans - _min : ans + _min) << endl;
return 0;
} | #include <algorithm>
#include <cmath> //abs()かfabs()で少数絶対値
#include <cstdlib> //abs()で整数絶対値
#include <deque>
#include <functional> //sort第三引数greater<型名>()で降順
#include <iomanip> //cout<<setw(数字) で空白による桁揃え
#include <iostream> //cout<<right で右揃え
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
int main() {
int N, L;
cin >> N >> L;
int _min = 1e9;
int ans = 0;
for (int i = 0; i < N; i++) {
ans += L + i;
if (abs(L + i) < _min)
_min = abs(L + i);
}
cout << (L >= 0 ? ans - _min : ans + _min) << endl;
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"io.output.change"
] | 802,385 | 802,386 | u022890424 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.