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 |
|---|---|---|---|---|---|---|---|
p02272 | #include <iostream>
using namespace std;
#define MAX 50000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2;... | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | [
"preprocessor.define.value.change",
"literal.integer.change",
"identifier.change",
"call.arguments.change"
] | 116,407 | 116,406 | u246775415 | cpp |
p02272 | #include <climits>
#include <iostream>
using namespace std;
const int INFTY = INT_MAX;
const int maxn = 500000;
int L[maxn / 2 + 2], R[maxn / 2 + 2];
int count;
void merge(int *Array, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++) {
L[i] = Array[left... | #include <climits>
#include <iostream>
using namespace std;
const int INFTY = INT_MAX;
const int maxn = 500000;
int L[maxn / 2 + 2], R[maxn / 2 + 2];
int count;
void merge(int *Array, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++) {
L[i] = Array[left... | [
"assignment.variable.change",
"identifier.change"
] | 116,409 | 116,410 | u201120946 | cpp |
p02272 | #include <algorithm>
#include <limits.h>
#include <stdio.h>
using namespace std;
int cmp_count = 0;
void merge(int A[], int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
... | #include <algorithm>
#include <limits.h>
#include <stdio.h>
using namespace std;
int cmp_count = 0;
void merge(int A[], int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
... | [
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 116,417 | 116,418 | u677291728 | cpp |
p02272 | #include <algorithm>
#include <limits.h>
#include <stdio.h>
using namespace std;
int cmp_count = 0;
void merge(int A[], int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
... | #include <algorithm>
#include <limits.h>
#include <stdio.h>
using namespace std;
int cmp_count = 0;
void merge(int A[], int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 116,419 | 116,418 | u677291728 | cpp |
p02272 | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
//#include "libs.h"
#include <random>
#include <unordered_map>
#include <unordered_set>
//#include <opencv2/core.hpp>
//#include <opencv2/highgui.hpp>
//#include <opencv2/imgproc.hpp>
using namespace std;
//呪文
#define DUMPOUT cerr
#define dump(...) ... | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
//#include "libs.h"
#include <random>
#include <unordered_map>
#include <unordered_set>
//#include <opencv2/core.hpp>
//#include <opencv2/highgui.hpp>
//#include <opencv2/imgproc.hpp>
using namespace std;
//呪文
#define DUMPOUT cerr
#define dump(...) ... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"variable_declaration.type.primitive.change"
] | 116,429 | 116,430 | u607211196 | cpp |
p02272 | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i <... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"assignment.value.change"
] | 116,435 | 116,436 | u450405533 | cpp |
p02272 | #include <iostream>
#include <limits.h>
#include <vector>
using namespace std;
void merge(vector<int> &A, int left, int mid, int right, int &c) {
int n1 = mid - left;
int n2 = right - mid;
vector<int> L(n1 + 1, 0);
vector<int> R(n2 + 1, 0);
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i =... | #include <iostream>
#include <limits.h>
#include <vector>
using namespace std;
void merge(vector<int> &A, int left, int mid, int right, int &c) {
int n1 = mid - left;
int n2 = right - mid;
vector<int> L(n1 + 1, 0);
vector<int> R(n2 + 1, 0);
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i =... | [
"io.output.change"
] | 116,443 | 116,444 | u594593404 | cpp |
p02272 | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | [
"assignment.change"
] | 116,448 | 116,449 | u198322268 | cpp |
p02272 | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 116,457 | 116,458 | u081251298 | cpp |
p02272 | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2... | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 116,459 | 116,458 | u081251298 | cpp |
p02272 | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a), i##_max = (b); i < i##_max; ++i)
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
using namespace std;
using vi = vector<int>;
using i64 = int64_t;
constexpr int INF = 1 << 25;
constexpr int M... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a), i##_max = (b); i < i##_max; ++i)
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
using namespace std;
using vi = vector<int>;
using i64 = int64_t;
constexpr int INF = 1 << 30;
constexpr int M... | [
"literal.number.change",
"expression.operation.binary.change"
] | 116,470 | 116,471 | u324077041 | cpp |
p02272 | #include <stdio.h>
#define MAX 500000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
R[i] = A[mid + i];
L[n1] = R[n2] = 200... | #include <stdio.h>
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
R[i] = A[mid... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 116,474 | 116,475 | u334460795 | cpp |
p02272 | #include <iostream>
#include <vector>
using namespace std;
#define INF 1.0e9
int cnt = 0;
void merge(vector<int> A, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
vector<int> L(n1 + 1, 0);
for (int i = 0; i < n1; ++i) {
L[i] = A[left + i];
}
vector<int> R(n2 + 1, 0);
for... | #include <iostream>
#include <vector>
using namespace std;
#define INF 1.0e9
int cnt = 0;
void merge(vector<int> &A, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
vector<int> L(n1 + 1, 0);
for (int i = 0; i < n1; ++i) {
L[i] = A[left + i];
}
vector<int> R(n2 + 1, 0);
fo... | [
"expression.operation.binary.remove"
] | 116,476 | 116,477 | u539796523 | cpp |
p02272 | #include <stdio.h>
int count = 0;
int temp[500000];
void MergeSort(int *, int, int);
int main(void) {
int i, n;
int A[1000000000];
scanf("%d", &n);
for (i = 0; i < n; i++)
scanf("%d", &A[i]);
MergeSort(A, 0, n - 1);
/*出力*/
for (i = 0; i < n - 1; i++)
printf("%d ", A[i]);
printf("%d\n", A... | #include <stdio.h>
int count = 0;
int temp[500000];
void MergeSort(int *, int, int);
int main(void) {
int i, n;
int A[1000000];
scanf("%d", &n);
for (i = 0; i < n; i++)
scanf("%d", &A[i]);
MergeSort(A, 0, n - 1);
/*出力*/
for (i = 0; i < n - 1; i++)
printf("%d ", A[i]);
printf("%d\n", A[n ... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 117,462 | 117,461 | u110930614 | cpp |
p02272 | #include <stdio.h>
#define LENGTH_N 500000
void merge(int *, int, int, int);
void mergeSort(int *, int, int);
int mergenum = 0;
int main() {
int i, nl, ql, arrayN[LENGTH_N], q;
scanf("%d", &nl);
for (i = 0; i < nl; i++) {
scanf("%d", &arrayN[i]);
}
mergeSort(arrayN, 0, nl);
for (i = 0; i < nl; i+... | #include <stdio.h>
#define LENGTH_N 500000
void merge(int *, int, int, int);
void mergeSort(int *, int, int);
int mergenum = 0;
int main() {
int i, nl, ql, arrayN[LENGTH_N], q;
scanf("%d", &nl);
for (i = 0; i < nl; i++) {
scanf("%d", &arrayN[i]);
}
mergeSort(arrayN, 0, nl);
for (i = 0; i < nl; i+... | [] | 117,464 | 117,465 | u170658813 | cpp |
p02272 | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits>;
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits>;
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <... | [
"literal.number.change",
"expression.operation.binary.change"
] | 117,475 | 117,476 | u041086527 | cpp |
p02272 | #include <iostream>
using namespace std;
void merge(int A[], int n, int left, int mid, int right, int &ans) {
int *tmp = new int[n];
for (int i = left; i < mid + 1; ++i) {
tmp[i] = A[i];
}
for (int j = mid + 1, i = right; i <= right; --j, ++i) {
tmp[i] = A[j];
}
int i = left;
int j = right;
... | #include <iostream>
using namespace std;
void merge(int A[], int n, int left, int mid, int right, int &ans) {
int *tmp = new int[n];
for (int i = left; i <= mid; ++i) {
tmp[i] = A[i];
}
for (int i = mid + 1, j = right; i <= right; --j, ++i) {
tmp[i] = A[j];
}
int i = left;
int j = right;
for... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"expression.operation.binary.remove",
"variable_declaration.name.change",
"identifier.change",
"control_flow.loop.for.initializer.change"
] | 117,658 | 117,659 | u580616456 | cpp |
p02272 | #include <cstdio>
#define MAX 1000000000
#define MN 5000001
long long M[MAX];
int c;
void merge(long long A[], long long left, long long mid, long long right) {
long long n1 = mid - left + 2;
long long n2 = right - mid + 1;
long long L[n1], R[n2];
for (long long i = 0; i < n1 - 1; i++)
L[i] = A[left + i];
... | #include <cstdio>
#define MAX 1000000000
#define MN 5000001
long long M[MN];
long long c;
void merge(long long A[], long long left, long long mid, long long right) {
long long n1 = mid - left + 2;
long long n2 = right - mid + 1;
long long L[n1], R[n2];
for (long long i = 0; i < n1 - 1; i++)
L[i] = A[left +... | [
"identifier.change",
"variable_declaration.array_dimensions.change",
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 117,672 | 117,673 | u890722286 | cpp |
p02272 | #include <cstdio>
#include <queue>
using namespace std;
int n, c, v, dp[500007];
int main() {
scanf("%d", &n);
dp[n] = 1;
for (int i = (n + 2) / 2; i > 1; i--)
dp[i] = dp[2 * i - 1] + 2 * dp[2 * i] + dp[2 * i + 1];
for (int i = 2; i <= n; i++)
c += dp[i] * i;
priority_queue<int> que;
for (int i = 0;... | #include <cstdio>
#include <queue>
using namespace std;
int n, c, v, dp[500007];
int main() {
scanf("%d", &n);
dp[n] = 1;
for (int i = (n + 2) / 2; i > 1; i--)
dp[i] = dp[2 * i - 1] + 2 * dp[2 * i] + dp[2 * i + 1];
for (int i = 2; i <= n; i++)
c += dp[i] * i;
priority_queue<int> que;
for (int i = 0;... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.remove",
"expression.operation.unary.add"
] | 117,682 | 117,683 | u823513038 | cpp |
p02272 | #include <iostream>
#define INF 1000000000
using namespace std;
int cnt = 0;
void merge(int a[], int left, int mid, int right);
void mergeSort(int a[], int left, int right);
int main() {
int i, n, a[500000];
cin >> n;
for (i = 0; i < n; i++)
cin >> a[i];
mergeSort(a, 0, n - 1);
for (i = 0; i < n; i++) {... | #include <iostream>
#define INF 1000000000
using namespace std;
int cnt = 0;
void merge(int a[], int left, int mid, int right);
void mergeSort(int a[], int left, int right);
int main() {
int i, n, a[500001];
cin >> n;
for (i = 0; i < n; i++)
cin >> a[i];
mergeSort(a, 0, n);
for (i = 0; i < n; i++) {
... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"expression.operation.binary.remove"
] | 117,687 | 117,688 | u389538742 | cpp |
p02272 | // -*- mode:c++; coding:utf-8; c-basic-offset:2; -*-
// ALDS1_5-B: Merge Sort
#include <climits>
#include <cstdio>
#include <cstring>
static void print_ints(const int as[], const unsigned int n,
const char *sep = " ") {
const char *out_sep = "";
for (auto i = 0u; i < n; ++i) {
std::prin... | // -*- mode:c++; coding:utf-8; c-basic-offset:2; -*-
// ALDS1_5-B: Merge Sort
#include <climits>
#include <cstdio>
#include <cstring>
static void print_ints(const int as[], const unsigned int n,
const char *sep = " ") {
const char *out_sep = "";
for (auto i = 0u; i < n; ++i) {
std::prin... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 117,698 | 117,699 | u020697156 | cpp |
p02272 | // -*- mode:c++; coding:utf-8; c-basic-offset:2; -*-
// ALDS1_5-B: Merge Sort
#include <climits>
#include <cstdio>
#include <cstring>
static void print_ints(const int as[], const unsigned int n,
const char *sep = " ") {
const char *out_sep = "";
for (auto i = 0u; i < n; ++i) {
std::prin... | // -*- mode:c++; coding:utf-8; c-basic-offset:2; -*-
// ALDS1_5-B: Merge Sort
#include <climits>
#include <cstdio>
#include <cstring>
static void print_ints(const int as[], const unsigned int n,
const char *sep = " ") {
const char *out_sep = "";
for (auto i = 0u; i < n; ++i) {
std::prin... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 117,700 | 117,699 | u020697156 | cpp |
p02272 | #include "iostream"
using namespace std;
int c;
void marge(int s[50000], int head, int mid, int tail) {
int x[50000];
int m = mid;
for (int i = head; i < tail; i++) {
x[i] = s[i];
}
for (int i = head; i < tail; i++) {
if (mid == tail) {
s[i] = x[head];
head++;
} else if (head == ... | #include "iostream"
using namespace std;
int c;
void marge(int s[500000], int head, int mid, int tail) {
int x[500000];
int m = mid;
for (int i = head; i < tail; i++) {
x[i] = s[i];
}
for (int i = head; i < tail; i++) {
if (mid == tail) {
s[i] = x[head];
head++;
} else if (head =... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 117,701 | 117,702 | u444120029 | cpp |
p02272 | #include <iostream>
#include <vector>
#define INF 2000000000
using namespace std;
int c = 0;
vector<int> merge(vector<int> A, vector<int> B) {
vector<int> res;
int i = 0, j = 0;
while (i < (int)A.size() || j < (int)B.size()) {
if (i < (int)A.size() && j < (int)B.size()) {
if (A[i] <= B[j])
res.p... | #include <iostream>
#include <vector>
#define INF 2000000000
using namespace std;
int c = 0;
vector<int> merge(vector<int> A, vector<int> B) {
vector<int> res;
int i = 0, j = 0;
while (i < (int)A.size() || j < (int)B.size()) {
if (i < (int)A.size() && j < (int)B.size()) {
if (A[i] <= B[j])
res.p... | [
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 117,717 | 117,718 | u751176970 | cpp |
p02272 | #include <iostream>
#include <vector>
#define INF 2000000000
using namespace std;
int c = 0;
vector<int> merge(vector<int> A, vector<int> B) {
vector<int> res;
int i = 0, j = 0;
while (i < (int)A.size() || j < (int)B.size()) {
if (i < (int)A.size() && j < (int)B.size()) {
if (A[i] <= B[j])
res.p... | #include <iostream>
#include <vector>
using namespace std;
int c = 0;
vector<int> merge(vector<int> A, vector<int> B) {
vector<int> res;
int i = 0, j = 0;
while (i < (int)A.size() || j < (int)B.size()) {
if (i < (int)A.size() && j < (int)B.size()) {
if (A[i] <= B[j])
res.push_back(A[i++]);
... | [
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 117,717 | 117,720 | u751176970 | cpp |
p02272 | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
const int INF = 1 << 31;
template <class RandomIt> size_t msort(RandomIt first, RandomIt last) {
if (first + 1 >= last)
return 0;
using T = typename RandomIt::value_type;
ptrdiff_t lhalf = (last - first) >> 1;
RandomIt mid = f... | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
const int INF = 1 << 30;
template <class RandomIt> size_t msort(RandomIt first, RandomIt last) {
if (first + 1 >= last)
return 0;
using T = typename RandomIt::value_type;
ptrdiff_t lhalf = (last - first) >> 1;
RandomIt mid = f... | [
"literal.number.change",
"expression.operation.binary.change"
] | 117,737 | 117,736 | u144532944 | cpp |
p02272 | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
const int INF = 1 << 30;
template <class RandomIt> size_t msort(RandomIt first, RandomIt last) {
if (first + 1 >= last)
return 0;
using T = typename RandomIt::value_type;
ptrdiff_t lhalf = (last - first) >> 1;
RandomIt mid = f... | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
const int INF = 1 << 30;
template <class RandomIt> size_t msort(RandomIt first, RandomIt last) {
if (first + 1 >= last)
return 0;
using T = typename RandomIt::value_type;
ptrdiff_t lhalf = (last - first) >> 1;
RandomIt mid = f... | [
"variable_declaration.value.change",
"identifier.change",
"control_flow.loop.for.initializer.change"
] | 117,738 | 117,739 | u144532944 | cpp |
p02272 |
#include <iostream>
#include <vector>
int __counter__ = 0;
namespace std {
void trace(vector<int> v) {
for (int i = 0; i < v.size(); ++i) {
if (i != v.size() - 1)
cout << v[i] << " ";
else
cout << v[i] << endl;
}
cout << endl;
}
void merge(vector<int> &v, vector<int> &L, vector<int> &R) ... |
#include <iostream>
#include <vector>
int __counter__ = 0;
namespace std {
void trace(vector<int> v) {
for (int i = 0; i < v.size(); ++i) {
if (i != v.size() - 1)
cout << v[i] << " ";
else
cout << v[i] << endl;
}
}
void merge(vector<int> &v, vector<int> &L, vector<int> &R) {
vector<int>:... | [] | 117,780 | 117,781 | u422898789 | cpp |
p02272 | #include <algorithm>
#include <iostream>
#include <stack>
#include <stdio.h>
#include <string>
using namespace std;
int merges(int start, int end) {
int middle;
if (start + 1 < end) {
middle = (start + end) / 2;
return (merges(start, middle) + merges(middle, end) - start + end);
} else {
return 0;
... | #include <algorithm>
#include <iostream>
#include <stack>
#include <stdio.h>
#include <string>
using namespace std;
int merges(int start, int end) {
int middle;
if (start + 1 < end) {
middle = (start + end) / 2;
return (merges(start, middle) + merges(middle, end) - start + end);
} else {
return 0;
... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 117,784 | 117,783 | u220303428 | cpp |
p02272 | #include <iostream>
using namespace std;
class Merge {
public:
Merge() : count(0) {}
void mergeSort(int A[], int left, int right) {
if (left + 1 >= right) {
return;
}
int mid = (left + right) / 2;
mergeSort(A, left, mid);
mergeSort(A, mid, right);
merge(A, left, mid, right);
}
i... | #include <iostream>
using namespace std;
class Merge {
public:
Merge() : count(0) {}
void mergeSort(int A[], int left, int right) {
if (left + 1 >= right) {
return;
}
int mid = (left + right) / 2;
mergeSort(A, left, mid);
mergeSort(A, mid, right);
merge(A, left, mid, right);
}
i... | [
"literal.number.change",
"assignment.value.change"
] | 117,787 | 117,786 | u253923767 | cpp |
p02272 | #include <iostream>
using namespace std;
class Merge {
public:
Merge() : count(0) {}
void mergeSort(int A[], int left, int right) {
if (left + 1 >= right) {
return;
}
int mid = (left + right) / 2;
mergeSort(A, left, mid);
mergeSort(A, mid, right);
merge(A, left, mid, right);
}
i... | #include <iostream>
using namespace std;
class Merge {
public:
Merge() : count(0) {}
void mergeSort(int A[], int left, int right) {
if (left + 1 >= right) {
return;
}
int mid = (left + right) / 2;
mergeSort(A, left, mid);
mergeSort(A, mid, right);
merge(A, left, mid, right);
}
i... | [
"literal.number.change",
"assignment.value.change"
] | 117,787 | 117,790 | u253923767 | cpp |
p02272 | #include <iostream>
using namespace std;
class Merge {
public:
Merge() : count(0) {}
void mergeSort(int A[], int left, int right) {
if (left + 1 >= right) {
return;
}
int mid = (left + right) / 2;
mergeSort(A, left, mid);
mergeSort(A, mid, right);
merge(A, left, mid, right);
}
i... | #include <iostream>
using namespace std;
class Merge {
public:
Merge() : count(0) {}
void mergeSort(int A[], int left, int right) {
if (left + 1 >= right) {
return;
}
int mid = (left + right) / 2;
mergeSort(A, left, mid);
mergeSort(A, mid, right);
merge(A, left, mid, right);
}
i... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"assignment.value.change"
] | 117,787 | 117,792 | u253923767 | cpp |
p02272 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 500000;
int cnt;
int A[MAXN], L[MAXN / 2 + 5], R[MAXN / 2 + 5];
void merge(int left, int mid, int right) {
int n1 = mid - left, n2 = rig... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 500000;
int cnt;
int A[MAXN], L[MAXN / 2 + 5], R[MAXN / 2 + 5];
void merge(int left, int mid, int right) {
int n1 = mid - left, n2 = rig... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 117,808 | 117,809 | u324907960 | cpp |
p02272 | // ?????¬???????????¬??????
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <ma... | // ?????¬???????????¬??????
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <ma... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 117,814 | 117,815 | u155634813 | cpp |
p02272 | #include <climits>
#include <iostream>
#define INF INT_MAX;
void merge(int *, int, int, int);
void mergeSort(int *, int, int);
int cnt = 0;
int main() {
int n;
std::cin >> n;
int A[n];
for (int i = 0; i < n; i++)
std::cin >> A[i];
mergeSort(A, 0, n);
for (int i = 0; i < n; i++)
std::cout << A[i] << ... | #include <climits>
#include <iostream>
#define INF INT_MAX;
void merge(int *, int, int, int);
void mergeSort(int *, int, int);
int cnt = 0;
int main() {
int n;
std::cin >> n;
int A[n];
for (int i = 0; i < n; i++)
std::cin >> A[i];
mergeSort(A, 0, n);
for (int i = 0; i < n; i++)
std::cout << A[i] << ... | [
"control_flow.branch.if.add",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 117,816 | 117,817 | u752082358 | cpp |
p02272 | #include <climits>
#include <iostream>
#define INF INT_MAX;
void merge(int *, int, int, int);
void mergeSort(int *, int, int);
int cnt = 0;
int main() {
int n;
std::cin >> n;
int A[n];
for (int i = 0; i < n; i++)
std::cin >> A[i];
mergeSort(A, 0, n);
for (int i = 0; i < n; i++)
std::cout << A[i] << ... | #include <climits>
#include <iostream>
#define INF INT_MAX;
void merge(int *, int, int, int);
void mergeSort(int *, int, int);
int cnt = 0;
int main() {
int n;
std::cin >> n;
int A[n];
for (int i = 0; i < n; i++)
std::cin >> A[i];
mergeSort(A, 0, n);
for (int i = 0; i < n; i++)
std::cout << A[i] << ... | [
"control_flow.branch.if.add",
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 117,816 | 117,818 | u752082358 | cpp |
p02272 | #include <iostream>
using namespace std;
#define MAX 1997328
#define Sentinel 19970328
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++) {
L[i] = A[left + i];
}
for (int i = 0; i... | #include <iostream>
using namespace std;
#define MAX 500000
#define Sentinel 1997032800
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; i++) {
L[i] = A[left + i];
}
for (int i = 0; ... | [
"preprocessor.define.value.change",
"literal.integer.change",
"variable_declaration.value.change"
] | 117,829 | 117,830 | u454221508 | cpp |
p02272 | #include <iostream>
#include <limits>
#define INFTY 1000000000
using namespace std;
int n;
int cnt = 0;
void printArray(int *A) {
for (int i = 0; i < n; i++) {
cout << A[i];
if (i < n - 1)
cout << " ";
}
cout << endl;
}
void merge(int *A, int left, int mid, int right) {
int n1 = mid - left;
... | #include <iostream>
#include <limits>
#define INFTY 1000000000
using namespace std;
int n;
int cnt = 0;
void printArray(int *A) {
for (int i = 0; i < n; i++) {
cout << A[i];
if (i < n - 1)
cout << " ";
}
cout << endl;
}
void merge(int *A, int left, int mid, int right) {
int n1 = mid - left;
... | [
"call.remove"
] | 117,841 | 117,842 | u202956334 | cpp |
p02272 | /*
* ALDS1_5_B.cpp
*
* Created on: Apr 27, 2018
* Author: 13743
*/
#include <cstdio>
using namespace std;
int cnt = 0;
void merge(int *A, int l, int mid, int r) {
int n1 = mid - l;
int n2 = r - mid;
int L[n1 + 1];
int R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = A[l + i];
}
for (int... | /*
* ALDS1_5_B.cpp
*
* Created on: Apr 27, 2018
* Author: 13743
*/
#include <cstdio>
using namespace std;
int cnt = 0;
void merge(int *A, int l, int mid, int r) {
int n1 = mid - l;
int n2 = r - mid;
int L[n1 + 1];
int R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = A[l + i];
}
for (int... | [
"control_flow.loop.for.condition.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 117,913 | 117,914 | u115352705 | cpp |
p02272 | /*
* ALDS1_5_B.cpp
*
* Created on: Apr 27, 2018
* Author: 13743
*/
#include <cstdio>
using namespace std;
int cnt = 0;
void merge(int *A, int l, int mid, int r) {
int n1 = mid - l;
int n2 = r - mid;
int L[n1 + 1];
int R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = A[l + i];
}
for (int... | /*
* ALDS1_5_B.cpp
*
* Created on: Apr 27, 2018
* Author: 13743
*/
#include <cstdio>
using namespace std;
int cnt = 0;
void merge(int *A, int l, int mid, int r) {
int n1 = mid - l;
int n2 = r - mid;
int L[n1 + 1];
int R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = A[l + i];
}
for (int... | [
"control_flow.loop.for.condition.change",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 117,915 | 117,914 | u115352705 | cpp |
p02272 | #include <iostream>
using namespace std;
#define INF 2 << 32;
int S[500000];
int merge(int left, int mid, int right) {
int count = 0;
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = S[left + i];
}
for (int i = 0; i < n2; i++) {
R[i] = S[mi... | #include <iostream>
using namespace std;
#define INF 2 << 29;
int S[500000];
int merge(int left, int mid, int right) {
int count = 0;
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = S[left + i];
}
for (int i = 0; i < n2; i++) {
R[i] = S[mi... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 117,928 | 117,924 | u105296105 | cpp |
p02272 | #include <iostream>
using namespace std;
#define INF 2 << 30;
int S[500000];
int merge(int left, int mid, int right) {
int count = 0;
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = S[left + i];
}
for (int i = 0; i < n2; i++) {
R[i] = S[mi... | #include <iostream>
using namespace std;
#define INF 2 << 29;
int S[500000];
int merge(int left, int mid, int right) {
int count = 0;
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = S[left + i];
}
for (int i = 0; i < n2; i++) {
R[i] = S[mi... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 117,934 | 117,924 | u105296105 | cpp |
p02272 | #include <cmath>
#include <iostream>
using namespace std;
int count = 0;
void merge(int *A, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1];
int R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = A[left + i];
}
for (int i = 0; i < n2; i++) {
R[i] = A[mid + i... | #include <cmath>
#include <iostream>
using namespace std;
int count = 0;
void merge(int *A, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1];
int R[n2 + 1];
for (int i = 0; i < n1; i++) {
L[i] = A[left + i];
}
for (int i = 0; i < n2; i++) {
R[i] = A[mid + i... | [] | 117,935 | 117,936 | u790645814 | cpp |
p02272 | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int left, int right, int mid) {
for (int i = 0; i < mid - left; i++)
L[i] = A[left + i];
for (int i = 0; i < right - mid; i++)
R[i] = A[mid + i];
L[mid ... | #include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int left, int right, int mid) {
for (int i = 0; i < mid - left; i++)
L[i] = A[left + i];
for (int i = 0; i < right - mid; i++)
R[i] = A[mid + i];
L[mid ... | [
"expression.unary.arithmetic.add"
] | 117,944 | 117,945 | u583707373 | cpp |
p02272 | #include <iostream>
using namespace std;
#define INFTY 100000000
int c;
int merge(int A[], int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1], R[n2];
for (int i = 0; i <= n1; i++) {
L[i] = A[left + i];
}
for (int i = 0; i <= n2; i++) {
R[i] = A[mid + i];
}
L[... | #include <iostream>
using namespace std;
#define INFTY 100000000000
int c;
int merge(int A[], int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1], R[n2];
for (int i = 0; i <= n1; i++) {
L[i] = A[left + i];
}
for (int i = 0; i <= n2; i++) {
R[i] = A[mid + i];
}
... | [
"preprocessor.define.value.change",
"literal.integer.change",
"io.output.change"
] | 117,951 | 117,952 | u526996304 | cpp |
p02272 | //
// test.cpp
// AtCoder
//
// Created by A on 2018/06/01.
// Copyright © 2018年 A. All rights reserved.
//
#include <iostream>
using namespace std;
#define MAX 5000000
#define SENTINEL 200000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mi... | //
// test.cpp
// AtCoder
//
// Created by A on 2018/06/01.
// Copyright © 2018年 A. All rights reserved.
//
#include <iostream>
using namespace std;
#define MAX 500000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
int cnt;
void merge(int A[], int n, int left, int mid, int right) {
int n1 = mi... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 117,964 | 117,963 | u004129073 | cpp |
p02272 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, n) for (int i = a; i < (n); i++)
#define mod (ll)(1e9 + 7)
#define int ll
#define MAX 500000
#define SENTINEL 2000000000
__attribute__((c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define pb push_back
#define rep(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, a, n) for (int i = a; i < (n); i++)
#define mod (ll)(1e9 + 7)
#define int ll
#define MAX 500000
#define SENTINEL 2000000000
__attribute__((c... | [
"identifier.change",
"expression.operation.binary.change"
] | 117,965 | 117,966 | u618359110 | cpp |
p02272 | #include <stdio.h>
#define INF 1 << 30
int count;
void merge(int *A, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
R[i] = A[mid + i];
L[n1] = INF;
R[n2] = INF;
... | #include <stdio.h>
#define INF 1 << 30
int count;
void merge(int *A, int left, int mid, int right) {
int n1 = mid - left;
int n2 = right - mid;
int L[n1 + 1], R[n2 + 1];
for (int i = 0; i < n1; i++)
L[i] = A[left + i];
for (int i = 0; i < n2; i++)
R[i] = A[mid + i];
L[n1] = INF;
R[n2] = INF;
... | [
"call.arguments.add"
] | 117,967 | 117,968 | u815527706 | cpp |
p02273 | #include "bits/stdc++.h"
using namespace std;
using LL = long long;
using ULL = unsigned long long;
const double PI = acos(-1);
template <class T> constexpr T INF() { return ::std::numeric_limits<T>::max(); }
template <class T> constexpr T HINF() { return INF<T>() / 2; }
template <typename T_char> T_char TL(T_char cX) ... | #include "bits/stdc++.h"
using namespace std;
using LL = long long;
using ULL = unsigned long long;
const double PI = acos(-1);
template <class T> constexpr T INF() { return ::std::numeric_limits<T>::max(); }
template <class T> constexpr T HINF() { return INF<T>() / 2; }
template <typename T_char> T_char TL(T_char cX) ... | [
"assignment.value.change",
"identifier.change",
"call.function.change",
"expression.operation.binary.change"
] | 118,020 | 118,021 | u018085514 | cpp |
p02273 | #include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <utility>
using namespace std;
class vec2d {
public:
double x, y;
vec2d(double _x, double _y) {
x = _x;
y = _y;
}
vec2d() {
x = 0;
y = 0;
}
vec2d transform(double rotate, double magnify) {
vec2d ret;
r... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <utility>
using namespace std;
class vec2d {
public:
double x, y;
vec2d(double _x, double _y) {
x = _x;
y = _y;
}
vec2d() {
x = 0;
y = 0;
}
vec2d transform(double rotate, double magnify) {
vec2d ret;
r... | [] | 118,024 | 118,025 | u256235568 | cpp |
p02273 | //
// main.cpp
// ALDS1_5_C
//
// Created by ptyuan on 2018/10/27.
// Copyright © 2018 Sy. All rights reserved.
//
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (0 == n) {
return;
}
Point s... | //
// main.cpp
// ALDS1_5_C
//
// Created by ptyuan on 2018/10/27.
// Copyright © 2018 Sy. All rights reserved.
//
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (0 == n) {
return;
}
Point s... | [
"expression.operator.arithmetic.change",
"expression.operation.binary.change",
"misc.opposites",
"assignment.value.change"
] | 118,026 | 118,027 | u201233769 | cpp |
p02273 | //
// main.cpp
// ALDS1_5_C
//
// Created by ptyuan on 2018/10/27.
// Copyright © 2018 Sy. All rights reserved.
//
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (0 == n) {
return;
}
Point s... | //
// main.cpp
// ALDS1_5_C
//
// Created by ptyuan on 2018/10/27.
// Copyright © 2018 Sy. All rights reserved.
//
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (0 == n) {
return;
}
Point s... | [
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 118,028 | 118,027 | u201233769 | cpp |
p02273 | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef struct {
double x;
double y;
} xy;
void kock(int, xy, xy);
int main() {
xy p1 = {0.00, 0.00}, p2 = {100.000, 0.00};
int n;
cin >> n;
cout << p1.x << " " << p1.y << endl;
kock(n, p1, p2);
cout << p2.x << " " << p2.y << endl;
re... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef struct {
double x;
double y;
} xy;
void kock(int, xy, xy);
int main() {
xy p1 = {0.00, 0.00}, p2 = {100.000, 0.00};
int n;
cin >> n;
cout << p1.x << " " << p1.y << endl;
kock(n, p1, p2);
cout << p2.x << " " << p2.y << endl;
re... | [
"io.output.change"
] | 118,031 | 118,032 | u743001313 | cpp |
p02273 | #include <math.h>
#include <stdio.h>
struct Point2 {
double x, y;
Point2() {
x = 0;
y = 0;
}
Point2(double x_, double y_) {
x = x_;
y = y_;
}
Point2 operator+(const Point2 &rhs) const {
return Point2(x + rhs.x, y + rhs.y);
}
Point2 operator-(const Point2 &rhs) const {
return... | #include <math.h>
#include <stdio.h>
struct Point2 {
double x, y;
Point2() {
x = 0;
y = 0;
}
Point2(double x_, double y_) {
x = x_;
y = y_;
}
Point2 operator+(const Point2 &rhs) const {
return Point2(x + rhs.x, y + rhs.y);
}
Point2 operator-(const Point2 &rhs) const {
return... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 118,033 | 118,034 | u403370719 | cpp |
p02273 | #include <iostream>
#include <math.h>
using namespace std;
int n;
struct Point {
double x, y;
};
void KorchCurve(int d, Point p1, Point p2) {
if (d == 0)
return;
// 与えられたp1, p2から三等分する
Point s, u, t;
double theta = M_PI * 60.0 / 180.0;
s.x = (p1.x * 2 + p2.x) / 3;
s.y = (p1.y * 2 + p2.y) / 3;
t.x ... | #include <iostream>
#include <math.h>
using namespace std;
int n;
struct Point {
double x, y;
};
void KorchCurve(int d, Point p1, Point p2) {
if (d == 0)
return;
// 与えられたp1, p2から三等分する
Point s, u, t;
double theta = M_PI * 60.0 / 180.0;
s.x = (p1.x * 2 + p2.x) / 3;
s.y = (p1.y * 2 + p2.y) / 3;
t.x ... | [
"assignment.value.change",
"expression.operation.binary.change"
] | 118,035 | 118,036 | u888548672 | cpp |
p02273 | #include <iostream>
#include <math.h>
#include <stdio.h>
struct point {
double x, y;
};
void koch(int d, point p1, point p2) {
if (d == 0) {
return;
}
point s, t, u;
double rad = M_PI * 60.0 / 180.0;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p1.y + 1 * p2.y) / 3;
t.x = (1 * p1.x + 2 * p2.x) / 3... | #include <iostream>
#include <math.h>
#include <stdio.h>
struct point {
double x, y;
};
void koch(int d, point p1, point p2) {
if (d == 0) {
return;
}
point s, t, u;
double rad = M_PI * 60.0 / 180.0;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p1.y + 1 * p2.y) / 3;
t.x = (1 * p1.x + 2 * p2.x) / 3... | [
"assignment.value.change",
"expression.operation.binary.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 118,037 | 118,038 | u888548672 | cpp |
p02273 | #include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int n;
long double pi = 3.141592653;
struct Node {
long double x;
long double y;
};
void koch(int d, Node p1, Node p2) {
if (d == 0)
return;
Node s, t, u;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p1.... | #include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int n;
long double pi = 3.141592653;
struct Node {
long double x;
long double y;
};
void koch(int d, Node p1, Node p2) {
if (d == 0)
return;
Node s, t, u;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p1.... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.number.change",
"io.output.change"
] | 118,039 | 118,040 | u678006013 | cpp |
p02273 | #include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int n;
long double pi = 3.141592653;
struct Node {
long double x;
long double y;
};
void koch(int d, Node p1, Node p2) {
if (d == 0)
return;
Node s, t, u;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p1.... | #include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int n;
long double pi = 3.141592653;
struct Node {
long double x;
long double y;
};
void koch(int d, Node p1, Node p2) {
if (d == 0)
return;
Node s, t, u;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p1.... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,041 | 118,040 | u678006013 | cpp |
p02273 | #include <cmath>
#include <cstdio>
using namespace std;
#define rep(i, N) for (ll i = 0; i < N; ++i)
typedef long long int ll;
struct Point {
double x, y;
};
void print(Point p) { printf("%.8f %.8f\n", p.x, p.y); }
void koch(int n, Point p1, Point p2) {
if (n == 0)
return;
double th = M_PI * 60.0 / 180.0... | #include <cmath>
#include <cstdio>
using namespace std;
#define rep(i, N) for (ll i = 0; i < N; ++i)
typedef long long int ll;
struct Point {
double x, y;
};
void print(Point p) { printf("%.8f %.8f\n", p.x, p.y); }
void koch(int n, Point p1, Point p2) {
if (n == 0)
return;
double th = M_PI * 60.0 / 180.0... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,044 | 118,045 | u423206630 | cpp |
p02273 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
const double PI = acos(-1);
void koch(int n, pair<double, double> p1, pair<double, double> p2) {
if (n == 0)
return;
pair<double, double> s, t, u;
double th = PI * 60 / 180;
s.first = (2.0 * p1.first + 1.0 * p2.first) / 3.0;
s... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
const double PI = acos(-1);
void koch(int n, pair<double, double> p1, pair<double, double> p2) {
if (n == 0)
return;
pair<double, double> s, t, u;
double th = PI * 60 / 180;
s.first = (2.0 * p1.first + 1.0 * p2.first) / 3.0;
s... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,046 | 118,047 | u539796523 | cpp |
p02273 | #include <algorithm>
#include <complex>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); i++)
typedef vector<int> VI;
typedef double D; // 座標値の型。doubleかlong doubleを想定
typedef complex<D> P; // Point
#define X real()
#define... | #include <algorithm>
#include <complex>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); i++)
typedef vector<int> VI;
typedef double D; // 座標値の型。doubleかlong doubleを想定
typedef complex<D> P; // Point
#define X real()
#define... | [
"assignment.change"
] | 118,049 | 118,050 | u984794799 | cpp |
p02273 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x ... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x ... | [
"assignment.value.change",
"expression.operation.binary.change",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 118,051 | 118,052 | u244742296 | cpp |
p02273 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x ... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct Point {
double x;
double y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x ... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,053 | 118,052 | u244742296 | cpp |
p02273 | #define _CRT_SECURE_NO_WARNINGS
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
struct Point {
double x;
double y;
};
vector<Point> Points[2];
int zeroOne;
int oneZero;
int n;
void getPoints(Point *p1, Point *p2, Point *s, Point *u, Point *t) {
s->x = (2.0 * p1->x + p2->x) / 3.0;
... | #define _CRT_SECURE_NO_WARNINGS
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
struct Point {
double x;
double y;
};
vector<Point> Points[2];
int zeroOne;
int oneZero;
int n;
void getPoints(Point *p1, Point *p2, Point *s, Point *u, Point *t) {
s->x = (2.0 * p1->x + p2->x) / 3.0;
... | [] | 118,059 | 118,060 | u554150588 | cpp |
p02273 | #include <algorithm>
#include <bitset>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <cmath>
#include <cstdint>
#include <cstdio>
using namespace std;
constexpr double pi = 3.14... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <cmath>
#include <cstdint>
#include <cstdio>
using namespace std;
constexpr double pi = 3.14... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 118,061 | 118,062 | u533650779 | cpp |
p02273 | #include <iostream>
#include <math.h>
#include <stdio.h>
double PI = M_PI * 60 / 180;
using namespace std;
void solve(int deep, pair<double, double> begin, pair<double, double> end) {
if (deep == 0) {
return;
}
pair<double, double> s = make_pair((2 * begin.first + end.first) / 3,
... | #include <iostream>
#include <math.h>
#include <stdio.h>
double PI = M_PI * 60 / 180;
using namespace std;
void solve(int deep, pair<double, double> begin, pair<double, double> end) {
if (deep == 0) {
return;
}
pair<double, double> s = make_pair((2 * begin.first + end.first) / 3,
... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 118,063 | 118,064 | u651428295 | cpp |
p02273 | #include <math.h>
#include <stdio.h>
#include <utility>
using namespace std;
typedef pair<double, double> Point;
int n;
const double cos60 = cos(M_PI / 3.0);
const double sin60 = sin(M_PI / 3.0);
void solve(int i, Point p0, Point p1);
int main() {
Point p0, p1;
p0.first = 0.0;
p0.second = 0.0;
p1.first = 1... | #include <math.h>
#include <stdio.h>
#include <utility>
using namespace std;
typedef pair<double, double> Point;
int n;
const double cos60 = cos(M_PI / 3.0);
const double sin60 = sin(M_PI / 3.0);
void solve(int i, Point p0, Point p1);
int main() {
Point p0, p1;
p0.first = 0.0;
p0.second = 0.0;
p1.first = 1... | [
"assignment.value.change",
"expression.operation.binary.change",
"identifier.change"
] | 118,065 | 118,066 | u700272293 | cpp |
p02273 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
typedef pair<float, float> point;
const float rad = (M_PI * 60) / 180.0;
int n;
void koch(int d, point p1, point p2) {
if (!d)
return;
float sx = (2 * p1.first + 1 * p2.first) / 3;
float sy = (2 * p1.second + 1 * p2.second) / 3;
... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
typedef pair<float, float> point;
const float rad = (M_PI * 60) / 180.0;
int n;
void koch(int d, point p1, point p2) {
if (!d)
return;
float sx = (2 * p1.first + 1 * p2.first) / 3;
float sy = (2 * p1.second + 1 * p2.second) / 3;
... | [
"literal.number.change",
"io.output.change"
] | 118,067 | 118,068 | u537319043 | cpp |
p02273 | #include <iostream>
#include <math.h>
using namespace std;
struct Point {
double x;
double y;
};
int Kcurve(int n, Point p1, Point p2) {
if (n == 0) {
return 0;
}
Point a, b, c;
a.x = (2.0 / 3.0) * p1.x + (1.0 / 3.0) * p2.x;
a.y = (2.0 / 3.0) * p1.y + (1.0 / 3.0) * p2.y;
b.x = p1.x + (1.0 / 2.0) *... | #include <iostream>
#include <math.h>
using namespace std;
struct Point {
double x;
double y;
};
int Kcurve(int n, Point p1, Point p2) {
if (n == 0) {
return 0;
}
Point a, b, c;
a.x = (2.0 / 3.0) * p1.x + (1.0 / 3.0) * p2.x;
a.y = (2.0 / 3.0) * p1.y + (1.0 / 3.0) * p2.y;
b.x = p1.x + (1.0 / 2.0) *... | [
"literal.number.change",
"io.output.change"
] | 118,069 | 118,070 | u176732165 | cpp |
p02273 | //
// Created by ?????°?????? on 2016/03/19.
//
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
struct point {
double x, y;
};
void koch(int n, point a, point b) {
if (n == 0)
return;
point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s... | //
// Created by ?????°?????? on 2016/03/19.
//
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
struct point {
double x, y;
};
void koch(int n, point a, point b) {
if (n == 0)
return;
point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,071 | 118,072 | u210148484 | cpp |
p02273 | #include <bits/stdc++.h>
using namespace std;
void koch(double, double, double, double, int cnt);
int n;
int main() {
cin >> n;
printf("%.8f %.8f\n", 0, 0);
koch(0, 0, 100, 0, 0);
printf("%.8f %.8f\n", 100, 0);
return 0;
}
void koch(double x1, double y1, double x2, double y2, int cnt) {
if (cnt == n) {
... | #include <bits/stdc++.h>
using namespace std;
void koch(double, double, double, double, int cnt);
int n;
int main() {
cin >> n;
printf("%.8f %.8f\n", 0, 0);
koch(0, 0, 100, 0, 0);
printf("%.8f %.8f\n", 100.0, 0);
return 0;
}
void koch(double x1, double y1, double x2, double y2, int cnt) {
if (cnt == n) ... | [
"literal.number.change",
"call.arguments.change",
"io.output.change"
] | 118,074 | 118,075 | u567521458 | cpp |
p02273 | #include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
struct Point {
double x, y;
};
inline void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x =... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
struct Point {
double x, y;
};
inline void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b... | [
"import.add",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 118,076 | 118,077 | u228579910 | cpp |
p02273 | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
struct Point {
double x, y;
};
inline void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b... | #include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
struct Point {
double x, y;
};
inline void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 118,078 | 118,077 | u228579910 | cpp |
p02273 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
struct Point {
double x;
double y;
};
typedef std::list<Point> List;
Point GetU(const Point &s, const Point &t) {
const double thete = 60. / 180. * M_PI;
Point st = {t.x - s.x, t.y - s.y};
Point su = {st.x * std::cos(thete) - st.y * st... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
struct Point {
double x;
double y;
};
typedef std::list<Point> List;
Point GetU(const Point &s, const Point &t) {
const double thete = 60. / 180. * M_PI;
Point st = {t.x - s.x, t.y - s.y};
Point su = {st.x * std::cos(thete) - st.y * st... | [
"identifier.change",
"expression.operation.binary.change"
] | 118,079 | 118,080 | u858711833 | cpp |
p02273 | #include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <math.h>
#include <stdio.h>
using namespace std;
void Koch_Curve(int d, double x1, double y1, double x2, double y2) {
if (d == 0)
return;
double sx = (2 * x1 + x2) / 3, sy = (2 * y1 + y2) / 3, tx = (x1 + 2 * x2) / 3,
ty =... | #include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <math.h>
#include <stdio.h>
using namespace std;
void Koch_Curve(int d, double x1, double y1, double x2, double y2) {
if (d == 0)
return;
double sx = (2 * x1 + x2) / 3, sy = (2 * y1 + y2) / 3, tx = (x1 + 2 * x2) / 3,
ty =... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 118,081 | 118,082 | u215278532 | cpp |
p02273 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define PUSH(n, v) ... | [
"identifier.change",
"call.arguments.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 118,085 | 118,084 | u956279155 | cpp |
p02273 | #include <cmath>
#include <cstdio>
#define PI acos(-1)
#define scanf_s scanf
struct Point {
double x, y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double rad = PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (1.0 * a.x... | #include <cmath>
#include <cstdio>
#define PI acos(-1)
#define scanf_s scanf
struct Point {
double x, y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
return;
Point s, t, u;
double rad = PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (1.0 * a.x... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,086 | 118,087 | u927516039 | cpp |
p02273 | #include <algorithm>
#include <cstdio>
#include <utility>
#include <vector>
using namespace std;
const double cos60 = 0.500000000000000;
const double sin60 = 0.866025403784439;
void koch_snowflake(size_t n, pair<double, double> p1,
pair<double, double> p2) {
if (!n)
return;
pair<double, ... | #include <algorithm>
#include <cstdio>
#include <utility>
#include <vector>
using namespace std;
const double cos60 = 0.500000000000000;
const double sin60 = 0.866025403784439;
void koch_snowflake(size_t n, pair<double, double> p1,
pair<double, double> p2) {
if (!n)
return;
pair<double, ... | [
"literal.number.change",
"call.arguments.change",
"io.output.change"
] | 118,090 | 118,091 | u144532944 | cpp |
p02273 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#define rep(i, o, u) for (int i = o; i <= u; i++)
typedef unsigned long long ll;
using namespace std;
struct point {
double x;
double y;
};
void solve(int n, point a, point b) {
if (n == 0)
retu... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#define rep(i, o, u) for (int i = o; i <= u; i++)
typedef unsigned long long ll;
using namespace std;
struct point {
double x;
double y;
};
void solve(int n, point a, point b) {
if (n == 0)
retu... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,092 | 118,093 | u749524100 | cpp |
p02273 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
typedef struct point {
double x, y;
} P;
void show(P p) {
cout << fixed << setprecision(5);
cout << p.x << ' ' << p.y << endl;
}
void work(P p1, P p2, int n) {
if (n == 0)
return;
P p3, p4, p5;
double dx, dy, a, b;
p3.x = 2 /... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
typedef struct point {
double x, y;
} P;
void show(P p) {
cout << fixed << setprecision(5);
cout << p.x << ' ' << p.y << endl;
}
void work(P p1, P p2, int n) {
if (n == 0)
return;
P p3, p4, p5;
double dx, dy, a, b;
p3.x = 2. ... | [] | 118,094 | 118,095 | u212005411 | cpp |
p02273 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
typedef pair<double, double> P;
int n;
void Koch(P p1, P p2, int n1) {
P s, t, u;
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
typedef pair<double, double> P;
int n;
void Koch(P p1, P p2, int n1) {
P s, t, u;
... | [
"literal.string.change",
"io.output.change"
] | 118,096 | 118,097 | u350754611 | cpp |
p02273 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
typedef pair<double, double> P;
int n;
void Koch(P p1, P p2, int n1) {
P s, t, u;
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
using namespace std;
typedef pair<double, double> P;
int n;
void Koch(P p1, P p2, int n1) {
P s, t, u;
... | [
"literal.string.change",
"io.output.change"
] | 118,098 | 118,097 | u350754611 | cpp |
p02273 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
struct zahyou {
double x, y;
};
void print_zahyou(zahyou z) { printf("%.5lf %.5lf\n", z.x, z.y); }
void koch(int d, zahyou p1, zahyou p2) {
zahyou s, u, t;
if (d == 0)
return;
s.x = (2 * p1.x + 1 * p2.x) / ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <stdio.h>
using namespace std;
struct zahyou {
double x, y;
};
void print_zahyou(zahyou z) { printf("%.8lf %.8lf\n", z.x, z.y); }
void koch(int d, zahyou p1, zahyou p2) {
zahyou s, u, t;
if (d == 0)
return;
s.x = (2 * p1.x + 1 * p2.x) / ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,121 | 118,122 | u690299834 | cpp |
p02273 | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,123 | 118,124 | u682097651 | cpp |
p02273 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct point {
double x, y;
};
void koch(int n, point a, point b) {
if (n == 0)
return;
point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (1.0 * a.... | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
struct point {
double x, y;
};
void koch(int n, point a, point b) {
if (n == 0)
return;
point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (1.0 * a.... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,125 | 118,126 | u702548238 | cpp |
p02273 | #define _USE_MATH_DEFINES
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
typedef std::complex<double> Comp_d;
// using Comp_d = std::complex<double>;
void KochCurve(int n, Comp_d p1, Comp_d p2) {
if (n == 0) {
return;
}
Comp_d s = p1 + (p2 - p1) / 3.;
Comp_d t = p1 + 2. * (p2 - p... | #define _USE_MATH_DEFINES
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
typedef std::complex<double> Comp_d;
// using Comp_d = std::complex<double>;
void KochCurve(int n, Comp_d p1, Comp_d p2) {
if (n == 0) {
return;
}
Comp_d s = p1 + (p2 - p1) / 3.;
Comp_d t = p1 + 2. * (p2 - p... | [
"literal.string.change",
"expression.operation.binary.change"
] | 118,127 | 118,128 | u933569644 | cpp |
p02273 | #include <cassert>
#include <cmath>
#include <iostream>
using namespace std;
void spr(double, double, double, double, int);
int main() {
double x1 = 0.0, y1 = 0.0, x2 = 100.0, y2 = 0.0;
int d;
cin >> d;
spr(x1, y1, x2, y2, d);
cout << fixed << x2 << ' ' << y2 << endl;
return 0;
}
void spr(double x1, do... | #include <cassert>
#include <cmath>
#include <iostream>
using namespace std;
void spr(double, double, double, double, int);
int main() {
double x1 = 0.0, y1 = 0.0, x2 = 100.0, y2 = 0.0;
int d;
cin >> d;
spr(x1, y1, x2, y2, d);
cout << fixed << x2 << ' ' << y2 << endl;
return 0;
}
void spr(double x1, do... | [
"assignment.change"
] | 118,134 | 118,135 | u231716965 | cpp |
p02273 | #include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
struct point {
double x, y;
};
void koch(int n, point a, point b) {
if (n == 0)
return;
point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + b.x) / 3.0;
s.y = (2.0 * a.y + b.y) / 3.0;
t.x = (a.x + 2.0 * b.x)... | #include <cstdio>
#include <iostream>
#include <math.h>
using namespace std;
struct point {
double x, y;
};
void koch(int n, point a, point b) {
if (n == 0)
return;
point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + b.x) / 3.0;
s.y = (2.0 * a.y + b.y) / 3.0;
t.x = (a.x + 2.0 * b.x)... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,138 | 118,139 | u861486645 | cpp |
p02273 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
const int INF = 0x3f3f3f3f;
struct Point {
double x, y;
};
void koch(int d, Point x1, Point x2) {
if (!d)
return;
Point s, u, t;
double th = M_PI * 60.0 / 180.0;
s.x = ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
const int INF = 0x3f3f3f3f;
// const double M_PI = acos(double(-1));
struct Point {
double x, y;
};
void koch(int d, Point x1, Point x2) {
if (!d)
return;
Point s, u, t;
d... | [
"identifier.change",
"call.arguments.change"
] | 118,140 | 118,141 | u324907960 | cpp |
p02273 | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
struct point {
float x, y;
};
void kehe(point a, point b, int n) {
if (n == 0) {
if (fabs(a.x - 0.0) < 0.000001)
printf("%.6f %.6f\n", a.x, a.y);
printf("%.6f %.6f\n", b.x, b.y);
} else {
double pi = M_PI / 3.0;
... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
struct point {
float x, y;
};
void kehe(point a, point b, int n) {
if (n == 0) {
if (fabs(a.x - 0.0) < 0.000001)
printf("%.6f %.6f\n", a.x, a.y);
printf("%.6f %.6f\n", b.x, b.y);
} else {
double pi = M_PI / 3.0;
... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,142 | 118,143 | u381149647 | cpp |
p02273 | #define _USE_MATH_DEFINES
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
using vec = pair<double, double>;
void koch(int d, vec p1, vec p2) {
if (d == 0)
return;
vec s, u, t;
double rad = M_PI * 60 / 180.;
// cauculate new coordinate
// first : x, second... | #define _USE_MATH_DEFINES
#include <cmath>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
using vec = pair<double, double>;
void koch(int d, vec p1, vec p2) {
if (d == 0)
return;
vec s, u, t;
double rad = M_PI * 60 / 180.;
// cauculate new coordinate
// first : x, second... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 118,147 | 118,148 | u772241565 | cpp |
p02273 | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct node {
double x, y;
} Point;
void koch(int, Point, Point);
void koch(int n, Point p1, Point p2) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60 / 180;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p2.... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct node {
double x, y;
} Point;
void koch(int, Point, Point);
void koch(int n, Point p1, Point p2) {
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60 / 180;
s.x = (2 * p1.x + 1 * p2.x) / 3;
s.y = (2 * p1.... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 118,149 | 118,150 | u896148161 | cpp |
p02273 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
struct point {
double x, y;
};
void kouch(int n, point a, point b) {
if (n == 0)
return;
point s, u, t;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (2.0 * ... | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
struct point {
double x, y;
};
void kouch(int n, point a, point b) {
if (n == 0)
return;
point s, u, t;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (2.0 * ... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,151 | 118,152 | u649417416 | cpp |
p02273 | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
#define PI 3.14159265358979323846
struct Point {
double x, y;
};
double kock(int n, Point p1, Point p2) {
if (n == 0)
return 0;
double rad = 60.0 * PI / 180.0;
Point s, t, u;
s.x = (2.0 * p1.x + 1.0 * p2.x) / 3.0;
s.y = (2.0 ... | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
#define PI 3.14159265358979323846
struct Point {
double x, y;
};
double kock(int n, Point p1, Point p2) {
if (n == 0)
return 0;
double rad = PI * 60.0 / 180.0;
Point s, t, u;
s.x = (2.0 * p1.x + 1.0 * p2.x) / 3.0;
s.y = (2.0... | [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,153 | 118,154 | u007523040 | cpp |
p02273 | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
#define FOR(k, m, n) for (int(k) = (m); (k) < (n); (k)++)
#define REP(i, n) FOR((i), 0, (n))
#define LL long long
#define M_PIn 3.1415926535
struct Point {
double x, y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
return;
... | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
#define FOR(k, m, n) for (int(k) = (m); (k) < (n); (k)++)
#define REP(i, n) FOR((i), 0, (n))
#define LL long long
#define M_PIn 3.141592653589793
struct Point {
double x, y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
ret... | [
"preprocessor.define.value.change",
"literal.float.change",
"identifier.change",
"io.output.change"
] | 118,155 | 118,156 | u905303767 | cpp |
p02273 | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
#define FOR(k, m, n) for (int(k) = (m); (k) < (n); (k)++)
#define REP(i, n) FOR((i), 0, (n))
#define LL long long
#define M_PIn 3.141592653589793
struct Point {
double x, y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
ret... | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
#define FOR(k, m, n) for (int(k) = (m); (k) < (n); (k)++)
#define REP(i, n) FOR((i), 0, (n))
#define LL long long
#define M_PIn 3.141592653589793
struct Point {
double x, y;
};
void koch(int n, Point a, Point b) {
if (n == 0)
ret... | [
"identifier.change",
"io.output.change"
] | 118,157 | 118,156 | u905303767 | cpp |
p02273 | ///
// File: alds1_5_c.cpp
// Author: ymiyamoto
//
// Created on Mon Oct 9 10:11:20 2017
//
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#define PI 3.14159265
struct point_t {
double x;
double y;
};
vector<point_t> calc_koch(point_t a, poin... | ///
// File: alds1_5_c.cpp
// Author: ymiyamoto
//
// Created on Mon Oct 9 10:11:20 2017
//
#include <cmath>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#define PI 3.14159265
struct point_t {
double x;
double y;
};
vector<point_t> calc_koch(point_t a, poin... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 118,158 | 118,159 | u827214117 | cpp |
p02273 | #define _USE_MATH_DEFINES // M_PI???????????????
#include <cmath>
#include <iostream>
using namespace std;
struct Point {
double x, y;
};
void makeKoch(int n, Point p1, Point p2) {
if (n <= 0)
return;
Point s, t, u;
s = {p1.x + (p2.x - p1.x) / 3, p2.y + (p2.y - p1.y) / 3};
t = {p1.x + 2 * (p2.x - p1.... | #define _USE_MATH_DEFINES // M_PI???????????????
#include <cmath>
#include <iostream>
using namespace std;
struct Point {
double x, y;
};
void makeKoch(int n, Point p1, Point p2) {
if (n <= 0)
return;
Point s, t, u;
s = {p1.x + (p2.x - p1.x) / 3, p1.y + (p2.y - p1.y) / 3};
t = {p1.x + 2 * (p2.x - p1.... | [
"identifier.change",
"expression.operation.binary.change"
] | 118,160 | 118,161 | u777913227 | cpp |
p02273 | #include <cmath>
#include <iostream>
#include <map>
#include <vector>
#define f first
#define s second
using namespace std;
int main() {
vector<pair<double, double>> p;
int n, i, j;
p.push_back(make_pair(0, 0));
p.push_back(make_pair(100, 0));
cin >> n;
for (i = 0; i < n; i++) {
for (j = 0; p[j].f != ... | #include <cmath>
#include <iostream>
#include <map>
#include <vector>
#define f first
#define s second
using namespace std;
int main() {
vector<pair<double, double>> p;
int n, i, j;
p.push_back(make_pair(0, 0));
p.push_back(make_pair(100, 0));
cin >> n;
for (i = 0; i < n; i++) {
for (j = 0; p[j].f != ... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 118,162 | 118,163 | u076398897 | cpp |
p02273 | #include <math.h>
#include <stdio.h>
struct point {
double x, y;
};
void koch(int n, struct point a, struct point b) {
if (n == 0)
return;
struct point s, t, u;
double tp = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (1.0 * a.x + 2.0 * b.x) /... | #include <math.h>
#include <stdio.h>
struct point {
double x, y;
};
void koch(int n, struct point a, struct point b) {
if (n == 0)
return;
struct point s, t, u;
double deg = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (1.0 * a.x + 2.0 * b.x) ... | [
"variable_declaration.name.change",
"identifier.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 118,164 | 118,165 | u407335067 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.