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 |
|---|---|---|---|---|---|---|---|
p02381 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
while (1) {
int n, s[1000];
double heikin = 0, hensa = 0;
cin >> n;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> s[i];
heikin += s[i];
}
heikin /= n;
for (int i = 0; i ... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
while (1) {
double n, s[1000], heikin = 0, hensa = 0;
cin >> n;
if (n == 0)
break;
for (int i = 0; i < n; i++) {
cin >> s[i];
heikin += s[i];
}
heikin /= n;
for (int i = 0; i < n; i++... | [
"variable_declaration.type.primitive.change"
] | 136,721 | 136,722 | u278641778 | cpp |
p02381 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
while (1) {
int n;
cin >> n;
if (n == 0)
break;
int s[n];
int sum = 0;
double average, dev2 = 0.0;
for (int i = 0; i < n; i++) {
cin >> s[i];
sum += s[i];
}
average = sum / n... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
while (1) {
int n;
cin >> n;
if (n == 0)
break;
int s[n];
int sum = 0;
double average, dev2 = 0.0;
for (int i = 0; i < n; i++) {
cin >> s[i];
sum += s[i];
}
average = (double... | [
"type_conversion.add"
] | 136,725 | 136,726 | u808404363 | cpp |
p02382 | #include <bits/stdc++.h>
using namespace std;
int n;
vector<double> x, y;
double distance1() {
double sum = 0.0;
for (int i = 0; i < n; i++) {
sum += abs(x[i] - y[i]);
}
return sum;
}
double distance2() {
double sum;
for (int i = 0; i < n; i++) {
sum += (x[i] - y[i]) * (x[i] - y[i]);
}
return ... | #include <bits/stdc++.h>
using namespace std;
int n;
vector<double> x, y;
double distance1() {
double sum = 0.0;
for (int i = 0; i < n; i++) {
sum += abs(x[i] - y[i]);
}
return sum;
}
double distance2() {
double sum;
for (int i = 0; i < n; i++) {
sum += (x[i] - y[i]) * (x[i] - y[i]);
}
return ... | [] | 136,731 | 136,732 | u268387825 | cpp |
p02382 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int n;
double x[100], y[100];
double dist(double p) {
double sum = 0;
for (int i = 0; i < n; ++i) {
sum += pow(abs(x[i] - y[i]), p);
}
return pow(sum, 1.0 / p);
}
int main(int argc, char const *argv[]) {
cout << fixed << setpr... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int n;
double x[100], y[100];
double dist(double p) {
double sum = 0;
for (int i = 0; i < n; ++i) {
sum += pow(abs(x[i] - y[i]), p);
}
return pow(sum, 1.0 / p);
}
int main(int argc, char const *argv[]) {
cout << fixed << setpr... | [
"identifier.change",
"expression.operation.binary.change"
] | 136,735 | 136,736 | u488842924 | cpp |
p02382 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int num;
double dis1 = 0, dis2 = 0, dis3 = 0, dis4 = 0, tmp = 0;
cin >> num;
double vector1[num];
double vector2[num];
for (int i = 0; i < num; i++) {
cin >> vector1[i];
}
for (int i = 0; i < num; i++) {
ci... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int num;
double dis1 = 0, dis2 = 0, dis3 = 0, dis4 = 0, tmp = 0;
cin >> num;
double vector1[num];
double vector2[num];
for (int i = 0; i < num; i++) {
cin >> vector1[i];
}
for (int i = 0; i < num; i++) {
ci... | [
"io.output.change",
"call.arguments.change"
] | 136,740 | 136,741 | u694546441 | cpp |
p02382 | #include <cmath>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
double x[100] = {0}, y[100] = {0}, p_1 = 0, p_2 = 0, p_3 = 0, p_infinity = -1;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%lf", &x[i]);
for (int i = 0; i < n; i++)
scanf("%lf", &y[i]);
for (int ... | #include <cmath>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
double x[100] = {0}, y[100] = {0}, p_1 = 0, p_2 = 0, p_3 = 0, p_infinity = -1;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%lf", &x[i]);
for (int i = 0; i < n; i++)
scanf("%lf", &y[i]);
for (int ... | [
"assignment.value.change",
"control_flow.loop.for.condition.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 136,742 | 136,743 | u841770308 | cpp |
p02382 |
#include <cmath>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
double x[100] = {0}, y[100] = {0}, p_1 = 0, p_2 = 0, p_3 = 0, p_infinity = -1;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%lf", &x[i]);
for (int i = 0; i < n; i++)
scanf("%lf", &y[i]);
for (int... | #include <cmath>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int n;
double x[100] = {0}, y[100] = {0}, p_1 = 0, p_2 = 0, p_3 = 0, p_infinity = -1;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%lf", &x[i]);
for (int i = 0; i < n; i++)
scanf("%lf", &y[i]);
for (int ... | [
"assignment.value.change",
"control_flow.loop.for.condition.change"
] | 136,744 | 136,743 | u841770308 | cpp |
p02382 | #include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
double x[n];
double y[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double p1 = 0;
for (int i = 0; i < n; i++) {
p1 = p1 + fab... | #include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
double x[n];
double y[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double p1 = 0;
for (int i = 0; i < n; i++) {
p1 = p1 + fab... | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 136,745 | 136,746 | u136295375 | cpp |
p02382 | #include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
double x[n];
double y[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double p1 = 0;
for (int i = 0; i < n; i++) {
p1 = p1 + fab... | #include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
double x[n];
double y[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double p1 = 0;
for (int i = 0; i < n; i++) {
p1 = p1 + fab... | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change"
] | 136,747 | 136,746 | u136295375 | cpp |
p02382 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#define lp(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n;
double x[101], y[101], ans1 = 0, ans2 = 0, ans3 = 0, ans4 = 0;
cin >> n;
lp(i, n) { cin >> x[i]; }
lp(i, n) { cin >> y[i]; }
lp... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#define lp(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n;
double x[101], y[101], ans1 = 0, ans2 = 0, ans3 = 0, ans4 = 0;
cin >> n;
lp(i, n) { cin >> x[i]; }
lp(i, n) { cin >> y[i]; }
lp... | [
"io.output.change"
] | 136,748 | 136,749 | u826160136 | cpp |
p02382 | #include <bits/stdc++.h>
using namespace std;
int main() {
long x[1000], y[1000];
int n;
cin >> n;
cout << fixed << setprecision(10);
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double maxn = 0;
for (int p = 1; p < 4; p++) {
double sum = 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
long x[1000], y[1000];
int n;
cin >> n;
cout << fixed << setprecision(10);
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double maxn = 0;
for (int p = 1; p < 4; p++) {
double sum = 0... | [
"type_conversion.add"
] | 136,859 | 136,860 | u803657704 | cpp |
p02382 | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n;
double x[99], y[99], p1 = 0, p1check = 0, p2 = 0, p3 = 0, pinfty = 0;
for (int i = 0; n > i; i++)
cin >> x[i];
for (int i = 0; n > i; i++)
cin >> y[i];
for (int i = 0; n > i; i++) {
p1 += abs(x[i] - y... | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n;
double x[99], y[99], p1 = 0, p1check = 0, p2 = 0, p3 = 0, pinfty = 0;
cin >> n;
for (int i = 0; n > i; i++)
cin >> x[i];
for (int i = 0; n > i; i++)
cin >> y[i];
for (int i = 0; n > i; i++) {
p1 += ... | [] | 136,871 | 136,872 | u843915147 | cpp |
p02382 | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n;
float x[100] = {}, y[100] = {};
float q;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
float tmp = 0;
for (int i = 0; i ... | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n;
double x[100] = {}, y[100] = {};
double q;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double tmp = 0;
for (int i = 0;... | [
"variable_declaration.type.primitive.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 136,876 | 136,877 | u972675635 | cpp |
p02382 | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n;
float x[100] = {}, y[100] = {};
float q;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
float tmp = 0;
for (int i = 0; i ... | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n;
double x[100] = {}, y[100] = {};
double q;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double tmp = 0;
for (int i = 0;... | [
"variable_declaration.type.primitive.change"
] | 136,878 | 136,877 | u972675635 | cpp |
p02382 | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n;
double x[100] = {}, y[100] = {};
float q;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double tmp = 0;
for (int i = 0; ... | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int n;
double x[100] = {}, y[100] = {};
double q;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double tmp = 0;
for (int i = 0;... | [
"variable_declaration.type.primitive.change"
] | 136,879 | 136,877 | u972675635 | cpp |
p02382 | #include <bits/stdc++.h>
using namespace std;
double dist_Minkowski(const vector<double> &x, const vector<double> &y, int p) {
if (p == 0) {
double temp = 1e5;
for (int i = 0; i < (int)x.size(); i++) {
if (abs(x[i] - y[i]) > temp)
temp = abs(x[i] - y[i]);
}
return temp;
}
double tem... | #include <bits/stdc++.h>
using namespace std;
double dist_Minkowski(const vector<double> &x, const vector<double> &y, int p) {
if (p == 0) {
double temp = 0;
for (int i = 0; i < (int)x.size(); i++) {
if (abs(x[i] - y[i]) > temp)
temp = abs(x[i] - y[i]);
}
return temp;
}
double temp ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 136,886 | 136,887 | u252054808 | cpp |
p02382 | #include <iomanip>
#include <iostream>
#include <math.h>
#include <stdlib.h>
using namespace std;
int main() {
int n, i, j;
cin >> n;
double x[n];
double y[n];
double d1, d2, d3, di = 0;
for (i = 0; i < 2; i++) {
for (j = 0; j < n; j++) {
if (i == 0)
cin >> x[j];
if (i == 1)
... | #include <iomanip>
#include <iostream>
#include <math.h>
#include <stdlib.h>
using namespace std;
int main() {
int n, i, j;
cin >> n;
double x[n];
double y[n];
double d1, d2, d3, di = 0;
for (i = 0; i < 2; i++) {
for (j = 0; j < n; j++) {
if (i == 0)
cin >> x[j];
if (i == 1)
... | [
"expression.operation.binary.remove"
] | 136,888 | 136,889 | u583833806 | cpp |
p02382 | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n;
double a = 0, b = 0, d = 0, e = 0;
cin >> n;
double x[n] = {};
double y[n] = {};
double c[n] = {};
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
for ... | #include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int n;
double a = 0, b = 0, d = 0, e = 0;
cin >> n;
double x[n] = {};
double y[n] = {};
double c[n] = {};
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
for ... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 136,890 | 136,891 | u023603990 | cpp |
p02382 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define All(X) X.begin(), X.end()
int aabs(double x) {
if (x < 0)
return x *= -1;
else
... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define vvi vector<vector<int>>
#define All(X) X.begin(), X.end()
int aabs(double x) {
if (x < 0)
return x *= -1;
else
... | [
"io.output.change"
] | 136,897 | 136,898 | u220216937 | cpp |
p02382 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <typeinfo>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
typedef long long i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <typeinfo>
#include <utility>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
typedef long long i... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 136,905 | 136,906 | u823052041 | cpp |
p02382 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n, x[100], y[100];
double d1 = 0, d2 = 0, d3 = 0, d8 = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
for (int i = 0; i < n; i++) {
doub... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n, x[100], y[100];
double d1 = 0, d2 = 0, d3 = 0, d8 = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
for (int i = 0; i < n; i++) {
doub... | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change",
"assignment.change"
] | 136,907 | 136,908 | u049242937 | cpp |
p02382 | #include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
using namespace std;
double minkowsky1(int n, int *x, int *y);
double minkowsky2(int n, int *x, int *y);
double minkowsky3(int n, int *x, int *y);
double chebyshev(int n, int *x, int *y);
int main() {
cout << fixed;
cout << setprecision(1... | #include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
using namespace std;
double minkowsky1(int n, int *x, int *y);
double minkowsky2(int n, int *x, int *y);
double minkowsky3(int n, int *x, int *y);
double chebyshev(int n, int *x, int *y);
int main() {
cout << fixed;
cout << setprecision(1... | [
"call.arguments.add",
"call.arguments.change"
] | 136,912 | 136,913 | u562861626 | cpp |
p02382 | #include <cmath>
#include <iostream>
using namespace std;
int main(void) {
u_int n;
cin >> n;
int x[n], y[n];
for (u_int i = 0; i < n; i++)
cin >> x[i];
for (u_int i = 0; i < n; i++)
cin >> y[i];
double manh[4] = {0, 0, 0, 0};
for (u_int i = 0; i < n; i++) {
double d = abs(x[i] - y[i]);
... | #include <cmath>
#include <iostream>
using namespace std;
int main(void) {
u_int n;
cin >> n;
int x[n], y[n];
for (u_int i = 0; i < n; i++)
cin >> x[i];
for (u_int i = 0; i < n; i++)
cin >> y[i];
double manh[4] = {0, 0, 0, 0};
for (u_int i = 0; i < n; i++) {
double d = abs(x[i] - y[i]);
... | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change"
] | 136,914 | 136,915 | u881491942 | cpp |
p02382 | // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_10_D
#include <cmath>
#include <cstdio>
#include <iostream>
const double inf = 1000;
using namespace std;
int main() {
int n;
cin >> n;
double x[n], y[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin... | // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_10_D
#include <cmath>
#include <cstdio>
#include <iostream>
const double inf = 100;
using namespace std;
int main() {
int n;
cin >> n;
double x[n], y[n];
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 136,916 | 136,917 | u681813376 | cpp |
p02382 | #include <iostream>
using namespace std;
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SQR(X) ((X) * (X))
long double minkosu(long sa[], long n, long double p) {
long i, j;
long double tmp = 0;
if (p == 100) {
for (i = 1; i < n; i++) {
if (tmp <... | #include <iostream>
using namespace std;
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SQR(X) ((X) * (X))
long double minkosu(long sa[], long n, long double p) {
long i, j;
long double tmp = 0;
if (p == 100) {
for (i = 0; i < n; i++) {
if (tmp <... | [
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"control_flow.branch.else.add"
] | 136,918 | 136,919 | u075842827 | cpp |
p02382 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
double x[1001], y[1001], sum[1001], d = 0.0;
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
for (int i = 0; i < n; i++) {
sum[i] = fabs(x[i] - y[i]);
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
double x[1001], y[1001], sum[1001], d = 0.0;
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
for (int i = 0; i < n; i++) {
sum[i] = fabs(x[i] - y[i]);
... | [
"literal.number.change",
"call.arguments.change",
"io.output.change"
] | 136,922 | 136,923 | u604252762 | cpp |
p02382 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
double x[1001], y[1001], sum[1001], d = 0.0;
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
for (int i = 0; i < n; i++) {
sum[i] = fabs(x[i] - y[i]);
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
double x[1001], y[1001], sum[1001], d = 0.0;
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
for (int i = 0; i < n; i++) {
sum[i] = fabs(x[i] - y[i]);
... | [
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 136,924 | 136,923 | u604252762 | cpp |
p02382 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iostream>
#include <list>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
double *x = ... |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <iostream>
#include <list>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
double *x = ... | [] | 136,931 | 136,932 | u823517752 | cpp |
p02382 | #define _USE_MATH_DEFINES // M_PI
#include <algorithm> //std::sort
#include <cmath> //abs, pow, sqrt, sin, cos,
#include <cstdlib> //abs
#include <fstream> //std::ifstream
#include <iomanip> //std::setprecision
#include <iostream> //std::cout, std::cin
#include <string> ... | #define _USE_MATH_DEFINES // M_PI
#include <algorithm> //std::sort
#include <cmath> //abs, pow, sqrt, sin, cos,
#include <cstdlib> //abs
#include <fstream> //std::ifstream
#include <iomanip> //std::setprecision
#include <iostream> //std::cout, std::cin
#include <string> ... | [
"expression.operator.change"
] | 136,941 | 136,942 | u215443863 | cpp |
p02382 | #include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n;
double D1 = 0, D2 = 0, D3 = 0, Di = 0;
cin >> n;
int x[n], y[n];
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
for (int i = 0;... | #include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int n;
double D1 = 0, D2 = 0, D3 = 0, Di = 0;
cin >> n;
int x[n], y[n];
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
for (int i = 0;... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 136,945 | 136,946 | u680890526 | cpp |
p02382 | #include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
int main(int argc, char **argv) {
int n = 0;
std::vector<int> x;
std::vector<int> y;
double d = 0;
std::cin >> n;
x.resize(n, 0);
y.resize(n, 0);
for (int i = 0; i < n; i++) {
std::cin >> x[i];
}
for... | #include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
int main(int argc, char **argv) {
int n = 0;
std::vector<int> x;
std::vector<int> y;
double d = 0;
std::cin >> n;
x.resize(n, 0);
y.resize(n, 0);
for (int i = 0; i < n; i++) {
std::cin >> x[i];
}
for... | [
"call.arguments.add",
"call.arguments.change"
] | 136,947 | 136,948 | u148628801 | cpp |
p02382 | #include <cmath>
#include <cstdlib>
#include <iomanip> //setprecision
#include <iostream>
#include <vector>
const int MAX = 100000000;
double ans(double x, double y) {
double dis;
dis = x - y;
if (dis < 0) {
dis = dis * (-1.0);
}
return dis;
}
double calc(std::vector<double> x, std::vector<double> y, in... | #include <cmath>
#include <cstdlib>
#include <iomanip> //setprecision
#include <iostream>
#include <vector>
const int MAX = 100000000;
double ans(double x, double y) {
double dis;
dis = x - y;
if (dis < 0) {
dis = dis * (-1.0);
}
return dis;
}
double calc(std::vector<double> x, std::vector<double> y, in... | [
"identifier.change",
"expression.operation.binary.change"
] | 136,949 | 136,950 | u910664394 | cpp |
p02382 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int n, x[101], y[101];
double d1 = 0, d2 = 0, d3 = 0, dm = 0;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++) {
cin >> y[i];
d1 += abs(x[i] - y[i]);
d2 += pow(x[i] - y[i], 2);
... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int n, x[101], y[101];
double d1 = 0, d2 = 0, d3 = 0, dm = 0;
int main() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++) {
cin >> y[i];
d1 += abs(x[i] - y[i]);
d2 += pow(x[i] - y[i], 2);
... | [
"literal.number.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 136,954 | 136,955 | u252263785 | cpp |
p02382 | #include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
int manhattan(vector<int> &x, vector<int> &y) {
assert(x.size() == y.size());
int sum = 0;
for (int i = 0; i < x.size(); i++) {
sum += abs(x[i] - y[i]);
}
return sum;
}
double euclidean(vect... | #include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
int manhattan(vector<int> &x, vector<int> &y) {
assert(x.size() == y.size());
int sum = 0;
for (int i = 0; i < x.size(); i++) {
sum += abs(x[i] - y[i]);
}
return sum;
}
double euclidean(vect... | [
"variable_declaration.type.widen.change",
"identifier.change",
"call.function.change",
"function.return_value.change",
"literal.number.type.widen.change"
] | 136,956 | 136,957 | u151979683 | cpp |
p02382 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n;
double d1, d2, d3, dinf;
cin >> n;
int x[n] = {};
int y[n] = {};
for (int i = 0; i < n; ++i) {
cin >> x[i];
}
for (int i = 0; i < n; ++i) {
cin >> y[i];
}
dinf = 0.0;
for (int i = 0; i < n; ... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int n;
double d1, d2, d3, dinf;
cin >> n;
int x[n] = {};
int y[n] = {};
for (int i = 0; i < n; ++i) {
cin >> x[i];
}
for (int i = 0; i < n; ++i) {
cin >> y[i];
}
dinf = 0.0;
for (int i = 0; i < n; ... | [
"call.arguments.add"
] | 136,961 | 136,962 | u927873196 | cpp |
p02382 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
void Minkowski_distance(int n, int p, int X[100], int Y[100]) {
double md;
if (p == 0) {
int max = 0;
for (int i = 0; i < n; i++) {
max = (max < fabs(X[i] - Y[i]) ? (X[i] - Y[i]) : max);
}
md = max;
} else {
do... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
void Minkowski_distance(int n, int p, int X[100], int Y[100]) {
double md;
if (p == 0) {
int max = 0;
for (int i = 0; i < n; i++) {
max = (max < fabs(X[i] - Y[i]) ? (fabs(X[i] - Y[i])) : max);
}
md = max;
} else {
... | [
"call.add",
"call.arguments.change"
] | 136,964 | 136,965 | u888871392 | cpp |
p02382 | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
int main() {
int n;
double pone = 0;
double ptwo = 0;
double pthree = 0;
double pfour = 0;
std::cin >> n;
int lista[n] = {0};
int listb[n] = {0};
for (int i = 0; i < n; i++) {
std::cin >> lista[i];
}
for (int j = 0; j <... | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
int main() {
int n;
double pone = 0;
double ptwo = 0;
double pthree = 0;
double pfour = 0;
std::cin >> n;
int lista[n] = {0};
int listb[n] = {0};
for (int i = 0; i < n; i++) {
std::cin >> lista[i];
}
for (int j = 0; j <... | [
"call.add",
"call.arguments.change",
"literal.string.change",
"io.output.change"
] | 136,970 | 136,971 | u840175389 | cpp |
p02382 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
int x[1000] = {}, y[1000] = {};
double d1 = 0, d2 = 0, d3 = 0, dinf = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
for (int i = 0; i < n;... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int n;
int x[1000] = {}, y[1000] = {};
double d1 = 0, d2 = 0, d3 = 0, dinf = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
for (int i = 0; i < n;... | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change",
"assignment.change"
] | 136,977 | 136,978 | u994068926 | cpp |
p02382 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, x[100], y[100];
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
double d[4];
for (int i = 0; i < 4; i++)
d[i] = 0.0;
for (int p = 1; p <= 3; p++) {
for (int i = 0; i < n; i++) {... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, x[100], y[100];
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++)
cin >> y[i];
double d[4];
for (int i = 0; i < 4; i++)
d[i] = 0.0;
for (int p = 1; p <= 3; p++) {
for (int i = 0; i < n; i++) {... | [
"assignment.value.change"
] | 136,983 | 136,984 | u734413170 | cpp |
p02382 | #include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
double d1 = 0, d2 = 0, d3 = 0, di = 0;
int n, m, i, j;
cin >> n;
int x[n] = {}, y[n] = {};
for (i = 0; i < n; i++) {
cin >> x[i];
}
for (i = 0; i < n; i++) {
cin >> y[i];
}
for (i = 0; i < n; i++) {
... | #include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
double d1 = 0, d2 = 0, d3 = 0, di = 0;
int n, m, i, j;
cin >> n;
int x[n] = {}, y[n] = {};
for (i = 0; i < n; i++) {
cin >> x[i];
}
for (i = 0; i < n; i++) {
cin >> y[i];
}
for (i = 0; i < n; i++) {
... | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change"
] | 136,989 | 136,990 | u910842455 | cpp |
p02382 | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
int main() {
int n, t;
cin >> n;
int x[n];
int y[n];
double total = 0, root, max = 0;
for (int i = 0; i < n; i++) {
... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
int main() {
int n, t;
cin >> n;
int x[n];
int y[n];
double total = 0, root, max = 0;
for (int i = 0; i < n; i++) {
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 136,991 | 136,992 | u343251190 | cpp |
p02382 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
double n;
cin >> n;
double x[100] = {0};
double y[100] = {0};
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
int p1 = 0;
for (int i = 0; i < n; i++) {
p1 += fabs(x[i] - ... | #include <iostream>
#include <math.h>
using namespace std;
int main() {
double n;
cin >> n;
double x[100] = {0};
double y[100] = {0};
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double p1 = 0;
for (int i = 0; i < n; i++) {
p1 += fabs(x[i]... | [
"variable_declaration.type.primitive.change",
"literal.number.change",
"io.output.change"
] | 136,995 | 136,996 | u002010345 | cpp |
p02382 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
double n;
cin >> n;
double x[100] = {0};
double y[100] = {0};
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double p1 = 0;
for (int i = 0; i < n; i++) {
p1 += fabs(x[i]... | #include <iostream>
#include <math.h>
using namespace std;
int main() {
double n;
cin >> n;
double x[100] = {0};
double y[100] = {0};
for (int i = 0; i < n; i++) {
cin >> x[i];
}
for (int i = 0; i < n; i++) {
cin >> y[i];
}
double p1 = 0;
for (int i = 0; i < n; i++) {
p1 += fabs(x[i]... | [
"literal.number.change",
"io.output.change"
] | 136,997 | 136,996 | u002010345 | cpp |
p02382 | #include <bits/stdc++.h>
using namespace std;
int n;
double x[100], y[100];
double distance(double p) {
double sum = 0;
for (int i = 0; i < n; i++) {
double w = abs(x[i] - y[i]);
sum += pow(w, p);
}
return pow(sum, 1.0 / p);
}
int main() {
cout << fixed << setprecision(12);
cin >> n;
for (int i... | #include <bits/stdc++.h>
using namespace std;
int n;
double x[100], y[100];
double distance(double p) {
double sum = 0;
for (int i = 0; i < n; i++) {
double w = abs(x[i] - y[i]);
sum += pow(w, p);
}
return pow(sum, 1.0 / p);
}
int main() {
cout << fixed << setprecision(12);
cin >> n;
for (int i... | [] | 137,020 | 137,021 | u117673497 | cpp |
p02383 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < b; i++)
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122
struct dice {
int s[6];
void roll(char c) {
int tmp;
if (c == 'E') {
tmp = s[0];
s[0] = s[3];
s[3] = s[5];
s[5] = s[2];
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < b; i++)
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122
struct dice {
int s[6];
void roll(char c) {
int tmp;
if (c == 'E') {
tmp = s[0];
s[0] = s[3];
s[3] = s[5];
s[5] = s[2];
... | [
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 137,135 | 137,136 | u783108851 | cpp |
p02383 | #include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloat>
#include <cinttypes>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstdbool>
#include <cstddef>
#include <cstdint>... | #include <cassert>
#include <ccomplex>
#include <cctype>
#include <cerrno>
#include <cfenv>
#include <cfloat>
#include <cinttypes>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstdbool>
#include <cstddef>
#include <cstdint>... | [
"literal.number.change",
"variable_access.subscript.index.change"
] | 137,137 | 137,138 | u346403603 | cpp |
p02383 | #include <iostream>
#include <string>
class Dice {
public:
int a[7]; // up,flont,right,left,back,down
void roll(char d);
};
void Dice::roll(char d) {
int tmp;
if (d == 'N') {
tmp = a[1];
a[1] = a[2];
a[2] = a[6];
a[6] = a[5];
a[5] = tmp;
} else if (d == 'S') {
tmp = a[1];
a[1] = ... | #include <iostream>
#include <string>
class Dice {
public:
int a[7]; // up,flont,right,left,back,down
void roll(char d);
};
void Dice::roll(char d) {
int tmp;
if (d == 'N') {
tmp = a[1];
a[1] = a[2];
a[2] = a[6];
a[6] = a[5];
a[5] = tmp;
} else if (d == 'S') {
tmp = a[1];
a[1] = ... | [
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 137,139 | 137,140 | u847281757 | cpp |
p02383 | #include <iostream>
#include <string>
using namespace std;
class Cube {
public:
int f[6];
Cube() {}
void roll_z() { roll(1, 2, 4, 3); }
void roll_y() { roll(0, 2, 5, 3); }
void roll_x() { roll(0, 1, 5, 4); }
void roll(int i, int j, int k, int l) {
int t = f[i];
f[i] = f[j];
f[j] = f[k];
f[k... | #include <iostream>
#include <string>
using namespace std;
class Cube {
public:
int f[6];
Cube() {}
void roll_z() { roll(1, 2, 4, 3); }
void roll_y() { roll(0, 2, 5, 3); }
void roll_x() { roll(0, 1, 5, 4); }
void roll(int i, int j, int k, int l) {
int t = f[i];
f[i] = f[j];
f[j] = f[k];
f[k... | [] | 137,142 | 137,143 | u442969736 | cpp |
p02383 | #include <iostream>
using namespace std;
int main() {
int dice[6];
for (int i = 0; i < 6; ++i) {
cin >> dice[i];
}
string s;
cin >> s;
int tmp;
for (const auto &c : s) {
switch (c) {
case ('S'):
tmp = dice[5];
dice[5] = dice[1];
dice[2] = dice[0];
dice[0] = dice[4];
... | #include <iostream>
using namespace std;
int main() {
int dice[6];
for (int i = 0; i < 6; ++i) {
cin >> dice[i];
}
string s;
cin >> s;
int tmp;
for (const auto &c : s) {
switch (c) {
case ('S'):
tmp = dice[5];
dice[5] = dice[1];
dice[1] = dice[0];
dice[0] = dice[4];
... | [
"literal.number.change",
"assignment.variable.change",
"variable_access.subscript.index.change"
] | 137,144 | 137,145 | u539796523 | cpp |
p02383 | #include <iostream>
#include <string>
using namespace std;
class Dice {
public:
int top, face[6];
void East() {
top = face[0];
face[0] = face[3];
face[3] = face[5];
face[5] = face[2];
face[2] = top;
}
void West() {
top = face[0];
face[0] = face[2];
face[2] = face[5];
face[5... | #include <iostream>
#include <string>
using namespace std;
class Dice {
public:
int top, face[6];
void East() {
top = face[0];
face[0] = face[3];
face[3] = face[5];
face[5] = face[2];
face[2] = top;
}
void West() {
top = face[0];
face[0] = face[2];
face[2] = face[5];
face[5... | [
"literal.number.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"assignment.variable.change"
] | 137,146 | 137,147 | u017200929 | cpp |
p02383 | #include <iostream>
using namespace std;
class Dice {
private:
int tmp;
public:
int d[6];
void rollN() {
tmp = d[0];
d[0] = d[1];
d[1] = d[5];
d[5] = d[4];
d[4] = tmp;
}
void rollE() {
tmp = d[0];
d[0] = d[3];
d[3] = d[5];
d[5] = d[2];
d[2] = tmp;
}
void rollS... | #include <iostream>
using namespace std;
class Dice {
private:
int tmp;
public:
int d[6];
void rollN() {
tmp = d[0];
d[0] = d[1];
d[1] = d[5];
d[5] = d[4];
d[4] = tmp;
}
void rollE() {
tmp = d[0];
d[0] = d[3];
d[3] = d[5];
d[5] = d[2];
d[2] = tmp;
}
void rollS... | [
"control_flow.break.add"
] | 137,150 | 137,151 | u881100444 | cpp |
p02383 | #include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
using namespace std;
class dice {
public:
dice() {}
int n[6];
void set(int n0, int n1, int n2, int n3, int n4, int n5) {
n[0] = n0;
n[1] = n1;
n[2] = n2;
n[3] = n3;
n[4] = n4;
n[5] = n5;
}
int get(int i) { retur... | #include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
using namespace std;
class dice {
public:
dice() {}
int n[6];
void set(int n0, int n1, int n2, int n3, int n4, int n5) {
n[0] = n0;
n[1] = n1;
n[2] = n2;
n[3] = n3;
n[4] = n4;
n[5] = n5;
}
int get(int i) { retur... | [
"control_flow.break.add"
] | 137,154 | 137,155 | u910472179 | cpp |
p02383 | #include <iostream>
#include <string>
using namespace std;
class DICE {
public:
int top;
int bottom;
int right;
int left;
int front;
int back;
void South();
void North();
void East();
void West();
};
void DICE::South() {
int kari = front;
front = top;
top = back;
back = bottom;
bottom =... | #include <iostream>
#include <string>
using namespace std;
class DICE {
public:
int top;
int bottom;
int right;
int left;
int front;
int back;
void South();
void North();
void East();
void West();
};
void DICE::South() {
int kari = front;
front = top;
top = back;
back = bottom;
bottom =... | [
"assignment.value.change",
"identifier.change"
] | 137,158 | 137,159 | u278285028 | cpp |
p02383 | #include <iostream>
#include <string>
using namespace std;
class Dice {
public:
int dice[6];
int buff1, buff2, buff3;
void north() {
buff1 = dice[0];
buff2 = dice[1];
buff3 = dice[5];
dice[0] = dice[4];
dice[4] = buff3;
dice[5] = buff2;
dice[1] = buff1;
}
void south() {
buff1 ... | #include <iostream>
#include <string>
using namespace std;
class Dice {
public:
int dice[6];
int buff1, buff2, buff3;
void south() {
buff1 = dice[0];
buff2 = dice[1];
buff3 = dice[5];
dice[0] = dice[4];
dice[4] = buff3;
dice[5] = buff2;
dice[1] = buff1;
}
void north() {
buff1 ... | [] | 137,165 | 137,166 | u884445603 | cpp |
p02383 | #include <iostream>
#include <string>
using namespace std;
int D[6];
void spin(char c) {
if (c == 'E') {
swap(D[0], D[3]);
swap(D[3], D[5]);
swap(D[5], D[2]);
} else if (c == 'W') {
swap(D[0], D[2]);
swap(D[2], D[5]);
swap(D[5], D[3]);
} else if (c == 'S') {
swap(D[0], D[1]);
swap... | #include <iostream>
#include <string>
using namespace std;
int D[6];
void spin(char c) {
if (c == 'E') {
swap(D[0], D[3]);
swap(D[3], D[5]);
swap(D[5], D[2]);
} else if (c == 'W') {
swap(D[0], D[2]);
swap(D[2], D[5]);
swap(D[5], D[3]);
} else if (c == 'S') {
swap(D[0], D[1]);
swap... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 137,176 | 137,177 | u210148484 | cpp |
p02383 | // ITP1_11_A
#include <bits/stdc++.h>
using namespace std;
class Dice {
public:
int face[6] = {};
int tmp[4] = {};
void direction(char ch) {
if (ch == 'N')
move(0, 1, 5, 4);
if (ch == 'S')
move(0, 4, 5, 1);
if (ch == 'W')
move(0, 2, 5, 3);
if (ch == 'E')
move(0, 3, 5, 2);
... | // ITP1_11_A
#include <bits/stdc++.h>
using namespace std;
class Dice {
public:
int face[6] = {};
int tmp[4] = {};
void direction(char ch) {
if (ch == 'N')
move(0, 1, 5, 4);
if (ch == 'S')
move(0, 4, 5, 1);
if (ch == 'W')
move(0, 2, 5, 3);
if (ch == 'E')
move(0, 3, 5, 2);
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"assignment.add"
] | 137,184 | 137,185 | u399801521 | cpp |
p02383 | #include <iostream>
#include <string>
#include <vector>
class dice {
private:
std::vector<int> faces;
public:
dice(int *surface) {
for (int i = 0; i < 6; i++) {
faces.push_back(surface[i]);
}
};
int getSurface() { return faces[0]; };
dice roll(char d) {
int *s = new int[6];
switch (d) {... | #include <iostream>
#include <string>
#include <vector>
class dice {
private:
std::vector<int> faces;
public:
dice(int *surface) {
for (int i = 0; i < 6; i++) {
faces.push_back(surface[i]);
}
};
int getSurface() { return faces[0]; };
dice roll(char d) {
int *s = new int[6];
switch (d) {... | [
"literal.number.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 137,186 | 137,187 | u641479950 | cpp |
p02383 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define PI 3.14159265359
using namespace std;
int main() {
int tmp;
vector<int> d(6);
for (int i = 0; i < 6; i++)
cin >> d[i];
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
i... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <vector>
#define PI 3.14159265359
using namespace std;
int main() {
int tmp;
vector<int> d(6);
for (int i = 0; i < 6; i++)
cin >> d[i];
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
i... | [
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 137,192 | 137,193 | u983285463 | cpp |
p02383 | #include <array>
#include <iostream>
#include <sstream>
class Dice {
private:
std::array<int, 6> inner_;
public:
Dice(std::string str) {
std::istringstream stream(str);
for (int i = 0; i != 6; ++i) {
stream >> inner_[i];
}
}
void roll(char dir) {
std::array<int, 6> new_dice;
switch ... | #include <array>
#include <iostream>
#include <sstream>
class Dice {
private:
std::array<int, 6> inner_;
public:
Dice(std::string str) {
std::istringstream stream(str);
for (int i = 0; i != 6; ++i) {
stream >> inner_[i];
}
}
void roll(char dir) {
std::array<int, 6> new_dice;
switch ... | [
"control_flow.return.add"
] | 137,194 | 137,195 | u709642619 | cpp |
p02383 | #include <cmath>
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int Dice(int n[6], string str) {
int east;
int west;
int sou;
int nor;
int g;
g = 1;
int t = 0;
sou = 2;
east = 3;
west = 4;
nor = 5;
for (int i = 0; i < str.length(); i++) {
if (str[i... | #include <cmath>
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int Dice(int n[6], string str) {
int east;
int west;
int sou;
int nor;
int g;
g = 1;
int t = 0;
sou = 2;
east = 3;
west = 4;
nor = 5;
for (int i = 0; i < str.length(); i++) {
if (str[i... | [
"assignment.value.change",
"identifier.change"
] | 137,196 | 137,197 | u613499860 | cpp |
p02383 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
int main() {
std::vector<int> v(6);
for (int i = 0; i < 6; i++) {
std::cin >> v[i];
}
std::string s;
std::cin >> s;
for (int i = 0; i < s.length(); i++) {
if (s[i] ==... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
int main() {
std::vector<int> v(6);
for (int i = 0; i < 6; i++) {
std::cin >> v[i];
}
std::string s;
std::cin >> s;
for (int i = 0; i < s.length(); i++) {
if (s[i] ==... | [
"literal.number.change",
"assignment.variable.change",
"variable_access.subscript.index.change"
] | 137,200 | 137,201 | u783707634 | cpp |
p02383 | #include <bits/stdc++.h>
using namespace std;
int main() {
int D[6], C;
string S;
for (int i = 0; i < 6; i++) {
cin >> D[i];
}
cin >> S;
for (int i = 0; i < S.length(); i++) {
if (S[i] == 'S') {
C = D[1], D[1] = D[5], D[5] = D[6], D[6] = D[2], D[2] = C;
} else if (S[i] == 'W') {
C =... | #include <bits/stdc++.h>
using namespace std;
int main() {
int D[7], C;
string S;
for (int i = 1; i <= 6; i++) {
cin >> D[i];
}
cin >> S;
for (int i = 0; i < S.length(); i++) {
if (S[i] == 'S') {
C = D[1], D[1] = D[5], D[5] = D[6], D[6] = D[2], D[2] = C;
} else if (S[i] == 'W') {
C ... | [
"literal.number.change",
"variable_declaration.array_dimensions.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"
] | 137,216 | 137,217 | u949389125 | cpp |
p02383 | #include <iostream>
#include <string>
using namespace std;
class Dice {
public:
enum DICE_FACE { eTop, eFront, eRight, eLeft, eBack, eBottom };
Dice(int t, int f, int r, int l, int ba, int bo) {
this->mTopValue = t;
this->mFrontValue = f;
this->mRightValue = r;
this->mLeftValue = l;
this->mBa... | #include <iostream>
#include <string>
using namespace std;
class Dice {
public:
enum DICE_FACE { eTop, eFront, eRight, eLeft, eBack, eBottom };
Dice(int t, int f, int r, int l, int ba, int bo) {
this->mTopValue = t;
this->mFrontValue = f;
this->mRightValue = r;
this->mLeftValue = l;
this->mBa... | [] | 137,224 | 137,225 | u810434660 | cpp |
p02383 | #include <iostream>
#include <math.h>
#include <string>
#define MEN 6
#include <iomanip>
using namespace std;
struct DICE {
int num;
};
int main() {
DICE A[MEN];
string meirei;
int i = 0;
for (int i = 0; i < MEN; i++) {
cin >> A[i].num;
}
cin >> meirei;
while (1) {
if (meirei[i] == '\0') {
... | #include <iostream>
#include <math.h>
#include <string>
#define MEN 6
#include <iomanip>
using namespace std;
struct DICE {
int num;
};
int main() {
DICE A[MEN];
string meirei;
int i = 0;
for (int i = 0; i < MEN; i++) {
cin >> A[i].num;
}
cin >> meirei;
while (1) {
if (meirei[i] == '\0') {
... | [
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 137,226 | 137,227 | u169109925 | cpp |
p02383 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
struct Dice {
vector<int> faces;
Dice(vector<int> &f) : faces(f) {}
int top() { return faces.front(); }
void roll(char direction) {
int tmp;
switch (direction) {
case 'E': // 1,4,5,3 -> 4,5,3,1
tmp = faces[0];
... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
struct Dice {
vector<int> faces;
Dice(vector<int> &f) : faces(f) {}
int top() { return faces.front(); }
void roll(char direction) {
int tmp;
switch (direction) {
case 'E': // 1,4,6,3 -> 4,6,3,1
tmp = faces[0];
... | [
"assignment.value.change"
] | 137,233 | 137,234 | u957470671 | cpp |
p02383 | #include <iostream>
#include <string>
using namespace std;
int main() {
int n = 6, d[n + 1];
for (int i = 1; i <= n; i++) {
cin >> d[i];
}
string cmd;
cin >> cmd;
for (int i = 0; i <= cmd.size(); i++) {
if (true) {
cout << " "
<< "," << d[1] << endl;
cout << d[4] << "," << ... | #include <iostream>
#include <string>
using namespace std;
int main() {
int n = 6, d[n + 1];
for (int i = 1; i <= n; i++) {
cin >> d[i];
}
string cmd;
cin >> cmd;
for (int i = 0; i <= cmd.size(); i++) {
if (false) {
cout << " "
<< "," << d[1] << endl;
cout << d[4] << "," <<... | [
"misc.opposites",
"control_flow.branch.if.condition.change",
"literal.number.change",
"variable_access.subscript.index.change",
"io.output.change"
] | 137,235 | 137,236 | u837073074 | cpp |
p02383 | #include <algorithm>
#include <array>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <unordered_map>
#define min(a, b) (a) > (b) ? (b) : (a)
#define max(a, b) (a) > (b) ? (a) : (b)
using namespace st... | #include <algorithm>
#include <array>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <unordered_map>
#define min(a, b) (a) > (b) ? (b) : (a)
#define max(a, b) (a) > (b) ? (a) : (b)
using namespace st... | [
"literal.number.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"assignment.variable.change"
] | 137,237 | 137,238 | u456512109 | cpp |
p02383 | #include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
int i, j, d[7], d_next[7];
string dire;
cin >> d[1] >> d[2] >> d[3] >> d[4] >> d[5] >> d[6];
cin >> dire;
for (i = 0; i < dire.size(); i++) {
if (dire[i] == 'E') {
d_next[1] = d[4];
d_... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
int i, j, d[7], d_next[7];
string dire;
cin >> d[1] >> d[2] >> d[3] >> d[4] >> d[5] >> d[6];
cin >> dire;
for (i = 0; i < dire.size(); i++) {
if (dire[i] == 'E') {
d_next[1] = d[4];
d_... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"assignment.value.change"
] | 137,243 | 137,244 | u538036761 | cpp |
p02383 | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int a[6];
string str;
for (int i = 0; i < 6; ++i)
cin >> a[i];
cin >> str;
for (auto itr = str.begin(); itr != str.end(); ++itr) {
int tmp;
switch (*itr) {
cas... | #include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int a[6];
string str;
for (int i = 0; i < 6; ++i)
cin >> a[i];
cin >> str;
for (auto itr = str.begin(); itr != str.end(); ++itr) {
int tmp;
switch (*itr) {
cas... | [
"literal.string.change"
] | 137,245 | 137,246 | u322168578 | cpp |
p02383 | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
class Dice {
public:
Dice() { num = new int[7]; }
~Dice() { delete[] num; }
int setLabel(int i, int label) { num[i] = label; }
int top() { return num[1]; }
int roll(char dir) {
int tmp[7];
memcpy(tmp, num, 7 * sizeof(... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
class Dice {
public:
Dice() { num = new int[7]; }
~Dice() { delete[] num; }
int setLabel(int i, int label) { num[i] = label; }
int top() { return num[1]; }
int roll(char dir) {
int tmp[7];
memcpy(tmp, num, 7 * sizeof(... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove",
"literal.string.change",
"control_flow.branch.if.condition.change"
] | 137,249 | 137,250 | u406276395 | cpp |
p02383 | #include <iostream>
void do_command(int *dice, char command) {
int targets[4] = {0, -1, 5, -1};
int temp;
switch (command) {
case 'E':
targets[1] = 3;
targets[3] = 2;
break;
case 'W':
targets[1] = 2;
targets[3] = 3;
break;
case 'N':
targets[1] = 4;
targets[3] = 1;
break... | #include <iostream>
void do_command(int *dice, char command) {
int targets[4] = {0, -1, 5, -1};
int temp;
switch (command) {
case 'E':
targets[1] = 3;
targets[3] = 2;
break;
case 'W':
targets[1] = 2;
targets[3] = 3;
break;
case 'S':
targets[1] = 4;
targets[3] = 1;
break... | [
"literal.string.change"
] | 137,251 | 137,252 | u662488567 | cpp |
p02383 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a[6];
for (int i = 0; i < 6; i++) {
cin >> a[i];
}
string str;
cin >> str;
int b, c, d, e;
b = c = d = e = 0;
for (int i = 0; i < str.size(); i++) {
if (str[i] ==... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a[6];
for (int i = 0; i < 6; i++) {
cin >> a[i];
}
string str;
cin >> str;
int b, c, d, e;
b = c = d = e = 0;
for (int i = 0; i < str.size(); i++) {
if (str[i] ==... | [] | 137,256 | 137,257 | u412537960 | cpp |
p02383 | #include <cstdio>
#include <string.h>
int main() {
int s[6];
int t[6];
char h[101];
for (int i = 0; i < 6; i++) {
scanf("%d", &s[i]);
}
scanf("%s", h);
for (int i = 0; h[i] != '\n'; i++) {
if (h[i] == 'N') {
t[4] = s[0];
t[0] = s[1];
t[1] = s[5];
t[5] = s[4];
t[2] = ... | #include <cstdio>
#include <string.h>
int main() {
int s[6];
int t[6];
char h[101];
for (int i = 0; i < 6; i++) {
scanf("%d", &s[i]);
}
scanf("%s", h);
for (int i = 0; h[i] != 0; i++) {
if (h[i] == 'N') {
t[4] = s[0];
t[0] = s[1];
t[1] = s[5];
t[5] = s[4];
t[2] = s[2... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 137,264 | 137,261 | u549319121 | cpp |
p02383 |
#include <cmath>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main(void) {
int a[6], ue, sita, hokan;
char huku;
cin >> a[1] >> a[2] >> a[3] >> a[4] >> a[5] >> a[6];
cin >> huku;
while (cin >> huku) {
if (huku == 'N') {
... |
#include <cmath>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main(void) {
int a[6], ue, sita, hokan;
char huku;
cin >> a[1] >> a[2] >> a[3] >> a[4] >> a[5] >> a[6];
while (cin >> huku) {
if (huku == 'N') {
hokan = a[1];
... | [] | 137,265 | 137,266 | u172520305 | cpp |
p02384 | #include <bits/stdc++.h>
using namespace std;
class dice {
public:
int d1;
int d2;
int d3;
int d4;
int d5;
int d6;
int kaisi(int s1, int s2, int s3, int s4, int s5, int s6);
string huru(string x);
int kakunin(int x, int y);
};
int dice::kaisi(int s1, int s2, int s3, int s4, int s5, int s6) {
d1 = s1... | #include <bits/stdc++.h>
using namespace std;
class dice {
public:
int d1;
int d2;
int d3;
int d4;
int d5;
int d6;
int kaisi(int s1, int s2, int s3, int s4, int s5, int s6);
string huru(string x);
int kakunin(int x, int y);
};
int dice::kaisi(int s1, int s2, int s3, int s4, int s5, int s6) {
d1 = s1... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 137,669 | 137,670 | u460296825 | cpp |
p02384 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
enum Face {
TOP = 0,
FRONT = 1,
RIGHT = 2,
LEFT = 3,
BACK = 4,
BOTTOM = 5,
};
void roll(vector<int> &f, string cmd) {
int tmp;
for (int i = 0; i < cmd.size(); i++) {
switch (cmd[i]) {
case 'E':
tmp = f[TOP];
... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
enum Face {
TOP = 0,
FRONT = 1,
RIGHT = 2,
LEFT = 3,
BACK = 4,
BOTTOM = 5,
};
void roll(vector<int> &f, string cmd) {
int tmp;
for (int i = 0; i < cmd.size(); i++) {
switch (cmd[i]) {
case 'E':
tmp = f[TOP];
... | [
"literal.string.change",
"call.arguments.change"
] | 137,671 | 137,672 | u917722865 | cpp |
p02384 | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, int> pli;
typ... | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, int> pli;
typ... | [
"literal.number.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 137,673 | 137,674 | u536138161 | cpp |
p02384 | #include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
const int n = 6;
int dice[n];
int top, front;
int p;
int dice_result[6];
/* const int dice_tem[4][6] ={ {2,6,3,4,1,5},{5,1,3,4,6,2},
{4,2,1,6,5,3},{3,2,6,1,5,4}};*/
const int dice_tem[4][6] =... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
const int n = 6;
int dice[n];
int top, front;
int p;
int dice_result[6];
/* const int dice_tem[4][6] ={ {2,6,3,4,1,5},{5,1,3,4,6,2},
{4,2,1,6,5,3},{3,2,6,1,5,4}};*/
const int dice_tem[4][6] =... | [
"literal.number.change"
] | 137,675 | 137,676 | u437044058 | cpp |
p02384 | #include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
const int n = 6;
int dice[n];
int top, front;
int p;
int dice_result[6];
/* const int dice_tem[4][6] ={ {2,6,3,4,1,5},{5,1,3,4,6,2},
{4,2,1,6,5,3},{3,2,6,1,5,4}};*/
const int dice_tem[4][6] =... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
int main() {
const int n = 6;
int dice[n];
int top, front;
int p;
int dice_result[6];
const int dice_tem[4][6] = {{3, 2, 6, 1, 5, 4},
{2, 6, 3, 4, 1, 5},
... | [
"literal.number.change"
] | 137,675 | 137,677 | u437044058 | cpp |
p02384 | //チェッカーコンパイルエラー
#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
class dice {
private:
int roll[6];
public:
explicit dice(int in[6]) {
for (int i = 0; i < 6; i++)
roll[i] = in[i];
}
void move(const char c) {
int tmp;
switch (c) {
case 'N':
tmp = roll[0];... | //チェッカーコンパイルエラー
#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
class dice {
private:
int roll[6];
public:
explicit dice(int in[6]) {
for (int i = 0; i < 6; i++)
roll[i] = in[i];
}
void move(const char c) {
int tmp;
switch (c) {
case 'N':
tmp = roll[0];... | [] | 137,678 | 137,679 | u669826458 | cpp |
p02384 | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int dice[6]{};
for (int i = 0; i < 6; i++)
cin >> dice[i];
int a, b;
int dicee[6]{};
for (int i = 0; i < 6; i++)
dicee[i] = dice[i];
int n;
cin >> n;
for (int k = 0; k < n; k++) {
cin >> a >> b;
// up-a
in... | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int dice[6]{};
for (int i = 0; i < 6; i++)
cin >> dice[i];
int a, b;
int dicee[6]{};
for (int i = 0; i < 6; i++)
dicee[i] = dice[i];
int n;
cin >> n;
for (int k = 0; k < n; k++) {
cin >> a >> b;
// up-a
in... | [
"literal.number.change",
"variable_access.subscript.index.change",
"io.output.change"
] | 137,680 | 137,681 | u856900614 | cpp |
p02384 | #include <iostream>
using namespace std;
int main() {
int dice[6];
int n = 0;
int x, y;
for (int i = 0; i < 6; i++) {
cin >> dice[i];
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> y;
if ((x == dice[3] && y == dice[1]) || (x == dice[4] && y == dice[3]) ||
(x == dice[2] && y == d... | #include <iostream>
using namespace std;
int main() {
int dice[6];
int n;
int x, y;
for (int i = 0; i < 6; i++) {
cin >> dice[i];
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> y;
if ((x == dice[3] && y == dice[1]) || (x == dice[4] && y == dice[3]) ||
(x == dice[2] && y == dice[... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 137,682 | 137,683 | u023603990 | cpp |
p02384 | #include <iostream>
using namespace std;
int main() {
int dice[6];
int n;
int x, y;
for (int i = 0; i < 6; i++) {
cin >> dice[i];
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> y;
if ((x == dice[3] && y == dice[1]) || (x == dice[4] && y == dice[3]) ||
(x == dice[2] && y == dice[... | #include <iostream>
using namespace std;
int main() {
int dice[6];
int n;
int x, y;
for (int i = 0; i < 6; i++) {
cin >> dice[i];
}
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> y;
if ((x == dice[3] && y == dice[1]) || (x == dice[4] && y == dice[3]) ||
(x == dice[2] && y == dice[... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 137,684 | 137,683 | u023603990 | cpp |
p02384 | #include <iostream>
#include <vector>
using namespace std;
// http://www.prefield.com/algorithm/misc/dice.html
enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT };
class dice {
public:
dice() {
id[TOP] = 1;
id[FRONT] = 2;
id[LEFT] = 3;
id[RIGHT] = 4;
id[BACK] = 5;
id[BOTTOM] = 6;
}
dice(i... | #include <iostream>
#include <vector>
using namespace std;
// http://www.prefield.com/algorithm/misc/dice.html
enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT };
class dice {
public:
dice() {
id[TOP] = 1;
id[FRONT] = 2;
id[LEFT] = 3;
id[RIGHT] = 4;
id[BACK] = 5;
id[BOTTOM] = 6;
}
dice(i... | [
"identifier.change",
"variable_access.subscript.index.change",
"io.output.change"
] | 137,685 | 137,686 | u300645821 | cpp |
p02384 | #include <iostream>
#include <vector>
using namespace std;
// http://www.prefield.com/algorithm/misc/dice.html
enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT };
class dice {
public:
dice(int top, int front, int right, int left, int back, int bottom) {
id[TOP] = top;
id[FRONT] = front;
id[RIGHT] = righ... | #include <iostream>
#include <vector>
using namespace std;
// http://www.prefield.com/algorithm/misc/dice.html
enum FACE { TOP, BOTTOM, FRONT, BACK, LEFT, RIGHT };
class dice {
public:
dice(int top, int front, int right, int left, int back, int bottom) {
id[TOP] = top;
id[FRONT] = front;
id[RIGHT] = righ... | [
"identifier.change",
"variable_access.subscript.index.change",
"io.output.change"
] | 137,687 | 137,688 | u300645821 | cpp |
p02384 | #include <iostream>
#include <sstream>
using namespace std;
class Dice {
public:
static int rollingface[][4];
static int sideface[][4];
int face[6];
Dice(string &face_data);
// ~Dice();
void roll(const char &op);
int top();
int front_face(int top, int right);
void print_faces();
};
int Dice::rollin... | #include <iostream>
#include <sstream>
using namespace std;
class Dice {
public:
static int rollingface[][4];
static int sideface[][4];
int face[6];
Dice(string &face_data);
// ~Dice();
void roll(const char &op);
int top();
int front_face(int top, int right);
void print_faces();
};
int Dice::rollin... | [
"expression.operation.binary.add"
] | 137,689 | 137,690 | u813270418 | cpp |
p02384 | #include <iostream>
using namespace std;
class Dice {
public:
int top;
int front;
int right;
int left;
int back;
int bottom;
Dice(int a, int b, int c, int d, int e, int f) {
top = a;
front = b;
right = c;
left = d;
back = e;
bottom = f;
}
void rotateN() {
int t = top;
... | #include <iostream>
using namespace std;
class Dice {
public:
int top;
int front;
int right;
int left;
int back;
int bottom;
Dice(int a, int b, int c, int d, int e, int f) {
top = a;
front = b;
right = c;
left = d;
back = e;
bottom = f;
}
void rotateN() {
int t = top;
... | [] | 137,693 | 137,694 | u324171823 | cpp |
p02384 | #include <iostream>
using namespace std;
class Dice {
public:
int top;
int front;
int right;
int left;
int back;
int bottom;
Dice(int a, int b, int c, int d, int e, int f) {
top = a;
front = b;
right = c;
left = d;
back = e;
bottom = f;
}
void rotateN() {
int t = top;
... | #include <iostream>
using namespace std;
class Dice {
public:
int top;
int front;
int right;
int left;
int back;
int bottom;
Dice(int a, int b, int c, int d, int e, int f) {
top = a;
front = b;
right = c;
left = d;
back = e;
bottom = f;
}
void rotateN() {
int t = top;
... | [
"call.add"
] | 137,695 | 137,694 | u324171823 | cpp |
p02384 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// const int sss[10] = { 0, 6, 5, 4, 3, 2, 1 };
struct DICE {
int f[8];
};
DICE dice;
int ch(char a) {
int s[60];
for (int i = 1; i < 7; i++) {
s[i] = dice.... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// const int sss[10] = { 0, 6, 5, 4, 3, 2, 1 };
struct DICE {
int f[8];
};
DICE dice;
int ch(char a) {
int s[60];
for (int i = 1; i < 7; i++) {
s[i] = dice.... | [
"control_flow.break.add"
] | 137,696 | 137,697 | u195954908 | cpp |
p02384 | #include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
class Dice {
public:
int label[6];
void Command(char hougaku);
};
void Dice::Command(char hougaku) {
int temp[6];
for (int i = 0; i < 6; i++) {
temp[i] = label[i];
}
if (hougaku == 'E') {
label[0] = temp[3];
label[2... | #include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
class Dice {
public:
int label[6];
void Command(char hougaku);
};
void Dice::Command(char hougaku) {
int temp[6];
for (int i = 0; i < 6; i++) {
temp[i] = label[i];
}
if (hougaku == 'E') {
label[0] = temp[3];
label[2... | [] | 137,698 | 137,699 | u839573768 | cpp |
p02384 | #include <iostream>
#include <string>
using namespace std;
void diceS(int[]);
void diceE(int[]);
void diceW(int[]);
void diceN(int[]);
void diceR(int[]);
int main() {
int d[6], p, n, m;
string str;
for (int i = 0; i < 6; i++)
cin >> d[i];
cin >> p;
while (p--) {
cin >> n >> m;
for (int k = 0; k ... | #include <iostream>
#include <string>
using namespace std;
void diceS(int[]);
void diceE(int[]);
void diceW(int[]);
void diceN(int[]);
void diceR(int[]);
int main() {
int d[6], p, n, m;
string str;
for (int i = 0; i < 6; i++)
cin >> d[i];
cin >> p;
while (p--) {
cin >> n >> m;
for (int k = 0; k ... | [
"literal.number.change",
"control_flow.loop.condition.change"
] | 137,700 | 137,701 | u496999590 | cpp |
p02384 | #include <cstdio>
int main() {
int dice[6];
int a, b, x, y, q, t = 0;
int ans[6][6] = {{0, 3, 6, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
scanf("%d %d %d %d %d %d", &dice[0], &dice[1], &dice[2], &dice[3], &dice[4],
... | #include <cstdio>
int main() {
int dice[6];
int a, b, x, y, q, t = 0;
int ans[6][6] = {{0, 3, 5, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
scanf("%d %d %d %d %d %d", &dice[0], &dice[1], &dice[2], &dice[3], &dice[4],
... | [
"literal.number.change",
"assignment.add"
] | 137,702 | 137,703 | u708862509 | cpp |
p02384 | #include <cstdio>
int main() {
int dice[6];
int a, b, x, y, q, t = 0;
int ans[6][6] = {{0, 3, 5, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
scanf("%d %d %d %d %d %d", &dice[0], &dice[1], &dice[2], &dice[3], &dice[4],
... | #include <cstdio>
int main() {
int dice[6];
int a, b, x, y, q, t = 0;
int ans[6][6] = {{0, 3, 5, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
scanf("%d %d %d %d %d %d", &dice[0], &dice[1], &dice[2], &dice[3], &dice[4],
... | [
"assignment.add"
] | 137,704 | 137,703 | u708862509 | cpp |
p02384 | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
typedef struct {
int Up;
int Sorth;
int East;
int West;
int North;
int Down;
} DICE; /*
DICE North(DICE *t);
DICE Sorth(DICE *t);
DICE East(DICE *t);
DICE West(DICE *t);
DICE Rot(DICE *t);
*/
void assignment(DICE *t);
int main() {
unsigned in... | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
typedef struct {
int Up;
int Sorth;
int East;
int West;
int North;
int Down;
} DICE; /*
DICE North(DICE *t);
DICE Sorth(DICE *t);
DICE East(DICE *t);
DICE West(DICE *t);
DICE Rot(DICE *t);
... | [
"call.arguments.change",
"io.output.change"
] | 137,707 | 137,708 | u369202024 | cpp |
p02384 | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a) REP(i, 0, a)
#define REP(i, a, b) for (int i = a; i < b; ++i)
t... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a) REP(i, 0, a)
#define REP(i, a, b) for (int i = a; i < b; ++i)
t... | [
"control_flow.branch.if.condition.change",
"literal.number.change",
"variable_access.subscript.index.change"
] | 137,709 | 137,710 | u426260581 | cpp |
p02384 | #include <iostream>
using namespace std;
int main() {
int y[7];
int x[6][6] = {{0, 3, 5, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
int a, b, c, d;
int q;
cin >> y[1] >> y[2] >> y[3] >> y[4] >> y[5] >> y[6];
cin >> q;
fo... | #include <iostream>
using namespace std;
int main() {
int y[7];
int x[6][6] = {{0, 3, 5, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
int a, b, c, d;
int q;
cin >> y[1] >> y[2] >> y[3] >> y[4] >> y[5] >> y[6];
cin >> q;
fo... | [] | 137,711 | 137,712 | u852311840 | cpp |
p02384 | #include <iostream>
using namespace std;
int main() {
int dice[6];
int pos[6][6] = {{0, 3, 5, 4, 2, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 5}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
int a, b, ap, bp, n;
for (int i = 0; i < 6; i++)
cin >> dice[i];
cin >> n;
for... | #include <iostream>
using namespace std;
int main() {
int dice[6];
int pos[6][6] = {{0, 3, 5, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
int a, b, ap, bp, n;
for (int i = 0; i < 6; i++)
cin >> dice[i];
cin >> n;
for... | [
"literal.number.change"
] | 137,713 | 137,714 | u411540321 | cpp |
p02384 | #include <iostream>
using namespace std;
int main() {
int dice[6];
int pos[6][6] = {{0, 3, 5, 4, 2, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
int a, b, ap, bp, n;
for (int i = 0; i < 6; i++)
cin >> dice[i];
cin >> n;
for... | #include <iostream>
using namespace std;
int main() {
int dice[6];
int pos[6][6] = {{0, 3, 5, 2, 4, 0}, {4, 0, 1, 6, 0, 3}, {2, 6, 0, 0, 1, 5},
{5, 1, 0, 0, 6, 2}, {3, 0, 6, 1, 0, 4}, {0, 4, 2, 5, 3, 0}};
int a, b, ap, bp, n;
for (int i = 0; i < 6; i++)
cin >> dice[i];
cin >> n;
for... | [] | 137,715 | 137,714 | u411540321 | cpp |
p02384 | #include <iostream>
using namespace std;
class Cube {
public:
int f[6];
Cube() {}
void roll_z() { roll(1, 2, 4, 3); } //
void roll_y() { roll(0, 2, 5, 7); } // to W
void roll_x() { roll(0, 1, 5, 4); } // to N
void roll(int i, int j, int k, int l) {
int t = f[i];
f[i] = f[j];
f[j] = f[k];
f... | #include <iostream>
using namespace std;
class Cube {
public:
int f[6];
Cube() {}
void roll_z() { roll(1, 2, 4, 3); } //
void roll_y() { roll(0, 2, 5, 3); } // to W
void roll_x() { roll(0, 1, 5, 4); } // to N
void roll(int i, int j, int k, int l) {
int t = f[i];
f[i] = f[j];
f[j] = f[k];
f... | [
"literal.number.change",
"call.arguments.change"
] | 137,716 | 137,717 | u604252762 | cpp |
p02384 | #include <iostream>
using namespace std;
struct Dice {
int top;
int north;
int east;
int south;
int west;
int bottom;
};
void rotn(void);
void rote(void);
void rots(void);
void rotw(void);
Dice d;
int tmp;
int main() {
int i, q, t, f, r;
char com;
cin >> d.top >> d.south >> d.east >> d.west >> d.n... | #include <iostream>
using namespace std;
struct Dice {
int top;
int north;
int east;
int south;
int west;
int bottom;
};
void rotn(void);
void rote(void);
void rots(void);
void rotw(void);
Dice d;
int tmp;
int main() {
int i, q, t, f, r;
cin >> d.top >> d.south >> d.east >> d.west >> d.north >> d.bo... | [
"variable_declaration.remove",
"assignment.value.change"
] | 137,718 | 137,719 | u389538742 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.