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 |
|---|---|---|---|---|---|---|---|
p00010 | #include <cmath>
#include <cstdio>
#include <iostream>
#define double long double
using namespace std;
double marume(double x) {
long long t = x * 1000 + ((x > 0) ? 1 : -1) * 0.5;
return t / 1000.0;
}
int main() {
int n;
double tx, ty, x1, y1, x2, y2;
cin >> n;
while (n--) {
cin >> tx >> ty >> x1 >> ... | #include <cmath>
#include <cstdio>
#include <iostream>
#define double long double
using namespace std;
double marume(double x) {
long long t = x * 1000 + ((x > 0) ? 1 : -1) * 0.5;
return t / 1000.0;
}
int main() {
int n;
double tx, ty, x1, y1, x2, y2;
cin >> n;
while (n--) {
cin >> tx >> ty >> x1 >> ... | [
"identifier.change",
"expression.operation.binary.change"
] | 12,734 | 12,735 | u911041619 | cpp |
p00010 | #include <cmath>
#include <cstdio>
#include <iostream>
#define double long double
using namespace std;
double marume(double x) {
long long t = x * 1000 + ((x > 0) ? 1 : -1) * 0.5;
return t / 1000.0;
}
int main() {
int n;
double tx, ty, x1, y1, x2, y2;
cin >> n;
while (n--) {
cin >> tx >> ty >> x1 >> ... | #include <cmath>
#include <cstdio>
#include <iostream>
#define double long double
using namespace std;
double marume(double x) {
long long t = x * 1000 + ((x > 0) ? 1 : -1) * 0.5;
return t / 1000.0;
}
int main() {
int n;
double tx, ty, x1, y1, x2, y2;
cin >> n;
while (n--) {
cin >> tx >> ty >> x1 >> ... | [
"identifier.change",
"expression.operation.binary.change"
] | 12,736 | 12,735 | u911041619 | cpp |
p00010 | #include <cmath>
#include <cstdio>
#include <iostream>
#define double long double
using namespace std;
double marume(double x) {
long long t = x * 1000 + ((x > 0) ? 1 : -1) * 0.5;
return t / 1000.0;
}
int main() {
int n;
double tx, ty, x1, y1, x2, y2;
cin >> n;
while (n--) {
cin >> tx >> ty >> x1 >> ... | #include <cmath>
#include <cstdio>
#include <iostream>
#define double long double
using namespace std;
double marume(double x) {
long long t = x * 1000 + ((x > 0) ? 1 : -1) * 0.5;
return t / 1000.0;
}
int main() {
int n;
double tx, ty, x1, y1, x2, y2;
cin >> n;
while (n--) {
cin >> tx >> ty >> x1 >> ... | [
"identifier.change",
"expression.operation.binary.change"
] | 12,737 | 12,738 | u911041619 | cpp |
p00010 | #include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double px, py, r;
double A1, B1, C1, A2, B2, C2;
A1 = 2 * (x2 - y2);
B1 = 2 * ... | #include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double px, py, r;
double A1, B1, C1, A2, B2, C2;
A1 = 2 * (x2 - x1);
B1 = 2 * ... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 12,742 | 12,743 | u559424765 | cpp |
p00010 | #include <cmath>
#include <cstdio>
#include <iostream>
#include <utility>
// ax + by = e1
// cx + dy = e2
auto solve(double a, double b, double c, double d, double e1, double e2)
-> std::pair<double, double> {
auto delta = a * d - b * c;
auto x = (d * e1 - b * e2) / delta;
auto y = (a * e2 - c * e1) / delta;... | #include <cmath>
#include <cstdio>
#include <iostream>
#include <utility>
// ax + by = e1
// cx + dy = e2
auto solve(double a, double b, double c, double d, double e1, double e2)
-> std::pair<double, double> {
auto delta = a * d - b * c;
auto x = (d * e1 - b * e2) / delta;
auto y = (a * e2 - c * e1) / delta;... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 12,744 | 12,745 | u194661666 | cpp |
p00010 | #include <algorithm>
#include <complex>
#include <cstdio>
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 pb push_back
#define A... | #include <algorithm>
#include <complex>
#include <cstdio>
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 pb push_back
#define A... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 12,746 | 12,747 | u529386725 | cpp |
p00010 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int datasetnum;
double x1, y1, x2, y2, x3, y3;
cin >> datasetnum;
for (int loopcount = 0; loopcount < datasetnum; loopcount++) {
double px, py, r;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double len_1 = s... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int datasetnum;
double x1, y1, x2, y2, x3, y3;
cin >> datasetnum;
for (int loopcount = 0; loopcount < datasetnum; loopcount++) {
double px, py, r;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double len_1 = s... | [
"io.output.change",
"literal.number.change"
] | 12,748 | 12,749 | u080939948 | cpp |
p00010 | #include <math.h>
#include <stdio.h>
int main() {
int i, n;
double x1, x2, x3, y1, y2, y3;
double a, b, c, d, e, f;
double X1, Y1, r;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3);
a = 2 * (x2 - x1);
b = 2 * (y2 - y1);
c = x1 * x1... | #include <math.h>
#include <stdio.h>
int main() {
int i, n;
double x1, x2, x3, y1, y2, y3;
double a, b, c, d, e, f;
double X1, Y1, r;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3);
a = 2 * (x2 - x1);
b = 2 * (y2 - y1);
c = x1 * x1... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 12,751 | 12,752 | u700120734 | cpp |
p00010 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
while (n--) {
double x1, x2, x3, y1, y2, y3;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double a1 = 2 * (x2 - x1);
double b1 = 2 * (y2 - y1);
double c1 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2;
double a2 = 2 * (x3... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
while (n--) {
double x1, x2, x3, y1, y2, y3;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double a1 = 2 * (x2 - x1);
double b1 = 2 * (y2 - y1);
double c1 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2;
double a2 = 2 * (x3... | [
"identifier.change",
"expression.operation.binary.change"
] | 12,753 | 12,754 | u318910474 | cpp |
p00010 | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <utility>
#include <vector>
using namespace std;
typedef complex<double> Point;
#define X real()
#define Y imag()
#define EPS 10e-8
namespace std {
bool operator<(Point a, Point b) {
if (a.X != b.X)
return a.X < b.X;
return a.Y ... | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <utility>
#include <vector>
using namespace std;
typedef complex<double> Point;
#define X real()
#define Y imag()
#define EPS 10e-8
namespace std {
bool operator<(Point a, Point b) {
if (a.X != b.X)
return a.X < b.X;
return a.Y ... | [
"call.function.change",
"function.return_value.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 12,755 | 12,756 | u794549850 | cpp |
p00010 | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <utility>
#include <vector>
using namespace std;
typedef complex<double> Point;
#define X real()
#define Y imag()
#define EPS 10e-8
namespace std {
bool operator<(Point a, Point b) {
if (a.X != b.X)
return a.X < b.X;
return a.Y ... | #include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <utility>
#include <vector>
using namespace std;
typedef complex<double> Point;
#define X real()
#define Y imag()
#define EPS 10e-8
namespace std {
bool operator<(Point a, Point b) {
if (a.X != b.X)
return a.X < b.X;
return a.Y ... | [
"call.function.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 12,755 | 12,757 | u794549850 | cpp |
p00010 | #include <cmath>
#include <complex>
#include <cstdio>
#include <vector>
using namespace std;
#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++)
typedef complex<double> P;
typedef vector<P> VP;
const double EPF = 1e-5;
#defin... | #include <cmath>
#include <complex>
#include <cstdio>
#include <vector>
using namespace std;
#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++)
typedef complex<double> P;
typedef vector<P> VP;
const double EPF = 1e-9;
#defin... | [
"literal.number.change",
"variable_declaration.value.change",
"expression.operation.unary.add",
"call.arguments.change"
] | 12,758 | 12,759 | u414322748 | cpp |
p00010 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double x1, x2, x3, y1, y2, y3, x12, x13, y12, y13, xx12, yy12, xx13, yy13, x,
y, r;
for (int i = 0; i < n; i++) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
x12 = x1 - x2;
x13 = x1 - x3;
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double x1, x2, x3, y1, y2, y3, x12, x13, y12, y13, xx12, yy12, xx13, yy13, x,
y, r;
for (int i = 0; i < n; i++) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
x12 = x1 - x2;
x13 = x1 - x3;
... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 12,764 | 12,765 | u974101748 | cpp |
p00010 | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using LL = long long;
constexpr int MOD = 1000000000 + 7;
//?¶???... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using LL = long long;
constexpr int MOD = 1000000000 + 7;
//?¶???... | [
"literal.number.change",
"io.output.change"
] | 12,766 | 12,767 | u018085514 | cpp |
p00010 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
#define E... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
#define E... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 12,768 | 12,769 | u327125861 | cpp |
p00010 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int n;
double x1, x2, x3, y1, y2, y3;
cin >> n;
while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) {
double a = 2 * (x1 - x2);
double b = 2 * (y1 - y2);
double c = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2;
d... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int n;
double x1, x2, x3, y1, y2, y3;
cin >> n;
while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) {
double a = 2 * (x1 - x2);
double b = 2 * (y1 - y2);
double c = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2;
d... | [
"literal.number.change",
"io.output.change"
] | 12,773 | 12,771 | u322168578 | cpp |
p00010 | #include <math.h>
#include <stdio.h>
int main(void) {
int i, n, j, k;
double x1, y1, x2, y2, x3, y3;
scanf("%d", &n);
for (i = 0; i < n; ++i) {
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
double xt1 = (x1 + x2) / 2, xt2 = (x3 + x2) / 2, yt1 = (y1 + y2) / 2,
yt2 = (y3 + y2) / 2... | #include <math.h>
#include <stdio.h>
int main(void) {
int i, n, j, k;
double x1, y1, x2, y2, x3, y3;
scanf("%d", &n);
for (i = 0; i < n; ++i) {
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
double xt1 = (x1 + x2) / 2, xt2 = (x3 + x2) / 2, yt1 = (y1 + y2) / 2,
yt2 = (y3 + y2) / 2... | [
"expression.operation.unary.add"
] | 12,774 | 12,775 | u428870975 | cpp |
p00010 | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n = 0, p, q, r;
double ax = 0, ay = 0, bx = 0, by = 0, cx = 0, cy = 0, S = 0, R = 0, a = 0,
b = 0, c = 0, x = 0, y = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> ax >> ay >> bx >> by >> cx >> cy;
... | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n = 0, p, q, r;
double ax = 0, ay = 0, bx = 0, by = 0, cx = 0, cy = 0, S = 0, R = 0, a = 0,
b = 0, c = 0, x = 0, y = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> ax >> ay >> bx >> by >> cx >> cy;
... | [
"call.add",
"call.arguments.change"
] | 12,776 | 12,777 | u835866094 | cpp |
p00010 | #include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef complex<double> Point;
bool eqv(double d1, double d2) { return abs(d1 - d2) < 1e-10; }
double r_(double x) {
if (abs(x) < 0.001)
return 0;
return x;
}
int main() {
int N;
cin >> N;
while (N--) {
... | #include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
using namespace std;
typedef complex<double> Point;
bool eqv(double d1, double d2) { return abs(d1 - d2) < 1e-10; }
double r_(double x) {
if (abs(x) < 0.001)
return 0;
return x;
}
int main() {
int N;
cin >> N;
while (N--) {
... | [
"identifier.change",
"expression.operation.binary.change",
"assignment.value.change"
] | 12,778 | 12,779 | u525048109 | cpp |
p00010 | #include <math.h>
#include <stdio.h>
int main() {
int a;
scanf("%d", &a);
while (a--) {
double x1, y1, x2, y2, x3, y3;
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
double a1 = 2 * (x2 - x1);
double b1 = 2 * (y2 - y2);
double c1 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2;
double ... | #include <math.h>
#include <stdio.h>
int main() {
int a;
scanf("%d", &a);
while (a--) {
double x1, y1, x2, y2, x3, y3;
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
double a1 = 2 * (x2 - x1);
double b1 = 2 * (y2 - y1);
double c1 = x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2;
double ... | [
"identifier.change",
"expression.operation.binary.change"
] | 12,780 | 12,781 | u676399799 | cpp |
p00010 | #include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
int main(void) {
int n, i;
float x1, x2, x3, y1, y2, y3, a1, a2, b1, b2, c1, c2, xp, yp, r;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3);
a1 = 2 * (x2 - x1);
b1 = 2 * (y2 - y1);
... | #include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
int main(void) {
int n, i, buf;
float x1, x2, x3, y1, y2, y3, a1, a2, b1, b2, c1, c2, xp, yp, r;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%f %f %f %f %f %f", &x1, &y1, &x2, &y2, &x3, &y3);
a1 = 2 * (x2 - x1);
b1 = 2 * (y2 - y1... | [
"variable_declaration.add",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 12,782 | 12,783 | u280223065 | cpp |
p00010 | #include <algorithm> // require sort next_permutation count __gcd reverse etc.
#include <cctype> // require tolower, toupper
#include <cfloat>
#include <climits>
#include <cmath> // require fabs
#include <cstdio> // require scanf printf
#include <cstdlib> // require abs exit atof atoi
#include <cstring> // requir... | #include <algorithm> // require sort next_permutation count __gcd reverse etc.
#include <cctype> // require tolower, toupper
#include <cfloat>
#include <climits>
#include <cmath> // require fabs
#include <cstdio> // require scanf printf
#include <cstdlib> // require abs exit atof atoi
#include <cstring> // requir... | [
"variable_declaration.type.primitive.change"
] | 12,784 | 12,785 | u597396610 | cpp |
p00010 | /*
Write a program which prints the central coordinate (px, py) and the radius r of
a circumscribed circle of a triangle which is constructed by three points (x1,
y1)(x2, y2)(x3, y3) on the plane surface.
*/
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
/*
http://zo3k... | /*
Write a program which prints the central coordinate (px, py) and the radius r of
a circumscribed circle of a triangle which is constructed by three points (x1,
y1)(x2, y2)(x3, y3) on the plane surface.
*/
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
/*
http://zo3k... | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 12,786 | 12,787 | u706376958 | cpp |
p00010 | #include "math.h"
#include <iomanip>
#include <iostream>
using namespace std;
/** Problem0010 : CIrcumscribed Circle of a Triangle **/
int main() {
int n;
double X1, Y1, X2, Y2, X3, Y3;
double a, b, c, d, e, f, l, m;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> X1 >> Y1 >> X2 >> Y2 >> X3 >> Y3;
a =... | #include "math.h"
#include "stdio.h"
#include <iostream>
using namespace std;
/** Problem0010 : CIrcumscribed Circle of a Triangle **/
int main() {
int N;
double X1, Y1, X2, Y2, X3, Y3;
double a, b, c, d, e, f, l, m, n;
cin >> N;
for (int i = 0; i < N; i++) {
cin >> X1 >> Y1 >> X2 >> Y2 >> X3 >> Y3;
... | [] | 12,801 | 12,802 | u358260180 | cpp |
p00010 | #include <cmath>
#include <iostream>
using namespace std;
typedef struct {
double x;
double y;
} point;
point getCircumcenter(point a, point b, point c) {
double A1 = 2.0f * (b.x - a.x);
double B1 = 2.0f * (b.y - a.y);
double C1 = pow(a.x, 2) - pow(b.x, 2) + pow(a.y, 2) - pow(b.y, 2);
double A2 = 2.0f * (... | #include <cmath>
#include <iostream>
using namespace std;
typedef struct {
double x;
double y;
} point;
point getCircumcenter(point a, point b, point c) {
double A1 = 2.0f * (b.x - a.x);
double B1 = 2.0f * (b.y - a.y);
double C1 = pow(a.x, 2) - pow(b.x, 2) + pow(a.y, 2) - pow(b.y, 2);
double A2 = 2.0f * (... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 12,808 | 12,809 | u419407022 | cpp |
p00010 | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
struct vect {
double x, y;
};
int main() {
vect a, b, c, p, l1, l2, M1, M2;
double t1, r;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y;
M1.x = (a.x + b.x) / 2;
M1.y = (a.... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
struct vect {
double x, y;
};
int main() {
vect a, b, c, p, l1, l2, M1, M2;
double t1, r;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y;
M1.x = (a.x + b.x) / 2;
M1.y = (a.... | [
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 12,810 | 12,811 | u437614372 | cpp |
p00010 | #include <cstdio>
#include <iostream>
#define _USE_MATH_DEFINES
#include <cmath>
#include <map>
#include <vector>
using namespace std;
#define INF 1e+10
#define EPS 1e-10
#define EQ(a, b) (abs(a - b) < EPS)
//誤差を考慮して足し算
double add(double a, double b) {
if (abs(a + b) < EPS * (abs(a) + abs(b)))
return 0;
retur... | #include <cstdio>
#include <iostream>
#define _USE_MATH_DEFINES
#include <cmath>
#include <map>
#include <vector>
using namespace std;
#define INF 1e+10
#define EPS 1e-10
#define EQ(a, b) (abs(a - b) < EPS)
//誤差を考慮して足し算
double add(double a, double b) {
if (abs(a + b) < EPS * (abs(a) + abs(b)))
return 0;
retur... | [
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 12,814 | 12,815 | u393475075 | cpp |
p00010 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int n;
double x1, y1, x2, y2, x3, y3;
double a1, b1, c1, a2, b2, c2;
double x, y, r;
cin >> n;
while (n--) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
a1 = x2 - x1;
b1 = y2 - x1;
c1 = -a1 * (x1 + x2) * 0.5 - b1 * (y1 + y2... | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int n;
double x1, y1, x2, y2, x3, y3;
double a1, b1, c1, a2, b2, c2;
double x, y, r;
cin >> n;
while (n--) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
a1 = x2 - x1;
b1 = y2 - y1;
c1 = -a1 * (x1 + x2) * 0.5 - b1 * (y1 + y2... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 12,824 | 12,825 | u800918599 | cpp |
p00010 | #include <cmath>
#include <iomanip>
#include <iostream>
#define PI 3.1415
using namespace std;
int main() {
int n;
double x1, y1, x2, y2, x3, y3;
double la, lb, lc;
double a, b, c;
double r;
double px, py;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
// ... | #include <cmath>
#include <iomanip>
#include <iostream>
#define PI 3.14159265359
using namespace std;
int main() {
int n;
double x1, y1, x2, y2, x3, y3;
double la, lb, lc;
double a, b, c;
double r;
double px, py;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
... | [
"preprocessor.define.value.change",
"literal.float.change"
] | 12,826 | 12,827 | u301021544 | cpp |
p00010 | #include <cstdio>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3, xp, yp, r;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
xp = 0;
yp = 0;
double a = y2 - y1, b = y3 - y1, c = y2... | #include <cstdio>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3, xp, yp, r;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
xp = 0;
yp = 0;
double a = y2 - y1, b = y3 - y1, c = y2... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 12,829 | 12,830 | u913726760 | cpp |
p00010 | #include <cstdio>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3, xp, yp, r;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
xp = 0;
yp = 0;
double a = y2 - y1, b = y3 - y1, c = y2... | #include <cstdio>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3, xp, yp, r;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
xp = 0;
yp = 0;
double a = y2 - y1, b = y3 - y1, c = y2... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 12,831 | 12,832 | u913726760 | cpp |
p00010 | /*Filename: aoj0010.cpp
*Author: Mushiyo
*/
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
struct Point {
double x;
double y;
};
double countDist(Point p1, Point p2) {
int xDist = abs(p1.x - p2.x);
int yDist = abs(p1.y - p2.y);
return sqrt(xDist * xDist + yDist * yDist);
}... | /*Filename: aoj0010.cpp
*Author: Mushiyo
*/
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
struct Point {
double x;
double y;
};
double countDist(Point p1, Point p2) {
double xDist = abs(p1.x - p2.x);
double yDist = abs(p1.y - p2.y);
return sqrt(xDist * xDist + yDist * yDi... | [
"variable_declaration.type.primitive.change"
] | 12,833 | 12,834 | u929505301 | cpp |
p00010 | #include <cmath>
#include <iostream>
int main() {
int n;
double x1, x2, x3, y1, y2, y3, a, b, c, r;
std::cin >> n;
std::cout.precision(3);
std::cout.setf(std::ios::fixed);
while (n--) {
std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
a = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
b = (x1 - x3... | #include <cmath>
#include <iostream>
int main() {
int n;
double x1, x2, x3, y1, y2, y3, a, b, c, r;
std::cin >> n;
std::cout.precision(3);
std::cout.setf(std::ios::fixed);
while (n--) {
std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
a = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
b = (x1 - x3... | [
"identifier.change",
"expression.operation.binary.change"
] | 12,835 | 12,836 | u543356675 | cpp |
p00010 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ctype.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ctype.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#includ... | [
"literal.number.change",
"expression.operation.binary.change"
] | 12,837 | 12,838 | u041086527 | cpp |
p00011 | #include <iostream>
using namespace std;
int main() {
int verticals, horizontals, a, b;
cin >> verticals;
cin >> horizontals;
int res[verticals];
for (int i = 0; i < verticals; i++)
res[i] = i + 1;
for (int i = 0; i < horizontals; i++) {
cin >> a >> b;
int tmp = res[a - 1];
res[a - 1] = r... | #include <iostream>
using namespace std;
int main() {
int verticals, horizontals, a, b;
char comma; // commaを抜くための変数
cin >> verticals;
cin >> horizontals;
int res[verticals];
for (int i = 0; i < verticals; i++)
res[i] = i + 1;
for (int i = 0; i < horizontals; i++) {
cin >> a >> comma >> b;
i... | [
"variable_declaration.add"
] | 12,989 | 12,990 | u150414576 | cpp |
p00011 | #include <stdio.h>
#include <string.h>
int now[30];
int main() {
int w, n;
scanf("%d%d", &w, &n);
for (int i = 0; i < w; i++) {
now[i] = i + 1;
}
for (int i = 0; i < n; i++) {
int a, b;
scanf("%d%d", &a, &b);
int w = now[a - 1];
now[a - 1] = now[b - 1];
now[b - 1] = w;
}
for (int... | #include <stdio.h>
#include <string.h>
int now[30];
int main() {
int w, n;
scanf("%d%d", &w, &n);
for (int i = 0; i < w; i++) {
now[i] = i + 1;
}
for (int i = 0; i < n; i++) {
int a, b;
scanf("%d,%d", &a, &b);
int w = now[a - 1];
now[a - 1] = now[b - 1];
now[b - 1] = w;
}
for (in... | [
"literal.string.change",
"call.arguments.change"
] | 12,997 | 12,998 | u618330043 | cpp |
p00011 | #include <stdio.h>
#define MAX 30
int main(void) {
int w, n, tmp;
int a, b;
int lot[MAX + 1]; // 1-origin
scanf("%d", &w);
scanf("%d", &n);
for (int i = 1; i <= w; i++)
lot[i] = i;
for (int i = 0; i < n; i++) {
scanf("%d,%d", &a, &b);
tmp = lot[a];
lot[a] = lot[b];
lot[b] = tmp;
}
... | #include <stdio.h>
#define MAX 30
int main(void) {
int w, n, tmp;
int a, b;
int lot[MAX + 1]; // 1-origin
scanf("%d", &w);
scanf("%d", &n);
for (int i = 1; i <= w; i++)
lot[i] = i;
for (int i = 1; i <= n; i++) {
scanf("%d,%d", &a, &b);
tmp = lot[a];
lot[a] = lot[b];
lot[b] = tmp;
}... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"identifier.change",
"call.function.change"
] | 12,999 | 13,000 | u182576515 | cpp |
p00011 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define rp(a) while (a--)
#define pb push_back
#define mp ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define rp(a) while (a--)
#define pb push_back
#define mp ... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 13,001 | 13,002 | u744420470 | cpp |
p00011 | #include <iostream>
using namespace std;
int main() {
int w, n;
int num[30] = {0};
int a, b;
cin >> w;
cin >> n;
for (int i = 0; i < w; i++)
num[i] = i + 1;
for (int i = 0; i < n; i++) {
cin >> a >> b;
int tmp = num[a - 1];
num[a - 1] = num[b - 1];
num[b - 1] = tmp;
}
for (... | #include <iostream>
using namespace std;
int main() {
int w, n;
int num[30] = {0};
int a, b;
char c;
cin >> w;
cin >> n;
for (int i = 0; i < w; i++)
num[i] = i + 1;
for (int i = 0; i < n; i++) {
cin >> a >> c >> b;
int tmp = num[a - 1];
num[a - 1] = num[b - 1];
num[b - 1] = tm... | [
"variable_declaration.add"
] | 13,003 | 13,004 | u600706103 | cpp |
p00009 | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define maxn 999999 + 5
typedef long long ll;
int prime[maxn];
void init() {
for (int i = 2; i < maxn - 4; i++)
prime[i] = i % 2;
prime[2] = 1;
prime[1] = 0;
for (int i = 2; i * i <= maxn; i++) {
if (!... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define maxn 999999 + 5
typedef long long ll;
int prime[maxn];
void init() {
for (int i = 2; i < maxn - 4; i++)
prime[i] = i % 2;
prime[2] = 1;
prime[1] = 0;
for (int i = 2; i * i <= maxn; i++) {
if (!... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 13,129 | 13,130 | u011621222 | cpp |
p00009 | #include <stdio.h>
#include <string.h>
bool mark[1000000];
void sieve() {
int N = 1000000;
memset(mark, true, N + 2);
mark[0] = mark[1] = false;
for (int i = 4; i < N + 2; i += 2)
mark[i] = false;
for (int i = 3; i * i <= N + 2; i += 2) {
if (mark[i] == true) {
for (int j = i * i; j < N + 2;... | /*#include<stdio.h>
int checkPrime(int i)
{
int p;
for ( p = 2 ; p <= i - 1 ; p++ )
{
if ( i%p == 0 )
return 0;
}
if ( p == i )
return 1;
}
int main()
{
int n,sum=0,count=0,rem,i;
while(scanf("%d",&n)!= EOF){
for(i=2;i<n-1;++i)
{
if(ch... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 13,131 | 13,132 | u011621222 | cpp |
p00009 | #include <stdio.h>
bool mark[1000000];
void init() {
for (int i = 0; i < 1000000; i++)
mark[i] = false;
mark[0] = true;
mark[1] = true;
for (int i = 2; i < 1000000; i++) {
if (mark[i])
continue;
for (int j = i * 2; j < 1000000; j += i) {
mark[j] = true;
}
}
}
int main() {
init(... | #include <stdio.h>
bool mark[1000000];
void init() {
for (int i = 0; i < 1000000; i++)
mark[i] = false;
mark[0] = true;
mark[1] = true;
for (int i = 2; i < 1000000; i++) {
if (mark[i])
continue;
for (int j = i * 2; j < 1000000; j += i) {
mark[j] = true;
}
}
}
int main() {
init(... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 13,139 | 13,140 | u011621222 | cpp |
p00009 | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef int long long ll;
using namespace std;
int main() {... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef int long long ll;
using namespace std;
int main() {... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 13,141 | 13,142 | u027430658 | cpp |
p00009 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int prime[40];
bool is_prime[40];
int i = 2, j = 2, n, count = 0;
while (scanf("%d", &n) != EOF) {
int p = 0;
for (i = 0; i <= n; i++) {
is_prime[i] = true;
}
is_prime[0] = is_prime[1] = false;
for (i = 2; i <= n... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int prime[1000000];
bool is_prime[1000000];
int i = 2, j = 2, n, count = 0;
while (scanf("%d", &n) != EOF) {
int p = 0;
for (i = 0; i <= n; i++) {
is_prime[i] = true;
}
is_prime[0] = is_prime[1] = false;
for (i =... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 13,148 | 13,149 | u749493116 | cpp |
p00009 | #include <iostream>
using namespace std;
int main() {
bool prime[1000000];
for (int i = 0; i < 1000000; i++)
prime[i] = true;
prime[0] = prime[1] = false;
for (int i = 0; i < 1000000; i++)
if (prime[i]) {
for (int j = i; j < 1000000; j += i)
prime[j] = false;
}
int n;
while (cin... | #include <iostream>
using namespace std;
int main() {
bool prime[1000000];
for (int i = 0; i < 1000000; i++)
prime[i] = true;
prime[0] = prime[1] = false;
for (int i = 0; i < 1000000; i++)
if (prime[i]) {
for (int j = i + i; j < 1000000; j += i)
prime[j] = false;
}
int n;
while ... | [
"control_flow.loop.for.initializer.change"
] | 13,159 | 13,160 | u663427240 | cpp |
p00009 | #include <cstdio>
using namespace std;
bool prime[1000000];
#define max 1000000
int main() {
prime[1] = true;
for (int i = 2; i < max; i++) {
if (!prime[i]) {
for (int j = i * i; j < max; j += i) {
prime[j] = true;
}
}
}
int n;
while (scanf("%d", &n) != EOF) {
int ans = 0;
... | #include <cstdio>
using namespace std;
bool prime[1000000];
#define max 1000000
int main() {
prime[1] = true;
for (int i = 2; i * i < max; i++) {
if (!prime[i]) {
for (int j = i * i; j < max; j += i) {
prime[j] = true;
}
}
}
int n;
while (scanf("%d", &n) != EOF) {
int ans = 0;
... | [
"control_flow.loop.for.condition.change"
] | 13,161 | 13,162 | u373127758 | cpp |
p00009 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
bool isprime[1000000];
int main(int argc, char **argv) {
in... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
bool isprime[1000000];
int main(int argc, char **argv) {
in... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 13,163 | 13,164 | u069565074 | cpp |
p00009 | #include <cstdio>
#include <iostream>
using namespace std;
const int MAX_N = 1000000; // いくつまで調べるか
bool prime[MAX_N + 1]; // 添字が素数ならtrue、それ以外はfalse
void sieve() {
prime[0] = prime[1] = false; // 例外処理
// 配列prime の初期化
for (int i = 2; i <= MAX_N; ++i)
prime[i] = true;
// 素数でないものを調べる
for (int i = 2; i <= ... | #include <cstdio>
#include <iostream>
using namespace std;
const int MAX_N = 1000000; // いくつまで調べるか
bool prime[MAX_N + 1]; // 添字が素数ならtrue、それ以外はfalse
void sieve() {
prime[0] = prime[1] = false; // 例外処理
// 配列prime の初期化
for (int i = 2; i <= MAX_N; ++i)
prime[i] = true;
// 素数でないものを調べる
for (int i = 2; i <= ... | [
"call.add"
] | 13,175 | 13,176 | u611053131 | cpp |
p00009 | #include <cmath>
#include <iostream>
using namespace std;
bool check(int in) {
for (int i = 3; i <= sqrt(in); i += 2) {
if (i != 5 && i % 5 == 0)
continue;
if (in % i == 0)
return false;
}
return true;
}
int PrimeNumber(int in, int start) {
int count = 0;
if (in > 2)
count++;
for (... | #include <cmath>
#include <iostream>
using namespace std;
bool check(int in) {
for (int i = 3; i <= sqrt(in); i += 2) {
if (i != 5 && i % 5 == 0)
continue;
if (in % i == 0)
return false;
}
return true;
}
int PrimeNumber(int in, int start) {
int count = 0;
if (in >= 2 && start == 3)
c... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 13,177 | 13,178 | u672233061 | cpp |
p00009 | #include <cmath>
#include <iostream>
using namespace std;
#define MAX 100
bool prime[MAX] = {};
void run() {
for (int i = 2; i < MAX; i++) {
prime[i] = true;
}
for (int i = 2; i < MAX; i++) {
if (!prime[i])
continue;
for (int j = 2; j * i < MAX; j++) { // i*1 is prime number
prime[i * j... | #include <cmath>
#include <iostream>
using namespace std;
#define MAX 1000000
bool prime[MAX] = {};
void run() {
for (int i = 2; i < MAX; i++) {
prime[i] = true;
}
for (int i = 2; i < MAX; i++) {
if (!prime[i])
continue;
for (int j = 2; j * i < MAX; j++) { // i*1 is prime number
prime[i... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 13,181 | 13,180 | u111842551 | cpp |
p00009 | #include <iostream>
#include <vector>
using namespace std;
constexpr int MAX = 1000000;
int main() {
vector<bool> prime_list(MAX, true);
prime_list.at(0) = false;
prime_list.at(1) = false;
for (int i = 2; i * i < MAX; ++i) {
if (!prime_list.at(i))
continue;
for (int j = 2; i * j < MAX; ++j)
... | #include <iostream>
#include <vector>
using namespace std;
constexpr int MAX = 1000000;
int main() {
vector<bool> prime_list(MAX, true);
prime_list.at(0) = false;
prime_list.at(1) = false;
for (int i = 2; i * i < MAX; ++i) {
if (!prime_list.at(i))
continue;
for (int j = 2; i * j < MAX; ++j)
... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 13,184 | 13,185 | u637106105 | cpp |
p00009 |
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
/*
int main(void)
{
int n;
vector<int> vecPrime;
while (cin >> n)
{
// vectorの破棄
vecPrime.clear();
// nが2以上の時,2のみ追加
if (n >= 2)
... |
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
/*
int main(void)
{
int n;
vector<int> vecPrime;
while (cin >> n)
{
// vectorの破棄
vecPrime.clear();
// nが2以上の時,2のみ追加
if (n >= 2)
... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 13,186 | 13,187 | u917646831 | cpp |
p00009 | #include <stdio.h>
#include <string.h>
int main(void) {
int n, i, c, k, prime[999999] = {0}, t;
for (i = 2; 999999 >= i; i++) {
if (!prime[i])
for (c = i * 2; 999999 >= c; c += i)
prime[c] = 1;
}
while (scanf("%d", &n) != EOF) {
i = 0;
for (c = 2; n > c; c++) {
if (!prime[c])
... | #include <stdio.h>
#include <string.h>
int main(void) {
int n, i, c, k, prime[999999] = {0}, t;
for (i = 2; 999999 >= i; i++) {
if (!prime[i])
for (c = i * 2; 999999 >= c; c += i)
prime[c] = 1;
}
while (scanf("%d", &n) != EOF) {
i = 0;
for (c = 2; n >= c; c++) {
if (!prime[c])
... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 13,190 | 13,191 | u676009614 | cpp |
p00009 | #include <bits/stdc++.h>
using namespace std;
int f[1000001];
int main() {
fill_n(f, f + 1000001, 1);
f[0] = f[1] = 0;
for (int i = 2; i < 1000001; i++) {
f[i] += f[i - 1];
if (!f[i])
continue;
for (int j = i + i; j < 1000001; j += i)
f[j] = 0;
}
int N;
while (scanf("%d", &N), &N... | #include <bits/stdc++.h>
using namespace std;
int f[1000001];
int main() {
fill_n(f, 1000001, 1);
f[0] = f[1] = 0;
for (int i = 2; i < 1000001; i++) {
f[i] += f[i - 1];
if (!f[i])
continue;
for (int j = i + i; j < 1000001; j += i)
f[j] = 0;
}
int N;
while (scanf("%d", &N) != EOF)... | [
"expression.operation.binary.remove",
"control_flow.loop.condition.change"
] | 13,194 | 13,195 | u113716229 | cpp |
p00009 | #include <bits/stdc++.h>
using namespace std;
vector<int> primes;
bool is_prime[1000100];
void search_prime(int n) {
for (int i = 0; i <= n; ++i)
is_prime[i] = true;
is_prime[0] = is_prime[1] = false;
for (int i = 2; i <= n; ++i) {
if (is_prime[i]) {
primes.push_back(i);
for (int j = i * 2; ... | #include <bits/stdc++.h>
using namespace std;
vector<int> primes;
bool is_prime[1000100];
void search_prime(int n) {
for (int i = 0; i <= n; ++i)
is_prime[i] = true;
is_prime[0] = is_prime[1] = false;
for (int i = 2; i <= n; ++i) {
if (is_prime[i]) {
primes.push_back(i);
for (int j = i * 2; ... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 13,199 | 13,200 | u662227160 | cpp |
p00009 | #include <cstdio>
#include <cstring>
const int N = 19;
int dp[N];
int isprime[N];
int main() {
dp[1] = 0;
for (int i = 2; i < N; i++) {
if (!isprime[i])
for (int j = 2 * i; j < N; j += i)
isprime[j] = 1;
dp[i] = dp[i - 1] + ((isprime[i]) ? 0 : 1);
}
int y;
while (~scanf("%d", &y))
... | #include <cstdio>
#include <cstring>
const int N = 1000009;
int dp[N];
int isprime[N];
int main() {
dp[1] = 0;
for (int i = 2; i < N; i++) {
if (!isprime[i])
for (int j = 2 * i; j < N; j += i)
isprime[j] = 1;
dp[i] = dp[i - 1] + ((isprime[i]) ? 0 : 1);
}
int y;
while (~scanf("%d", &y)... | [
"literal.number.change",
"variable_declaration.value.change"
] | 13,201 | 13,202 | u508947313 | cpp |
p00009 | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 30; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_n... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 30; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_n... | [
"assignment.variable.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"identifier.replace.remove",
"literal.replace.add",
"control_flow.branch.if.condition.change",
"identifier.change"
] | 13,203 | 13,204 | u353535315 | cpp |
p00009 | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 30; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_n... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 30; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_n... | [
"assignment.variable.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"identifier.replace.remove",
"literal.replace.add",
"control_flow.branch.if.condition.change"
] | 13,205 | 13,204 | u353535315 | cpp |
p00009 | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 30; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_n... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 30; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_n... | [
"identifier.replace.remove",
"literal.replace.add",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 13,206 | 13,204 | u353535315 | cpp |
p00009 | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 3; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_nu... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable : 4996)
int main() {
int num, cnt;
unsigned int i, j, k, data_num;
int data[30];
unsigned int sq_num;
unsigned int *prime;
for (data_num = 0; data_num < 30; data_num++) {
data[data_num] = -1;
scanf("%d", &data[data_n... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"identifier.replace.remove",
"literal.replace.add",
"control_flow.branch.if.condition.change"
] | 13,207 | 13,204 | u353535315 | cpp |
p00009 | #include <iostream>
using namespace std;
int main() {
bool p[1000000] = {false};
int n;
for (int i = 2; i < 1000000; i++) {
for (int i2 = 2; i * i2 <= n; i2++) {
p[i * i2] = true;
}
}
p[2] = false;
p[3] = false;
while (cin >> n) {
int c = 0;
for (int i = 2; i <= n; i++) {
if (... | #include <iostream>
using namespace std;
int main() {
bool p[1000000] = {false};
int n;
for (int i = 2; i < 1000000; i++) {
for (int i2 = 2; i * i2 <= 1000000; i2++) {
p[i * i2] = true;
}
}
p[2] = false;
p[3] = false;
while (cin >> n) {
int c = 0;
for (int i = 2; i <= n; i++) {
... | [
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 13,208 | 13,209 | u453728254 | cpp |
p00009 | #include <iostream>
using namespace std;
#define x 1000000
int main() {
bool q[x];
for (int i = 2; i < x; i++)
q[i] = true;
for (int i = 2; i < x; i++)
if (q[i])
for (int j = 2; j < x / i; j++)
q[i * j] = false;
int n;
while (cin >> n) {
int a = 0;
for (int i = 2; i < x; i++)
... | #include <iostream>
using namespace std;
#define x 1000000
int main() {
bool q[x];
for (int i = 2; i < x; i++)
q[i] = true;
for (int i = 2; i < x; i++)
if (q[i])
for (int j = 2; j <= x / i; j++)
q[i * j] = false;
int n;
while (cin >> n) {
int a = 0;
for (int i = 2; i <= n; i++)
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 13,212 | 13,213 | u313570264 | cpp |
p00009 | #include <iostream>
using namespace std;
#define x 1000000
int main() {
bool q[x];
for (int i = 2; i < x; i++)
q[i] = true;
for (int i = 2; i < x; i++)
if (q[i])
for (int j = 2; j <= x / i; j++)
q[i * j] = false;
int n;
while (cin >> n) {
int a = 0;
for (int i = 2; i < x; i++)
... | #include <iostream>
using namespace std;
#define x 1000000
int main() {
bool q[x];
for (int i = 2; i < x; i++)
q[i] = true;
for (int i = 2; i < x; i++)
if (q[i])
for (int j = 2; j <= x / i; j++)
q[i * j] = false;
int n;
while (cin >> n) {
int a = 0;
for (int i = 2; i <= n; i++)
... | [
"control_flow.loop.for.condition.change"
] | 13,214 | 13,213 | u313570264 | cpp |
p00009 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n, i, j, k;
int b;
int count = 0;
while (cin >> n) {
int a[n + 1];
for (i = 2; i < n + 1; i++) {
a[i] = i;
}
for (i = 2; i * i < n; i++) {
if (a[i] ... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n, i, j, k;
int b;
int count = 0;
while (cin >> n) {
int a[n + 1];
for (i = 2; i < n + 1; i++) {
a[i] = i;
}
for (i = 2; i * i < n + 1; i++) {
if (a... | [
"control_flow.loop.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 13,218 | 13,219 | u672487238 | cpp |
p00011 | #include <iostream>
using namespace std;
int main() {
int w, n, a, b;
int amida[31];
for (int i = 1; i < 31; i++)
amida[i] = i;
cin >> w >> n;
for (int i = 0; i < n; i++) {
cin >> a >> b;
swap(amida[a], amida[b]);
}
for (int i = 1; i <= w; i++) {
cout << amida[i] << endl;
}
return ... | #include <iostream>
using namespace std;
int main() {
int w, n, a, b;
char comma;
int amida[31];
for (int i = 1; i < 31; i++)
amida[i] = i;
cin >> w >> n;
for (int i = 0; i < n; i++) {
cin >> a >> comma >> b;
swap(amida[a], amida[b]);
}
for (int i = 1; i <= w; i++) {
cout << amida[i] ... | [
"variable_declaration.add"
] | 13,224 | 13,225 | u631113523 | cpp |
p00011 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int w, n;
cin >> n;
cin >> w;
int T[31];
for (int i = 1; i <= n; i++) {
T[i] = i;
}
for (int i = 0; i < w; i++) {
int a, b;
cin >> a >> b;
swap(T[a], T[b]);
}
for (int i = 1; i <= n; i++)
cout << T[i] << en... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int w, n;
cin >> n;
cin >> w;
int T[31];
for (int i = 1; i <= n; i++) {
T[i] = i;
}
for (int i = 0; i < w; i++) {
int a, b;
char c;
cin >> a >> c >> b;
swap(T[a], T[b]);
}
for (int i = 1; i <= n; i++)
c... | [
"variable_declaration.add"
] | 13,228 | 13,229 | u829912068 | cpp |
p00011 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int w, n;
int u[30];
cin >> w >> n;
for (int i = 0; i < w; i++) {
u[i] = i + 1;
}
for (int i = 0; i < n; i++) {
int a, b;
scanf("%d,%d", &a, &b);
swap(u[a + 1], u[b + 1]);
}
for (int i = 0; i < w; i++) {
cout... | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int w, n;
int u[30];
cin >> w >> n;
for (int i = 0; i < w; i++) {
u[i] = i + 1;
}
for (int i = 0; i < n; i++) {
int a, b;
scanf("%d,%d", &a, &b);
swap(u[a - 1], u[b - 1]);
}
for (int i = 0; i < w; i++) {
cout... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 13,230 | 13,231 | u705334572 | cpp |
p00011 | #include <iostream>
int main() {
int a, b, c, g, h;
std::cin >> a >> b;
int d[a];
for (int e = 1; e <= a; e++) {
d[e] = e;
}
for (int f = 0; f < b; f++) {
std::cin >> g >> h;
c = d[g];
d[g] = d[h];
d[h] = c;
}
for (int i = 1; i <= a; i++) {
std::cout << d[i] << std::endl;
}
... | #include <iostream>
int main() {
int a, b, c, g, h;
char j;
std::cin >> a >> b;
int d[a];
for (int e = 1; e <= a; e++) {
d[e] = e;
}
for (int f = 0; f < b; f++) {
std::cin >> g >> j >> h;
c = d[g];
d[g] = d[h];
d[h] = c;
}
for (int i = 1; i <= a; i++) {
std::cout << d[i] << st... | [
"variable_declaration.add"
] | 13,232 | 13,233 | u691200007 | cpp |
p00011 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int w, n, a, b;
char o;
cin >> w >> o >> n;
vector<int> c;
for (int i = 0; i <= w + 1; i++)
c.push_back(i);
for (int i = 1; i <= n; i++) {
cin >> a >> b;
swap(c[a], c[b]);
}
for (in... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int w, n, a, b;
char o;
cin >> w >> n;
vector<int> c;
for (int i = 0; i <= w + 1; i++)
c.push_back(i);
for (int i = 1; i <= n; i++) {
cin >> a >> o >> b;
swap(c[a], c[b]);
}
for (in... | [
"expression.operation.binary.remove"
] | 13,246 | 13,247 | u802096158 | cpp |
p00011 | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int w, n;
int c[] = {0};
int a, b;
// int temp;
scanf("%d", &w);
scanf("%d", &n);
for (int i = 0; i <= w; i++) {
c[i] = i;
}
for (int i = 0; i < n; i++) {
scanf("%d,%d", &a, &b);
swap(c[a], c[... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int w, n;
int c[50] = {0};
int a, b;
// int temp;
scanf("%d", &w);
scanf("%d", &n);
for (int i = 0; i <= w; i++) {
c[i] = i;
}
for (int i = 0; i < n; i++) {
scanf("%d,%d", &a, &b);
swap(c[a], ... | [
"variable_declaration.array_dimensions.change"
] | 13,250 | 13,251 | u672233061 | cpp |
p00011 | #include <iostream>
#include <string>
using namespace std;
int main() {
int place[31];
int w, n;
cin >> w >> n;
for (int i = 1; i <= w; i++)
place[i] = i;
int a, b;
char c;
for (int i = 1; i <= n; i++) {
cin >> a >> c >> b;
int temp = place[a];
place[a] = place[b];
place[b] = temp;... | #include <iostream>
#include <string>
using namespace std;
int main() {
int place[31];
int w, n;
cin >> w >> n;
for (int i = 1; i <= w; i++)
place[i] = i;
int a, b;
char c;
for (int i = 1; i <= n; i++) {
cin >> a >> c >> b;
int temp = place[a];
place[a] = place[b];
place[b] = temp;... | [
"io.output.newline.add"
] | 13,265 | 13,266 | u662227160 | cpp |
p00010 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double x[n], y[n], r[n];
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3;
double a, b, c, d, e, f;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
a = 2 * (x1 - x2);
b = 2 * (y1 -... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
double x[n], y[n], r[n];
for (int i = 0; i < n; i++) {
double x1, y1, x2, y2, x3, y3;
double a, b, c, d, e, f;
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
a = 2 * (x1 - x2);
b = 2 * (y1 -... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 13,267 | 13,268 | u343612457 | cpp |
p00010 | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
double x1, y1, x2, y2, x3, y3;
int n;
while (n--) {
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double d1 = x1 * x1 + y1 * y1;
double d2 = x2 * x2 + y2 * y2;
double d3 = x3 * x3 + y3 * y3;
double u =
... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
double x1, y1, x2, y2, x3, y3;
int n;
cin >> n;
while (n--)
{
cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
double d1 = x1 * x1 + y1 * y1;
double d2 = x2 * x2 + y2 * y2;
double d3 = x3 * x3 + y3 * y3;
do... | [] | 13,269 | 13,270 | u656012163 | cpp |
p00013 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
#define mp make_pair
#define it ::itera... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
#define mp make_pair
#define it ::itera... | [
"import.add",
"variable_declaration.type.change",
"call.function.change",
"io.output.change"
] | 13,755 | 13,756 | u214600613 | cpp |
p00013 | #include <stdio.h>
#include <string.h>
#include <stack>
#include <iostream>
using namespace std;
int main() {
int input;
stack<int> train;
while (scanf("%d", &input) != EOF) {
// scanf("%d",&input);
if (input != 0)
train.push(input);
else {
printf("%d", train.top());
tra... | #include <stdio.h>
#include <string.h>
#include <stack>
#include <iostream>
using namespace std;
int main() {
int input;
stack<int> train;
while (scanf("%d", &input) != EOF) {
// scanf("%d",&input);
if (input != 0)
train.push(input);
else {
printf("%d\n", train.top());
t... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 13,760 | 13,761 | u448931644 | cpp |
p00013 | #include <iostream>
#include <malloc.h>
using namespace std;
struct stack {
int element;
struct stack *next;
};
int top(struct stack *s) { return s->element; }
struct stack *pop(struct stack *s) {
struct stack *p, *q;
q = s;
p = s->next;
free(q);
s = p;
return s;
}
struct stack *push(struct stack *s, i... | #include <iostream>
#include <malloc.h>
using namespace std;
struct stack {
int element;
struct stack *next;
};
int top(struct stack *s) { return s->element; }
struct stack *pop(struct stack *s) {
struct stack *p, *q;
q = s;
p = s->next;
free(q);
s = p;
return s;
}
struct stack *push(struct stack *s, i... | [] | 13,768 | 13,769 | u664488627 | cpp |
p00013 | #include <cstdio>
int main() {
int g[10];
int i = 0;
int t;
while (scanf("%d", &t)) {
if (t) {
g[i] = t;
i++;
} else {
i--;
printf("%d\n", g[i]);
}
}
return 0;
} | #include <cstdio>
int main() {
int g[10];
int i = 0;
int t;
while (scanf("%d", &t) + 1) {
if (t) {
g[i] = t;
i++;
} else {
i--;
printf("%d\n", g[i]);
}
}
return 0;
} | [
"control_flow.loop.condition.change"
] | 13,780 | 13,781 | u708862509 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
stack<int> s;
s.push(n);
int a;
cin >> a;
if (a == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(a);
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
stack<int> s;
s.push(n);
int a;
while (cin >> a) {
if (a == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(a);
}
}
return 0;
} | [] | 13,782 | 13,783 | u820425665 | cpp |
p00013 | // 0013
#include <bits/stdc++.h>
using namespace std;
int main() {
int tmp, i = 0, j, k = 0, f[11];
vector<int> ans;
while (cin >> tmp) {
if (tmp == 0) {
ans[k] = f[i - 1];
f[i - 1] = '\0';
i--;
k++;
} else {
f[i] = tmp;
i++;
}
}
for (j = 0; j < k; j++) {
... | // 0013
#include <bits/stdc++.h>
using namespace std;
int main() {
int tmp, i = 0, j, k = 0, f[11];
vector<int> ans;
while (cin >> tmp) {
if (tmp == 0) {
ans.push_back(f[i - 1]);
f[i - 1] = '\0';
i--;
k++;
} else {
f[i] = tmp;
i++;
}
}
for (j = 0; j < k; j++) ... | [
"call.arguments.change"
] | 13,784 | 13,785 | u399801521 | cpp |
p00013 |
#include <iostream>
#include <stack>
int main() {
std::stack<int> rail;
int buf;
// repeat until "cin" fails.
while (std::cin >> buf) {
if (buf == 0) { // train goes out.
std::cout << rail.top();
rail.pop();
} else { // train comes in.
rail.push(buf);
}
}
return 0;
} |
#include <iostream>
#include <stack>
int main() {
std::stack<int> rail;
int buf;
// repeat until "cin" fails.
while (std::cin >> buf) {
if (buf == 0) { // train goes out.
std::cout << rail.top() << std::endl;
rail.pop();
} else { // train comes in.
rail.push(buf);
}
}
retur... | [
"expression.operation.binary.add"
] | 13,805 | 13,806 | u452576681 | cpp |
p00013 | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> a;
int n;
while (cin >> n) {
if (n == 0) {
cout << a.back();
a.pop_back(); // delete
} else
a.push_back(n);
}
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> a;
int n;
while (cin >> n) {
if (n == 0) {
cout << a.back() << endl;
a.pop_back(); // delete
} else
a.push_back(n);
}
return 0;
} | [
"io.output.newline.add"
] | 13,807 | 13,808 | u880857007 | cpp |
p00013 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[10], i = 0, n;
while (scanf("%d", n) != EOF) {
if (n != 0) {
a[i] = n;
i++;
} else {
i--;
cout << a[i] << endl;
}
}
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[10], i = 0, n;
while (scanf("%d", &n) == 1) {
if (n != 0) {
a[i] = n;
i++;
} else {
i--;
cout << a[i] << endl;
}
}
return 0;
} | [
"control_flow.loop.condition.change"
] | 13,809 | 13,810 | u962041986 | cpp |
p00013 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[10], i = 0, n;
while (scanf("%d", n) == 1) {
if (n != 0) {
a[i] = n;
i++;
} else {
i--;
cout << a[i] << endl;
}
}
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a[10], i = 0, n;
while (scanf("%d", &n) == 1) {
if (n != 0) {
a[i] = n;
i++;
} else {
i--;
cout << a[i] << endl;
}
}
return 0;
} | [
"control_flow.loop.condition.change"
] | 13,811 | 13,810 | u962041986 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n;
stack<int> s;
while (true) {
cin >> n;
if (n == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(n);
}
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n;
stack<int> s;
while (cin >> n) {
if (n == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(n);
}
}
return 0;
} | [] | 13,812 | 13,813 | u910030421 | cpp |
p00013 | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
vector<int>::iterator pv = v.begin();
int n;
while (cin >> n) {
if (n == 0) {
int x = v.size();
cout << v[x - 1] << endl;
v.pop_back();
}
v.push_back(n);
}
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> v;
vector<int>::iterator pv = v.begin();
int n;
while (cin >> n) {
if (n == 0) {
int x = v.size();
cout << v[x - 1] << endl;
v.pop_back();
continue;
}
v.push_back(n);
}
return 0;
} | [] | 13,814 | 13,815 | u705334572 | cpp |
p00013 | #include "bits/stdc++.h"
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
stack<int> st;
int x;
while (cin >> x) {
if (x == 0) {
cout << st.top();
st.pop();
} else
st.push(x);
}
} | #include "bits/stdc++.h"
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
stack<int> st;
int x;
while (cin >> x) {
if (x == 0) {
cout << st.top() << endl;
st.pop();
} else
st.push(x);
}
} | [
"io.output.newline.add"
] | 13,816 | 13,817 | u929568713 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main() {
stack<int> st;
int a;
while (cin >> a) {
if (a == 0) {
cout << st.top() << endl;
st.pop();
}
st.push(a);
}
return 0;
} | //
// main.cpp
// BT
//
// Created by h3037175 on 2017/07/27.
// Copyright ?? 2017??´ h3037175. All rights reserved.
//
#include <iostream>
#include <stack>
using namespace std;
int main() {
stack<int> st;
int a;
while (cin >> a) {
if (a == 0) {
cout << st.top() << endl;
st.pop();
} else ... | [
"control_flow.branch.else.add"
] | 13,820 | 13,821 | u304898265 | cpp |
p00013 | #include <bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(), vec.end()
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD = 1000000007;
const ll INF = 1000000010;
const ll LINF = 4000000000000000010LL;
const int MAX = 310;
const double EPS = 1e-6;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, ... | #include <bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(), vec.end()
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD = 1000000007;
const ll INF = 1000000010;
const ll LINF = 4000000000000000010LL;
const int MAX = 310;
const double EPS = 1e-6;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, ... | [
"variable_declaration.type.change",
"call.function.change",
"io.output.change"
] | 13,822 | 13,823 | u155879025 | cpp |
p00013 | #include <iostream>
#include <utility>
using namespace std;
int main() {
int a[100];
int i = 0;
while (1) {
cin >> a[i];
if (a[i] == 0) {
int j = i;
while (1) {
j--;
if (a[j] != 0) {
cout << a[j] << endl;
a[j] = 0;
break;
}
}
}
... | #include <iostream>
#include <utility>
using namespace std;
int main() {
int a[100];
int i = 0;
while (cin >> a[i]) {
if (a[i] == 0) {
int j = i;
while (1) {
j--;
if (a[j] != 0) {
cout << a[j] << endl;
a[j] = 0;
break;
}
}
}
i++;... | [] | 13,824 | 13,825 | u286829185 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
int num;
stack<int> st;
while (1) {
cin >> num;
st.push(num);
if (num == 0) {
st.pop(); // 0ツづーツ渉慊つュ
cout << st.top() << endl;
st.pop();
}
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
int num;
stack<int> st;
while (cin >> num) {
st.push(num);
if (num == 0) {
st.pop(); // 0ツづーツ渉慊つュ
cout << st.top() << endl;
st.pop();
}
}
return 0;
} | [] | 13,829 | 13,830 | u757519851 | cpp |
p00013 | /*
This figure shows railway tracks for reshuffling cars. The rail tracks end in
the bottom and the top-left rail track is used for the entrace and the top-right
rail track is used for the exit. Ten cars, which have numbers from 1 to 10
respectively, use the rail tracks.
We can simulate the movement (comings and going... | /*
This figure shows railway tracks for reshuffling cars. The rail tracks end in
the bottom and the top-left rail track is used for the entrace and the top-right
rail track is used for the exit. Ten cars, which have numbers from 1 to 10
respectively, use the rail tracks.
We can simulate the movement (comings and going... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 13,831 | 13,832 | u706376958 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n, count = 0;
stack<int> get;
while (1) {
cin >> n;
if (n == 0) {
cout << get.top() << endl;
get.pop();
count -= 1;
} else {
get.push(n);
count += 1;
}
// if(count == 0) break;
}
retur... | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n, count = 0;
stack<int> get;
while (cin >> n) {
if (n == 0) {
cout << get.top() << endl;
get.pop();
count -= 1;
} else {
get.push(n);
count += 1;
}
}
return 0;
} | [] | 13,833 | 13,834 | u108432367 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n, count = 0;
stack<int> get;
while (1) {
cin >> n;
if (n == 0) {
cout << get.top() << endl;
get.pop();
count -= 1;
} else {
get.push(n);
count += 1;
}
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n, count = 0;
stack<int> get;
while (cin >> n) {
if (n == 0) {
cout << get.top() << endl;
get.pop();
count -= 1;
} else {
get.push(n);
count += 1;
}
}
return 0;
} | [] | 13,835 | 13,834 | u108432367 | cpp |
p00013 | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> train;
int n;
while (cin >> n) {
if (n != 0) {
train.push_back(n);
} else {
cout << train.back();
train.pop_back();
}
}
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> train;
int n;
while (cin >> n) {
if (n != 0) {
train.push_back(n);
} else {
cout << train.back() << endl;
;
train.pop_back();
}
}
return 0;
} | [
"io.output.newline.add"
] | 13,836 | 13,837 | u594364403 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n;
stack<int> S;
while (cin >> n) {
if (n == 0) {
cout << S.top();
S.pop();
} else {
S.push(n);
}
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main() {
int n;
stack<int> S;
while (cin >> n) {
if (n == 0) {
cout << S.top() << endl;
S.pop();
} else {
S.push(n);
}
}
return 0;
} | [
"io.output.newline.add"
] | 13,840 | 13,839 | u420446254 | cpp |
p00013 | #include <cstdio>
#include <queue>
using namespace std;
int main() {
int x;
queue<int> q;
while (scanf("%d", &x) != EOF) {
if (x == 0) {
printf("%d\n", q.front());
q.pop();
} else {
q.push(x);
}
}
return 0;
} | #include <cstdio>
#include <stack>
using namespace std;
int main() {
int x;
stack<int> q;
while (scanf("%d", &x) != EOF) {
if (x == 0) {
printf("%d\n", q.top());
q.pop();
} else {
q.push(x);
}
}
return 0;
} | [
"variable_declaration.type.change",
"call.function.change",
"call.arguments.change",
"io.output.change"
] | 13,844 | 13,845 | u611853667 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
stack<int> s;
int buf;
while (1) {
cin >> buf;
if (buf == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(buf);
}
}
} | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
stack<int> s;
int buf;
while (cin >> buf) {
if (buf == 0) {
cout << s.top() << endl;
s.pop();
} else {
s.push(buf);
}
}
} | [] | 13,846 | 13,847 | u442290497 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
double n;
stack<double> buf;
while (true) {
cin >> n;
if (cin.eof())
break;
if (n != 0)
buf.push(n);
else {
cout << buf.top();
buf.pop();
}
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main(void) {
double n;
stack<double> buf;
while (true) {
cin >> n;
if (cin.eof())
break;
if (n != 0)
buf.push(n);
else {
cout << buf.top() << endl;
buf.pop();
}
}
return 0;
} | [
"io.output.newline.add"
] | 13,852 | 13,853 | u912237403 | cpp |
p00013 | #include <iostream>
#include <stack>
using namespace std;
int main() {
int train;
stack<int> out;
while (cin >> train) {
if (train != 0) {
out.push(train);
} else {
cout << out.top() << " ";
out.pop();
}
}
return 0;
} | #include <iostream>
#include <stack>
using namespace std;
int main() {
int train;
stack<int> out;
while (cin >> train) {
if (train != 0) {
out.push(train);
} else {
cout << out.top() << endl;
out.pop();
}
}
return 0;
} | [
"io.output.change"
] | 13,854 | 13,855 | u238820099 | cpp |
p00013 | #include <iostream>
using namespace std;
int main() {
int k = 0, b;
int a[1];
while (cin >> b) {
if (b != 0) {
a[k] = b;
k = k + 1;
}
if (b == 0) {
cout << a[k - 1] << endl;
k = k - 1;
}
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int k = 0, b;
int a[1000000];
while (cin >> b) {
if (b != 0) {
a[k] = b;
k = k + 1;
}
if (b == 0) {
cout << a[k - 1] << endl;
k = k - 1;
}
}
return 0;
} | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 13,860 | 13,861 | u835414158 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.