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 |
|---|---|---|---|---|---|---|---|
p02261 |
#include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j++) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[... | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"identifier.change",
"expression.operation.binary.change",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,703 | 105,702 | u694499356 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j++) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | [
"identifier.change",
"expression.operation.binary.change",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,705 | 105,702 | u694499356 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char mark, value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j++) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j - 1] =... | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | [
"identifier.change",
"expression.operation.binary.change",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,706 | 105,702 | u694499356 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | [
"identifier.change",
"expression.operation.binary.change",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,707 | 105,702 | u694499356 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,708 | 105,702 | u694499356 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char mark, value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j - 1] =... | #include <iostream>
using namespace std;
struct Card {
char mark;
int value;
};
void bubbleSort(struct Card C[], int n) {
int i, j;
Card v;
for (i = 0; i < n; i++) {
for (j = n - 1; j >= i + 1; j--) {
if (C[j].value < C[j - 1].value) {
v = C[j];
C[j] = C[j - 1];
C[j ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,710 | 105,702 | u694499356 | cpp |
p02261 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef vector<string> card_list;
bool comp(string a, string b) {
int x = static_cast<int>(a[1]) - 48;
int y = static_cast<int>(b[1]) - 48;
return x < y;
}
int bubbleSort(card_list &A) {
int N = A.size();
int... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef vector<string> card_list;
bool comp(string a, string b) {
int x = static_cast<int>(a[1]) - 48;
int y = static_cast<int>(b[1]) - 48;
return x < y;
}
int bubbleSort(card_list &A) {
int N = A.size();
int... | [
"call.function.change",
"control_flow.branch.if.condition.change"
] | 105,713 | 105,714 | u957470671 | cpp |
p02261 | #include <iostream>
#include <string.h>
using namespace std;
int main() {
int n = 0, minj = 0, flag = 1, k = 0;
char a[36][3], b[36][3], temp[3];
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
strcpy(b[i], a[i]);
while (flag) {
flag = 0;
for (int j = n - ... | #include <iostream>
#include <string.h>
using namespace std;
int main() {
int n = 0, minj = 0, flag = 1, k = 0;
char a[36][3], b[36][3], temp[3];
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
strcpy(b[i], a[i]);
while (flag) {
flag = 0;
for (int j = n - ... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.number.change"
] | 105,716 | 105,717 | u604920879 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit;
char value;
};
void trace(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
if (i > 0)
cout << " ";
cout << A[i].suit << A[i].value;
}
cout << endl;
}
int bubbleSort(struct Card A[], int N) {
int flag = 1;
int count =... | #include <iostream>
using namespace std;
struct Card {
char suit;
char value;
};
void trace(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
if (i > 0)
cout << " ";
cout << A[i].suit << A[i].value;
}
cout << endl;
}
int bubbleSort(struct Card A[], int N) {
int flag = 1;
int count =... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,722 | 105,723 | u878584486 | cpp |
p02261 | #include <cstdio>
#include <iostream>
#include <utility>
using namespace std;
struct Card {
char suit, value;
};
//???????????????????????¢??° write ?????????
void write(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
if (i > 0) {
printf(" ");
}
cout << A[i].suit << A[i].value;
}... | #include <cstdio>
#include <iostream>
#include <utility>
using namespace std;
struct Card {
char suit, value;
};
//???????????????????????¢??° write ?????????
void write(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
if (i > 0) {
printf(" ");
}
cout << A[i].suit << A[i].value;
}... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 105,728 | 105,729 | u150659088 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
}
}
... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
}
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,730 | 105,731 | u047796078 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit;
int value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
}
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,732 | 105,731 | u047796078 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit;
int value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
}
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,733 | 105,731 | u047796078 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit;
int value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
}
}
... | [] | 105,734 | 105,731 | u047796078 | cpp |
p02261 | #include <algorithm>
#include <deque>
#include <iostream>
#include <vector>
using namespace std;
struct Card {
char suit;
int value;
};
void trace(const vector<Card> &a) {
for (int i = 0; i < a.size(); i++) {
cout << a[i].suit << a[i].value << ((i != a.size() - 1) ? " " : "");
}
cout << endl;
}
bool is... | #include <algorithm>
#include <deque>
#include <iostream>
#include <vector>
using namespace std;
struct Card {
char suit;
int value;
};
void trace(const vector<Card> &a) {
for (int i = 0; i < a.size(); i++) {
cout << a[i].suit << a[i].value << ((i != a.size() - 1) ? " " : "");
}
cout << endl;
}
bool is... | [
"control_flow.branch.if.condition.change"
] | 105,735 | 105,736 | u036926685 | cpp |
p02261 | #include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
const int N_MAX = 36;
typedef struct Card {
char suit;
int value;
} Card;
void printArray(Card *A, int len) {
for (int i = 0; i < len; i++) {
cout << A[i].suit << A[i].value;
if (i != len - 1)
cout << " ";
}
cout <... | #include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
const int N_MAX = 36;
typedef struct Card {
char suit;
int value;
} Card;
void printArray(Card *A, int len) {
for (int i = 0; i < len; i++) {
cout << A[i].suit << A[i].value;
if (i != len - 1)
cout << " ";
}
cout <... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"call.arguments.change",
"literal.string.change",
"literal.string.case.change"
] | 105,737 | 105,738 | u668974880 | cpp |
p02261 | #include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
const int N_MAX = 36;
typedef struct Card {
char suit;
int value;
} Card;
void printArray(Card *A, int len) {
for (int i = 0; i < len; i++) {
cout << A[i].suit << A[i].value;
if (i != len - 1)
cout << " ";
}
cout <... | #include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
const int N_MAX = 36;
typedef struct Card {
char suit;
int value;
} Card;
void printArray(Card *A, int len) {
for (int i = 0; i < len; i++) {
cout << A[i].suit << A[i].value;
if (i != len - 1)
cout << " ";
}
cout <... | [
"literal.string.change",
"literal.string.case.change"
] | 105,739 | 105,738 | u668974880 | cpp |
p02261 | #include <cstdio>
int main() {
int n, i, j, minj;
char c[36][3], d[36][3], tmp;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s", c[i]);
for (j = 0; j < 3; j++)
d[i][j] = c[i][j];
}
for (i = 0; i < n; i++) {
for (j = n - 1; j > i; j--) {
if (c[j][1] < c[j - 1][1]) {
tmp ... | #include <cstdio>
int main() {
int n, i, j, minj;
char c[36][3], d[36][3], tmp;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s", c[i]);
for (j = 0; j < 3; j++)
d[i][j] = c[i][j];
}
for (i = 0; i < n; i++) {
for (j = n - 1; j > i; j--) {
if (c[j][1] < c[j - 1][1]) {
tmp ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 105,745 | 105,746 | u549180102 | cpp |
p02261 | #include <cstdio>
int main() {
int n, i, j, minj;
char c[36][3], d[36][3], tmp;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s", c[i]);
for (j = 0; j < 3; j++)
d[i][j] = c[i][j];
}
for (i = 0; i < n; i++) {
for (j = n - 1; j > i; j--) {
if (c[j][1] < c[j - 1][1]) {
tmp ... | #include <cstdio>
int main() {
int n, i, j, minj;
char c[36][3], d[36][3], tmp;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%s", c[i]);
for (j = 0; j < 3; j++)
d[i][j] = c[i][j];
}
for (i = 0; i < n; i++) {
for (j = n - 1; j > i; j--) {
if (c[j][1] < c[j - 1][1]) {
tmp ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 105,747 | 105,746 | u549180102 | cpp |
p02261 |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,752 | 105,753 | u594988858 | cpp |
p02261 |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,754 | 105,753 | u594988858 | cpp |
p02261 |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,755 | 105,753 | u594988858 | cpp |
p02261 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}
... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
void stringSwap(string *a, int i, int j);
void BubbleSort(string *C, int N);
void SelectionSort(string *C, int N);
bool check(string *C1, string *C2, int N) {
for (int i = 0; i < N; i++) {
if (C1[i] != C2[i])
return false;
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,756 | 105,753 | u594988858 | cpp |
p02261 | #include <iostream>
#include <vector>
using namespace std;
void swap(int &a, int &b) {
int dum = a;
a = b;
b = dum;
return;
}
void swap(char &a, char &b) {
char dum = a;
a = b;
b = dum;
return;
}
int main() {
int n, minj;
cin >> n;
vector<int> a(n), b(n);
vector<char> s(n), t(n);
for (int i... | #include <iostream>
#include <vector>
using namespace std;
void swap(int &a, int &b) {
int dum = a;
a = b;
b = dum;
return;
}
void swap(char &a, char &b) {
char dum = a;
a = b;
b = dum;
return;
}
int main() {
int n, minj;
cin >> n;
vector<int> a(n), b(n);
vector<char> s(n), t(n);
for (int i... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,759 | 105,760 | u643494333 | cpp |
p02261 | #include <iostream>
#include <string>
using namespace std;
struct Card {
char suit;
int value;
};
void printAry(Card src[], Card dst[], int N) {
if (src == NULL && dst == NULL) {
std::cout << "Stable" << std::endl;
return;
}
if (src == NULL || dst == NULL) {
std::cout << "Not stable" << std::en... | #include <iostream>
#include <string>
using namespace std;
struct Card {
char suit;
int value;
};
void printAry(Card src[], Card dst[], int N) {
if (src == NULL && dst == NULL) {
std::cout << "Stable" << std::endl;
return;
}
if (src == NULL || dst == NULL) {
std::cout << "Not stable" << std::en... | [
"expression.operation.binary.add"
] | 105,761 | 105,762 | u643111332 | cpp |
p02261 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#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 ALL(a) (a).begin(), (a).end()
#define VI vector<int>
#define INF 1145141919
typed... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#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 ALL(a) (a).begin(), (a).end()
#define VI vector<int>
#define INF 1145141919
typed... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,763 | 105,764 | u045279534 | cpp |
p02261 | #include <iostream>
#include <vector>
using namespace std;
void show_vec(vector<string> &vec) {
int N = vec.size();
for (int i = 0; i < N; ++i) {
cout << vec[i];
if (i < N - 1) {
cout << " ";
}
}
cout << endl;
}
int main() {
string temp;
int N;
cin >> N;
vector<string> data1(N), dat... | #include <iostream>
#include <vector>
using namespace std;
void show_vec(vector<string> &vec) {
int N = vec.size();
for (int i = 0; i < N; ++i) {
cout << vec[i];
if (i < N - 1) {
cout << " ";
}
}
cout << endl;
}
int main() {
string temp;
int N;
cin >> N;
vector<string> data1(N), dat... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,766 | 105,767 | u148775320 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++)
for (int j = N - 1; j >= i; j--)
if (A[j].value < A[j - 1].value)
swap(A[j], A[j - 1]);
}
void selection(struct Card A[], int N) {
for (int i = 0; i < ... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++)
for (int j = N - 1; j >= i; j--)
if (A[j].value < A[j - 1].value)
swap(A[j], A[j - 1]);
}
void selection(struct Card A[], int N) {
for (int i = 0; i < ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,768 | 105,771 | u150984829 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++)
for (int j = N - 1; j >= i; j--)
if (A[j].value < A[j - 1].value)
swap(A[j], A[j - 1]);
}
void selection(struct Card A[], int N) {
for (int i = 0; i < ... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++)
for (int j = N - 1; j >= i + 1; j--)
if (A[j].value < A[j - 1].value)
swap(A[j], A[j - 1]);
}
void selection(struct Card A[], int N) {
for (int i = 0; ... | [
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,768 | 105,773 | u150984829 | cpp |
p02261 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int i, j, N;
ios::sync_with_stdio(false);
cin.tie(0);
cin >> N;
vector<string> data1(N), data2(N);
for (i = 0; i < N; i++) {
cin >> data1[i];
data2[i] = data1[i];
}
//バブルソート
for (i = 0; i < N; i++) {
for (j = N - 1... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int i, j, N;
ios::sync_with_stdio(false);
cin.tie(0);
cin >> N;
vector<string> data1(N), data2(N);
for (i = 0; i < N; i++) {
cin >> data1[i];
data2[i] = data1[i];
}
//バブルソート
for (i = 0; i < N; i++) {
for (j = N - 1... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,774 | 105,775 | u032207327 | cpp |
p02261 | #include <iostream>
using namespace std;
typedef struct {
char suit;
int value;
} poker;
void bubbleSort(poker arr[], int n) {
bool flag = 1;
for (int i = 0; flag; i++) {
flag = 0;
for (int j = n - 1; j >= i + 1; j--) {
if (arr[j].value < arr[j - 1].value) {
swap(arr[j], arr[j - 1]);
... | #include <iostream>
using namespace std;
typedef struct {
char suit;
int value;
} poker;
void bubbleSort(poker arr[], int n) {
bool flag = 1;
for (int i = 0; flag; i++) {
flag = 0;
for (int j = n - 1; j >= i + 1; j--) {
if (arr[j].value < arr[j - 1].value) {
swap(arr[j], arr[j - 1]);
... | [
"assignment.value.change",
"identifier.change"
] | 105,776 | 105,777 | u952260505 | cpp |
p02261 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<string> a, b;
string tmp;
int n, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tmp;
a.push_back(tmp);
}
b.assign(a.begin(), a.end());
for (i = 0; i < n - 1; i++) {
for (int j = n - 2; j != i ... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<string> a, b;
string tmp;
int n, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tmp;
a.push_back(tmp);
}
b.assign(a.begin(), a.end());
for (i = 0; i < n - 1; i++) {
for (int j = n - 2; j != i ... | [] | 105,780 | 105,781 | u967723789 | cpp |
p02261 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<string> a, b;
string tmp;
int n, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tmp;
a.push_back(tmp);
}
b.assign(a.begin(), a.end());
for (i = 0; i < n - 1; i++) {
for (int j = n - 2; j != i ... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<string> a, b;
string tmp;
int n, i;
cin >> n;
for (i = 0; i < n; i++) {
cin >> tmp;
a.push_back(tmp);
}
b.assign(a.begin(), a.end());
for (i = 0; i < n - 1; i++) {
for (int j = n - 2; j != i ... | [] | 105,782 | 105,781 | u967723789 | cpp |
p02261 | #include <iostream>
struct Card {
char suit, num;
};
using namespace std;
void bubblesort(Card c[], int n);
void selectionsort(Card c[], int n);
void print(Card c[], int n);
bool isStable(Card c1[], Card c2[], int n);
int main(int argc, char const *argv[]) {
Card c1[36], c2[36];
int n;
cin >> n;
for (int i... | #include <iostream>
struct Card {
char suit, num;
};
using namespace std;
void bubblesort(Card c[], int n);
void selectionsort(Card c[], int n);
void print(Card c[], int n);
bool isStable(Card c1[], Card c2[], int n);
int main(int argc, char const *argv[]) {
Card c1[36], c2[36];
int n;
cin >> n;
for (int i... | [
"expression.operator.compare.change",
"assignment.value.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 105,792 | 105,793 | u291057603 | cpp |
p02261 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
int j, i;
string a[100];
string b[100];
string min;
int minj;
cin >> n;
for (i = 0; i < n; i++) {
cin >> a[i];
b[i] = a[i];
reverse(a[i].begin(), a[i].end());
}
for (i = 0; i < n; i++... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
int j, i;
string a[100];
string b[100];
string min;
int minj;
cin >> n;
for (i = 0; i < n; i++) {
cin >> a[i];
b[i] = a[i];
reverse(a[i].begin(), a[i].end());
}
for (i = 0; i < n; i++... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 105,796 | 105,797 | u145151732 | cpp |
p02261 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s[n], t[n];
for (int i = 0; i < n; i++)
cin >> s[i], t[i] = s[i];
// buble sort
for (int i = 0; i < n; i++) {
for (int j = n - 1; j > 0; j--) {
if (t[j][1] < t[j - 1][1])
swap(t[j], t[j - 1]);
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s[n], t[n];
for (int i = 0; i < n; i++)
cin >> s[i], t[i] = s[i];
// buble sort
for (int i = 0; i < n; i++) {
for (int j = n - 1; j > 0; j--) {
if (t[j][1] < t[j - 1][1])
swap(t[j], t[j - 1]);
}
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 105,804 | 105,805 | u799746736 | cpp |
p02261 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s[n], t[n];
for (int i = 0; i < n; i++)
cin >> s[i], t[i] = s[i];
// buble sort
for (int i = 0; i < n; i++) {
for (int j = n - 1; j > 0; j--) {
if (t[j][1] < t[j - 1][1])
swap(t[j], t[j - 1]);
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s[n], t[n];
for (int i = 0; i < n; i++)
cin >> s[i], t[i] = s[i];
// buble sort
for (int i = 0; i < n; i++) {
for (int j = n - 1; j > 0; j--) {
if (t[j][1] < t[j - 1][1])
swap(t[j], t[j - 1]);
}
... | [] | 105,806 | 105,805 | u799746736 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char c;
int v;
};
Card A[36];
void bubbleSort(Card A[], int n) {
for (int i = 0; i < n; ++i) {
for (int j = n - 1; j > i; --j) {
if (A[j - 1].v > A[j].v) {
Card t = A[j - 1];
A[j - 1] = A[j];
A[j] = t;
}
}
}
}... | #include <iostream>
using namespace std;
struct Card {
char c;
int v;
};
Card A[36];
void bubbleSort(Card A[], int n) {
for (int i = 0; i < n; ++i) {
for (int j = n - 1; j > i; --j) {
if (A[j - 1].v > A[j].v) {
Card t = A[j - 1];
A[j - 1] = A[j];
A[j] = t;
}
}
}
}... | [
"control_flow.return.add"
] | 105,807 | 105,808 | u480716860 | cpp |
p02261 | #include <iostream>
using namespace std;
void selection_sort(char seq[100][2], int length) {
char temp;
int mini;
for (int i = 0; i < length - 1; i++) {
mini = i;
for (int j = i + 1; j < length; j++) {
if (seq[j][1] < seq[mini][1]) {
mini = j;
}
}
if (mini != i) {
for (... | #include <iostream>
using namespace std;
void selection_sort(char seq[100][2], int length) {
char temp;
int mini;
for (int i = 0; i < length - 1; i++) {
mini = i;
for (int j = i + 1; j < length; j++) {
if (seq[j][1] < seq[mini][1]) {
mini = j;
}
}
if (mini != i) {
for (... | [
"misc.opposites",
"variable_declaration.value.change"
] | 105,811 | 105,812 | u662488567 | cpp |
p02261 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
struct Card {
... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
struct Card {
... | [
"literal.string.change",
"io.output.change"
] | 105,813 | 105,814 | u395246068 | cpp |
p02261 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
struct Card {
... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <set>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
using namespace std;
struct Card {
... | [
"literal.string.change",
"io.output.change"
] | 105,815 | 105,814 | u395246068 | cpp |
p02261 | #include <iostream>
void print_list(std::string *a, int n) {
for (int i = 0; i < n - 1; i++) {
std::cout << a[i] << " ";
}
std::cout << a[n - 1] << std::endl;
}
void bubbleSort(std::string *a, int n) {
bool sorted = false;
while (!sorted) {
sorted = true;
for (int i = n - 1; i > 0; i--) {
... | #include <iostream>
void print_list(std::string *a, int n) {
for (int i = 0; i < n - 1; i++) {
std::cout << a[i] << " ";
}
std::cout << a[n - 1] << std::endl;
}
void bubbleSort(std::string *a, int n) {
bool sorted = false;
while (!sorted) {
sorted = true;
for (int i = n - 1; i > 0; i--) {
... | [
"literal.string.change",
"literal.string.case.change",
"expression.operation.binary.change"
] | 105,817 | 105,818 | u950705519 | cpp |
p02261 | #include <climits>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
struct card {
char suite;
int num;
};
void BubbleSort(struct card *C, int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j > i;... | #include <climits>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
using namespace std;
struct card {
char suite;
int num;
};
void BubbleSort(struct card *C, int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j > i;... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 105,819 | 105,820 | u756895802 | cpp |
p02261 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int n;
void input(vector<char> &, vector<int> &);
void babble(vector<char>, vector<int>, vector<char>, vector<int>);
void selection(vector<char>, vector<int>, vector<... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int n;
void input(vector<char> &, vector<int> &);
void babble(vector<char>, vector<int>, vector<char>, vector<int>);
void selection(vector<char>, vector<int>, vector<... | [
"assignment.add"
] | 105,821 | 105,822 | u304898265 | cpp |
p02261 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int, int>
#define MA make_pair
#define LL long long
#define FOR(i, a, b) for (int... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int, int>
#define MA make_pair
#define LL long long
#define FOR(i, a, b) for (int... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,829 | 105,830 | u216725628 | cpp |
p02261 | #include <iostream>
struct Card {
int num;
char suit;
};
void bubbleSort(Card *a, int n) {
int tmp;
for (int i = n - 1; i > 0; i--) {
for (int j = n - 1; j > n - i - 1; j--) {
if (a[j].num < a[j - 1].num) {
std::swap(a[j], a[j - 1]);
}
}
}
for (int c = 0; c < n; c++) {
i... | #include <iostream>
struct Card {
int num;
char suit;
};
void bubbleSort(Card *a, int n) {
int tmp;
for (int i = n - 1; i > 0; i--) {
for (int j = n - 1; j > n - i - 1; j--) {
if (a[j].num < a[j - 1].num) {
std::swap(a[j], a[j - 1]);
}
}
}
for (int c = 0; c < n; c++) {
i... | [
"literal.string.change",
"literal.string.case.change",
"expression.operation.binary.change"
] | 105,831 | 105,832 | u595594582 | cpp |
p02261 | #include <algorithm>
#include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubbleSort(Card c[], int n) {
bool flag = true;
for (int i = 0; flag; i++) {
flag = false;
for (int j = n - 1; j > i; j--) {
if (c[j].value < c[j - 1].value) {
swap(c[j], c[j - 1]);
... | #include <algorithm>
#include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubbleSort(Card c[], int n) {
bool flag = true;
for (int i = 0; flag; i++) {
flag = false;
for (int j = n - 1; j > i; j--) {
if (c[j].value < c[j - 1].value) {
swap(c[j], c[j - 1]);
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,835 | 105,836 | u775693229 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i + 1; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i + 1; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
... | [
"control_flow.loop.for.initializer.change",
"expression.operation.binary.remove",
"identifier.change",
"call.arguments.change",
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,837 | 105,838 | u411052298 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i + 1; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
... | #include <iostream>
using namespace std;
struct Card {
char suit, value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j >= i + 1; j--) {
if (A[j].value < A[j - 1].value) {
Card t = A[j];
A[j] = A[j - 1];
A[j - 1] = t;
}
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,839 | 105,838 | u411052298 | cpp |
p02261 | #include <iostream>
using namespace std;
struct Card {
char suit;
char value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j > i; j--) {
if (A[j].value < A[j - 1].value) {
Card temp = A[j];
A[j] = A[j - 1];
A[j - 1] = temp;
}
... | #include <iostream>
using namespace std;
struct Card {
char suit;
char value;
};
void bubble(struct Card A[], int N) {
for (int i = 0; i < N; i++) {
for (int j = N - 1; j > i; j--) {
if (A[j].value < A[j - 1].value) {
Card temp = A[j];
A[j] = A[j - 1];
A[j - 1] = temp;
}
... | [
"io.output.change"
] | 105,845 | 105,846 | u411052298 | cpp |
p02261 |
#include <bits/stdc++.h>
using namespace std;
typedef struct Card {
char suit;
int value;
} CARD;
void print(CARD C[], int N) {
for (int i = 0; i < N; i++) {
if (i)
cout << " ";
cout << C[i].suit << C[i].value;
}
cout << endl;
}
void isStable(CARD A[], CARD B[], int N) {
for (int i = 0; i ... | #include <bits/stdc++.h>
using namespace std;
typedef struct Card {
char suit;
int value;
} CARD;
void print(CARD C[], int N) {
for (int i = 0; i < N; i++) {
if (i)
cout << " ";
cout << C[i].suit << C[i].value;
}
cout << endl;
}
void isStable(CARD A[], CARD B[], int N) {
for (int i = 0; i <... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,848 | 105,849 | u004129073 | cpp |
p02261 | #include <bits/stdc++.h>
using namespace std;
typedef struct Card {
char suit;
int value;
} CARD;
void print(CARD C[], int N) {
for (int i = 0; i < N; i++) {
if (i)
cout << " ";
cout << C[i].suit << C[i].value;
}
cout << endl;
}
void isStable(CARD A[], CARD B[], int N) {
for (int i = 0; i <... | #include <bits/stdc++.h>
using namespace std;
typedef struct Card {
char suit;
int value;
} CARD;
void print(CARD C[], int N) {
for (int i = 0; i < N; i++) {
if (i)
cout << " ";
cout << C[i].suit << C[i].value;
}
cout << endl;
}
void isStable(CARD A[], CARD B[], int N) {
for (int i = 0; i <... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 105,850 | 105,849 | u004129073 | cpp |
p02261 | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
int n, A[36], B[36];
char a[36], b[36];
string isStable() {
for (int i = 0; i < n; i++) {
if (A[i] == B[i] && a[i] == b[i])
continue;
return "Not Stable";
}
return "Stable";
}
int main() {
cin >> n;
for (int i = 0... | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
int n, A[36], B[36];
char a[36], b[36];
string isStable() {
for (int i = 0; i < n; i++) {
if (A[i] == B[i] && a[i] == b[i])
continue;
return "Not stable";
}
return "Stable";
}
int main() {
cin >> n;
for (int i = 0... | [
"literal.string.change",
"literal.string.case.change",
"function.return_value.change"
] | 105,856 | 105,857 | u098170735 | cpp |
p02262 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int cnt = 0;
vector<int> G;
void insertsort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int temp = A[i], j = i - g;
while (j >= 0 && A[j] > temp) {
A[j + g] = A[j];
j -= g;
cnt++;
... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int cnt = 0;
vector<int> G;
void insertsort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int temp = A[i], j = i - g;
while (j >= 0 && A[j] > temp) {
A[j + g] = A[j];
j -= g;
cnt++;
... | [] | 105,984 | 105,985 | u347577008 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[10000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[10000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 105,988 | 105,989 | u578092577 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[10000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[10000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v... | [] | 105,990 | 105,989 | u578092577 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[10000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[10000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 105,991 | 105,989 | u578092577 | cpp |
p02262 | #include <iostream>
#include <vector>
using namespace std;
long long cnt;
vector<int> G;
void insertionSort(vector<int> &A, int g) {
for (int i = g; i < A.size(); i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
}
A[j + g] = v;
... | #include <iostream>
#include <vector>
using namespace std;
long long cnt;
vector<int> G;
void insertionSort(vector<int> &A, int g) {
for (int i = g; i < A.size(); i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
}
A[j + g] = v;
... | [
"io.output.newline.add"
] | 105,992 | 105,993 | u626935725 | cpp |
p02262 | // ConsoleApplication1.cpp : Defines the entry point for the console
// application.
//
//#include "stdafx.h"
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int cnt = 0;
vector<int> g;
int shell(int n) {
int m = 0;
for (int i = 1;; i = i * 2 + 1, m++) {
if (i > n)
break... | // ConsoleApplication1.cpp : Defines the entry point for the console
// application.
//
//#include "stdafx.h"
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long cnt = 0;
vector<int> g;
int shell(int n) {
int m = 0;
for (int i = 1;; i = i * 3 + 1, m++) {
if (i > n)
... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"literal.number.change",
"assignment.value.change",
"expression.operation.binary.change",
"variable_declaration.array_dimensions.change"
] | 105,994 | 105,995 | u636273421 | cpp |
p02262 | #include <iostream>
#include <vector>
using namespace std;
int cnt = 0;
int A[1000000];
vector<int> G;
void insertionSort(int A[], int n, int g) {
int cnt = 0;
int v, j;
for (int i = g; i < n; ++i) {
v = A[i];
j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
... | #include <iostream>
#include <vector>
using namespace std;
int cnt = 0;
int A[1000000];
vector<int> G;
void insertionSort(int A[], int n, int g) {
int v, j;
for (int i = g; i < n; ++i) {
v = A[i];
j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
}
A[j ... | [
"variable_declaration.remove",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 105,998 | 105,999 | u166697967 | cpp |
p02262 | #include <cstdio>
#include <iostream>
using namespace std;
#define N 2
void InsertionSort(int *a, int n, int g);
void ShellSort(int *a, int n);
int a[1000005];
int cnt = 0;
int main(void) {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
ShellSort(a, n);
cout << cnt << endl;
for (... | #include <cstdio>
#include <iostream>
using namespace std;
#define N 2
void InsertionSort(int *a, int n, int g);
void ShellSort(int *a, int n);
int a[1000005];
int cnt = 0;
int main(void) {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
ShellSort(a, n);
cout << cnt << endl;
for (... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"expression.operation.binary.remove"
] | 106,007 | 106,008 | u669807407 | cpp |
p02262 | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, cnt;
vector<int> nums;
auto insertionSort = [&nums, &n, &cnt](int d) {
for (int i = d; i < n; ++i) {
int top = nums[i];
int j;
for (j = i - d; i >= 0 && nums[j] > top; j -= d) {
nums[j + ... | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, cnt;
vector<int> nums;
auto insertionSort = [&nums, &n, &cnt](int d) {
for (int i = d; i < n; ++i) {
int top = nums[i];
int j;
for (j = i - d; j >= 0 && nums[j] > top; j -= d) {
nums[j + ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 106,218 | 106,219 | u372334046 | cpp |
p02262 | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, cnt;
vector<int> nums;
auto insertionSort = [&nums, &n, &cnt](int d) {
for (int i = d; i < n; ++i) {
int top = nums[i];
int j;
for (j = i - d; i >= 0 && nums[j] > top; j -= d) {
nums[j + ... | #include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, cnt;
vector<int> nums;
auto insertionSort = [&nums, &n, &cnt](int d) {
for (int i = d; i < n; ++i) {
int top = nums[i];
int j;
for (j = i - d; j >= 0 && nums[j] > top; j -= d) {
nums[j + ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 106,218 | 106,220 | u372334046 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void insertionsort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void xxx(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j... | [
"identifier.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"call.function.change"
] | 106,221 | 106,222 | u011621222 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void insertionsort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {... | [
"identifier.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"call.function.change"
] | 106,221 | 106,223 | u011621222 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void insertionsort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {... | [
"identifier.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"call.function.change"
] | 106,221 | 106,225 | u011621222 | cpp |
p02262 | #include <stdio.h>
int a[1000100], g[100000] = {1}, cnt = 0, m = 0;
void shell(int A[], int g, int n) {
for (int i = g; i < n; i++) {
int v = a[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
}
A[j + g] = v;
}
}
void shellSort(int A[], int n) {... | #include <stdio.h>
int a[1000100], g[100000] = {1}, cnt = 0, m = 0;
void shell(int A[], int g, int n) {
for (int i = g; i < n; i++) {
int v = a[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
}
A[j + g] = v;
}
}
void shellSort(int A[], int n) {... | [
"assignment.change"
] | 106,331 | 106,330 | u053802181 | cpp |
p02262 | #include <stdio.h>
int cnt, m, G[101];
int insertionSort(int *A, int n, int g) {
int i;
for (i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j + g] = v;
}
}
void shellSort(int *A, int n) {
cnt = 0;
in... | #include <stdio.h>
int cnt, m, G[101];
int insertionSort(int *A, int n, int g) {
int i;
for (i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j + g] = v;
}
}
void shellSort(int *A, int n) {
cnt = 0;
in... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 106,332 | 106,333 | u826160136 | cpp |
p02262 | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | [
"assignment.change"
] | 106,350 | 106,351 | u489119975 | cpp |
p02262 | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | [
"literal.number.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"assignment.change"
] | 106,352 | 106,351 | u489119975 | cpp |
p02262 | #include <bits/stdc++.h>
using namespace std;
long long cnt;
int l;
int A[100000000];
int n;
vector<int> G;
//間隔gを指定した挿入ソート
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++... | #include <bits/stdc++.h>
using namespace std;
long long cnt;
int l;
int A[100000000];
int n;
vector<int> G;
//間隔gを指定した挿入ソート
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++... | [] | 106,353 | 106,354 | u618814736 | cpp |
p02262 | #include <stdio.h>
long long cnt;
int G[100];
int m;
void insertionSort(int A[], int n, int g) {
int v, i, j;
for (i = g; i < n; i++) {
v = A[i];
j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j + g] = v;
}
}
void print(int m, int G[], int A... | #include <stdio.h>
long long cnt;
int G[100];
int m;
void insertionSort(int A[], int n, int g) {
int v, i, j;
for (i = g; i < n; i++) {
v = A[i];
j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j + g] = v;
}
}
void print(int m, int G[], int A... | [
"literal.number.change",
"assignment.value.change",
"variable_declaration.array_dimensions.change"
] | 106,360 | 106,361 | u711264127 | cpp |
p02262 | #include <iostream>
#include <vector>
using namespace std;
int n, *d;
int cnt = 0;
void sort(int length) {
for (int i = 0; i < length; i++) {
for (int k = i + length; k < n; k += length) {
int now = d[k];
int m = k - length;
for (; m >= 0; m -= length) {
d[m + length] = d[m];
i... | #include <iostream>
#include <vector>
using namespace std;
int n, *d;
int cnt = 0;
void sort(int length) {
for (int i = 0; i < length; i++) {
for (int k = i + length; k < n; k += length) {
int now = d[k];
int m = k - length;
for (; m >= 0; m -= length) {
d[m + length] = d[m];
i... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 106,395 | 106,396 | u873368295 | cpp |
p02262 | #include <algorithm>
#include <climits>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
void insertionSort(vector<int> &A, int n, int g, int &cnt) {
for (int i = g; i < n; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
... | #include <algorithm>
#include <climits>
#include <cstring>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
void insertionSort(vector<int> &A, int n, int g, int &cnt) {
for (int i = g; i < n; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
... | [
"control_flow.loop.for.condition.change"
] | 106,418 | 106,419 | u703196441 | cpp |
p02262 | #include <algorithm>
#include <iostream>
using namespace std;
int cnt = 0;
int G[] = {1, 4, 13, 40, 121, 364, 1093,
3280, 9841, 29524, 88573, 265720, 797161};
int A[1000000];
int shellSort(int A[], int n);
void insertionSort(int A[], int n, int g);
int main() {
ios::sync_with_stdio(false... | #include <algorithm>
#include <iostream>
using namespace std;
int cnt = 0;
int G[] = {1, 4, 13, 40, 121, 364, 1093,
3280, 9841, 29524, 88573, 265720, 797161};
int A[1000000];
int shellSort(int A[], int n);
void insertionSort(int A[], int n, int g);
int main() {
ios::sync_with_stdio(false... | [
"expression.operation.binary.remove"
] | 106,423 | 106,424 | u277798389 | cpp |
p02262 | #include <iostream>
using namespace std;
int x[10000000];
int G[20];
int v;
int w;
int cnt = 0;
int m;
int n;
void sort1(int x[], int n, int g) {
for (int i = g; i < n; i++) {
v = x[i];
w = i - g;
while (w >= 0 && x[w] > v) {
x[w + g] = x[w];
w = w - g;
cnt++;
}
x[w + g] = v;
... | #include <iostream>
using namespace std;
int x[10000000];
int G[20];
int v;
int w;
int cnt = 0;
int m;
int n;
void sort1(int x[], int n, int g) {
for (int i = g; i < n; i++) {
v = x[i];
w = i - g;
while (w >= 0 && x[w] > v) {
x[w + g] = x[w];
w = w - g;
cnt++;
}
x[w + g] = v;
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 106,425 | 106,426 | u852311840 | cpp |
p02262 | #include <cstdio>
#include <iostream>
using namespace std;
int x[10000000];
int G[20];
int v;
int w;
int cnt = 0;
int m;
int n;
void sort1(int x[], int n, int g) {
for (int i = g; i < n; i++) {
v = x[i];
w = i - g;
while (w >= 0 && x[w] > v) {
x[w + g] = x[w];
w = w - g;
cnt++;
}
... | #include <cstdio>
#include <iostream>
using namespace std;
int x[10000000];
int G[20];
int v;
int w;
int cnt = 0;
int m;
int n;
void sort1(int x[], int n, int g) {
for (int i = g; i < n; i++) {
v = x[i];
w = i - g;
while (w >= 0 && x[w] > v) {
x[w + g] = x[w];
w = w - g;
cnt++;
}
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 106,427 | 106,428 | u852311840 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int cnt;
int n;
int l;
int A[1000000];
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n - 1; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int cnt;
int n;
int l;
int A[1000000];
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 106,444 | 106,445 | u210148484 | cpp |
p02262 | #include <algorithm>
#include <iostream>
#include <vector>
typedef int TInt;
typedef std::vector<TInt> TList;
TList Input() {
int Count;
std::cin >> Count;
TList List(Count);
for (int i = 0; i < Count; ++i) {
std::cin >> List[i];
}
return List;
}
int insertionSort(TList &A, int g) {
int cnt = 0;
fo... | #include <algorithm>
#include <iostream>
#include <vector>
typedef int TInt;
typedef std::vector<TInt> TList;
TList Input() {
int Count;
std::cin >> Count;
TList List(Count);
for (int i = 0; i < Count; ++i) {
std::cin >> List[i];
}
return List;
}
int insertionSort(TList &A, int g) {
int cnt = 0;
fo... | [
"control_flow.loop.for.initializer.change",
"variable_declaration.type.change",
"identifier.change",
"call.function.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 106,457 | 106,458 | u858711833 | cpp |
p02262 | #include <algorithm>
#include <iostream>
#include <vector>
typedef int TInt;
typedef std::vector<TInt> TList;
TList Input() {
int Count;
std::cin >> Count;
TList List(Count);
for (int i = 0; i < Count; ++i) {
std::cin >> List[i];
}
return List;
}
int insertionSort(TList &A, int g) {
int cnt = 0;
fo... | #include <algorithm>
#include <iostream>
#include <vector>
typedef int TInt;
typedef std::vector<TInt> TList;
TList Input() {
int Count;
std::cin >> Count;
TList List(Count);
for (int i = 0; i < Count; ++i) {
std::cin >> List[i];
}
return List;
}
int insertionSort(TList &A, int g) {
int cnt = 0;
fo... | [
"control_flow.loop.for.initializer.change",
"variable_declaration.type.change",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 106,459 | 106,458 | u858711833 | cpp |
p02262 | #include <iostream>
using namespace std;
int cnt;
void insertionSort(int *a, int n, int g) {
int i, j, v;
for (i = g; i < n; i++) {
v = a[i];
j = i - g;
while ((j >= 0) && (a[j] > v)) {
a[j + g] = a[j];
j = j - g;
cnt++;
};
a[j + g] = v;
}
}
void shellsort(int *a, int n)... | #include <iostream>
using namespace std;
int cnt;
void insertionSort(int *a, int n, int g) {
int i, j, v;
for (i = g; i < n; i++) {
v = a[i];
j = i - g;
while ((j >= 0) && (a[j] > v)) {
a[j + g] = a[j];
j = j - g;
cnt++;
};
a[j + g] = v;
}
}
void shellsort(int *a, int n)... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"assignment.change"
] | 106,474 | 106,475 | u986478725 | cpp |
p02262 | #include <algorithm>
#include <iostream>
using namespace std;
int n, a[1111111], c, g[20];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
g[0] = 1;
c = 0;
while (true) {
g[c + 1] = g[c] * 3 + 1;
if (g[++c] >= n)
break;
}
... | #include <algorithm>
#include <iostream>
using namespace std;
int n, a[1111111], c, g[20];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
g[0] = 1;
c = 0;
while (true) {
g[c + 1] = g[c] * 3 + 1;
if (g[++c] >= n)
break;
}
... | [] | 106,482 | 106,483 | u823513038 | cpp |
p02262 | #include <cstdio>
#include <vector>
using namespace std;
int insSort(vector<int> &arr, int g) {
int v, cnt;
cnt = 0;
for (int i = g; i < arr.size(); ++i) {
int j;
v = arr[i];
for (j = i - g; j >= 0 && arr[j] > v; j -= g) {
arr[j + g] = arr[j];
++cnt;
}
arr[j + g] = v;
}
retur... | #include <cstdio>
#include <vector>
using namespace std;
int insSort(vector<int> &arr, int g) {
int v, cnt;
cnt = 0;
for (int i = g; i < arr.size(); ++i) {
int j;
v = arr[i];
for (j = i - g; j >= 0 && arr[j] > v; j -= g) {
arr[j + g] = arr[j];
++cnt;
}
arr[j + g] = v;
}
retur... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"identifier.replace.remove",
"literal.replace.add",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 106,486 | 106,487 | u302953291 | cpp |
p02262 | #include <cstdio>
#include <vector>
using namespace std;
int insSort(vector<int> &arr, int g) {
int v, cnt;
cnt = 0;
for (int i = g; i < arr.size(); ++i) {
int j;
v = arr[i];
for (j = i - g; j >= 0 && arr[j] > v; j -= g) {
arr[j + g] = arr[j];
++cnt;
}
arr[j + g] = v;
}
retur... | #include <cstdio>
#include <vector>
using namespace std;
int insSort(vector<int> &arr, int g) {
int v, cnt;
cnt = 0;
for (int i = g; i < arr.size(); ++i) {
int j;
v = arr[i];
for (j = i - g; j >= 0 && arr[j] > v; j -= g) {
arr[j + g] = arr[j];
++cnt;
}
arr[j + g] = v;
}
retur... | [
"identifier.replace.remove",
"literal.replace.add",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operation.binary.remove"
] | 106,488 | 106,487 | u302953291 | cpp |
p02262 | #include "bits/stdc++.h"
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
}
A[j + g... | #include "bits/stdc++.h"
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j -= g;
cnt++;
}
A[j + g... | [] | 106,506 | 106,507 | u944777079 | cpp |
p02262 | /**************
* Shell Sort
*************/
#include <algorithm>
#include <cstdio>
#include <vector> //??£?¨?
using namespace std;
typedef vector<int> TList; //??????????????????
void insertionSort(TList &A, int g, int &cnt) {
for (unsigned int i = g; i < (A.size()); i++) {
int v = A[i];
int j = i - g;
... | /**************
* Shell Sort
*************/
#include <algorithm>
#include <cstdio>
#include <vector> //??£?¨?
using namespace std;
typedef vector<int> TList; //??????????????????
void insertionSort(TList &A, int g, int &cnt) {
for (unsigned int i = g; i < (A.size()); i++) {
int v = A[i];
int j = i - g;
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 106,519 | 106,520 | u979799212 | cpp |
p02262 | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int a[1000000];
int cnt = 0;
void insertionsort(int A[], int n, int g) {
for (int i = g; i < n; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] >= v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j ... | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int a[1000000];
int cnt = 0;
void insertionsort(int A[], int n, int g) {
for (int i = g; i < n; ++i) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j +... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 106,524 | 106,525 | u443587731 | cpp |
p02262 | #include <algorithm>
#include <cstdio>
using namespace std;
int A[1000000];
int G[1000000 / 2];
int cnt;
void print(int A[], int n) {
for (int i = 0; i < n; i++) {
printf("%d\n", A[i]);
}
}
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
w... | #include <algorithm>
#include <cstdio>
using namespace std;
int A[1000000];
int G[1000000 / 2];
int cnt;
void print(int A[], int n) {
for (int i = 0; i < n; i++) {
printf("%d\n", A[i]);
}
}
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
w... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"expression.unary.arithmetic.remove"
] | 106,580 | 106,579 | u808582184 | cpp |
p02262 | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 1e6 + 5;
int m[MAXN];
long long cnt;
void insertion(int m[], int dis, int n) {
for (int i = dis; i < n; i++) {
for (int j = i; j >= 0; j -= dis) {
... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 1e6 + 5;
int m[MAXN];
long long cnt;
void insertion(int m[], int dis, int n) {
for (int i = dis; i < n; i++) {
for (int j = i; j >= dis; j -= dis) {
... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 106,585 | 106,586 | u324907960 | cpp |
p02262 | #include <algorithm>
#include <iostream>
#include <new>
#include <vector>
using namespace std;
int cnt;
int m;
vector<int> v;
void insertionSort(int A[], int n, int g) {
int i, j, tmp;
for (i = g; i < n; i++) {
tmp = A[i];
j = i - g;
while (j >= 0 && A[j] > tmp) {
A[j + g] = A[j];
j = j - ... | #include <algorithm>
#include <iostream>
#include <new>
#include <vector>
using namespace std;
int cnt;
int m;
vector<int> v;
void insertionSort(int A[], int n, int g) {
int i, j, tmp;
for (i = g; i < n; i++) {
tmp = A[i];
j = i - g;
while (j >= 0 && A[j] > tmp) {
A[j + g] = A[j];
j = j - ... | [
"io.output.change"
] | 106,609 | 106,610 | u106214670 | cpp |
p02262 | #include <stdio.h>
#include <vector>
using namespace std;
vector<int> G;
int cnt = 0;
void insertionSort(int *p, int n, int g) {
for (int i = g; i < n; i++) {
int v = p[i];
int j = i - g;
while (j >= 0 && p[j] > v) {
p[j + g] = p[j];
j -= g;
cnt = cnt + 1;
}
p[j + g] = v;
}
}
... |
#include <stdio.h>
#include <vector>
using namespace std;
vector<int> G;
int cnt = 0;
void insertionSort(int *p, int n, int g) {
for (int i = g; i < n; i++) {
int v = p[i];
int j = i - g;
while (j >= 0 && p[j] > v) {
p[j + g] = p[j];
j -= g;
cnt = cnt + 1;
}
p[j + g] = v;
}
}... | [
"control_flow.loop.for.initializer.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 106,611 | 106,612 | u291324100 | cpp |
p02262 | #include <stdio.h>
#include <vector>
using namespace std;
vector<int> G;
int cnt = 0;
void insertionSort(int *p, int n, int g) {
for (int i = g; i < n; i++) {
int v = p[i];
int j = i - g;
while (j >= 0 && p[j] > v) {
p[j + g] = p[j];
j -= g;
cnt = cnt + 1;
}
p[j + g] = v;
}
}
... |
#include <stdio.h>
#include <vector>
using namespace std;
vector<int> G;
int cnt = 0;
void insertionSort(int *p, int n, int g) {
for (int i = g; i < n; i++) {
int v = p[i];
int j = i - g;
while (j >= 0 && p[j] > v) {
p[j + g] = p[j];
j -= g;
cnt = cnt + 1;
}
p[j + g] = v;
}
}... | [
"control_flow.loop.for.initializer.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 106,613 | 106,612 | u291324100 | cpp |
p02262 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
//間隔gを指定した挿入ソート
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long cnt;
int l;
int A[1000000];
int n;
vector<int> G;
//間隔gを指定した挿入ソート
void insertionSort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 106,638 | 106,639 | u047796078 | cpp |
p02262 | #include <cmath>
#include <iostream>
using namespace std;
int cnt = 0;
int m = 100;
int G[100] = {};
void insertionsort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j + g] ... | #include <cmath>
#include <iostream>
using namespace std;
int cnt = 0;
int m = 20;
int G[20] = {};
void insertionsort(int A[], int n, int g) {
for (int i = g; i < n; i++) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j - g;
cnt++;
}
A[j + g] = ... | [
"literal.number.change",
"variable_declaration.value.change",
"variable_declaration.array_dimensions.change"
] | 106,671 | 106,672 | u972246289 | cpp |
p02262 | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define MAX 1000010
using namespace std;
int n, A[MAX], cnt;
void insertionSort(int g) {
REP(i, g, n) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j ... | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define MAX 1000010
using namespace std;
int n, A[MAX], cnt;
void insertionSort(int g) {
REP(i, g, n) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.condition.change"
] | 106,678 | 106,679 | u116766943 | cpp |
p02262 | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define MAX 1000010
using namespace std;
int n, A[MAX], cnt;
void insertionSort(int g) {
REP(i, g, n) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j ... | #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define MAX 1000010
using namespace std;
int n, A[MAX], cnt;
void insertionSort(int g) {
REP(i, g, n) {
int v = A[i];
int j = i - g;
while (j >= 0 && A[j] > v) {
A[j + g] = A[j];
j = j ... | [
"control_flow.loop.condition.change"
] | 106,680 | 106,679 | u116766943 | cpp |
p02262 | /*
* ALDS1_2_D.cpp
*
* Created on: Apr 25, 2018
* Author: 13743
*/
#include <iostream>
using namespace std;
int cnt = 0;
void insertionSort(int *a, int n, int g) {
for (int i = g; i < n; i++) {
int v = a[i];
int j = i - g;
while (j >= 0 && a[j] > v) {
a[j + g] = a[j];
j = j - g;... | /*
* ALDS1_2_D.cpp
*
* Created on: Apr 25, 2018
* Author: 13743
*/
#include <iostream>
using namespace std;
int cnt = 0;
void insertionSort(int *a, int n, int g) {
for (int i = g; i < n; i++) {
int v = a[i];
int j = i - g;
while (j >= 0 && a[j] > v) {
a[j + g] = a[j];
j = j - g;... | [
"identifier.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"control_flow.loop.for.condition.change"
] | 106,681 | 106,682 | u115352705 | cpp |
p02263 | #include <deque>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
deque<int> d;
char temp_char[10];
while (scanf("%s", &temp_char) != -1) {
if (temp_char[0] != '+' && te... | #include <deque>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
int main(int argc, char *argv[]) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
deque<int> d;
char temp_char[10];
while (scanf("%s", &temp_char) != -1) {
if (temp_char[0] != '+' && te... | [
"expression.operation.binary.remove",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 107,439 | 107,440 | u011621222 | cpp |
p02263 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#define rep(index, num) for (int index = 0; index < num; index++)
#define scan(argument) cin >> argument
#define prin(argument) cout << argument << endl
#define kaigyo cout << endl
#define eps 1e-15
typed... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#define rep(index, num) for (int index = 0; index < num; index++)
#define scan(argument) cin >> argument
#define prin(argument) cout << argument << endl
#define kaigyo cout << endl
#define eps 1e-15
typed... | [
"variable_declaration.type.primitive.change"
] | 107,441 | 107,442 | u282997867 | cpp |
p02263 | //
// Created by yoshihito.hotta on 2018/06/17.
//
#include <iostream>
#include <stdio.h>
#include <stdlib.h> /* atoi */
//
// Created by yoshihito.hotta on 2018/06/17.
//
#include <iostream>
using namespace std;
char a[100];
int stack[100];
int top = 0;
int pop() {
top--;
return a[top + 1];
}
void push(int d) ... | //
// Created by yoshihito.hotta on 2018/06/17.
//
#include <iostream>
#include <stdio.h>
#include <stdlib.h> /* atoi */
//
// Created by yoshihito.hotta on 2018/06/17.
//
#include <iostream>
using namespace std;
char a[100];
int stack[100];
int top = 0;
int pop() {
top--;
return stack[top + 1];
}
void push(int... | [
"identifier.change",
"function.return_value.change",
"expression.operation.binary.remove"
] | 107,443 | 107,444 | u011563519 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.