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
p00021
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int n; double x1, x2, x3, x4, ya1, y2, y3, y4; int main() { cin >> n; for (int i =...
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int n; double x1, x2, x3, x4, ya1, y2, y3, y4; int main() { cin >> n; for (int i =...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "literal.number.change" ]
18,899
18,898
u858901574
cpp
p00021
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int n; double x1, x2, x3, x4, ya1, y2, y3, y4; int main() { cin >> n; for (int i =...
#include <algorithm> #include <cmath> #include <cstdio> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int n; double x1, x2, x3, x4, ya1, y2, y3, y4; int main() { cin >> n; for (int i =...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
18,900
18,898
u858901574
cpp
p00021
#include <bits/stdc++.h> using namespace std; #define x() real() #define y() imag() #define EPS (1e-0) #define INF (1e12) #define SQ(a) ((a) * (a)) #define EQ(a, b) (abs((a) - (b)) < EPS) #define EQV(a, b) (EQ((a).x(), (b).x()) && EQ((a).y(), (b).y())) #define MP make_pair const int COUNTER_CLOCKWISE = 1; const int CL...
#include <bits/stdc++.h> using namespace std; #define x() real() #define y() imag() #define EPS (1e-10) #define INF (1e12) #define SQ(a) ((a) * (a)) #define EQ(a, b) (abs((a) - (b)) < EPS) #define EQV(a, b) (EQ((a).x(), (b).x()) && EQ((a).y(), (b).y())) #define MP make_pair const int COUNTER_CLOCKWISE = 1; const int C...
[ "preprocessor.define.value.change", "literal.float.change", "control_flow.return.add", "control_flow.return.0.add" ]
18,919
18,916
u334031393
cpp
p00021
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; int main() { const double EPS = 1e-12; double x[5]; double y[5]; double s; double t; double u; double v; double m; int n; cin >> n; for (int i = 0; i < n; i++) { ...
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; int main() { const double EPS = 1e-12; double x[5]; double y[5]; double s; double t; double u; double v; double m; int n; cin >> n; for (int i = 0; i < n; i++) { ...
[]
18,966
18,967
u003658820
cpp
p00021
#include <cmath> #include <iostream> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double x1, y1, x2, y2, x3, y3, x4, y4; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; double a1 = x2 - x1; double b1 = y2 -...
#include <cmath> #include <iostream> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double x1, y1, x2, y2, x3, y3, x4, y4; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; double a1 = x2 - x1; double b1 = y2 -...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
18,992
18,993
u155634813
cpp
p00021
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> using namespace std; int main(void) { int n; cin >> n; for (int i = 0; i < n; i++) { double x1, y1, x2, y2; double x3, y3, x4, y4; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> using namespace std; int main(void) { int n; cin >> n; for (int i = 0; i < n; i++) { double x1, y1, x2, y2; double x3, y3, x4, y4; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "literal.number.change" ]
19,027
19,028
u991537731
cpp
p00021
// // // // // // // #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(complex<double> a, complex<double> b) { return (conj(a) * b).imag(); } int main() { int n; //??????????????° cin >> n; while (n > 0) { complex<double> a, b, c, d, e, f; ...
// // // // // // // #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(complex<double> a, complex<double> b) { return (conj(a) * b).imag(); } int main() { int n; //??????????????° cin >> n; while (n > 0) { complex<double> a, b, c, d, e, f; ...
[ "control_flow.branch.if.condition.change", "call.add" ]
19,057
19,058
u835652478
cpp
p00021
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; float point[4][2]; for (int i = 0; i < n; i++) { for (int j = 0; j < 4; j++) { for (int k = 0; k < 2; k++) { cin >> point[j][k]; } } if ((point[1][1] - point[0][1]) / (point[1][0] - poi...
#include <algorithm> #include <iostream> using namespace std; int main() { int n; cin >> n; float point[4][2]; for (int i = 0; i < n; i++) { for (int j = 0; j < 4; j++) { for (int k = 0; k < 2; k++) { cin >> point[j][k]; } } if ((point[1][1] - point[0][1]) / (point[1][0] - poi...
[ "control_flow.branch.if.condition.change" ]
19,061
19,062
u951251055
cpp
p00021
#include <iostream> using namespace std; int main() { double x1, y1, x2, y2, x3, y3, x4, y4; int n; cin >> n; int N[100]; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if ((y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4)) { N[i] = 1; } else { N[i] = 0...
#include <iostream> using namespace std; int main() { long double x1, y1, x2, y2, x3, y3, x4, y4; int n; cin >> n; int N[100]; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if ((y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4)) { N[i] = 1; } else { N[i...
[ "variable_declaration.type.widen.change", "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
19,071
19,072
u494662220
cpp
p00021
#include <iostream> using namespace std; int main() { long double x1, y1, x2, y2, x3, y3, x4, y4; int n; cin >> n; int N[100]; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if ((y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4)) { N[i] = 1; } else { N[i...
#include <iostream> using namespace std; int main() { long double x1, y1, x2, y2, x3, y3, x4, y4; int n; cin >> n; int N[100]; for (int i = 0; i < n; i++) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if ((y1 - y2) / (x1 - x2) == (y3 - y4) / (x3 - x4)) { N[i] = 1; } else { N[i...
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
19,073
19,072
u494662220
cpp
p00021
#include <algorithm> #include <cctype> #include <cmath> #include <iostream> #include <map> // pair #include <set> #include <stdio.h> #include <string> #include <vector> #define MAXSIZE 200000 #define PI 3.141592653589 using namespace std; template <typename T> T add(T a, T b) { return a + b; } namespace A { int f(vo...
#include <algorithm> #include <cctype> #include <cmath> #include <iostream> #include <map> // pair #include <set> #include <stdio.h> #include <string> #include <vector> #define MAXSIZE 200000 #define PI 3.141592653589 using namespace std; template <typename T> T add(T a, T b) { return a + b; } namespace A { int f(vo...
[ "call.add", "control_flow.branch.if.condition.change", "literal.number.change" ]
19,091
19,092
u672543083
cpp
p00021
#include <cmath> #include <iostream> using namespace std; int main(void) { int n; cin >> n; for (int i = 0; i < n; ++i) { double x1, y1, x2, y2, x3, y3, x4, y4; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if ((x2 - x1) == 0 && (x4 - x3) == 0) cout << "YES" << endl; else { int...
#include <cmath> #include <iostream> using namespace std; int main(void) { int n; cin >> n; for (int i = 0; i < n; ++i) { double x1, y1, x2, y2, x3, y3, x4, y4; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if (((x2 - x1) == 0) && ((x4 - x3) == 0)) cout << "YES" << endl; else { ...
[ "control_flow.branch.if.condition.change", "variable_declaration.type.primitive.change" ]
19,098
19,099
u322168578
cpp
p00021
#include <complex> #include <iostream> int main() { const double E = 1e-10; int n; double x1, y1, x2, y2, x3, y3, x4, y4; std::cin >> n; while (n--) { std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; std::cout << (std::abs((y2 - y1) * (x4 - x3) - (y4 - y3) * (x2 - x1)) < E) ? "YES\n" ...
#include <complex> #include <iostream> int main() { const double E = 1e-10; int n; double x1, y1, x2, y2, x3, y3, x4, y4; std::cin >> n; while (n--) { std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; std::cout << ((std::abs((y2 - y1) * (x4 - x3) - (y4 - y3) * (x2 - x1)) < E) ...
[]
19,123
19,124
u835866094
cpp
p00021
#include <cmath> #include <iostream> using namespace std; int main() { int N; cin >> N; while (N--) { double x1, x2, x3, x4, y1, y2, y3, y4; cin >> x1 >> y1 >> x2 >> y2; cin >> x3 >> y3 >> x4 >> y4; x2 -= x1; y2 -= y1; x4 -= x3; y4 -= y3; cout << (fabs(x2 * y4 - x4 * y2 < 1e-5) ...
#include <cmath> #include <iostream> using namespace std; int main() { int N; cin >> N; while (N--) { double x1, x2, x3, x4, y1, y2, y3, y4; cin >> x1 >> y1 >> x2 >> y2; cin >> x3 >> y3 >> x4 >> y4; x2 -= x1; y2 -= y1; x4 -= x3; y4 -= y3; cout << (fabs(x2 * y4 - x4 * y2) < 1e-10...
[ "expression.operation.binary.remove", "control_flow.loop.condition.change" ]
19,129
19,130
u869600431
cpp
p00021
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { vector<double> a(2), b(2), c(2), d(2); double tmp; cin >> a[0] >> a[1] >> b[0] >> b[1] >> c[0] >> c[1] >> d[0] >> d[1]; double x1 = b[0] - a[0], y1 = b[1] - a[1]; double x2 = ...
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { vector<double> a(2), b(2), c(2), d(2); double tmp; cin >> a[0] >> a[1] >> b[0] >> b[1] >> c[0] >> c[1] >> d[0] >> d[1]; double x1 = b[0] - a[0], y1 = b[1] - a[1]; double x2 = ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.branch.else.remove", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
19,135
19,136
u681915583
cpp
p00021
#include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #incl...
#include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #incl...
[ "call.add", "call.arguments.change", "function.return_value.change" ]
19,139
19,140
u660774699
cpp
p00021
#include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #incl...
#include <algorithm> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <memory> #include <numeric> #incl...
[ "literal.number.change", "variable_declaration.value.change", "call.add", "call.arguments.change", "function.return_value.change" ]
19,141
19,140
u660774699
cpp
p00021
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII;...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <vector> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII;...
[ "control_flow.branch.if.condition.change", "call.add" ]
19,151
19,152
u918172775
cpp
p00021
#include <cstdint> #include <iostream> int main() { std::uint32_t n; std::cin >> n; for (std::uint32_t i = 0; i < n; ++i) { double x1, y1, x2, y2, x3, y3, x4, y4; std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if ((x1 - x2) * (y3 - y4) - (x3 - x4) * (y1 - y2) == 0.0) { std::cout << "...
#include <cstdint> #include <iostream> int main() { std::uint32_t n; std::cin >> n; for (std::uint32_t i = 0; i < n; ++i) { double x1, y1, x2, y2, x3, y3, x4, y4; std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if ((x1 - x2) * (y3 - y4) - (x3 - x4) * (y1 - y2) != 0.0) { std::cout << "...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,155
19,156
u167573543
cpp
p00021
#include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { double abdx, abdy, cddx, cddy; double x[4]; double y[4]; for (int j = 0; j < 4; ++j) { cin >> x[j] >> y[j]; } abdx = x[0] - x[1]; cddx = x[2] - x[3]; abdy = y[0] - y[1]; c...
#include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { double abdx, abdy, cddx, cddy; double x[4]; double y[4]; for (int j = 0; j < 4; ++j) { cin >> x[j] >> y[j]; } abdx = x[0] - x[1]; cddx = x[2] - x[3]; abdy = y[0] - y[1]; c...
[ "control_flow.branch.if.condition.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
19,164
19,165
u646183247
cpp
p00021
#include <cmath> #include <iostream> using namespace std; #define EPS 1e-10 int main() { int n; double x1, x2, x3, x4, y1, y2, y3, y4; cin >> n; while (n--) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if (abs((x4 - x3) * (y2 - y1) - (x2 - x1) * (y4 - y2)) < EPS) cout << "YES" << endl; ...
#include <cmath> #include <iostream> using namespace std; #define EPS 1e-10 int main() { int n; double x1, x2, x3, x4, y1, y2, y3, y4; cin >> n; while (n--) { cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4; if (abs((x4 - x3) * (y2 - y1) - (x2 - x1) * (y4 - y3)) < EPS) cout << "YES" << endl; ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
19,198
19,199
u284889485
cpp
p00021
#include <complex> #include <cstdio> #include <vector> using namespace std; typedef complex<double> P; struct L : public vector<P> { L(const P &a, const P &b) { push_back(a); push_back(b); } }; const double EPS = 1e-8; int cross(P a, P b) { return imag(conj(a) * b); } bool intersectLL(const L &l, const...
#include <complex> #include <cstdio> #include <vector> using namespace std; typedef complex<double> P; struct L : public vector<P> { L(const P &a, const P &b) { push_back(a); push_back(b); } }; const double EPS = 1e-10; double cross(P a, P b) { return imag(conj(a) * b); } bool intersectLL(const L &l, c...
[ "literal.number.change", "variable_declaration.value.change", "function.return_type.change", "identifier.change", "call.function.change", "function.return_value.change", "expression.operation.binary.change" ]
19,212
19,213
u664090703
cpp
p00021
#include <complex> #include <cstdio> #include <vector> using namespace std; typedef complex<double> P; struct L : public vector<P> { L(const P &a, const P &b) { push_back(a); push_back(b); } }; const double EPS = 1e-8; int cross(P a, P b) { return imag(conj(a) * b); } bool intersectLL(const L &l, const...
#include <complex> #include <cstdio> #include <vector> using namespace std; typedef complex<double> P; struct L : public vector<P> { L(const P &a, const P &b) { push_back(a); push_back(b); } }; const double EPS = 1e-10; double cross(P a, P b) { return imag(conj(a) * b); } bool intersectLL(const L &l, c...
[ "literal.number.change", "variable_declaration.value.change", "function.return_type.change" ]
19,214
19,213
u664090703
cpp
p00021
#include <iostream> #include <map> using namespace std; int main(void) { int n, x[2], y[2]; pair<int, int> v[2]; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { cin >> x[0] >> y[0] >> x[1] >> y[1]; v[j] = make_pair(x[0] - x[1], y[0] - y[1]); } cout << (v[0].first...
#include <iostream> #include <map> using namespace std; int main(void) { int n; float x[2], y[2]; pair<float, float> v[2]; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < 2; j++) { cin >> x[0] >> y[0] >> x[1] >> y[1]; v[j] = make_pair(x[0] - x[1], y[0] - y[1]); } cout <<...
[ "variable_declaration.type.primitive.change", "literal.string.change", "io.output.change" ]
19,216
19,217
u378480414
cpp
p00021
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
[ "call.arguments.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
19,226
19,227
u416632581
cpp
p00021
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-12; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
[ "literal.number.change", "variable_declaration.value.change", "call.arguments.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
19,228
19,227
u416632581
cpp
p00021
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 5e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
[ "literal.number.change", "variable_declaration.value.change", "call.arguments.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
19,229
19,227
u416632581
cpp
p00021
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
19,230
19,227
u416632581
cpp
p00021
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
[ "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
19,231
19,227
u416632581
cpp
p00021
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
#include <cmath> #include <complex> #include <iostream> using namespace std; typedef complex<double> xy_t; double cross_product(xy_t a, xy_t b) { return (conj(a) * b).imag(); } const double eps = 1e-11; double x[4], y[4]; int N; int main() { cin >> N; for (int i = 0; i < N; ++i) { for (int i = 0; i < 4; ++i) {...
[ "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change" ]
19,232
19,227
u416632581
cpp
p00024
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int main() { double in; int ans; while (scanf("%lf", &in) != EOF) { ans = (int)(in * in / 98); printf("%d\n", ans + 1...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int main() { double in; int ans; while (scanf("%lf", &in) != EOF) { ans = ceil(in * in / 98); printf("%d\n", ans + 1)...
[ "assignment.value.change" ]
19,316
19,317
u414351000
cpp
p00024
#include <algorithm> #include <climits> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <utility> #include <vector> using namespace std; int main() { int x; while (cin >> x) { double h = 4.9 * x * x / 9.8 / 9.8; int y = 0; while (5 * y - 5 < h) y++; cout <...
#include <algorithm> #include <climits> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <utility> #include <vector> using namespace std; int main() { double x; while (cin >> x) { double h = 4.9 * x * x / 9.8 / 9.8; int y = 0; while (5 * y - 5 < h) y++; cou...
[ "variable_declaration.type.primitive.change" ]
19,318
19,319
u014979214
cpp
p00024
#include <algorithm> #include <climits> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <utility> #include <vector> using namespace std; int main() { int x; while (cin >> x) { double h = (5 + 4.9 * x / 9.8 * x / 9.8) / 5; int y = 0; while (y < h) y++; cout...
#include <algorithm> #include <climits> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <utility> #include <vector> using namespace std; int main() { double x; while (cin >> x) { double h = (5 + 4.9 * x / 9.8 * x / 9.8) / 5; int y = 0; while (y < h) y++; c...
[ "variable_declaration.type.primitive.change" ]
19,320
19,321
u014979214
cpp
p00024
#include <cmath> #include <iostream> using namespace std; int main() { double v; while (cin >> v) { double y = v * v / 19.8; double N = (y + 5.0) / 5.0; cout << ceil(N) << endl; } return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { double v; while (cin >> v) { double y = v * v / 19.6; double N = (y + 5.0) / 5.0; cout << ceil(N) << endl; } return 0; }
[ "literal.number.change", "expression.operation.binary.change" ]
19,322
19,323
u839573768
cpp
p00024
#include <stdio.h> int main() { double v = 0.0, t = 0.0, y = 0.0; while (scanf("%lf", &v) != EOF) { t = v / 9.8; y = 4.9 * t * t; printf("%.0f\n", (y / 5 + 1)); } return 0; }
#include <stdio.h> int main() { double v = 0.0, t = 0.0, y = 0.0; while (scanf("%lf", &v) != EOF) { t = v / 9.8; y = 4.9 * t * t; printf("%.0f\n", (y / 5 + 1) + 0.5); } return 0; }
[ "expression.operation.binary.add" ]
19,324
19,325
u416593310
cpp
p00024
#include <iostream> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; int main() { double v; while (cin >> v) { double t = v / 9.8; double y = t * t * 4.9; int ans = 0; rep(i, 0, 60) { int h = 5 * (i - 1); if (h > y) { ans = i; break; } } ...
#include <iostream> #define rep(i, a, n) for (int i = a; i < n; i++) using namespace std; int main() { double v; while (cin >> v) { double t = v / 9.8; double y = t * t * 4.9; int ans = 0; rep(i, 1, 600) { double h = 5 * (i - 1); if (h > y) { ans = i; break; } ...
[ "literal.number.change", "call.arguments.change", "variable_declaration.type.primitive.change" ]
19,328
19,329
u188938853
cpp
p00024
#include <cmath> #include <iostream> using namespace std; /* v = 9.8t y = 4.8t^2 割れる速度になるtを求め、その時間でどのくらいの距離になるか計算する。 */ int main() { double v; while (cin >> v) { double t = v / 9.8; double y = 4.8 * t * t; int N = static_cast<int>(ceil(y / 5) + 1); cout << N << endl; } ...
#include <cmath> #include <iostream> using namespace std; /* v = 9.8t y = 4.8t^2 割れる速度になるtを求め、その時間でどのくらいの距離になるか計算する。 */ int main() { double v; while (cin >> v) { double t = v / 9.8; double y = 4.9 * t * t; int N = static_cast<int>(ceil(y / 5)) + 1; cout << N << endl; } ...
[ "literal.number.change", "expression.operation.binary.change", "call.arguments.change" ]
19,332
19,333
u516225176
cpp
p00024
#include <bits/stdc++.h> using namespace std; int main() { double v, y; int n; while (cin >> v) { y = v * v / 19.6; n = (y - 1) / 5; cout << n + 2 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double v, y; int n; while (cin >> v) { y = v * v / 19.6; n = (y - 0.0000000001) / 5; cout << n + 2 << endl; } return 0; }
[ "literal.number.change", "assignment.value.change", "expression.operation.binary.change" ]
19,340
19,341
u154363079
cpp
p00024
#define _USE_MATH_DEFINES #include <algorithm> #include <cctype> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; #define INF (1 << 20) #define EPS (1e-10) #define EQ(a, b) (fabs((a) - (b)) < EPS) int...
#define _USE_MATH_DEFINES #include <algorithm> #include <cctype> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; #define INF (1 << 20) #define EPS (1e-10) #define EQ(a, b) (fabs((a) - (b)) < EPS) int...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.loop.condition.change" ]
19,344
19,343
u124161377
cpp
p00024
#include <iostream> using namespace std; int main() { double a, b, c; while (cin >> a) { b = 0; int s = 0; while (1) { if (9.8 * b >= a) break; b += 0.01; } while (1) { if (4.9 * b * b <= s) break; s += 5; } cout << s / 5 + 1 << endl; } }
#include <iostream> using namespace std; int main() { double a, b, c; while (cin >> a) { b = 0; int s = 0; while (1) { if (9.8 * b >= a) break; b += 0.0000001; } while (1) { if (4.9 * b * b <= s) break; s += 5; } cout << s / 5 + 1 << endl; } }
[ "literal.number.change", "assignment.value.change" ]
19,356
19,357
u962041986
cpp
p00024
#include <iostream> using namespace std; int main() { double a, b, c; while (cin >> a) { b = 0; int s = 0; while (1) { if (9.8 * b >= a) break; b += 0.001; } while (1) { if (4.9 * b * b <= s) break; s += 5; } cout << s / 5 + 1 << endl; } }
#include <iostream> using namespace std; int main() { double a, b, c; while (cin >> a) { b = 0; int s = 0; while (1) { if (9.8 * b >= a) break; b += 0.0000001; } while (1) { if (4.9 * b * b <= s) break; s += 5; } cout << s / 5 + 1 << endl; } }
[ "literal.number.change", "assignment.value.change" ]
19,358
19,357
u962041986
cpp
p00024
// clang-format off #include <bits/stdc++.h> #define int long long #define main signed main() // #define main int main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecis...
// clang-format off #include <bits/stdc++.h> #define int long long #define main signed main() // #define main int main() #define loop(i, a, n) for (int i = (a); i < (n); i++) #define rep(i, n) loop(i, 0, n) #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define prec(n) fixed << setprecis...
[ "literal.number.change", "io.output.change" ]
19,361
19,362
u449960815
cpp
p00024
#include <cmath> #include <iostream> using namespace std; int main() { double v, y; cin >> v; y = 4.9 * pow(v / 9.8, 2); int n; for (n = 0;; n++) { if (y <= 5 * n - 5) break; } cout << n << endl; return 0; } // 25.4 // 32
#include <cmath> #include <iostream> using namespace std; int main() { double v, y; while (cin >> v) { y = 4.9 * pow(v / 9.8, 2); int n; for (n = 0;; n++) { if (y <= 5 * n - 5) break; } cout << n << endl; } return 0; } // 25.4 // 32
[]
19,365
19,366
u096656118
cpp
p00024
#include <cmath> #include <iostream> using namespace std; int main() { double v, y; while (cin >> v) { y = 4.9 * pow(v / 9.8, 2); int n = 0; while (n++) if (y <= 5 * n - 5) break; cout << n << endl; } return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { double v, y; while (cin >> v) { y = 4.9 * pow(v / 9.8, 2); int n = 0; for (n;; n++) if (y <= 5 * n - 5) break; cout << n << endl; } return 0; }
[]
19,367
19,368
u096656118
cpp
p00024
#include <iostream> main() { for (double v; std::cin >> v;) std::cout << (int)v * v / 98 + 2 << "\n"; }
#include <iostream> main() { for (double v; std::cin >> v;) std::cout << (int)(v * v / 98 + 2) << "\n"; }
[]
19,378
19,379
u129997015
cpp
p00024
#include <iostream> using namespace std; int main() { double v0; while (scanf("%lf ", &v0) == 1) { cout << (int)((v0 * v0) / (5.0 * 4.0 * 4.9)) + 1 << endl; } }
#include <cstdio> #include <iostream> using namespace std; int main() { double v0; while (scanf("%lf ", &v0) == 1) { cout << (int)((v0 * v0) / (5.0 * 4.0 * 4.9)) + 2 << endl; } }
[ "import.add", "literal.number.change", "io.output.change" ]
19,380
19,381
u871901071
cpp
p00024
#include <cstdio> #include <iostream> using namespace std; int main() { double v0; while (scanf("%lf ", &v0) == 1) { cout << (int)((v0 * v0) / (5.0 * 4.0 * 4.9) + 0.5) + 1 << endl; } }
#include <cstdio> #include <iostream> using namespace std; int main() { double v0; while (scanf("%lf ", &v0) == 1) { cout << (int)((v0 * v0) / (5.0 * 4.0 * 4.9)) + 2 << endl; } }
[ "expression.operation.binary.remove", "literal.number.change", "io.output.change" ]
19,382
19,381
u871901071
cpp
p00024
#include <iostream> using namespace std; int main(void) { double v; while (cin >> v) { double t = v / 9.8; int y = (4.9 * t * t) + 4; cout << y / 5 + 1 << endl; } return 0; }
#include <iostream> using namespace std; int main(void) { double v; while (cin >> v) { double t = v / 9.8; int y = (4.9 * t * t) + 5; cout << y / 5 + 1 << endl; } return 0; }
[ "literal.number.change", "expression.operation.binary.change" ]
19,398
19,397
u107564203
cpp
p00024
#include <stdio.h> int main() { int n; double v, y; while (scanf("%lf", &v) != EOF) { y = (v / 2.0) * (v / 9.8); n = (y + 5) / 5; printf("%d\n", n); } return 0; }
#include <stdio.h> int main() { int n; double v, y; while (scanf("%lf", &v) != EOF) { y = (v / 2.0) * (v / 9.8); n = (y + 5) / 5; printf("%d\n", n + 1); } return 0; }
[ "expression.operation.binary.add" ]
19,404
19,405
u133060595
cpp
p00024
#include <iostream> using namespace std; int main(void) { double v, t, y, N; cin >> v; t = v / 9.8; y = 4.9 * t * t; N = (y + 5) / 5; cout << (int)++N << endl; return 0; }
#include <iostream> using namespace std; int main(void) { double v, t, y, N; while (cin >> v) { t = v / 9.8; y = 4.9 * t * t; N = (y + 5) / 5; cout << (int)++N << endl; } return 0; }
[]
19,410
19,411
u126791750
cpp
p00024
#include <iostream> using namespace std; int main() { double v, y; int n; while (cin >> v) { y = (v * v) / 19.6; n = y / 5 + 2; cout << n; } return 0; }
#include <iostream> using namespace std; int main() { double v, y; int n; while (cin >> v) { y = (v * v) / 19.6; n = y / 5 + 2; cout << n << endl; } return 0; }
[ "io.output.newline.add" ]
19,412
19,413
u946540531
cpp
p00024
#include <cmath> #include <iostream> #define REP(i, s, n) for (int i = 0; i < n; i++) #define rep(i, n) REP(i, 0, n) using namespace std; int main() { long double n; cin >> n; // cout << n*n/19.6<<endl; // cout << int(35.0+1.2)<<endl; cout << int(n * n / 19.6 / 5 + 2) << endl; return 0; }
#include <cmath> #include <iostream> #define REP(i, s, n) for (int i = 0; i < n; i++) #define rep(i, n) REP(i, 0, n) using namespace std; int main() { long double n; // cout << n*n/19.6<<endl; // cout << int(35.0+1.2)<<endl; while (cin >> n) { cout << int(n * n / 19.6 / 5 + 2) << endl; } return 0; }
[]
19,623
19,624
u594289582
cpp
p00024
#include <iostream> using namespace std; int main(void) { double v; double t; //球が割れるのに必要な最低速度になるのは落下し始めてから何秒後か int y; // t秒後に物体が落下した距離 int N; //球が割れる建物の階の最小値 while (cin >> v) { t = v / 9.8; y = 4.9 * t * t; N = ((y + 1) + 5) / 5; cout << N + 1 << endl; } }
#include <iostream> using namespace std; int main(void) { double v; double t; //球が割れるのに必要な最低速度になるのは落下し始めてから何秒後か double y; // t秒後に物体が落下した距離 int N; //球が割れる建物の階の最小値 while (cin >> v) { t = v / 9.8; y = 4.9 * t * t; N = (y + 5) / 5; cout << N + 1 << endl; } }
[ "variable_declaration.type.primitive.change" ]
19,625
19,626
u395654950
cpp
p00023
#include <iostream> #include <math.h> #include <stdio.h> #include <string.h> using namespace std; double dis(long double x1, long double y1, long double x2, long double y2); int main() { long double x1, y1, r1; long double x2, y2, r2; long double ans; double r[2]; int n; cin >> n; for (int i = 0; i < n...
#include <iostream> #include <math.h> #include <stdio.h> #include <string.h> using namespace std; double dis(long double x1, long double y1, long double x2, long double y2); int main() { long double x1, y1, r1; long double x2, y2, r2; long double ans; double r[2]; int n; cin >> n; for (int i = 0; i < n...
[ "literal.string.change", "io.output.change" ]
19,681
19,682
u615353970
cpp
p00023
#include <iostream> #include <math.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb, l; cin >> xa >> ya >> ra >> xb >> yb >> rb; l = sqrt(pow((xa - xb), 2) + pow((ya - yb), 2)); if (l > ra + rb) cout << 0 << endl; else if...
#include <iostream> #include <math.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb, l; cin >> xa >> ya >> ra >> xb >> yb >> rb; l = sqrt(pow((xa - xb), 2) + pow((ya - yb), 2)); if (l > ra + rb) cout << 0 << endl; else if...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,687
19,688
u480404457
cpp
p00023
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstr...
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <sstr...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
19,702
19,703
u914809068
cpp
p00023
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double dis = sqrt(pow((xa - xb), 2) - pow((ya - yb), 2)); if (fabs(ra - rb) >= dis) if (ra > rb) ...
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double dis = sqrt(pow((xa - xb), 2) + pow((ya - yb), 2)); if (fabs(ra - rb) > dis) if (ra > rb) ...
[ "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,704
19,705
u981364540
cpp
p00023
#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) <...
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
19,719
19,720
u959413365
cpp
p00023
#include <array> #include <iostream> #include <math.h> int main() { std::array<double, 3> a; // 0:xa 1:ya 2:ra std::array<double, 3> b; int N; std::cin >> N; for (int i = 0; i < N; ++i) { for (int j = 0; j < 3; ++j) std::cin >> a[j]; for (int j = 0; j < 3; ++j) std::cin >> b[j]; ...
#include <array> #include <iostream> #include <math.h> int main() { std::array<double, 3> a; // 0:xa 1:ya 2:ra std::array<double, 3> b; int N; std::cin >> N; for (int i = 0; i < N; ++i) { for (int j = 0; j < 3; ++j) std::cin >> a[j]; for (int j = 0; j < 3; ++j) std::cin >> b[j]; ...
[ "identifier.change", "call.function.change", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
19,726
19,727
u926908660
cpp
p00023
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n-- > 0) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = sqrt((xa - xb) * (xa - xb) + (ya * yb) * (ya - yb)); if (ra > d + rb) cout << 2 << endl; else if (...
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n-- > 0) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb)); if (ra > d + rb) cout << 2 << endl; else if (...
[ "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,735
19,734
u313570264
cpp
p00023
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int main() { double xa, ya, ra, xb, yb, rb; double ab; int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> xa >> ya >> ra >> xb >> yb >> ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int main() { double xa, ya, ra, xb, yb, rb; double ab; int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> xa >> ya >> ra >> xb >> yb >> ...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "identifier.change" ]
19,746
19,747
u822202919
cpp
p00023
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int main() { double xa, ya, ra, xb, yb, rb; double ab; int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> xa >> ya >> ra >> xb >> yb >> ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int main() { double xa, ya, ra, xb, yb, rb; double ab; int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> xa >> ya >> ra >> xb >> yb >> ...
[ "control_flow.branch.if.condition.change", "identifier.change" ]
19,748
19,747
u822202919
cpp
p00023
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double dist = sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya)); int ans; if (ra > dist + rb) ...
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double dist = sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya)); int ans; if (ra > dist + rb) ...
[ "expression.operation.unary.arithmetic.remove" ]
19,758
19,759
u368876271
cpp
p00023
#include <bits/stdc++.h> using namespace std; using db = double; const db eps = 1e-9; int sgn(db a, db b = 0) { a -= b; return (a > eps) - (a < -eps); } struct poi { db x, y; void r() { cin >> x >> y; } poi operator-(poi p) { return {x - p.x, y - p.y}; } db len() { return sqrt(x * x + y * y); } }; int ma...
#include <bits/stdc++.h> using namespace std; using db = double; const db eps = 1e-12; int sgn(db a, db b = 0) { a -= b; return (a > eps) - (a < -eps); } struct poi { db x, y; void r() { cin >> x >> y; } poi operator-(poi p) { return {x - p.x, y - p.y}; } db len() { return sqrt(x * x + y * y); } }; int m...
[ "literal.number.change", "variable_declaration.value.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "misc.opposites" ]
19,819
19,820
u296631814
cpp
p00023
#include <bits/stdc++.h> using namespace std; using db = double; const db eps = 1e-12; int sgn(db a, db b = 0) { a -= b; return (a > eps) - (a < -eps); } struct poi { db x, y; void r() { cin >> x >> y; } poi operator-(poi p) { return {x - p.x, y - p.y}; } db len() { return sqrt(x * x + y * y); } }; int m...
#include <bits/stdc++.h> using namespace std; using db = double; const db eps = 1e-12; int sgn(db a, db b = 0) { a -= b; return (a > eps) - (a < -eps); } struct poi { db x, y; void r() { cin >> x >> y; } poi operator-(poi p) { return {x - p.x, y - p.y}; } db len() { return sqrt(x * x + y * y); } }; int m...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "misc.opposites" ]
19,821
19,820
u296631814
cpp
p00023
#include <cmath> #include <iostream> using namespace std; int check(double xa, double ya, double ra, double xb, double yb, double rb) { double dist = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb)); double minr = min(ra, rb); if (ra + rb < dist) { return 0; } else { if (ra > rb && dist < rb) { ...
#include <cmath> #include <iostream> using namespace std; int check(double xa, double ya, double ra, double xb, double yb, double rb) { double dist = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb)); double minr = min(ra, rb); if (ra + rb < dist) { return 0; } else { if (ra > rb && dist < ra - rb) ...
[ "control_flow.branch.if.condition.change" ]
19,822
19,823
u445955169
cpp
p00023
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { long double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; long double d = hypot(xa - xb, ya - yb); if (d < abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) << std:...
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { long double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; long double d = hypot(xa - xb, ya - yb); if (d < std::abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) <<...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
19,836
19,837
u884291095
cpp
p00023
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, ya - yb); if (d < abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) << std::endl; ...
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { long double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; long double d = hypot(xa - xb, ya - yb); if (d < std::abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) <<...
[ "variable_declaration.type.widen.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
19,838
19,837
u884291095
cpp
p00023
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { long double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; long double d = hypot(xa - xb, ya - yb); if (d < abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) << std:...
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, ya - yb); if (d < std::abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) << std::endl...
[ "variable_declaration.type.narrow.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
19,836
19,842
u884291095
cpp
p00023
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, ya - yb); if (d < abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) << std::endl; ...
#include <cmath> #include <iostream> int main() { int n; std::cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, ya - yb); if (d < std::abs(ra - rb)) { std::cout << 2 * (ra < rb ? -1 : 1) << std::endl...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
19,838
19,842
u884291095
cpp
p00023
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, yb - yb); int res = 1; if (ra > rb) { if (d < ra - rb) res = 2; else if (d...
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, ya - yb); int res = 1; if (ra > rb) { if (d < ra - rb) res = 2; else if (d...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,856
19,857
u647134562
cpp
p00023
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, yb - yb); int res = 1; if (ra > rb) { if (d <= ra - rb) res = 2; else if (...
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, ya - yb); int res = 1; if (ra > rb) { if (d < ra - rb) res = 2; else if (d...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,858
19,857
u647134562
cpp
p00023
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, yb - yb); int res = 1; if (ra > rb) { if (d <= ra - rb) res = 2; else if (...
#include <cmath> #include <iostream> using namespace std; int main() { int n; cin >> n; while (n--) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double d = hypot(xa - xb, ya - yb); int res = 1; if (ra > rb) { if (d < ra - rb) res = 2; else if (d...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,859
19,857
u647134562
cpp
p00023
#include <cmath> #include <complex> #include <iostream> #include <map> #define fs first #define sc second #define EPS 0 using namespace std; typedef complex<double> P; typedef pair<P, int> C; int cpr(C a, C b) { double d = abs(a.fs - b.fs); if (a.sc + b.sc + EPS < d) return -1; // no intersection (outside) ...
#include <cmath> #include <complex> #include <iostream> #include <map> #define fs first #define sc second #define EPS 0 using namespace std; typedef complex<double> P; typedef pair<P, double> C; int cpr(C a, C b) { double d = abs(a.fs - b.fs); if (a.sc + b.sc + EPS < d) return -1; // no intersection (outside)...
[ "variable_declaration.type.primitive.change" ]
19,869
19,870
u914140574
cpp
p00023
#include <iostream> #include <math.h> using namespace std; int main() { double x1, x2, y1, y2, r1, r2, d; int n, i; cin >> n; for (i = 0; i < n; i++) { cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2; d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); if (d - r1 - r2 > 0.0) cout << "0" << ...
#include <iostream> #include <math.h> using namespace std; int main() { double x1, x2, y1, y2, r1, r2, d; int n, i; cin >> n; for (i = 0; i < n; i++) { cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2; d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); if (d - r1 - r2 > 0.0) cout << "0" << ...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
19,884
19,885
u704101410
cpp
p00023
#include <cmath> #include <iostream> enum JudgeCircleIntersect { BinA = 2, AinB = -2, AcrossB = 1, AdisB = 0, Error = -1 }; struct Circle { Circle() {} Circle(double sx, double sy, double sr) : cx(sx), cy(sy), r(sr) {} double cx; double cy; double r; }; double Abs(double x) { return x >= 0 ? ...
#include <cmath> #include <iostream> enum JudgeCircleIntersect { BinA = 2, AinB = -2, AcrossB = 1, AdisB = 0, Error = -1 }; struct Circle { Circle() {} Circle(double sx, double sy, double sr) : cx(sx), cy(sy), r(sr) {} double cx; double cy; double r; }; double Abs(double x) { return x >= 0 ? ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "misc.opposites" ]
19,905
19,906
u965222365
cpp
p00023
#include <math.h> #include <stdio.h> int main() { int n, x; double xa, ya, ra, xb, yb, rb, d; scanf("%d", &n); for (x = 0; x < n; x++) { scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb); d = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb)); if (ra + rb < d) { printf("0\n")...
#include <math.h> #include <stdio.h> int main() { int n, x; double xa, ya, ra, xb, yb, rb, d; scanf("%d", &n); for (x = 0; x < n; x++) { scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &xb, &yb, &rb); d = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb)); if (ra + rb < d) { printf("0\n")...
[]
19,920
19,921
u133060595
cpp
p00023
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int main() { double xa, ya, ra, xb, yb, rb, d; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> xa >> ya >> ra >> xb >> yb >> rb; d = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; int main() { double xa, ya, ra, xb, yb, rb, d; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> xa >> ya >> ra >> xb >> yb >> rb; d = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb...
[ "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
19,924
19,925
u816759634
cpp
p00023
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #inclu...
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #inclu...
[ "literal.number.change", "io.output.change" ]
19,928
19,929
u372495136
cpp
p00023
#include <algorithm> #include <complex> #include <iostream> #include <map> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<VI> VVI; #define rep(i, n) for (int i = 0; i < (n); i++) typ...
#include <algorithm> #include <complex> #include <iostream> #include <map> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<VI> VVI; #define rep(i, n) for (int i = 0; i < (n); i++) typ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
19,930
19,931
u984794799
cpp
p00023
#include <cmath> #include <iostream> double dist(double xa, double ya, double xb, double yb) { return sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya)); } int main() { int n; std::cin >> n; for (int i = 0; i < n; ++i) { double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; ...
#include <cmath> #include <iostream> double dist(double xa, double ya, double xb, double yb) { return sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya)); } int main() { int n; std::cin >> n; for (int i = 0; i < n; ++i) { double xa, ya, ra, xb, yb, rb; std::cin >> xa >> ya >> ra >> xb >> yb >> rb; ...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
19,932
19,933
u201529067
cpp
p00023
#include <cmath> #include <cstdlib> #include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double dsq = pow(xb - xa, 2.0) + pow(yb - ya, 2.0); if (dsq > ra + rb) { cout <<...
#include <cmath> #include <cstdlib> #include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { double xa, ya, ra, xb, yb, rb; cin >> xa >> ya >> ra >> xb >> yb >> rb; double dsq = pow(xb - xa, 2.0) + pow(yb - ya, 2.0); if (sqrt(dsq) > ra + rb) { c...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "call.add", "expression.operator.compare.change" ]
19,939
19,940
u777217452
cpp
p00023
#include <cmath> #include <iostream> #include <vector> int check_intersection(const double ra, const double rb, const double distance) { if (distance > (ra + rb)) { return 0; } else if (ra > rb) { return ((distance + rb) < ra) ? 2 : 1; } else { return ((distance + ra) < rb) ? -...
#include <cmath> #include <iostream> #include <vector> int check_intersection(const double ra, const double rb, const double distance) { if (distance > (ra + rb)) { return 0; } else if (ra > rb) { return ((distance + rb) < ra) ? 2 : 1; } else { return ((distance + ra) < rb) ? -...
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
19,954
19,955
u118865059
cpp
p00023
#include <cmath> #include <iostream> #include <vector> int check_intersection(const double ra, const double rb, const double distance) { if (distance >= (ra + rb)) { return 0; } else if (ra > rb) { return ((distance + rb) < ra) ? 2 : 1; } else { return ((distance + ra) < rb) ? ...
#include <cmath> #include <iostream> #include <vector> int check_intersection(const double ra, const double rb, const double distance) { if (distance > (ra + rb)) { return 0; } else if (ra > rb) { return ((distance + rb) < ra) ? 2 : 1; } else { return ((distance + ra) < rb) ? -...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
19,957
19,955
u118865059
cpp
p00023
#include <cmath> #include <iostream> #include <vector> int check_intersection(const double ra, const double rb, const double distance) { if (distance > (ra + rb)) { return 0; } else if (ra > rb) { return ((distance + rb) <= ra) ? 2 : 1; } else { return ((distance + ra) <= rb) ?...
#include <cmath> #include <iostream> #include <vector> int check_intersection(const double ra, const double rb, const double distance) { if (distance > (ra + rb)) { return 0; } else if (ra > rb) { return ((distance + rb) < ra) ? 2 : 1; } else { return ((distance + ra) < rb) ? -...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
19,958
19,955
u118865059
cpp
p00023
#include <iostream> #include <vector> inline int func(const int x) { return x * x; } int state_circles(const std::vector<double> &a, const std::vector<double> &b) { double d; d = func(a[0] - b[0]) + func(a[1] - b[1]); if (func(a[2] + b[2]) < d) return 0; if (func(a[2] - b[2]) > d) { if (a[2] > b[2]) ...
#include <iostream> #include <vector> inline double func(const double x) { return x * x; } int state_circles(const std::vector<double> &a, const std::vector<double> &b) { double d; d = func(a[0] - b[0]) + func(a[1] - b[1]); if (func(a[2] + b[2]) < d) return 0; if (func(a[2] - b[2]) > d) { if (a[2] > b...
[ "function.return_type.change", "variable_declaration.type.primitive.change" ]
19,962
19,963
u279125166
cpp
p00022
#include <algorithm> #include <iostream> int main() { int n; while (std::cin >> n, n) { int max = 0, before; std::cin >> before; for (int i = 1, a; i < n; i++) { std::cin >> a; before = std::max(before + a, a); max = std::max(max, before); } std::cout << max << std::endl; ...
#include <algorithm> #include <iostream> int main() { int n; while (std::cin >> n, n) { int max, before; std::cin >> before; max = before; for (int i = 1, a; i < n; i++) { std::cin >> a; before = std::max(before + a, a); max = std::max(max, before); } std::cout << max...
[ "assignment.add" ]
19,973
19,974
u426260581
cpp
p00022
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a[5001]; while (cin >> n) { for (int i = 0; i < n; i++) { cin >> a[i]; } int maxseq = -100001; for (int i = 0; i < n; i++) { int sum = 0; for (int j = 0; i + j < n; j++) { sum += a[i + j]; ...
#include <algorithm> #include <iostream> using namespace std; int main() { int n, a[5001]; while (cin >> n, n) { for (int i = 0; i < n; i++) { cin >> a[i]; } int maxseq = -100001; for (int i = 0; i < n; i++) { int sum = 0; for (int j = 0; i + j < n; j++) { sum += a[i + j];...
[ "control_flow.loop.condition.change" ]
19,975
19,976
u262602753
cpp
p00025
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[3]; // 正解の数字 int b[3]; // 回答者の数字 while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { // 正解の数字を入力 int hit = 0; // 初期値 int blow = 0; // 初期値 for (int i = 0; i < 4; i+...
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[4]; int b[4]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { int hit = 0; int blow = 0; for (int i = 0; i < 4; i++) cin >> b[i]; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (a[i] ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "literal.string.change", "io.output.change", "control_flow.return.add", "control_flow.return.0.add" ]
20,211
20,212
u194854904
cpp
p00025
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[3]; int b[3]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { int hit = 0; int blow = 0; for (int i = 0; i < 4; i++) cin >> b[i]; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (a[i] ...
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[4]; int b[4]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { int hit = 0; int blow = 0; for (int i = 0; i < 4; i++) cin >> b[i]; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (a[i] ...
[ "literal.number.change", "variable_declaration.array_dimensions.change", "literal.string.change", "io.output.change", "control_flow.return.add", "control_flow.return.0.add" ]
20,214
20,212
u194854904
cpp
p00025
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[4]; int b[4]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { int hit = 0; int blow = 0; for (int i = 0; i < 4; i++) cin >> b[i]; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (a[i] ...
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[4]; int b[4]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { int hit = 0; int blow = 0; for (int i = 0; i < 4; i++) cin >> b[i]; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (a[i] ...
[ "literal.string.change", "io.output.change", "control_flow.return.add", "control_flow.return.0.add" ]
20,215
20,212
u194854904
cpp
p00025
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[4]; int b[4]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { int hit = 0; int blow = 0; for (int i = 0; i < 4; i++) cin >> b[i]; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (a[i] ...
// 0025 Hit and Blow #include <iostream> using namespace std; int main() { int a[4]; int b[4]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { int hit = 0; int blow = 0; for (int i = 0; i < 4; i++) cin >> b[i]; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (a[i] ...
[ "literal.string.change", "io.output.change" ]
20,216
20,212
u194854904
cpp
p00025
#include <algorithm> #include <bitset> #include <cstdio> #include <cstdlib> #include <iostream> #include <iterator> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <string> #include <time.h> #include <vector> using namespace std; #define FOR(I, F, N) for (int I = F; I < (int...
#include <algorithm> #include <bitset> #include <cstdio> #include <cstdlib> #include <iostream> #include <iterator> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <string> #include <time.h> #include <vector> using namespace std; #define FOR(I, F, N) for (int I = F; I < (int...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
20,219
20,220
u092829549
cpp
p00025
#include <array> #include <iostream> int main() { std::array<int, 4> A; while (std::cin >> A[0] >> A[1] >> A[2] >> A[3]) { std::array<int, 4> B; std::cin >> B[0] >> B[1] >> B[2] >> B[3]; int hit = 0; int blow = 0; for (int i = 0; i < 4; ++i) { if (A[i] == B[i]) ++hit; for ...
#include <array> #include <iostream> int main() { std::array<int, 4> A; while (std::cin >> A[0] >> A[1] >> A[2] >> A[3]) { std::array<int, 4> B; std::cin >> B[0] >> B[1] >> B[2] >> B[3]; int hit = 0; int blow = 0; for (int i = 0; i < 4; ++i) { if (A[i] == B[i]) ++hit; else...
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add", "control_flow.loop.for.initializer.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
20,221
20,222
u955669338
cpp
p00025
#include <algorithm> #include <array> #include <iostream> int main() { int a1, a2, a3, a4, b1, b2, b3, b4; while (std::cin >> a1 >> a2 >> a3 >> a4) { std::cin >> b1 >> b2 >> b3 >> b4; std::array<int, 4> A = {a1, a2, a3, a4}; std::array<int, 4> B = {b1, b2, b3, b4}; int hit = 0; int blow = ...
#include <algorithm> #include <array> #include <iostream> int main() { int a1, a2, a3, a4, b1, b2, b3, b4; while (std::cin >> a1 >> a2 >> a3 >> a4) { std::cin >> b1 >> b2 >> b3 >> b4; std::array<int, 4> A = {a1, a2, a3, a4}; std::array<int, 4> B = {b1, b2, b3, b4}; int hit = 0; int blow = ...
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
20,226
20,225
u926908660
cpp
p00025
#include <algorithm> #include <array> #include <iostream> int main() { int a1, a2, a3, a4, b1, b2, b3, b4; while (std::cin >> a1 >> a2 >> a3 >> a4) { std::cin >> b1 >> b2 >> b3 >> b4; std::array<int, 4> A = {a1, a2, a3, a4}; std::array<int, 4> B = {b1, b2, b3, b4}; int hit = 0; int blow = ...
#include <algorithm> #include <array> #include <iostream> int main() { int a1, a2, a3, a4, b1, b2, b3, b4; while (std::cin >> a1 >> a2 >> a3 >> a4) { std::cin >> b1 >> b2 >> b3 >> b4; std::array<int, 4> A = {a1, a2, a3, a4}; std::array<int, 4> B = {b1, b2, b3, b4}; int hit = 0; int blow = ...
[ "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
20,227
20,225
u926908660
cpp
p00025
#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 ...
[ "identifier.change", "call.function.change", "call.arguments.change" ]
20,228
20,229
u744420470
cpp
p00025
#include <iostream> using namespace std; int main() { int hit, blow; int a[4], b[4]; while (cin >> a[0] >> a[1] >> a[2] >> a[3]) { cin >> b[0] >> b[1] >> b[2] >> b[3]; hit = 0; blow = 0; for (int i = 0; i < 4; i++) { for (int j = i; j < 4; j++) { if (a[i] == b[j]) { if (...
#include <iostream> using namespace std; int main() { int hit, blow; int a[4], b[4]; while (cin >> a[0]) { cin >> a[1] >> a[2] >> a[3]; cin >> b[0] >> b[1] >> b[2] >> b[3]; hit = 0; blow = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (a[i] == b[j]) { ...
[ "control_flow.loop.condition.change", "variable_declaration.value.change", "identifier.replace.remove", "literal.replace.add", "control_flow.loop.for.initializer.change" ]
20,230
20,231
u681511075
cpp
p00025
#include <iostream> int main() { const int size = 4; int a[size], b[size]; while (std::cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) { int hit = 0, blow = 0; for (int i = 0; i < size; i++) if (a[i] == b[i]) { hit++; } else { for (int j = 1; j <...
#include <iostream> int main() { const int size = 4; int a[size], b[size]; while (std::cin >> a[0] >> a[1] >> a[2] >> a[3] >> b[0] >> b[1] >> b[2] >> b[3]) { int hit = 0, blow = 0; for (int i = 0; i < size; i++) if (a[i] == b[i]) { hit++; } else { for (int j = 0; j <...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.initializer.change", "expression.off_by_one", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
20,233
20,234
u276203229
cpp
p00025
#include <iostream> int main() { int a[4], b[4], c, d, i, j; while (std::cin >> a[0]) { for (i = 1; i < 4; i++) { std::cin >> a[i]; } for (i = 0; i < 4; i++) { std::cin >> b[i]; } c = 0; d = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { if (i == j && a...
#include <iostream> int main() { int a[4], b[4], c, d, i, j; while (std::cin >> a[0]) { for (i = 1; i < 4; i++) { std::cin >> a[i]; } for (i = 0; i < 4; i++) { std::cin >> b[i]; } c = 0; d = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { if (i == j && a...
[]
20,236
20,237
u827103673
cpp