Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p00081
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define mp...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define mp...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,230
30,231
u041086527
cpp
p00081
#include <cstdio> #include <iostream> int main() { double x0, y0, x1, y1, x2, y2, xq, yq, x, y, m, a; char c; while (std::cin >> x1 >> c >> y1 >> c >> x2 >> c >> y2 >> c >> xq >> c >> yq) { if (x1 == x2) { y = y1; x = x1; } else { m = (y2 - y1) / (x2 - x1); a = m * m + 1; ...
#include <cstdio> #include <iostream> int main() { double x0, y0, x1, y1, x2, y2, xq, yq, x, y, m, a; char c; while (std::cin >> x1 >> c >> y1 >> c >> x2 >> c >> y2 >> c >> xq >> c >> yq) { if (x1 == x2) { y = yq; x = x1; } else { m = (y2 - y1) / (x2 - x1); a = m * m + 1; ...
[ "assignment.value.change", "identifier.change" ]
30,232
30,233
u912237403
cpp
p00082
#include <algorithm> #include <climits> #include <cstdio> #include <cstring> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; const int latte[8] = {4, 1, 4, 1, 2, 1, 2, 1}, pri[8] = {0, 5, 1, 7, 3, 6, ...
#include <algorithm> #include <climits> #include <cstdio> #include <cstring> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; const int latte[8] = {4, 1, 4, 1, 2, 1, 2, 1}, pri[8] = {0, 5, 1, 7, 3, 6, ...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
30,266
30,267
u364532954
cpp
p00078
#include <iostream> #include <string.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int field[16][16]; int n; while (cin >> n && n) { memset(field, 0, sizeof(field)); int x = n / 2; int y = n / 2 + 1; field[y][x] = 1; int count = 2; while (true) { ...
#include <iostream> #include <string.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int field[16][16]; int n; while (cin >> n && n) { memset(field, 0, sizeof(field)); int x = n / 2; int y = n / 2 + 1; field[y][x] = 1; int count = 2; while (true) { ...
[ "assignment.variable.change", "identifier.change" ]
30,330
30,329
u765197056
cpp
p00078
#include <cstdio> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { int n; while (cin >> n, n) { vector<vector<int>> d(n, vector<int>(n, 0)); int x = n / 2 + 1, y = n / 2; d[x][y] = 1; int m = 1; while (m < n * n) { m++; int dx = (x + 1) % n,...
#include <cstdio> #include <iomanip> #include <iostream> #include <vector> using namespace std; int main() { int n; while (cin >> n, n) { vector<vector<int>> d(n, vector<int>(n, 0)); int x = n / 2 + 1, y = n / 2; d[x][y] = 1; int m = 1; while (m < n * n) { m++; int dx = (x + 1) % n,...
[ "literal.number.change", "io.output.change" ]
30,331
30,332
u398354652
cpp
p00078
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n, n) { int x = n / 2, y = n / 2 + 1, fld[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { fld[i][j] = -1; } } fld[x][y] = 1; for (int i = 2; i <= n * n; i++) { x++; ...
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n, n) { int x = n / 2, y = n / 2 + 1, fld[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { fld[i][j] = -1; } } fld[x][y] = 1; for (int i = 2; i <= n * n; i++) { x++; ...
[ "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "io.output.change" ]
30,333
30,334
u198011997
cpp
p00078
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n, n) { int x = n / 2, y = n / 2 + 1, fld[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { fld[i][j] = -1; } } fld[x][y] = 1; for (int i = 2; i <= n * n; i++) { x++; ...
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n, n) { int x = n / 2, y = n / 2 + 1, fld[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { fld[i][j] = -1; } } fld[x][y] = 1; for (int i = 2; i <= n * n; i++) { x++; ...
[ "literal.string.change", "call.arguments.change", "io.output.change", "identifier.change", "variable_access.subscript.index.change" ]
30,335
30,334
u198011997
cpp
p00078
#include <iostream> using namespace std; int main() { // your code goes here int n; int a[20][20]; cin >> n; while (n != 0) { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { a[i][j] = 0; } } int k = 1 + n / 2; int l = n / 2; int m = 1; a[k][l] = 1; ...
#include <iostream> using namespace std; int main() { // your code goes here int n; int a[20][20]; cin >> n; while (n != 0) { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { a[i][j] = 0; } } int k = 1 + n / 2; int l = n / 2; int m = 1; a[k][l] = 1; ...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
30,340
30,341
u835414158
cpp
p00078
#include <bits/stdc++.h> #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 PB push_back #define INF (1 << 29) #define ALL(a) (a).begin(), (a).end() #de...
#include <bits/stdc++.h> #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 PB push_back #define INF (1 << 29) #define ALL(a) (a).begin(), (a).end() #de...
[ "literal.string.change", "call.arguments.change", "io.output.change", "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change" ]
30,344
30,345
u802625365
cpp
p00078
#include <cstdio> #include <iostream> using namespace std; int main() { int a[15][15]; int n, x, y, i = 1; cin >> n; while (n != 0) { for (int j = 0; j < n * n; j++) a[j / n][j % n] = -1; x = n / 2; y = n / 2 + 1; i = 1; while (i <= n * n) { if (x >= n) { x = 0; ...
#include <cstdio> #include <iostream> using namespace std; int main() { int a[15][15]; int n, x, y, i = 1; cin >> n; while (n != 0) { for (int j = 0; j < n * n; j++) a[j / n][j % n] = -1; x = n / 2; y = n / 2 + 1; i = 1; while (i <= n * n) { if (x >= n) { x = 0; ...
[]
30,347
30,348
u358566817
cpp
p00078
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using nam...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <utility> #include <vector> using nam...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,357
30,358
u823048060
cpp
p00078
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int i, j, k; int n; int a[15][15]; while (cin >> n && n != 0) { k = 0; for (i = 0; i < 15; i++) { for (j = 0; j < 15; j++) { a[i][j] = 0; } } for (i = -n / 2; i <= n / 2; i++) for (j = ...
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int i, j, k; int n; int a[15][15]; while (cin >> n && n != 0) { k = 0; for (i = 0; i < 15; i++) { for (j = 0; j < 15; j++) { a[i][j] = 0; } } for (i = -n / 2; i <= n / 2; i++) for (j = ...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.variable.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
30,359
30,360
u017294960
cpp
p00078
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace ::std; int main() { int number; int i, j; int center = 0; int h = 0; int w = 0; cin >> number; while (number != 0) { int magic[number][number]; for (i = 0; i < number; i++) { for...
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace ::std; int main() { int number; int i, j; int center = 0; int h = 0; int w = 0; cin >> number; while (number != 0) { int magic[number][number]; for (i = 0; i < number; i++) { for...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,363
30,364
u219107515
cpp
p00078
#include <iomanip> #include <iostream> using namespace std; int n; int m[15][15]; void func(int x, int y, int l) { int nx, ny; if (!m[x][y]) { m[x][y] = l; if (l == n * n) return; if (x < n - 1) nx = x + 1; else nx = 0; if (y < n - 1) ny = y + 1; else ny = 0; ...
#include <iomanip> #include <iostream> using namespace std; int n; int m[15][15]; void func(int x, int y, int l) { int nx, ny; if (!m[x][y]) { m[x][y] = l; if (l == n * n) return; if (x < n - 1) nx = x + 1; else nx = 0; if (y < n - 1) ny = y + 1; else ny = 0; ...
[ "literal.number.change", "io.output.change" ]
30,367
30,368
u800918599
cpp
p00078
#include <iomanip> #include <iostream> using namespace std; int main() { int n; int table[20][20]; while (cin >> n, n) { for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) table[i][j] = 0; int y = n / 2 + 1, x = n / 2; for (int i = 1; i <= n * n; i++) { table[y][x] = i; ...
#include <iomanip> #include <iostream> using namespace std; int main() { int n; int table[20][20]; while (cin >> n, n) { for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) table[i][j] = 0; int y = n / 2 + 1, x = n / 2; for (int i = 1; i <= n * n; i++) { table[y][x] = i; ...
[ "literal.number.change", "io.output.change" ]
30,369
30,370
u003114686
cpp
p00085
#include <iostream> #include <vector> using namespace std; int main() { int n, k, m, i; for (; cin >> n >> k, n;) { vector<int> vec(n); for (i = 0; i < n; i++) vec[i] = i + 1; i = (m - 1) % vec.size(); vec.erase(vec.begin() + i); for (; vec.size() > 1; vec.erase(vec.begin() + i)) if ...
#include <iostream> #include <vector> using namespace std; int main() { int n, k, m, i; for (; cin >> n >> k, n;) { vector<int> vec(n); for (m = k, i = 0; i < n; i++) vec[i] = i + 1; i = (m - 1) % vec.size(); vec.erase(vec.begin() + i); for (; vec.size() > 1; vec.erase(vec.begin() + i)) ...
[ "control_flow.loop.for.initializer.change" ]
30,445
30,446
u300645821
cpp
p00085
#include <iostream> #include <vector> using namespace std; int main() { int n, k, m, i; for (; cin >> n >> k, n;) { vector<int> vec(n); for (i = 0; i < n; i++) vec[i] = i + 1; i = (m - 1) % vec.size(); vec.erase(vec.begin() + i); for (; vec.size() > 1; vec.erase(vec.begin() + i)) if ...
#include <iostream> #include <vector> using namespace std; int main() { int n, k, i; for (; cin >> n >> k, n;) { vector<int> vec(n); for (i = 0; i < n; i++) vec[i] = i + 1; i = (k - 1) % vec.size(); vec.erase(vec.begin() + i); for (; vec.size() > 1; vec.erase(vec.begin() + i)) if (i ...
[ "variable_declaration.remove", "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
30,445
30,447
u300645821
cpp
p00085
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; const double EPS = 1e-9; cons...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; const double EPS = 1e-9; cons...
[ "literal.number.change", "variable_declaration.value.change" ]
30,448
30,449
u934534598
cpp
p00085
#include <iostream> using namespace std; int potato(int n, int k) { int i; for (i = k - 1; i < (k - 1) * n; i = (k * i) / (k - 1) + 1) return (k * n - i); } int main() { int n, k; while (cin >> n >> k, n || k) { cout << potato(n, k) << endl; } }
#include <iostream> using namespace std; int jos(int n, int k) { int i; for (i = k - 1; i < (k - 1) * n; i = (k * i) / (k - 1) + 1) ; return (k * n - i); } int main() { int n, k; while (cin >> n >> k, n || k) { cout << jos(n, k) << endl; } }
[ "identifier.change", "call.function.change", "io.output.change" ]
30,450
30,451
u674364816
cpp
p00085
#include <iostream> using namespace std; int jos(int n, int k) { int i; for (i = k - 1; i < (k - 1) * n; i = (k * i) / (k - 1) + 1) return (k * n - i); } int main() { int n, k; while (cin >> n >> k, n || k) { cout << jos(n, k) << endl; } }
#include <iostream> using namespace std; int jos(int n, int k) { int i; for (i = k - 1; i < (k - 1) * n; i = (k * i) / (k - 1) + 1) ; return (k * n - i); } int main() { int n, k; while (cin >> n >> k, n || k) { cout << jos(n, k) << endl; } }
[]
30,452
30,451
u674364816
cpp
p00085
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (i * y) / (y - 1) + 1) return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (y * i) / (y - 1) + 1) ; return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
[ "control_flow.loop.for.update.change", "expression.operation.binary.remove", "assignment.change" ]
30,453
30,454
u674364816
cpp
p00085
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = i * y / (y - 1) + 1) return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (y * i) / (y - 1) + 1) ; return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
[ "assignment.value.change", "expression.operation.binary.change", "control_flow.loop.for.update.change" ]
30,455
30,454
u674364816
cpp
p00085
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (i * y) / (y - 1) + 1) return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (y * i) / (y - 1) + 1) ; return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
[ "control_flow.loop.for.update.change", "expression.operation.binary.remove", "assignment.change" ]
30,456
30,454
u674364816
cpp
p00085
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (i * y) / (y - 1) + 1) return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (y * i) / (y - 1) + 1) ; return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
[ "control_flow.loop.for.update.change", "expression.operation.binary.remove", "assignment.change" ]
30,457
30,454
u674364816
cpp
p00085
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (y * i) / (y - 1) + 1) return (y * x - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
#include <iostream> using namespace std; int potato(int x, int y) { int i; for (i = y - 1; i < (y - 1) * x; i = (y * i) / (y - 1) + 1) ; return (x * y - i); } int main() { int x, y; while (cin >> x >> y, x || y) { cout << potato(x, y) << endl; } }
[ "expression.operation.binary.remove" ]
30,458
30,454
u674364816
cpp
p00083
#include <iostream> using namespace std; long long int func(int year, int month, int day) { return (year * 10000 + month * 100 + day); } int main() { long long int data[4]; data[0] = 1868 * 10000 + 9 * 100 + 8; data[1] = 1912 * 10000 + 7 * 100 + 29; data[2] = 1926 * 10000 + 12 * 100 + 24; data[3] = 1989 ...
#include <iostream> using namespace std; long long int func(int year, int month, int day) { return (year * 10000 + month * 100 + day); } int main() { long long int data[4]; data[0] = 1868 * 10000 + 9 * 100 + 8; data[1] = 1912 * 10000 + 7 * 100 + 29; data[2] = 1926 * 10000 + 12 * 100 + 24; data[3] = 1989 ...
[ "io.output.change", "literal.string.change" ]
30,477
30,478
u022913578
cpp
p00083
#include <cstdio> #include <iostream> using namespace std; string G[] = {"meiji", "taisho", "showa", "heisei"}; int Gnum[] = {1868, 1912, 1926, 1989}; int YEAR(int year) { if (19890108 <= year) { return 3; } else if (19891225 <= year) { return 2; } else if (19120730 <= year) { return 1; } else if (...
#include <cstdio> #include <iostream> using namespace std; string G[] = {"meiji", "taisho", "showa", "heisei"}; int Gnum[] = {1868, 1912, 1926, 1989}; int YEAR(int year) { if (19890108 <= year) { return 3; } else if (19261225 <= year) { return 2; } else if (19120730 <= year) { return 1; } else if (...
[ "literal.number.change", "control_flow.branch.if.condition.change", "variable_declaration.type.widen.change", "control_flow.return.add", "control_flow.return.0.add" ]
30,483
30,484
u107750881
cpp
p00080
#include <cmath> #include <cstdio> #include <iostream> #define EPS 1e-9 using namespace std; double eps, alterX; int q; //漸化式 double formula() { return (alterX - ((alterX * alterX * alterX - q) / (3.0 * (alterX * alterX)))); } //ループ void solve() { while (sqrt(alterX * alterX * alterX - q) > eps) { //|x^...
#include <cmath> #include <cstdio> #include <iostream> #define EPS 1e-9 using namespace std; double eps, alterX; int q; //漸化式 double formula() { return (alterX - ((alterX * alterX * alterX - q) / (3.0 * (alterX * alterX)))); } //ループ void solve() { while (fabs(alterX * alterX * alterX - q) > eps) { //|x^...
[ "identifier.change", "call.function.change", "control_flow.loop.condition.change", "call.remove", "call.arguments.change" ]
30,684
30,685
u273981871
cpp
p00080
#include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int q; while (cin >> q, q != -1) { double x = q / 2.0; double eps = 0.0001 * q; while (eps <= abs(x * x * x - q)) { x = x - (x * x * x - q) / (3 * x * x); } cout.precision(6); co...
#include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int q; while (cin >> q, q != -1) { double x = q / 2.0; double eps = 0.00001 * q; while (eps <= abs(x * x * x - q)) { x = x - (x * x * x - q) / (3 * x * x); } cout.precision(6); c...
[ "literal.number.change", "expression.operation.binary.change" ]
30,686
30,687
u703196441
cpp
p00080
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; double abso(double n) { if ...
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; double abso(double n) { if ...
[ "literal.number.change", "assignment.value.change", "expression.operation.binary.change" ]
30,692
30,693
u364532954
cpp
p00080
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pair<int, int>> vii; #define rrep(i, m, n) for (int(i) = (m); (i) < (n); (i)++) #define erep(i, m, n) for (int(i) = (m); (i) <= (n); (i)++) #define rep(i, n) for (int(i) = 0; (i) <...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pair<int, int>> vii; #define rrep(i, m, n) for (int(i) = (m); (i) < (n); (i)++) #define erep(i, m, n) for (int(i) = (m); (i) <= (n); (i)++) #define rep(i, n) for (int(i) = 0; (i) <...
[ "control_flow.loop.condition.change" ]
30,699
30,700
u959413365
cpp
p00080
#include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long int q; double x; while (cin >> q) { if (q != -1) { x = q / 2; while (abs(pow(x, 3) - q) >= 0.00001 * q) { x = x - ((pow(x, 3) - q) / (3 * pow(x, 2))); ...
#include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long int q; double x; while (cin >> q) { if (q != -1) { x = (double)q / 2; while (abs(pow(x, 3) - q) >= 0.00001 * q) { x = x - ((pow(x, 3) - q) / (3 * pow(x,...
[ "type_conversion.add" ]
30,707
30,708
u681511075
cpp
p00080
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; // < "D:\D_Download\Visual Studio // 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; // < "D:\D_Download\Visual Studio // 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D...
[]
30,721
30,722
u186082958
cpp
p00080
#include <cmath> #include <cstdio> using namespace std; double q; int main() { while (1) { scanf("%lf", &q); if (q == -1.0) return 0; double ans = q / 2; while (abs(ans * ans * ans - q) >= 10e-5 * q) { ans = ans - (ans * ans * ans - q) / (3 * ans * ans); } printf("%f\n", ans); ...
#include <cmath> #include <cstdio> using namespace std; double q; int main() { while (1) { scanf("%lf", &q); if (q == -1.0) return 0; double ans = q / 2; while (abs(ans * ans * ans - q) >= 1e-5 * q) { ans = ans - (ans * ans * ans - q) / (3 * ans * ans); } printf("%f\n", ans); ...
[ "literal.number.change", "control_flow.loop.condition.change" ]
30,725
30,726
u794549850
cpp
p00080
#include <bits/stdc++.h> using namespace std; // typedef unsigned double d; double temp(double, double); double temp(double x, double q) { x -= (x * x * x - q) / (3 * x * x); return x; } int main() { double x[50], q; int i; for (i = 0; i < 50; i++) { cin >> q; if (q == -1) break; x[i] = q ...
#include <bits/stdc++.h> using namespace std; double temp(double, double); double temp(double x, double q) { x -= (x * x * x - q) / (3 * x * x); return x; } int main() { double x[50], q; int i; for (i = 0; i < 50; i++) { cin >> q; if (q == -1) break; x[i] = q / 2; do { x[i] = tem...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,733
30,734
u493646413
cpp
p00080
#include <cmath> #include <cstdio> #include <iostream> using namespace std; typedef long long LL; typedef long double LD; int main() { LL q; LD x; while (1) { cin >> q; if (q == -1) break; x = (LD)q / 2.0; while (abs(x * x * x - q) >= 0.00001 * q) { x = x - (x * x * x - q) / (3....
#include <cmath> #include <cstdio> #include <iostream> using namespace std; typedef int LL; typedef double LD; int main() { LL q; LD x; while (1) { cin >> q; if (q == -1) break; x = (LD)q / 2.0; while (abs(x * x * x - q) >= 0.00001 * q) { x = x - (x * x * x - q) / (3.0 * x * x);...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.narrow.change" ]
30,777
30,778
u118157225
cpp
p00080
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long int in; while (cin >> in, in + 1) { long double x = in / 2; while (x * x * x - in > 0.000000001 * in || x * x * x - in < -0.000000001 * in) ...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main() { long long int in; while (cin >> in, in + 1) { double x = in / 2; while (x * x * x - in > 0.00001 * in || x * x * x - in < -0.00001 * in) x -= (x * x * x - i...
[ "variable_declaration.type.narrow.change", "literal.number.change", "control_flow.loop.condition.change", "literal.string.change", "call.arguments.change", "io.output.change" ]
30,781
30,782
u214600613
cpp
p00082
#include <algorithm> #include <cstdio> using namespace std; int p[8], t[8], u[8], c[8] = {1, 4, 1, 4, 1, 2, 1, 2}; bool comp() { for (int j = 0; j < 8; j++) { if (t[j] > u[j]) return true; if (t[j] < u[j]) return false; } return false; } int main() { while (~scanf("%d%d%d%d%d%d%d%d", &p[0], ...
#include <algorithm> #include <cstdio> using namespace std; int p[8], t[8], u[8], c[8] = {1, 4, 1, 4, 1, 2, 1, 2}; bool comp() { for (int j = 0; j < 8; j++) { if (t[j] > u[j]) return true; if (t[j] < u[j]) return false; } return false; } int main() { while (~scanf("%d%d%d%d%d%d%d%d", &p[0], ...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,821
30,822
u823513038
cpp
p00082
#include <iomanip> #include <iostream> #include <limits.h> using namespace std; int max(int x, int y) { return x > y ? x : y; } int main() { int capacity[8] = {4, 1, 4, 1, 2, 1, 2, 1}; int index[8] = {3, 5, 7, 1, 4, 6, 2, 0}; int p[8]; while (cin >> p[0]) { for (int i = 1; i < 8; i++) cin >> p[i];...
#include <iomanip> #include <iostream> #include <limits.h> using namespace std; int max(int x, int y) { return x > y ? x : y; } int main() { int capacity[8] = {4, 1, 4, 1, 2, 1, 2, 1}; int index[8] = {3, 5, 1, 7, 4, 6, 2, 0}; int p[8]; while (cin >> p[0]) { for (int i = 1; i < 8; i++) cin >> p[i];...
[]
30,835
30,836
u296194591
cpp
p00082
#include <climits> #include <iostream> using namespace std; #define N 8 int main() { int vehicle[N] = {4, 1, 4, 1, 2, 1, 2, 1}, passenger[N]; int i, j, wait, min, place; while (cin >> passenger[0]) { for (i = 1; i < N; i++) cin >> passenger[i]; min = INT_MAX; place = 0; for (i = 0; i < N;...
#include <climits> #include <iostream> using namespace std; #define N 8 int main() { int vehicle[N] = {4, 1, 4, 1, 2, 1, 2, 1}, passenger[N]; int i, j, wait, min, place; while (cin >> passenger[0]) { for (i = 1; i < N; i++) cin >> passenger[i]; min = INT_MAX; place = 0; for (i = 0; i < N;...
[ "assignment.change" ]
30,841
30,842
u392015442
cpp
p00082
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #define INF 2147483647 int main() { int w[8], c[8] = {1, 2, 1, 2, 1, 4, 1, 4}, dict[8] = {0, 2, 6, 4, 1, 3, 7, 5}; while (1) { int r[8] = {0}, m = INF; rep(i, 8) if (!(cin >> w[...
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #define INF 2147483647 int main() { int w[8], c[8] = {1, 2, 1, 2, 1, 4, 1, 4}, dict[8] = {0, 2, 6, 4, 1, 3, 7, 5}; while (1) { int r[8] = {0}, m = INF; rep(i, 8) if (!(cin >> w[...
[ "misc.opposites", "expression.operator.arithmetic.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "literal.number.change", "control_flow.branch.if.condition.change" ]
30,843
30,844
u456755759
cpp
p00082
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #define INF 2147483647 int main() { int w[8], c[8] = {1, 2, 1, 2, 1, 4, 1, 4}, dict[8] = {0, 2, 6, 4, 1, 3, 7, 5}; while (1) { int r[8] = {0}, m = INF; rep(i, 8) if (!(cin >> w[...
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #define INF 2147483647 int main() { int w[8], c[8] = {1, 2, 1, 2, 1, 4, 1, 4}, dict[8] = {0, 2, 6, 4, 1, 3, 7, 5}; while (1) { int r[8] = {0}, m = INF; rep(i, 8) if (!(cin >> w[...
[ "misc.opposites", "expression.operator.arithmetic.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
30,845
30,844
u456755759
cpp
p00082
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #define INF 2147483647 int main() { int w[8], c[8] = {1, 2, 1, 2, 1, 4, 1, 4}, dict[8] = {0, 2, 6, 4, 1, 3, 7, 5}; while (1) { int r[8] = {0}, m = INF; rep(i, 8) if (!(cin >> w[...
#include <algorithm> #include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define ll long long #define INF 2147483647 int main() { int w[8], c[8] = {1, 2, 1, 2, 1, 4, 1, 4}, dict[8] = {0, 2, 6, 4, 1, 3, 7, 5}; while (1) { int r[8] = {0}, m = INF; rep(i, 8) if (!(cin >> w[...
[]
30,846
30,844
u456755759
cpp
p00082
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define f first #define s second int fj[8][8] = {4, 1, 4, 1, 2, 1, 2, 1}; int main() { for (int i = 1; i < 8; i++) { for (int j = 0; j < 8; j++) { int t = j + 1; if (t == 8) ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <vector> using namespace std; #define f first #define s second int fj[8][8] = {4, 1, 4, 1, 2, 1, 2, 1}; int main() { for (int i = 1; i < 8; i++) { for (int j = 0; j < 8; j++) { int t = j + 1; if (t == 8) ...
[ "expression.operation.unary.arithmetic.remove", "literal.number.change", "variable_access.subscript.index.change", "io.output.change" ]
30,851
30,852
u263247628
cpp
p00082
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; const double EPS = 1e-9; const double PI = 3....
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; const double EPS = 1e-9; const double PI = 3....
[ "misc.opposites", "assignment.value.change" ]
30,853
30,854
u934534598
cpp
p00082
#include <algorithm> #include <climits> #include <cstdio> using namespace std; int main() { int i, j, k, s, t, u; int l[8]; int m[8] = {4, 1, 4, 1, 2, 1, 2, 1}; int o[8] = {0, 2, 6, 4, 3, 5, 1, 7}; while (1) { for (i = 0; i < 8; i++) { s = scanf("%d", &l[i]); } if (s != 1) break; ...
#include <algorithm> #include <climits> #include <cstdio> using namespace std; int main() { int i, j, k, s, t, u; int l[8]; int m[8] = {4, 1, 4, 1, 2, 1, 2, 1}; int o[8] = {0, 2, 6, 4, 7, 1, 5, 3}; while (1) { for (i = 0; i < 8; i++) { s = scanf("%d", &l[i]); } if (s != 1) break; ...
[ "literal.number.change" ]
30,855
30,856
u800918599
cpp
p00082
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <ve...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <ve...
[ "control_flow.loop.for.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
30,857
30,858
u802096158
cpp
p00082
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <ve...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <ve...
[ "assignment.change", "control_flow.loop.for.condition.change" ]
30,859
30,858
u802096158
cpp
p00082
#include <algorithm> #include <iostream> using namespace std; int main() { int k[8]; string mery = "41212141", ans; while (cin >> k[0] >> k[1] >> k[2] >> k[3] >> k[4] >> k[5] >> k[6] >> k[7]) { int mn = 5 << 30, mnum = 5 << 30; for (int i = 0; i < 8; i++) { rotate(mery.begin(), mery.begin() + 1, m...
#include <algorithm> #include <iostream> using namespace std; int main() { int k[8]; string mery = "41212141", ans; while (cin >> k[0] >> k[1] >> k[2] >> k[3] >> k[4] >> k[5] >> k[6] >> k[7]) { int mn = 5 << 30, mnum = 5 << 30; for (int i = 0; i < 8; i++) { rotate(mery.begin(), mery.begin() + 1, m...
[ "control_flow.branch.if.add" ]
30,860
30,861
u107750881
cpp
p00082
#include <iostream> using namespace std; int check(int p[], int data[]) { int cnt = 0; for (int i = 0; i < 8; i++) cnt += max(0, data[i] - p[i]); return cnt; } int makeint(int p[]) { int ans = 0; for (int i = 0; i < 8; i++) { ans *= 10; ans += p[i]; } return ans; } int main() { int p[8];...
#include <iostream> using namespace std; int check(int p[], int data[]) { int cnt = 0; for (int i = 0; i < 8; i++) cnt += max(0, data[i] - p[i]); return cnt; } int makeint(int p[]) { int ans = 0; for (int i = 0; i < 8; i++) { ans *= 10; ans += p[i]; } return ans; } int main() { int p[8];...
[ "identifier.change", "call.arguments.change" ]
30,869
30,870
u752673456
cpp
p00082
#include <iostream> using namespace std; int main() { int pdata[8]; int cdata[8][8] = { {4, 1, 4, 1, 2, 1, 2, 1}, {4, 1, 2, 1, 2, 1, 4, 1}, {2, 1, 4, 1, 4, 1, 2, 1}, {2, 1, 2, 1, 4, 1, 4, 1}, {1, 4, 1, 4, 1, 2, 1, 2}, {1, 4, 1, 2, 1, 2, 1, 4}, {1, 2, 1, 4, 1, 4, 1, 2}, {1, 2, 1, 2, 1, 4, ...
#include <iostream> using namespace std; int main() { int pdata[8]; int cdata[8][8] = { {4, 1, 4, 1, 2, 1, 2, 1}, {4, 1, 2, 1, 2, 1, 4, 1}, {2, 1, 4, 1, 4, 1, 2, 1}, {2, 1, 2, 1, 4, 1, 4, 1}, {1, 4, 1, 4, 1, 2, 1, 2}, {1, 4, 1, 2, 1, 2, 1, 4}, {1, 2, 1, 4, 1, 4, 1, 2}, {1, 2, 1, 2, 1, 4, ...
[ "literal.number.change", "assignment.value.change" ]
30,871
30,872
u118157225
cpp
p00082
#include <cstdlib> #include <iostream> #include <string> std::string B = "4141212141412121"; int main() { int i, j, C[8] = {}, x[8] = {}, s, m, p, tmp; for (i = 7; i--;) C[i] = atoi(B.substr(i, 8).c_str()); while (std::cin >> x[0]) { m = x[0]; for (i = 1; i < 8; i++) { std::cin >> x[i]; m ...
#include <cstdlib> #include <iostream> #include <string> std::string B = "4141212141412121"; int main() { int i, j, C[8] = {}, x[8] = {}, s, m, p, tmp; for (i = 8; i--;) C[i] = atoi(B.substr(i, 8).c_str()); while (std::cin >> x[0]) { m = x[0]; for (i = 1; i < 8; i++) { std::cin >> x[i]; m ...
[ "literal.number.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
30,873
30,874
u912237403
cpp
p00082
#include <cstdlib> #include <iostream> #include <string> std::string B = "4141212141412121"; int main() { int i, j, C[8] = {}, x[8] = {}, s, m, p, tmp; for (i = 7; i--;) C[i] = atoi(B.substr(i, 8).c_str()); while (std::cin >> x[0]) { m = x[0]; for (i = 1; i < 8; i++) { std::cin >> x[i]; m ...
#include <cstdlib> #include <iostream> #include <string> std::string B = "4141212141412121"; int main() { int i, j, C[8] = {}, x[8] = {}, s, m, p, tmp; for (i = 8; i--;) C[i] = atoi(B.substr(i, 8).c_str()); while (std::cin >> x[0]) { m = x[0]; for (i = 1; i < 8; i++) { std::cin >> x[i]; m ...
[ "literal.number.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one" ]
30,875
30,876
u912237403
cpp
p00083
#include <cstdio> #include <utility> using namespace std; #define gcu getchar_unlocked #define pcu putchar_unlocked #define _T template <typename T> #define _HT template <typename H, typename... T> #define _il inline #define _in _il int in #define _sc _il bool scan _T T in(int c) { T n = 0; bool m = false; if (c...
#include <cstdio> #include <utility> using namespace std; #define gcu getchar_unlocked #define pcu putchar_unlocked #define _T template <typename T> #define _HT template <typename H, typename... T> #define _il inline #define _in _il int in #define _sc _il bool scan _T T in(int c) { T n = 0; bool m = false; if (c...
[ "control_flow.break.remove", "control_flow.continue.add", "literal.number.change", "call.arguments.change", "expression.operation.binary.change" ]
30,971
30,972
u621234548
cpp
p00083
#include <cstdio> #include <utility> using namespace std; #define gcu getchar_unlocked #define pcu putchar_unlocked #define _T template <typename T> #define _HT template <typename H, typename... T> #define _il inline #define _in _il int in #define _sc _il bool scan _T T in(int c) { T n = 0; bool m = false; if (c...
#include <cstdio> #include <utility> using namespace std; #define gcu getchar_unlocked #define pcu putchar_unlocked #define _T template <typename T> #define _HT template <typename H, typename... T> #define _il inline #define _in _il int in #define _sc _il bool scan _T T in(int c) { T n = 0; bool m = false; if (c...
[ "control_flow.break.remove", "control_flow.continue.add" ]
30,973
30,972
u621234548
cpp
p00083
#include <stdbool.h> #include <stdio.h> #define Pre 0 // for switch #define Meiji 1 #define Taisho 2 #define Showa 3 #define Heisei 4 // declare function void print_gengo(int nen, int tuki, int hi); /*==============end of delaration====================================*/ int main(void) { int impyear; int impmont...
#include <stdbool.h> #include <stdio.h> #define Pre 0 // for switch #define Meiji 1 #define Taisho 2 #define Showa 3 #define Heisei 4 // declare function void print_gengo(int nen, int tuki, int hi); /*==============end of delaration====================================*/ int main(void) { int impyear; int impmont...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,974
30,975
u726905441
cpp
p00083
#include <stdbool.h> #include <stdio.h> bool judge_beginning_era(int year, int month, int day, int beginning_year, int beginning_month, int beginning_day) { if (beginning_year < year || (beginning_year == year && (beginning_month < month || (beginning_month == month && b...
#include <stdbool.h> #include <stdio.h> bool judge_beginning_era(int year, int month, int day, int beginning_year, int beginning_month, int beginning_day) { if (beginning_year < year || (beginning_year == year && (beginning_month < month || (beginning_month == month && b...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,979
30,980
u938503537
cpp
p00083
#include <stdbool.h> #include <stdio.h> const int ERA_PRE_MEIJI = -1; const int ERA_MEIJI = 0; const int ERA_TAISHO = 1; const int ERA_SHOWA = 2; const int ERA_HEISEI = 3; const int ERA_BEGIN_YEAR[] = {1868, 1912, 1926, 1989}; const int ERA_BEGIN_MONTH[] = {9, 7, 12, 1}; const int ERA_BEGIN_DATE[] = {8, 30, 25, 8}; ...
#include <stdbool.h> #include <stdio.h> const int ERA_PRE_MEIJI = -1; const int ERA_MEIJI = 0; const int ERA_TAISHO = 1; const int ERA_SHOWA = 2; const int ERA_HEISEI = 3; const int ERA_BEGIN_YEAR[] = {1868, 1912, 1926, 1989}; const int ERA_BEGIN_MONTH[] = {9, 7, 12, 1}; const int ERA_BEGIN_DATE[] = {8, 30, 25, 8}; ...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,981
30,982
u733329486
cpp
p00083
#include <stdbool.h> #include <stdio.h> const int ERA_PRE_MEIJI = -1; const int ERA_MEIJI = 0; const int ERA_TAISHO = 1; const int ERA_SHOWA = 2; const int ERA_HEISEI = 3; const int ERA_BEGIN_YEAR[] = {1868, 1912, 1926, 1989}; const int ERA_BEGIN_MONTH[] = {9, 7, 12, 1}; const int ERA_BEGIN_DATE[] = {8, 30, 25, 8}; ...
#include <stdbool.h> #include <stdio.h> const int ERA_PRE_MEIJI = -1; const int ERA_MEIJI = 0; const int ERA_TAISHO = 1; const int ERA_SHOWA = 2; const int ERA_HEISEI = 3; const int ERA_BEGIN_YEAR[] = {1868, 1912, 1926, 1989}; const int ERA_BEGIN_MONTH[] = {9, 7, 12, 1}; const int ERA_BEGIN_DATE[] = {8, 30, 25, 8}; ...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
30,981
30,983
u733329486
cpp
p00083
#include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) using namespace std; const int Yb = 0; const int Mb = 1; const int Db = 2; const int Ye = 3; const int Me = 4; const int De = 5; const int table[4][6] = {{1868, 9, 8, 1912, 7, 29}, {1912, 7, 30, 1926, 12,...
#include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) using namespace std; const int Yb = 0; const int Mb = 1; const int Db = 2; const int Ye = 3; const int Me = 4; const int De = 5; const int table[4][6] = {{1868, 9, 8, 1912, 7, 29}, {1912, 7, 30, 1926, 12,...
[ "literal.number.change", "call.arguments.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.change", "variable_access.subscript.index.change", "io.output.change" ]
30,992
30,993
u615353970
cpp
p00083
#include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) using namespace std; const int Yb = 0; const int Mb = 1; const int Db = 2; const int Ye = 3; const int Me = 4; const int De = 5; const int table[4][6] = {{1868, 9, 8, 1912, 7, 29}, {1912, 7, 30, 1926, 12,...
#include <iostream> #include <string> #define loop(i, a, b) for (int i = a; i < b; i++) using namespace std; const int Yb = 0; const int Mb = 1; const int Db = 2; const int Ye = 3; const int Me = 4; const int De = 5; const int table[4][6] = {{1868, 9, 8, 1912, 7, 29}, {1912, 7, 30, 1926, 12,...
[ "literal.number.change", "call.arguments.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove", "identifier.change", "variable_access.subscript.index.change", "io.output.change" ]
30,994
30,993
u615353970
cpp
p00083
#include <iostream> using namespace std; int main() { int y, m, d; string str[] = {"pre-meiji", "meiji", "taisho", "showa", "heisei"}; while (cin >> y >> m >> d) { int p = y * 10000 + m * 100 + d, c; if (p < 18680908) c = 0; else if (p < 19120730) c = 1; else if (p < 19261225) c ...
#include <iostream> using namespace std; int main() { int y, m, d; string str[] = {"pre-meiji", "meiji", "taisho", "showa", "heisei"}; while (cin >> y >> m >> d) { int p = y * 10000 + m * 100 + d, c; if (p < 18680908) c = 0; else if (p < 19120730) c = 1; else if (p < 19261225) c ...
[ "control_flow.break.add" ]
30,999
31,000
u113716229
cpp
p00083
#include <stdio.h> int main() { int x, y, z; int n1 = 0, m1 = 0; while (scanf("%d %d %d", &x, &y, &z) != EOF) { n1 = 10000 * x + 100 * y + z; if (n1 >= 19890108) { printf("heisei "); x = x - 1988; } else if (n1 >= 19261225) { printf("showa "); x = x - 1925; } else if (n1 ...
#include <stdio.h> int main() { int x, y, z; int n1 = 0, m1 = 0; while (scanf("%d %d %d", &x, &y, &z) != EOF) { n1 = 10000 * x + 100 * y + z; if (n1 >= 19890108) { printf("heisei "); x = x - 1988; } else if (n1 >= 19261225) { printf("showa "); x = x - 1925; } else if (n1 ...
[ "literal.number.change", "assignment.value.change", "expression.operation.binary.change" ]
31,001
31,002
u745328149
cpp
p00083
#include <stdio.h> int main(void) { int y, m, d; while (scanf("%d %d %d", &y, &m, &d) != EOF) { if ((y < 1868) || (y == 1868 && m < 9) || (y == 1868 && m == 9 && d < 8)) { printf("pre-meiji"); } else if ((y < 1912) || (y == 1912 && m < 7) || (y == 1912 && m == 7 && d < 30)) { pri...
#include <stdio.h> int main(void) { int y, m, d; while (scanf("%d %d %d", &y, &m, &d) != EOF) { if ((y < 1868) || (y == 1868 && m < 9) || (y == 1868 && m == 9 && d < 8)) { printf("pre-meiji\n"); } else if ((y < 1912) || (y == 1912 && m < 7) || (y == 1912 && m == 7 && d < 30)) { p...
[ "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add", "literal.number.change", "control_flow.branch.if.condition.change" ]
31,005
31,006
u885015414
cpp
p00083
#include <stdio.h> const int year[4] = {1868, 1912, 1926, 1989}; const int month[4] = {9, 7, 12, 1}; const int day[4] = {8, 30, 25, 8}; const char gengou[5] = { 'p', 'm', 't', 's', 'h'}; //??????pre-meiji, meiji, taisyou, syowa, heisei??¨?????? char gengouka(int inputyear, int inputmonth, int inputday) { in...
#include <stdio.h> const int year[4] = {1868, 1912, 1926, 1989}; const int month[4] = {9, 7, 12, 1}; const int day[4] = {8, 30, 25, 8}; const char gengou[5] = { 'p', 'm', 't', 's', 'h'}; //??????pre-meiji, meiji, taisyou, syowa, heisei??¨?????? char gengouka(int inputyear, int inputmonth, int inputday) { in...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
31,015
31,016
u330582179
cpp
p00083
#include <stdio.h> const int year[4] = {1868, 1912, 1926, 1989}; const int month[4] = {9, 7, 12, 1}; const int day[4] = {8, 30, 25, 8}; const char gengou[5] = { 'p', 'm', 't', 's', 'h'}; //??????pre-meiji, meiji, taisyou, syowa, heisei??¨?????? char gengouka(int inputyear, int inputmonth, int inputday) { in...
#include <stdio.h> const int year[4] = {1868, 1912, 1926, 1989}; const int month[4] = {9, 7, 12, 1}; const int day[4] = {8, 30, 25, 8}; const char gengou[5] = {'p', 'm', 't', 's', 'h'}; char gengouka(int inputyear, int inputmonth, int inputday) { int i; char y; for (i = 0; i <= 3; ++i) { if (inputyear == ye...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
31,015
31,017
u330582179
cpp
p00083
#include <stdio.h> char judge(int year, int month, int day); int main(void) { int year, month, day; char era; while (scanf("%d %d %d", &year, &month, &day) != EOF) { era = judge(year, month, day); if (era == 'p') { printf("pre-meii\n"); } else if (era == 'm') { printf("meiji %d %d %d\n",...
#include <stdio.h> char judge(int year, int month, int day); int main(void) { int year, month, day; char era; while (scanf("%d %d %d", &year, &month, &day) != EOF) { era = judge(year, month, day); if (era == 'p') { printf("pre-meiji\n"); } else if (era == 'm') { printf("meiji %d %d %d\n"...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
31,018
31,019
u232170406
cpp
p00083
#include <stdio.h> void wareki_convert(int year, int month, int day); int main(void) { int year, month, day; while (scanf("%d %d %d", &year, &month, &day) != EOF) { wareki_convert(year, month, day); } return 0; } void wareki_convert(int year, int month, int day) { if (year <= 1867 || (year == 1868 && m...
#include <stdio.h> void wareki_convert(int year, int month, int day); int main(void) { int year, month, day; while (scanf("%d %d %d", &year, &month, &day) != EOF) { wareki_convert(year, month, day); } return 0; } void wareki_convert(int year, int month, int day) { if (year <= 1867 || (year == 1868 && m...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
31,021
31,022
u800588187
cpp
p00083
#include <stdbool.h> #include <stdint.h> #include <stdio.h> void transferToGengo(int, int, int); int main(void) { int year, month, day; while (scanf("%d%d%d", &year, &month, &day) != EOF) { transferToGengo(year, month, day); } return 0; } void transferToGengo(int year, int month, int day) { //年月日をくっつ...
#include <stdbool.h> #include <stdint.h> #include <stdio.h> void transferToGengo(int, int, int); int main(void) { int year, month, day; while (scanf("%d%d%d", &year, &month, &day) != EOF) { transferToGengo(year, month, day); } return 0; } void transferToGengo(int year, int month, int day) { //年月日をくっつ...
[ "literal.number.change", "control_flow.branch.if.condition.change", "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add" ]
31,024
31,025
u460491970
cpp
p00083
#include <iostream> #include <string> using namespace std; int main() { int y, m, d; while (cin >> y >> m >> d) { if (y >= 1990 || (y == 1989 && m >= 2) || (y == 1989 && m == 1 && d >= 8)) { cout << "heisei " << y - 1989 + 1 << " " << m << " " << d << endl; } else if (y >= 1927 || (y == 1926 && m == ...
#include <iostream> #include <string> using namespace std; int main() { int y, m, d; while (cin >> y >> m >> d) { if (y >= 1990 || (y == 1989 && m >= 2) || (y == 1989 && m == 1 && d >= 8)) { cout << "heisei " << y - 1989 + 1 << " " << m << " " << d << endl; } else if (y >= 1927 || (y == 1926 && m == ...
[ "literal.number.change", "io.output.change", "literal.string.change" ]
31,029
31,030
u706356703
cpp
p00083
#include <algorithm> #include <iostream> #include <list> #include <map> #include <stdio.h> #include <string.h> #include <vector> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) range(i, 0, b) #define debug(x) cout << x << endl; using namespace std; int main() { int year, month, day; while ...
#include <algorithm> #include <iostream> #include <list> #include <map> #include <stdio.h> #include <string.h> #include <vector> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) range(i, 0, b) #define debug(x) cout << x << endl; using namespace std; int main() { int year, month, day; while ...
[ "literal.string.change", "io.output.change" ]
31,033
31,034
u452212317
cpp
p00083
#include <iostream> #include <string> using namespace std; int main() { int y, m, d, ny; string a; while (cin >> y >> m >> d) { a = "pre-meiji"; ny = y + 1; if (y > 1868 || y == 1868 && m > 9 || y == 1868 && m == 9 && d >= 8) { ny -= 1868; a = "meiji "; } if (y > 1912 || y == 1912 ...
#include <iostream> #include <string> using namespace std; int main() { int y, m, d, ny; string a; while (cin >> y >> m >> d) { a = "pre-meiji"; ny = y + 1; if (y > 1868 || y == 1868 && m > 9 || y == 1868 && m == 9 && d >= 8) { ny -= 1868; a = "meiji "; } if (y > 1912 || y == 1912 ...
[]
31,039
31,040
u455494700
cpp
p00083
#include <stdio.h> int Y, M, D; bool is_leap(int y) { return y % 400 == 0 || (y % 4 == 0 && y % 100 != 0); } int count(int y, int m, int d) { int ret = 0; for (int i = 1; i < y; i++) { if (is_leap(i)) ret += 366; else ret += 365; } for (int i = 1; i < m; i++) { if (i == 2) ret += (...
#include <stdio.h> int Y, M, D; bool is_leap(int y) { return y % 400 == 0 || (y % 4 == 0 && y % 100 != 0); } int count(int y, int m, int d) { int ret = 0; for (int i = 1; i < y; i++) { if (is_leap(i)) ret += 366; else ret += 365; } for (int i = 1; i < m; i++) { if (i == 2) ret += (...
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove", "literal.string.change", "call.arguments.change", "io.output.change" ]
31,041
31,042
u823513038
cpp
p00083
#include <iostream> using namespace std; int main() { int y, m, d; long n[4], num; n[0] = 1868 * 10000 + 9 * 100 + 8; n[1] = 1912 * 10000 + 7 * 100 + 30; n[2] = 1926 * 10000 + 12 * 100 + 25; n[3] = 1989 * 10000 + 1 * 100 + 8; cin >> y >> m >> d; num = y * 10000 + m * 100 + d; if (n[0] <= num && nu...
#include <iostream> using namespace std; int main() { int y, m, d; long n[4], num; n[0] = 1868 * 10000 + 9 * 100 + 8; n[1] = 1912 * 10000 + 7 * 100 + 30; n[2] = 1926 * 10000 + 12 * 100 + 25; n[3] = 1989 * 10000 + 1 * 100 + 8; while (cin >> y >> m >> d) { num = y * 10000 + m * 100 + d; if (n[0]...
[]
31,045
31,046
u318910474
cpp
p00083
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; //// < "D:\D_Download\Visual Studio ///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; //// < "D:\D_Download\Visual Studio ///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.string.change", "assignment.value.change" ]
31,054
31,053
u186082958
cpp
p00083
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; //// < "D:\D_Download\Visual Studio ///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; template <class T> using Table = vector<vector<T>>; const ld eps = 1e-9; //// < "D:\D_Download\Visual Studio ///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:...
[ "literal.string.change", "assignment.value.change" ]
31,055
31,053
u186082958
cpp
p00083
#include <stdio.h> class Date { public: int y; int m; int d; Date(int y, int m, int d) { this->y = y; this->m = m; this->d = d; } int cmp(Date d2) { if (this->y < d2.y) return -1; if (this->y > d2.y) return 1; if (this->m < d2.m) return -1; if (this->m > d2.m)...
#include <stdio.h> class Date { public: int y; int m; int d; Date(int y, int m, int d) { this->y = y; this->m = m; this->d = d; } int cmp(Date d2) { if (this->y < d2.y) return -1; if (this->y > d2.y) return 1; if (this->m < d2.m) return -1; if (this->m > d2.m)...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
31,057
31,058
u182576515
cpp
p00083
#include <cstdio> #include <iostream> #include <string> using namespace std; #define loop(i, n) for (int i = 0; i < n; i++) int main() { int a, b, c; while (cin >> a >> b >> c) { int era = 0; if (a < 1868) { era = 1; } else if (a == 1868) { if (b < 9) { era = 1; } else if (b...
#include <cstdio> #include <iostream> #include <string> using namespace std; #define loop(i, n) for (int i = 0; i < n; i++) int main() { int a, b, c; while (cin >> a >> b >> c) { int era = 0; if (a < 1868) { era = 1; } else if (a == 1868) { if (b < 9) { era = 1; } else if (b...
[ "literal.number.change", "control_flow.branch.if.condition.change", "literal.string.change", "io.output.change" ]
31,059
31,060
u648717067
cpp
p00083
#include <cstdio> #include <iostream> #include <string> using namespace std; #define loop(i, n) for (int i = 0; i < n; i++) int main() { int a, b, c; while (cin >> a >> b >> c) { int era = 0; if (a < 1868) { era = 1; } else if (a == 1868) { if (b < 9) { era = 1; } else if (b...
#include <cstdio> #include <iostream> #include <string> using namespace std; #define loop(i, n) for (int i = 0; i < n; i++) int main() { int a, b, c; while (cin >> a >> b >> c) { int era = 0; if (a < 1868) { era = 1; } else if (a == 1868) { if (b < 9) { era = 1; } else if (b...
[ "literal.string.change", "io.output.change" ]
31,061
31,060
u648717067
cpp
p00083
#include <stdio.h> int main() { int a, b, c; while (scanf("%d%d%d", &a, &b, &c) != EOF) { if (a > 1989) printf("heisei %d %d %d\n", a - 1988, b, c); else if (a == 1989) { if (b > 1) printf("heisei %d %d %d\n", a - 1988, b, c); else if (c >= 8) printf("heisei %d %d %d\n", a ...
#include <stdio.h> int main() { int a, b, c; while (scanf("%d%d%d", &a, &b, &c) != EOF) { if (a > 1989) printf("heisei %d %d %d\n", a - 1988, b, c); else if (a == 1989) { if (b > 1) printf("heisei %d %d %d\n", a - 1988, b, c); else if (c >= 8) printf("heisei %d %d %d\n", a ...
[ "call.arguments.change", "io.output.change" ]
31,064
31,065
u048151615
cpp
p00083
#include <iostream> #include <string> using namespace std; #define DATE_MEIJI_S 18680908 #define DATE_MEIJI_F 19190729 #define DATE_TAISHO_S 19190730 #define DATE_TAISHO_F 19261224 #define DATE_SHOWA_S 19261225 #define DATE_SHOWA_F 19890107 #define DATE_HEISEI_S 19890108 class CEra { public: CEra() {} void Set(s...
#include <iostream> #include <string> using namespace std; #define DATE_MEIJI_S 18680908 #define DATE_MEIJI_F 19120729 #define DATE_TAISHO_S 19120730 #define DATE_TAISHO_F 19261224 #define DATE_SHOWA_S 19261225 #define DATE_SHOWA_F 19890107 #define DATE_HEISEI_S 19890108 class CEra { public: CEra() {} void Set(s...
[ "preprocessor.define.value.change", "literal.integer.change" ]
31,068
31,069
u280402997
cpp
p00083
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using ...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using ...
[ "literal.string.change", "identifier.change", "call.function.change", "call.arguments.change" ]
31,070
31,071
u223628983
cpp
p00083
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using ...
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using ...
[ "literal.string.change" ]
31,072
31,071
u223628983
cpp
p00083
#include <iostream> #include <string> using namespace std; int main() { string name[5] = {"meiji", "taisho", "showa", "heisei"}, ss = " "; int year[5] = {1867, 1911, 1925, 1988}; int a, b, c, d; while (cin >> a >> b >> c) { d = a * 10000 + b * 100 + c; if (d < 18680908) { cout << "pre-meiji" << en...
#include <iostream> #include <string> using namespace std; int main() { string name[5] = {"meiji", "taisho", "showa", "heisei"}, ss = " "; int year[5] = {1867, 1911, 1925, 1988}; int a, b, c, d; while (cin >> a >> b >> c) { d = a * 10000 + b * 100 + c; if (d < 18680908) { cout << "pre-meiji" << en...
[ "io.output.change" ]
31,077
31,078
u129997015
cpp
p00085
#include <iostream> using namespace std; int main() { long i, j, n, nn, m, p[1000]; while (cin >> n) { cin >> m; if (n == 0) break; nn = n; for (i = 0; i < n; i++) p[i] = i; j = 0; for (;;) { for (i = 0; i < m; i++) { j++; if (j >= n) j -= n; ...
#include <iostream> using namespace std; int main() { long i, j, n, nn, m, p[1001]; while (cin >> n) { cin >> m; if (n == 0) break; nn = n; for (i = 1; i <= n; i++) p[i] = 1; j = 0; for (;;) { for (i = 0; i < m; i++) { j++; if (j > n) j -= n; ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "assignment.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "expression.operator.compare.change", "control_flow.loop.condition.change", "identifier.replace.remove", "literal.replace.add", "...
31,079
31,080
u425782371
cpp
p00085
#include <stdio.h> int main(void) { int n, m; int a[1000]; while (1) { scanf("%d %d", &n, &m); if (n == 0 && m == 0) return 0; for (int i = 0; i <= n; i++) a[i] = 0; int p = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < m;) { p = (p + 1) % n; if (a[p] ...
#include <stdio.h> int main(void) { int n, m; int a[1000]; while (1) { scanf("%d %d", &n, &m); if (n == 0 && m == 0) return 0; for (int i = 0; i < n; i++) a[i] = 0; int p = -1; for (int i = 0; i < n; i++) { for (int j = 0; j < m;) { p = (p + 1) % n; if (a[p] ...
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "literal.number.change", "variable_declaration.value.change" ]
31,083
31,084
u174233867
cpp
p00085
#include <iostream> #include <vector> using namespace std; int main() { int n, m; while (cin >> n >> m && n != 0 && m != 0) { vector<bool> seki(n, true); int cn = 0; for (int i = 0; i < n - 1; i++) { int offset = 0; for (int j = 0; j < m + offset; j++) { cn++; cn = cn % n; ...
#include <iostream> #include <vector> using namespace std; int main() { int n, m; while (cin >> n >> m && n != 0 && m != 0) { vector<bool> seki(n, true); int cn = -1; for (int i = 0; i < n - 1; i++) { int offset = 0; for (int j = 0; j < m + offset; j++) { cn++; cn = cn % n; ...
[ "literal.number.change", "variable_declaration.value.change" ]
31,085
31,086
u686709939
cpp
p00086
#include <cstring> #include <iostream> using namespace std; int list[100]; int main(void) { int a, b; bool flag = false; while (cin >> a >> b) { memset(list, 0, 100); list[a - 1]++; list[b - 1]++; while (true) { cin >> a >> b; if (!a && !b) break; list[a - 1]++; l...
#include <cstring> #include <iostream> using namespace std; int list[100]; int main(void) { int a, b; bool flag = false; while (cin >> a >> b) { memset(list, 0, 100); list[a - 1]++; list[b - 1]++; while (true) { cin >> a >> b; if (!a && !b) break; list[a - 1]++; l...
[ "assignment.add" ]
31,140
31,141
u467929102
cpp
p00086
#include <iostream> #include <vector> using namespace std; int main(int argc, const char *argv[]) { while (1) { vector<int> G[100]; int a, b; while (1) { if (!cin >> a >> b) { return 0; } if (a == 0 && b == 0) { break; } a--; b--; G[a].push_back(b)...
#include <iostream> #include <vector> using namespace std; int main(int argc, const char *argv[]) { while (1) { vector<int> G[100]; int a, b; while (1) { if (!(cin >> a >> b)) { return 0; } if (a == 0 && b == 0) { break; } a--; b--; G[a].push_back(...
[ "control_flow.branch.if.condition.change" ]
31,148
31,149
u444132188
cpp
p00086
#include <iostream> using namespace std; int main() { int a, b; int hen[100] = {}; while (cin >> a >> b) { hen[a - 1]++; hen[b - 1]++; if (a == 0) { if (hen[0] % 2 == 1 && hen[1] % 2 == 1) { for (int i = 2; i < 100; i++) { if (i < 100 && hen[i] % 2 == 1) { cout <...
#include <iostream> using namespace std; int main() { int a, b; int hen[100] = {0}; while (cin >> a >> b) { hen[a - 1]++; hen[b - 1]++; if (a == 0) { if (hen[0] % 2 == 1 && hen[1] % 2 == 1) { for (int i = 2; i < 101; i++) { if (i < 100 && hen[i] % 2 == 1) { cout <<...
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
31,158
31,159
u829912068
cpp
p00086
#include <iostream> using namespace std; int main() { int a, b; int hen[100] = {}; while (cin >> a >> b) { hen[a - 1]++; hen[b - 1]++; if (a == 0) { if (hen[0] % 2 == 1 && hen[1] % 2 == 1) { for (int i = 2; i < 101; i++) { if (i < 100 && hen[i] % 2 == 1) { cout << ...
#include <iostream> using namespace std; int main() { int a, b; int hen[100] = {0}; while (cin >> a >> b) { hen[a - 1]++; hen[b - 1]++; if (a == 0) { if (hen[0] % 2 == 1 && hen[1] % 2 == 1) { for (int i = 2; i < 101; i++) { if (i < 100 && hen[i] % 2 == 1) { cout <<...
[]
31,160
31,159
u829912068
cpp
p00086
#include <iostream> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) using namespace std; int main() { while (1) { int a = -1, b; int dt[101] = {0}; while (cin >> a >> b && a || b) { dt[a]++; dt[b]++; } if (a == -1) return 0; bool flg = true;...
#include <iostream> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) using namespace std; int main() { while (1) { int a = -1, b; int dt[101] = {0}; while (cin >> a >> b && a || b) { dt[a]++; dt[b]++; } if (a == -1) return 0; bool flg = true;...
[ "literal.number.change", "call.arguments.change", "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
31,170
31,171
u982302262
cpp
p00086
#include <bits/stdc++.h> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) range(i, 0, b) #define itrep(it, a) for (it = (a).begin(); it != (a).end(); it++) #define all(a) (a).begin(), (a).end() #define debug(x) cout << "debug " << x << endl; #define INF (1 << 30) using namespace std; #define N ...
#include <bits/stdc++.h> #define range(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, b) range(i, 0, b) #define itrep(it, a) for (it = (a).begin(); it != (a).end(); it++) #define all(a) (a).begin(), (a).end() #define debug(x) cout << "debug " << x << endl; #define INF (1 << 30) using namespace std; #define N ...
[ "expression.operation.binary.remove", "control_flow.branch.if.condition.change" ]
31,172
31,173
u452212317
cpp
p00086
#include <algorithm> // sort ????????? #include <iostream> #include <string> // string (?????????) ????????? using namespace std; int N[128] = {0}, a, b; bool ok() { if (N[1] % 2 == 0) return false; if (N[2] % 2 == 0) return false; for (int i = 3; i < 128; i++) { if (N[i] % 2 == 1) return false;...
#include <algorithm> // sort ????????? #include <iostream> #include <string> // string (?????????) ????????? using namespace std; int N[256] = {0}, a, b; bool ok() { if (N[1] % 2 == 0) return false; if (N[2] % 2 == 0) return false; for (int i = 3; i < 256; i++) { if (N[i] % 2 == 1) return false;...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change", "call.add" ]
31,174
31,175
u269653912
cpp
p00086
#include <algorithm> // sort ????????? #include <iostream> #include <string> // string (?????????) ????????? using namespace std; int N[256] = {0}, a, b; bool ok() { if (N[1] % 2 == 0) return false; if (N[2] % 2 == 0) return false; for (int i = 3; i < 256; i++) { if (N[i] % 2 == 1) return false;...
#include <algorithm> // sort ????????? #include <iostream> #include <string> // string (?????????) ????????? using namespace std; int N[256] = {0}, a, b; bool ok() { if (N[1] % 2 == 0) return false; if (N[2] % 2 == 0) return false; for (int i = 3; i < 256; i++) { if (N[i] % 2 == 1) return false;...
[ "control_flow.branch.if.condition.change", "call.add" ]
31,177
31,175
u269653912
cpp
p00086
#include <bits/stdc++.h> using namespace std; int main() { while (1) { int a[120] = {0}, s, t; while (cin >> s >> t, s) a[s]++, a[t]++; if (a[0] == 0) return 0; for (int i = 3; i < 120; i++) if (a[i] % 2 || !(a[0] % 2 && a[1] % 2)) goto L; cout << "OK" << endl; if (0)...
#include <bits/stdc++.h> using namespace std; int main() { while (1) { int a[120] = {0}, s, t; while (cin >> s >> t, s) a[s]++, a[t]++; if (a[1] == 0) return 0; for (int i = 3; i < 120; i++) if (a[i] % 2 || !(a[1] % 2 && a[2] % 2)) goto L; cout << "OK" << endl; if (0)...
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
31,180
31,181
u962041986
cpp
p00086
#include <iostream> using namespace std; int map[110]; bool solve() { if (map[1] % 2 == map[2] & 2 == 1) { for (int i = 3; i <= 100; i++) { if (map[i] % 2 == 1) return false; } return true; } else return false; } int main() { int a, b; while (cin >> a >> b) { if (!a && !b) { ...
#include <iostream> using namespace std; int map[110]; bool solve() { if (map[1] % 2 == 1 && map[2] % 2 == 1) { for (int i = 3; i <= 100; i++) { if (map[i] % 2 == 1) return false; } return true; } else return false; } int main() { int a, b; while (cin >> a >> b) { if (!a && !b)...
[ "control_flow.branch.if.condition.change" ]
31,182
31,183
u988213374
cpp
p00086
#include <bits/stdc++.h> using namespace std; int main() { int a, b; map<int, int> deg; while (cin >> a >> b) { if (a == 0 && b == 0) { bool f = true; for (auto p : deg) { if (p.first < 2 && !(p.second & 1)) f = false; if (p.first >= 2 && p.second & 1) f = fal...
#include <bits/stdc++.h> using namespace std; int main() { int a, b; map<int, int> deg; while (cin >> a >> b) { if (a == 0 && b == 0) { bool f = true; for (auto p : deg) { if (p.first < 2 && ~p.second & 1) f = false; if (p.first >= 2 && p.second & 1) f = false...
[ "control_flow.branch.if.condition.change" ]
31,184
31,185
u547616245
cpp
p00086
#include <iostream> #define CROSS 101 using namespace std; int main() { int a, b; int data[CROSS][CROSS]; int initFlag = true; while (cin >> a >> b) { if (initFlag) { for (int i = 0; i < CROSS; i++) { for (int j = 0; j < CROSS; j++) { data[i][j] = 0; } } initFlag...
#include <iostream> #define CROSS 101 using namespace std; int main() { int a, b; int data[CROSS][CROSS]; int initFlag = true; while (cin >> a >> b) { if (initFlag) { for (int i = 0; i < CROSS; i++) { for (int j = 0; j < CROSS; j++) { data[i][j] = 0; } } initFlag...
[ "assignment.add" ]
31,194
31,195
u480459673
cpp
p00086
#include <iostream> #include <map> using namespace std; int main(void) { int u, v; map<int, int> m; while (cin >> u >> v) { if (u == 0 && v == 0) { bool flag = true; map<int, int>::iterator it; for (it = m.begin(); it != m.end(); it++) { if (it->first == 1 && it->second % 2 == 0) ...
#include <iostream> #include <map> using namespace std; int main(void) { int u, v; map<int, int> m; while (cin >> u >> v) { if (u == 0 && v == 0) { bool flag = true; map<int, int>::iterator it; for (it = m.begin(); it != m.end(); it++) { if (it->first == 1 && it->second % 2 == 0) ...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
31,200
31,201
u739636574
cpp