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 |
|---|---|---|---|---|---|---|---|
p02278 | #include <algorithm>
#include <cstdio>
#include <map>
#include <vector>
using namespace std;
int do_cycle(vector<int> &v, int x) {
int s = 0, m = 1 << 30;
for (auto &e : v)
s += e, m = min(m, e);
return min(s + (v.size() - 2) * m, s + m + (v.size() + 1) * x);
}
int main() {
int N, x = 1 << 30, r;
scanf(... | //????????°???????????°????????????????????\??????????????¢?????´???????????¨??????????§????
//P181-182(Google Books?????¬?????\???)?????????.
#include <algorithm>
#include <cstdio>
#include <map>
#include <vector>
using namespace std;
int do_cycle(vector<int> &v, int x) {
int s = 0, m = 1 << 30;
for (auto &e : v... | [
"variable_declaration.value.change"
] | 121,420 | 121,422 | u300645821 | cpp |
p02278 | #include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct StCst {
int m_nNo;
int m_nInSeq;
bool m_bDone;
static bool AsdNo(const StCst &roLeft, const StCst &roRight) {
return roLeft.m_nNo < roRight.m_nNo;
}
};
void fnInput(int &rnMaxSiz,... | #include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
struct StCst {
int m_nNo;
int m_nInSeq;
bool m_bDone;
static bool AsdNo(const StCst &roLeft, const StCst &roRight) {
return roLeft.m_nNo < roRight.m_nNo;
}
};
void fnInput(int &rnMaxSiz,... | [
"assignment.value.change",
"call.arguments.change"
] | 121,430 | 121,431 | u050764167 | cpp |
p02278 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FOR(i, l, r) for (i = (l); i < r; i++)
using namespace std;
typedef long long ll;
#define MAX_N (1010)
#define MAX_V (10010)
int n;
int A[MAX_N];
int g_min = MAX_V; ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FOR(i, l, r) for (i = (l); i < r; i++)
using namespace std;
typedef long long ll;
#define MAX_N (1010)
#define MAX_V (10010)
int n;
int A[MAX_N];
int g_min = MAX_V; ... | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 121,438 | 121,439 | u700272293 | cpp |
p02278 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define MAX 1000
#define INF 100000
using namespace std;
//[0] = id, [1] = cost
int A[MAX][2], SortedA[MAX][2], NumT[MAX];
bool comp[MAX] = {};
vector<int> Typelist[MAX];
int MIN = INF;
void sorts(int n) ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define MAX 1000
#define INF 100000
using namespace std;
//[0] = id, [1] = cost
int A[MAX][2], SortedA[MAX][2], NumT[MAX];
bool comp[MAX] = {};
vector<int> Typelist[MAX];
int MIN = INF;
void sorts(int n) ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 121,440 | 121,441 | u126072490 | cpp |
p02278 | #include <algorithm>
#include <iostream>
#include <map>
using namespace std;
int main() {
int n, ans = 0;
cin >> n;
int arr[n], sorted[n];
bool visit[n] = {false};
map<int, int> mp;
for (int i = 0; i < n; i++) {
cin >> arr[i];
sorted[i] = arr[i];
}
sort(sorted, sorted + n);
for (int i = 0;... | #include <algorithm>
#include <iostream>
#include <map>
using namespace std;
int main() {
int n, ans = 0;
cin >> n;
int arr[n], sorted[n];
bool visit[n] = {false};
map<int, int> mp;
for (int i = 0; i < n; i++) {
cin >> arr[i];
sorted[i] = arr[i];
}
sort(sorted, sorted + n);
for (int i = 0;... | [
"assignment.value.change",
"call.arguments.change"
] | 121,442 | 121,443 | u327778409 | cpp |
p02278 | #include <algorithm>
#include <iostream>
using namespace std;
static const int MAX = 1000;
static const int VMAX = 10000;
int n, A[MAX], s;
int B[MAX], T[VMAX + 1];
int solve() {
int ans = 0;
bool V[MAX];
for (int i = 0; i < n; i++) {
B[i] = A[i];
V[i] = false;
}
sort(B, B + n);
for (int i = 0; i... | #include <algorithm>
#include <iostream>
using namespace std;
static const int MAX = 1000;
static const int VMAX = 10000;
int n, A[MAX], s;
int B[MAX], T[VMAX + 1];
int solve() {
int ans = 0;
bool V[MAX];
for (int i = 0; i < n; i++) {
B[i] = A[i];
V[i] = false;
}
sort(B, B + n);
for (int i = 0; i... | [
"misc.typo",
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 121,451 | 121,450 | u167064764 | cpp |
p02278 | #include <algorithm>
#include <iostream>
using namespace std;
static const int MAX = 1000;
static const int VMAX = 10000;
int n, A[MAX], s;
int B[MAX], T[VMAX + 1];
int solve() {
int ans = 0;
bool V[VMAX];
for (int i = 0; i < n; i++) {
B[i] = A[i];
V[i] = false;
}
sort(B, B + n);
for (int i = 0; ... | #include <algorithm>
#include <iostream>
using namespace std;
static const int MAX = 1000;
static const int VMAX = 10000;
int n, A[MAX], s;
int B[MAX], T[VMAX + 1];
int solve() {
int ans = 0;
bool V[VMAX];
for (int i = 0; i < n; i++) {
B[i] = A[i];
V[i] = false;
}
sort(B, B + n);
for (int i = 0; ... | [
"assignment.variable.change",
"identifier.change"
] | 121,456 | 121,455 | u722526744 | cpp |
p02278 | #include <cstdio>
#include <vector>
using namespace std;
#define MIN(a, b) ((a) < (b) ? (a) : (b))
void merge(vector<pair<int, int>> &w, int left, int mid, int right) {
vector<pair<int, int>> L, R;
int n1 = mid - left;
int n2 = right - mid;
int i = 0, j = 0, k;
L.resize(n1 + 1);
R.resize(n2 + 1);
for (i... | #include <cstdio>
#include <vector>
using namespace std;
#define MIN(a, b) ((a) < (b) ? (a) : (b))
void merge(vector<pair<int, int>> &w, int left, int mid, int right) {
vector<pair<int, int>> L, R;
int n1 = mid - left;
int n2 = right - mid;
int i = 0, j = 0, k;
L.resize(n1 + 1);
R.resize(n2 + 1);
for (i... | [
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 121,460 | 121,461 | u263859629 | cpp |
p02278 | #include <bits/stdc++.h>
using namespace std;
#define Vi vector<int>
#define FOR(i, s, e) for (int i = s; i < e; i++)
#define ITER(v) v.begin(), v.end()
constexpr int MAX_N = 1000;
constexpr int MAX_VAL = 10001;
int minCostSort(int *w, int *ref, int n, int minval) {
bool isfixed[MAX_N] = {0};
int cost = 0;
FO... | #include <bits/stdc++.h>
using namespace std;
#define Vi vector<int>
#define FOR(i, s, e) for (int i = s; i < e; i++)
#define ITER(v) v.begin(), v.end()
constexpr int MAX_N = 1000;
constexpr int MAX_VAL = 10001;
int minCostSort(int *w, int *ref, int n, int minval) {
bool isfixed[MAX_N] = {0};
int cost = 0;
FO... | [
"call.arguments.change",
"expression.operation.binary.remove"
] | 121,463 | 121,464 | u312838664 | cpp |
p02278 | #include <algorithm>
#include <cassert>
#include <climits>
#include <fstream>
#include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <vector>
using namespace std;
#define DEBUG (0)
#if DEBUG
#define DPRINTF(...) \
do { ... | #include <algorithm>
#include <cassert>
#include <climits>
#include <fstream>
#include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <vector>
using namespace std;
#define DEBUG (0)
#if DEBUG
#define DPRINTF(...) \
do { ... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change",
"control_flow.loop.for.condition.change"
] | 121,465 | 121,466 | u166659979 | cpp |
p02279 | /*
* ALDS1_7_A.cpp
*
* Created on: Apr 30, 2018
* Author: 13743
*/
#include <cstdio>
struct Node {
int pa;
int lc;
int rs;
};
Node tree[100000];
int depth(int u) {
int de = 0;
while (tree[u].pa != -1) {
de++;
u = tree[u].pa;
}
return de;
}
int main() {
int n;
scanf("%d", &n);
... | /*
* ALDS1_7_A.cpp
*
* Created on: Apr 30, 2018
* Author: 13743
*/
#include <cstdio>
struct Node {
int pa;
int lc;
int rs;
};
Node tree[100000];
int depth(int u) {
int de = 0;
while (tree[u].pa != -1) {
de++;
u = tree[u].pa;
}
return de;
}
int main() {
int n;
scanf("%d", &n);
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 121,545 | 121,546 | u115352705 | cpp |
p02279 | #include <bits/stdc++.h>
using namespace std;
typedef struct node_ {
int id;
int k;
vector<node_ *> children;
int depth;
int parent;
} * node;
void printTree(vector<node> tree, int n) {
for (int i = 0; i < n; i++) {
node nd = tree[i];
char *kind = new char[15];
if (nd->parent == -1) {
s... | #include <bits/stdc++.h>
using namespace std;
typedef struct node_ {
int id;
int k;
vector<node_ *> children;
int depth;
int parent;
} * node;
void printTree(vector<node> tree, int n) {
for (int i = 0; i < n; i++) {
node nd = tree[i];
char *kind = new char[15];
if (nd->parent == -1) {
s... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 121,556 | 121,557 | u208440043 | cpp |
p02279 |
//左子右兄弟表达法
#include <cstdio>
#include <iostream>
using namespace std;
const int maxn = 1e5 + 5;
const int NIL = -1;
struct node {
int p, l, r;
};
node t[maxn];
int n, d[maxn];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << t[u].p << ", ";
cout << "depth = " << d[u] <<... |
//左子右兄弟表达法
#include <cstdio>
#include <iostream>
using namespace std;
const int maxn = 1e5 + 5;
const int NIL = -1;
struct node {
int p, l, r;
};
node t[maxn];
int n, d[maxn];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << t[u].p << ", ";
cout << "depth = " << d[u] <<... | [
"literal.string.change",
"io.output.change"
] | 121,559 | 121,560 | u173851820 | cpp |
p02279 | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <cmath>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
using namespace std;
typedef long ... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <cmath>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
using namespace std;
typedef long ... | [
"literal.string.change",
"io.output.change"
] | 121,561 | 121,562 | u147896162 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int D[MAX];
void print(int i) {
cout << "node " << i << ": parents = ";
cout << T[i].p << ", depth = " << D[i] << ", ";
if (T[i].p == NIL)
cout << "root";
else if (T[i].l == NIL)
cou... | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int D[MAX];
void print(int i) {
cout << "node " << i << ": parent = ";
cout << T[i].p << ", depth = " << D[i] << ", ";
if (T[i].p == NIL)
cout << "root";
else if (T[i].l == NIL)
cout... | [
"literal.string.change",
"io.output.change",
"io.output.newline.add"
] | 121,563 | 121,564 | u583707373 | cpp |
p02279 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <vector>
long long int INF = 1e18;
using namespace std;
typedef pair<long long int, long long int> P;
vector<int> E[110000];
int parent[11... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <vector>
long long int INF = 1e18;
using namespace std;
typedef pair<long long int, long long int> P;
vector<int> E[110000];
int parent[11... | [
"literal.string.change",
"io.output.change"
] | 121,566 | 121,567 | u467175809 | cpp |
p02279 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <vector>
long long int INF = 1e18;
using namespace std;
typedef pair<long long int, long long int> P;
vector<int> E[110000];
int parent[11... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <vector>
long long int INF = 1e18;
using namespace std;
typedef pair<long long int, long long int> P;
vector<int> E[110000];
int parent[11... | [
"literal.string.change",
"io.output.change"
] | 121,568 | 121,567 | u467175809 | cpp |
p02279 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <vector>
long long int INF = 1e18;
using namespace std;
typedef pair<long long int, long long int> P;
vector<int> E[110000];
int parent[11... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <vector>
long long int INF = 1e18;
using namespace std;
typedef pair<long long int, long long int> P;
vector<int> E[110000];
int parent[11... | [
"literal.string.change",
"io.output.change"
] | 121,569 | 121,567 | u467175809 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int parent;
int leftChild;
int rightSibling;
};
Node T[MAX];
int D[MAX];
void print(int u) {
cout << "node " << u << ": ";
cout << "parent = " << T[u].parent << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u]... | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int parent;
int leftChild;
int rightSibling;
};
Node T[MAX];
int D[MAX];
void print(int u) {
cout << "node " << u << ": ";
cout << "parent = " << T[u].parent << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u]... | [
"io.output.newline.add",
"function.return_type.change"
] | 121,570 | 121,571 | u626935725 | cpp |
p02279 | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <limits>
#include <map>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
map<int, int> mpa, mpb;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <limits>
#include <map>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
map<int, int> mpa, mpb;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D... | [
"literal.string.change",
"io.output.change",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 121,575 | 121,576 | u721251852 | cpp |
p02279 | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <limits>
#include <map>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
map<int, int> mpa, mpb;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <limits>
#include <map>
#include <set>
#include <stdio.h>
#include <vector>
using namespace std;
map<int, int> mpa, mpb;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 121,577 | 121,576 | u721251852 | cpp |
p02279 | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define LP(i, n) for (int i = 0; i < n; i++)
#define Mset(x, v) memset(x, v, sizeof(x... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define LP(i, n) for (int i = 0; i < n; i++)
#define Mset(x, v) memset(x, v, sizeof(x... | [
"literal.string.change",
"io.output.change"
] | 121,581 | 121,582 | u943155333 | cpp |
p02279 | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
map<int, string> t;
enum NodeType { ROOT = 0, INTERNALNODE = 1, LEAF = 2 };
struct type_name {
map<int, string> type_map;
type_name() {
type_map[ROOT] = "root";
type_map[INTERNALNODE] = "intern... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
map<int, string> t;
enum NodeType { ROOT = 0, INTERNALNODE = 1, LEAF = 2 };
struct type_name {
map<int, string> type_map;
type_name() {
type_map[ROOT] = "root";
type_map[INTERNALNODE] = "intern... | [
"assignment.value.change",
"identifier.change"
] | 121,585 | 121,586 | u335617201 | cpp |
p02279 | #include <iostream>
#include <vector>
using namespace std;
#define MAX 100000
int par[MAX];
void init(int n) {
for (int i = 0; i < n; i++) {
par[i] = -1;
}
}
int depth(int x) {
if (par[x] == -1) {
return 0;
} else {
return depth(par[x]) + 1;
}
}
int main() {
int n;
vector<int> v[MAX];
... | #include <iostream>
#include <vector>
using namespace std;
#define MAX 100000
int par[MAX];
void init(int n) {
for (int i = 0; i < n; i++) {
par[i] = -1;
}
}
int depth(int x) {
if (par[x] == -1) {
return 0;
} else {
return depth(par[x]) + 1;
}
}
int main() {
int n;
vector<int> v[MAX];
... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 121,587 | 121,588 | u881100444 | cpp |
p02278 | #include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
int A[n], B[n], C[n];
for (int i = 0; i < n; i++)
scanf("%d", &A[i]);
for (int i = 0; i < n; i++)
B[i] = A[i];
sort(B, B + n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if... | #include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
int A[n], B[n], C[n];
for (int i = 0; i < n; i++)
scanf("%d", &A[i]);
for (int i = 0; i < n; i++)
B[i] = A[i];
sort(B, B + n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if... | [
"control_flow.branch.if.condition.change"
] | 121,591 | 121,592 | u683313189 | cpp |
p02278 | #include <algorithm>
#include <bitset>
#include <stdio.h>
#include <utility>
using namespace std;
typedef pair<int, int> pi;
#define F first
#define S second
#define MP make_pair
const int N = 1e3 + 10;
bitset<N> went;
int bot, tot, a[N], t;
pi b[N];
void dfs(int n) {
if (went[n])
return;
went[n] = true;
t++;... | #include <algorithm>
#include <bitset>
#include <stdio.h>
#include <utility>
using namespace std;
typedef pair<int, int> pi;
#define F first
#define S second
#define MP make_pair
const int N = 1e3 + 10;
bitset<N> went;
int bot, tot, a[N], t;
pi b[N];
void dfs(int n) {
if (went[n])
return;
went[n] = true;
t++;... | [
"call.arguments.change",
"assignment.change"
] | 121,596 | 121,597 | u048151615 | cpp |
p02278 | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define INTINF 2147483647
#define LLINF 9223372036854775807
#define MAX 1000
#define VMAX 10000
typedef long long ll;
using namespace std;
int n, A[MAX], s;
in... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define INTINF 2147483647
#define LLINF 9223372036854775807
#define MAX 1000
#define VMAX 10000
typedef long long ll;
using namespace std;
int n, A[MAX], s;
in... | [
"control_flow.return.add"
] | 121,598 | 121,599 | u417793585 | cpp |
p02278 | #include <algorithm>
#include <iostream>
using namespace std;
static const int MAX = 1000;
static const int VMAX = 10000;
int n, A[MAX], s;
int B[MAX], T[VMAX + 1];
int solve() {
int ans = 0;
bool V[MAX];
for (int i = 0; i < n; i++) {
B[i] = A[i];
V[i] = false;
}
sort(B, B + n);
for (int i = 0; i... | #include <algorithm>
#include <iostream>
using namespace std;
static const int MAX = 1000;
static const int VMAX = 10000;
int n, A[MAX], s;
int B[MAX], T[VMAX + 1];
int solve() {
int ans = 0;
bool V[MAX];
for (int i = 0; i < n; i++) {
B[i] = A[i];
V[i] = false;
}
sort(B, B + n);
for (int i = 0; i... | [
"variable_declaration.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 121,602 | 121,603 | u815527706 | cpp |
p02274 | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
typedef long long llong;
int L[MAX / 2 + 2], R[MAX / 2 + 2];
llong merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
llong cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (i = 0; i < n1; i++) {
... | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
typedef long long llong;
int L[MAX / 2 + 2], R[MAX / 2 + 2];
llong merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
llong cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (i = 0; i < n1; i++) {
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 122,329 | 122,330 | u393302384 | cpp |
p02274 | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
typedef long long llong;
int L[MAX / 2 + 2], R[MAX / 2 + 2];
llong merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
llong cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (i = 0; i < n1; i++)
L... | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
typedef long long llong;
int L[MAX / 2 + 2], R[MAX / 2 + 2];
llong merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
llong cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (i = 0; i < n1; i++)
L... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 122,331 | 122,332 | u268647501 | cpp |
p02274 | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
long long merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
long long cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (i = 0; i < n1; i++)
L[i] = A[left +... | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
int L[MAX / 2 + 2], R[MAX / 2 + 2];
long long merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
long long cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (i = 0; i < n1; i++)
L[i] = A[left +... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 122,362 | 122,363 | u783707634 | cpp |
p02274 | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
typedef long long llong;
int L[MAX / 2 + 2], R[MAX / 2 + 2];
llong merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
llong cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; ++i... | #include <iostream>
using namespace std;
#define MAX 200000
#define SENTINEL 2000000000
typedef long long llong;
int L[MAX / 2 + 2], R[MAX / 2 + 2];
llong merge(int A[], int n, int left, int mid, int right) {
int i, j, k;
llong cnt = 0;
int n1 = mid - left;
int n2 = right - mid;
for (int i = 0; i < n1; ++i... | [
"variable_declaration.value.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.initializer.change"
] | 122,374 | 122,375 | u590698232 | cpp |
p02274 | #include <algorithm>
#include <iostream>
using namespace std;
int n, a[200000], b[200000], bit[262145];
void add(int i, int x) {
while (i <= n)
bit[i] += x, i += i & -i;
}
int sum(int i) {
int ret = 0;
while (i > 0)
ret += bit[i], i -= i & -i;
return ret;
}
int main() {
scanf("%d", &n);
for (int i =... | #include <algorithm>
#include <iostream>
using namespace std;
int n, a[200000], b[200000], bit[262145];
void add(int i, int x) {
while (i <= n)
bit[i] += x, i += i & -i;
}
int sum(int i) {
int ret = 0;
while (i > 0)
ret += bit[i], i -= i & -i;
return ret;
}
int main() {
scanf("%d", &n);
for (int i =... | [
"expression.operation.binary.add"
] | 122,392 | 122,393 | u823513038 | cpp |
p02280 | #include <cstdio>
#define MAX 10000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHight(int u) {
int h1 = 0, h2 = 0;
if (T[... | #include <cstdio>
#define MAX 10000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T... | [
"identifier.change",
"assignment.value.change",
"call.function.change",
"expression.operation.binary.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,437 | 122,438 | u246775415 | cpp |
p02280 | #include <cstdio>
#define MAX 10000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T... | #include <cstdio>
#define MAX 10000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == NIL)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T... | [
"function.return_value.change"
] | 122,442 | 122,443 | u583863211 | cpp |
p02280 | #include "bits/stdc++.h"
using namespace std;
struct Node {
int parent, left, right;
};
Node T[100005];
int n, D[1000005], hei[1000005];
void setDepth(int u, int p) {
if (u == -1)
return;
D[u] = p;
setDepth(T[u].left, p + 1);
setDepth(T[u].right, p + 1);
}
int setHeight(int u) {
int h = 0, hh = 0;
i... | #include "bits/stdc++.h"
using namespace std;
struct Node {
int parent, left, right;
};
Node T[100005];
int n, D[1000005], hei[1000005];
void setDepth(int u, int p) {
if (u == -1)
return;
D[u] = p;
setDepth(T[u].left, p + 1);
setDepth(T[u].right, p + 1);
}
int setHeight(int u) {
int h = 0, hh = 0;
i... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 122,444 | 122,445 | u607795294 | cpp |
p02280 | #include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node {
int p, left, right;
};
Node T[MAX];
int n, dep[MAX], h[MAX];
void Depth(int a, int da) {
if (a == NIL) {
return;
}
dep[a] = da;
Depth(T[a].left, da + 1);
Depth(T[a].right, da + 1);
}
int Height(int a) {
int ha1 = 0, ha2 = 0;
if (T... | #include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node {
int p, left, right;
};
Node T[MAX];
int n, dep[MAX], h[MAX];
void Depth(int a, int da) {
if (a == NIL) {
return;
}
dep[a] = da;
Depth(T[a].left, da + 1);
Depth(T[a].right, da + 1);
}
int Height(int a) {
int ha1 = 0, ha2 = 0;
if (T... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,447 | 122,448 | u870219409 | cpp |
p02280 | #include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node {
int p, left, right;
};
Node T[MAX];
int n, dep[MAX], h[MAX];
void Depth(int a, int da) {
if (a == NIL) {
return;
}
dep[a] = da;
Depth(T[a].left, da + 1);
Depth(T[a].right, da + 1);
}
int Height(int a) {
int ha1 = 0, ha2 = 0;
if (T... | #include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node {
int p, left, right;
};
Node T[MAX];
int n, dep[MAX], h[MAX];
void Depth(int a, int da) {
if (a == NIL) {
return;
}
dep[a] = da;
Depth(T[a].left, da + 1);
Depth(T[a].right, da + 1);
}
int Height(int a) {
int ha1 = 0, ha2 = 0;
if (T... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,449 | 122,448 | u870219409 | cpp |
p02280 | #include <bits/stdc++.h>
using namespace std;
#define MAX 100000
#define NIL -1
struct Node {
int parent, left, right;
};
struct Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int, int);
int setHeight(int);
int getSibling(int);
void print(int);
int main() {
int i, v, l, r, root = 0;
cin >> n;
for (i = 0... | #include <bits/stdc++.h>
using namespace std;
#define MAX 100000
#define NIL -1
struct Node {
int parent, left, right;
};
struct Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int, int);
int setHeight(int);
int getSibling(int);
void print(int);
int main() {
int i, v, l, r, root = 0;
cin >> n;
for (i = 0... | [
"literal.string.change",
"io.output.change"
] | 122,451 | 122,452 | u106492454 | cpp |
p02280 | #include <cstdio>
#define MAX 10000
#define N -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == N)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T[u].... | #include <cstdio>
#define MAX 10000
#define N -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX], H[MAX];
void setDepth(int u, int d) {
if (u == N)
return;
D[u] = d;
setDepth(T[u].left, d + 1);
setDepth(T[u].right, d + 1);
}
int setHeight(int u) {
int h1 = 0, h2 = 0;
if (T[u].... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 122,453 | 122,454 | u962332067 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100001
#define KAZU -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].parent << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].parent ==... | #include <iostream>
using namespace std;
#define MAX 100010
#define KAZU -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].parent << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].parent ==... | [
"preprocessor.define.value.change",
"literal.integer.change",
"literal.string.change",
"io.output.change"
] | 122,945 | 122,946 | u267916634 | cpp |
p02279 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define max 100001
struct node {
int p, l, r;
};
struct node t[max];
int d[max];
void getdepth(int i, int j) {
d[i] = j;
if (t[i].r != -1)
getdepth(t[i].r,... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define max 100001
struct node {
int p, l, r;
};
struct node t[max];
int d[max];
void getdepth(int i, int j) {
d[i] = j;
if (t[i].r != -1)
getdepth(t[i].r,... | [
"literal.string.change",
"io.output.change"
] | 122,947 | 122,948 | u829558692 | cpp |
p02279 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define max 100001
struct node {
int p, l, r;
};
struct node t[max];
int d[max];
void getdepth(int i, int j) {
d[i] = j;
if (t[i].r != -1)
getdepth(t[i].r,... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
#define max 100001
struct node {
int p, l, r;
};
struct node t[max];
int d[max];
void getdepth(int i, int j) {
d[i] = j;
if (t[i].r != -1)
getdepth(t[i].r,... | [
"literal.string.change",
"io.output.change"
] | 122,950 | 122,948 | u829558692 | cpp |
p02279 | #include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node {
int p, l, r;
};
struct Node T[MAX];
int n, D[MAX], H[MAX];
void print(int u) {
int i, c;
printf("node %d:", u);
printf("parent = %d, ", T[u].p);
printf("depth = %d, ", D[u]);
if (T[u].p == NIL)
printf("root, ");
else if (T[u].l == ... | #include <stdio.h>
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
struct Node T[MAX];
int n, D[MAX], H[MAX];
void print(int u) {
int i, c;
printf("node %d: ", u);
printf("parent = %d, ", T[u].p);
printf("depth = %d, ", D[u]);
if (T[u].p == NIL)
printf("root, ");
else if (T[u].l =... | [
"preprocessor.define.value.change",
"literal.integer.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,954 | 122,955 | u110930614 | cpp |
p02279 | #include <iostream>
#include <vector>
struct Node {
Node()
: // constracter
parent(-1), id(-1), depth(0) {}
int id;
int depth;
int parent;
std::vector<Node *> children; // stack,pointa
};
int FindRoot(Node *nodes, int n) {
for (int i = 0; i < n; i++) {
if (nodes[i].parent == -1) {
... | #include <iostream>
#include <vector>
struct Node {
Node()
: // constracter
parent(-1), id(-1), depth(0) {}
int id;
int depth;
int parent;
std::vector<Node *> children; // stack,pointa
};
int FindRoot(Node *nodes, int n) {
for (int i = 0; i < n; i++) {
if (nodes[i].parent == -1) {
... | [
"literal.string.change",
"expression.operation.binary.change"
] | 122,958 | 122,959 | u997586832 | cpp |
p02279 | #include <iostream>
#include <vector>
struct Node {
Node()
: // constracter
parent(-1), id(-1), depth(0) {}
int id;
int depth;
int parent;
std::vector<Node *> children; // stack,pointa
};
int FindRoot(Node *nodes, int n) {
for (int i = 0; i < n; i++) {
if (nodes[i].parent == -1) {
... | #include <iostream>
#include <vector>
struct Node {
Node()
: // constracter
parent(-1), id(-1), depth(0) {}
int id;
int depth;
int parent;
std::vector<Node *> children; // stack,pointa
};
int FindRoot(Node *nodes, int n) {
for (int i = 0; i < n; i++) {
if (nodes[i].parent == -1) {
... | [
"literal.string.change",
"expression.operation.binary.change"
] | 122,960 | 122,959 | u997586832 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define HN -1
struct Node {
int p, l, r;
};
Node Ta[MAX];
int num, Da[MAX];
void express(int d) {
int i, o;
cout << "node " << d << ":";
cout << "parent = " << Ta[d].p << ", ";
cout << "DEPTH = " << Da[d] << ", ";
if (Ta[d].p == HN) {
cout ... | #include <iostream>
using namespace std;
#define MAX 100005
#define HN -1
struct Node {
int p, l, r;
};
Node Ta[MAX];
int num, Da[MAX];
void express(int d) {
int i, o;
cout << "node " << d << ": ";
cout << "parent = " << Ta[d].p << ", ";
cout << "depth = " << Da[d] << ", ";
if (Ta[d].p == HN) {
cout... | [
"literal.string.change",
"io.output.change",
"literal.string.case.change",
"control_flow.branch.if.condition.change"
] | 122,968 | 122,969 | u870219409 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define HN -1
struct Node {
int p, l, r;
};
Node Ta[MAX];
int num, Da[MAX];
void express(int d) {
int i, o;
cout << "node " << d << ": ";
cout << "parent = " << Ta[d].p << ", ";
cout << "DEPTH = " << Da[d] << ", ";
if (Ta[d].p == HN) {
cout... | #include <iostream>
using namespace std;
#define MAX 100005
#define HN -1
struct Node {
int p, l, r;
};
Node Ta[MAX];
int num, Da[MAX];
void express(int d) {
int i, o;
cout << "node " << d << ": ";
cout << "parent = " << Ta[d].p << ", ";
cout << "depth = " << Da[d] << ", ";
if (Ta[d].p == HN) {
cout... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change",
"control_flow.branch.if.condition.change"
] | 122,971 | 122,969 | u870219409 | cpp |
p02279 | #include <stdio.h>
using namespace std;
#define NEL -1
struct tree {
int p, l, r;
};
tree a[100005];
int d[100005];
int re(int u, int p) {
d[u] = p;
if (a[u].r >= 0)
re(a[u].r, p);
if (a[u].l >= 0)
re(a[u].l, p + 1);
}
void print(int n) {
for (int i = 0; i < n; i++) {
printf("node %d:", i);
... | #include <stdio.h>
using namespace std;
#define NEL -1
struct tree {
int p, l, r;
};
tree a[100005];
int d[100005];
int re(int u, int p) {
d[u] = p;
if (a[u].r >= 0)
re(a[u].r, p);
if (a[u].l >= 0)
re(a[u].l, p + 1);
}
void print(int n) {
for (int i = 0; i < n; i++) {
printf("node %d:", i);
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,972 | 122,973 | u011621222 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].p == NIL)
cout << "ro... | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].p == NIL)
cout << "root... | [
"function.return_type.change",
"assignment.add"
] | 122,977 | 122,978 | u962332067 | cpp |
p02279 | #include <iostream>
using namespace std;
struct Node {
int parent, left, right;
};
struct Node T[100001];
#define NIL -1
int D[100001], n, dim, child, v, l, s;
void getDepth(int u, int p) {
D[u] = p;
if (T[u].right != NIL)
getDepth(T[u].right, p);
if (T[u].left != NIL)
getDepth(T[u].left, p + 1);
}
void... | #include <iostream>
using namespace std;
struct Node {
int parent, left, right;
};
struct Node T[100001];
#define NIL -1
int D[100001], n, dim, child, v, l, s;
void getDepth(int u, int p) {
D[u] = p;
if (T[u].right != NIL)
getDepth(T[u].right, p);
if (T[u].left != NIL)
getDepth(T[u].left, p + 1);
}
void... | [
"literal.string.change",
"io.output.change"
] | 122,981 | 122,982 | u367386691 | cpp |
p02279 | #include <iostream>
#include <string>
using namespace std;
#define MAX 100000
#define NIL -1
struct Node {
int parent;
int left;
int right;
};
Node T[MAX];
int n, D[MAX];
void setDepth(int u, int p) {
D[u] = p;
if (T[u].right != NIL) {
setDepth(T[u].right, p);
}
if (T[u].left != NIL) {
setDepth... | #include <iostream>
#include <string>
using namespace std;
#define MAX 100000
#define NIL -1
struct Node {
int parent;
int left;
int right;
};
Node T[MAX];
int n, D[MAX];
void setDepth(int u, int p) {
D[u] = p;
if (T[u].right != NIL) {
setDepth(T[u].right, p);
}
if (T[u].left != NIL) {
setDepth... | [
"expression.unary.arithmetic.add"
] | 122,985 | 122,986 | u492887225 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100001
#define NIL -1
struct Node {
int p; //親
int l; //一番左の子
int r; //右の兄弟
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node" << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T... | #include <iostream>
using namespace std;
#define MAX 100001
#define NIL -1
struct Node {
int p; //親
int l; //一番左の子
int r; //右の兄弟
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (... | [
"literal.string.change",
"io.output.change"
] | 122,987 | 122,988 | u204247262 | cpp |
p02279 | #include <cstdio>
#include <cstdlib>
typedef struct tree_ {
int parent;
int depth;
int noc;
int *child;
} tree;
void setDepth(tree *node, int id, int depth) {
node[id].depth = depth;
for (int i = 0; i < node[id].noc; i++)
setDepth(node, node[id].child[i], depth + 1);
return;
}
int main() {
int i,... | #include <cstdio>
#include <cstdlib>
typedef struct tree_ {
int parent;
int depth;
int noc;
int *child;
} tree;
void setDepth(tree *node, int id, int depth) {
node[id].depth = depth;
for (int i = 0; i < node[id].noc; i++)
setDepth(node, node[id].child[i], depth + 1);
return;
}
int main() {
int i,... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,989 | 122,990 | u832302504 | cpp |
p02279 | #include <iostream>
#include <stdio.h>
using namespace std;
#define MAX 1000005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
printf("node %d; ", u);
printf("parent = %d ", T[u].p);
printf(", ");
printf("depth = %d ", D[u]);
printf(", ");
if (... | #include <iostream>
#include <stdio.h>
using namespace std;
#define MAX 1000005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
printf("node %d: ", u);
printf("parent = %d", T[u].p);
printf(", ");
printf("depth = %d", D[u]);
printf(", ");
if (T[... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,992 | 122,993 | u199560691 | cpp |
p02279 | #include <iostream>
#include <stdio.h>
using namespace std;
#define MAX 1000005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
printf("node %d: ", u);
printf("parent = %d", T[u].p);
printf(", ");
printf("depth = %d", D[u]);
printf(", ");
if (T[... | #include <iostream>
#include <stdio.h>
using namespace std;
#define MAX 1000005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
printf("node %d: ", u);
printf("parent = %d", T[u].p);
printf(", ");
printf("depth = %d", D[u]);
printf(", ");
if (T[... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 122,995 | 122,993 | u199560691 | cpp |
p02279 | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int N;
int parent[100000], Left[100000], Right[100000];
int d[100000];
void rec(int u, int p) {
d[u] = p;
if (Right[u] != -1)
re... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int N;
int parent[100000], Left[100000], Right[100000];
int d[100000];
void rec(int u, int p) {
d[u] = p;
if (Right[u] != -1)
re... | [
"literal.string.change",
"io.output.change"
] | 122,998 | 122,999 | u685501501 | cpp |
p02279 | //
// main.cpp
// ALDS1_7_A
//
// Created by ptyuan on 2018/11/3.
// Copyright © 2018 YY. All rights reserved.
//
#include <cstdio>
#include <iostream>
using namespace std;
struct Node {
int parent = -1;
int left;
int right;
};
const int kCount = 100000;
const int kNil = -1;
Node tree[kCount];
int D[kCount... | //
// main.cpp
// ALDS1_7_A
//
// Created by ptyuan on 2018/11/3.
// Copyright © 2018 YY. All rights reserved.
//
#include <cstdio>
#include <iostream>
using namespace std;
struct Node {
int parent = -1;
int left;
int right;
};
const int kCount = 100000;
const int kNil = -1;
Node tree[kCount];
int D[kCount... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 123,001 | 123,002 | u201233769 | cpp |
p02279 | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define MAX 100000
#define NIL -1
struct node {
int p, l, r;
};
node A[MAX];
int D[MAX];
void setDepth(int v, int d) {
if (v == NIL)
return;
D[v] ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define MAX 100000
#define NIL -1
struct node {
int p, l, r;
};
node A[MAX];
int D[MAX];
void setDepth(int v, int d) {
if (v == NIL)
return;
D[v] ... | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo",
"identifier.change",
"variable_access.subscript.index.change",
"io.output.change"
] | 123,004 | 123,005 | u543955176 | cpp |
p02279 | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define MAX 100000
#define NIL -1
struct node {
int p, l, r;
};
node A[MAX];
int D[MAX];
void setDepth(int v, int d) {
if (v == NIL)
return;
D[v] ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
#define MAX 100000
#define NIL -1
struct node {
int p, l, r;
};
node A[MAX];
int D[MAX];
void setDepth(int v, int d) {
if (v == NIL)
return;
D[v] ... | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 123,006 | 123,005 | u543955176 | cpp |
p02279 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
#define MAX 10000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int depth(int i) {
int count = 0;
int c = i;
while (T[c].parent != NIL) {
c = T[c].parent;
count++;
}
return count;
}
string node... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
#define MAX 100000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int depth(int i) {
int count = 0;
int c = i;
while (T[c].parent != NIL) {
c = T[c].parent;
count++;
}
return count;
}
string nod... | [
"preprocessor.define.value.change",
"literal.integer.change",
"literal.string.change",
"io.output.change",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 123,007 | 123,008 | u164798161 | cpp |
p02279 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
#define MAX 10000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int depth(int i) {
int count = 0;
int c = i;
while (T[c].parent != NIL) {
c = T[c].parent;
count++;
}
return count;
}
string node... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
#define MAX 100000
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int depth(int i) {
int count = 0;
int c = i;
while (T[c].parent != NIL) {
c = T[c].parent;
count++;
}
return count;
}
string nod... | [
"preprocessor.define.value.change",
"literal.integer.change",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 123,009 | 123,008 | u164798161 | cpp |
p02279 | #include <bits/stdc++.h>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int c;
cout << "node" << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].p == NIL)
cout << "roo... | #include <bits/stdc++.h>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].p == NIL)
cout << "ro... | [
"literal.string.change",
"io.output.change"
] | 123,011 | 123,012 | u398020462 | cpp |
p02279 | #include <bits/stdc++.h>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int getDepth(int u) {
int d = 0;
while (T[u].parent != NIL) {
u = T[u].parent;
d++;
}
return d;
};
vector<int> D(MAX, 0);
void setDepth(int u, int p) {
D[u] = p;... | #include <bits/stdc++.h>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int getDepth(int u) {
int d = 0;
while (T[u].parent != NIL) {
u = T[u].parent;
d++;
}
return d;
};
vector<int> D(MAX, 0);
void setDepth(int u, int p) {
D[u] = p;... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 123,013 | 123,014 | u808697998 | cpp |
p02279 | #include <iostream>
#include <string>
using namespace std;
const int N = 100000;
const int NIL = -1;
struct Node {
int parent, left, right;
};
void set_depth(int id, int d, Node T[], int depth[]) {
depth[id] = d;
if (T[id].left != NIL)
set_depth(T[id].left, d + 1, T, depth);
if (T[id].right != NIL)
s... | #include <iostream>
#include <string>
using namespace std;
const int N = 100000;
const int NIL = -1;
struct Node {
int parent, left, right;
};
void set_depth(int id, int d, Node T[], int depth[]) {
depth[id] = d;
if (T[id].left != NIL)
set_depth(T[id].left, d + 1, T, depth);
if (T[id].right != NIL)
s... | [
"control_flow.branch.else.add"
] | 123,015 | 123,016 | u908238078 | cpp |
p02279 | #include <iostream>
#include <stdio.h>
#define MAX 100005
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX];
void rec(int u, int p) {
D[u] = p;
if (T[u].right != NIL)
rec(T[u].right, p);
if (T[u].left != NIL)
rec(T[u].left, p + 1);
}
void printChildren(int id) {
p... | #include <iostream>
#include <stdio.h>
#define MAX 100005
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX];
void rec(int u, int p) {
D[u] = p;
if (T[u].right != NIL)
rec(T[u].right, p);
if (T[u].left != NIL)
rec(T[u].left, p + 1);
}
void printChildren(int id) {
p... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 123,017 | 123,018 | u888548672 | cpp |
p02279 | #include <iostream>
#include <stdio.h>
#define MAX 100005
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX];
void rec(int u, int p) {
D[u] = p;
if (T[u].right != NIL)
rec(T[u].right, p);
if (T[u].left != NIL)
rec(T[u].left, p + 1);
}
void printChildren(int id) {
p... | #include <iostream>
#include <stdio.h>
#define MAX 100005
#define NIL -1
struct Node {
int parent, left, right;
};
Node T[MAX];
int n, D[MAX];
void rec(int u, int p) {
D[u] = p;
if (T[u].right != NIL)
rec(T[u].right, p);
if (T[u].left != NIL)
rec(T[u].left, p + 1);
}
void printChildren(int id) {
p... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 123,020 | 123,018 | u888548672 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100001
#define NIL -1
struct Node {
int p, l, r;
};
struct Node T[MAX];
int D[MAX];
void rec(int u, int p) {
D[u] = p;
if (T[u].r != NIL)
rec(T[u].r, p);
if (T[u].l != NIL)
rec(T[u].l, p + 1);
}
void print(int u) {
cout << "node " << u << ": parent... | #include <iostream>
using namespace std;
#define MAX 100001
#define NIL -1
struct Node {
int p, l, r;
};
struct Node T[MAX];
int D[MAX];
void rec(int u, int p) {
D[u] = p;
if (T[u].r != NIL)
rec(T[u].r, p);
if (T[u].l != NIL)
rec(T[u].l, p + 1);
}
void print(int u) {
cout << "node " << u << ": parent... | [
"io.output.change"
] | 123,025 | 123,026 | u820781011 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ": ";
if (T[u].p == NIL)
cout << "root... | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].p == NIL)
cout << "root... | [
"literal.string.change",
"io.output.change"
] | 123,029 | 123,030 | u124905431 | cpp |
p02279 | #include <iostream>
using namespace std;
class Node {
public:
int depth;
int parent;
int degree;
int *children;
};
void Depth(Node *node, int cur, int dp) {
node[cur].depth = dp;
for (int i = 0; i < node[cur].degree; ++i) {
Depth(node, node[cur].children[i], dp + 1);
}
}
int main() {
int n;
... | #include <iostream>
using namespace std;
class Node {
public:
int depth;
int parent;
int degree;
int *children;
};
void Depth(Node *node, int cur, int dp) {
node[cur].depth = dp;
for (int i = 0; i < node[cur].degree; ++i) {
Depth(node, node[cur].children[i], dp + 1);
}
}
int main() {
int n;
... | [
"assignment.value.change",
"identifier.change"
] | 123,031 | 123,032 | u301021544 | cpp |
p02279 | #include <iostream>
#include <vector>
using namespace std;
struct Node {
Node(int k) : depth(0), parentId(-1) { vChildId.resize(k, -1); }
int depth;
int parentId;
vector<int> vChildId;
};
void SetNodeDepthRecursive(Node *n, vector<Node *> &vNode) {
int s = n->vChildId.size();
if (0 == s)
return;
for ... | #include <iostream>
#include <vector>
using namespace std;
struct Node {
Node(int k) : depth(0), parentId(-1) { vChildId.resize(k, -1); }
int depth;
int parentId;
vector<int> vChildId;
};
void SetNodeDepthRecursive(Node *n, vector<Node *> &vNode) {
int s = n->vChildId.size();
if (0 == s)
return;
for ... | [
"literal.string.change",
"io.output.change"
] | 123,033 | 123,034 | u701536962 | cpp |
p02279 | #include <iostream>
using namespace std;
typedef struct {
int id;
int parent;
int depth;
int child_num;
int *children;
} node;
node *tree;
void update_depth(int node_id, int depth) {
node nod = tree[node_id];
tree[node_id].depth = depth;
int child_num = nod.child_num;
for (int i = 0; i < child_num... | #include <iostream>
using namespace std;
typedef struct {
int id;
int parent;
int depth;
int child_num;
int *children;
} node;
node *tree;
void update_depth(int node_id, int depth) {
node nod = tree[node_id];
tree[node_id].depth = depth;
int child_num = nod.child_num;
for (int i = 0; i < child_num... | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"assignment.variable.change"
] | 123,035 | 123,036 | u813563655 | cpp |
p02279 | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <v... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <v... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 123,037 | 123,038 | u819979588 | cpp |
p02279 | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <v... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <v... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 123,039 | 123,038 | u819979588 | cpp |
p02279 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ctype.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ctype.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#includ... | [
"literal.string.change",
"io.output.change"
] | 123,041 | 123,042 | u021233305 | cpp |
p02279 | #include <cstdio>
#include <iostream>
using namespace std;
const long N = 100001;
typedef struct {
long parent;
long left; // 1????????????
long
right_sib; //??????????????????(????????????????????¬?????????????????¨?????????)
} Node;
long n, d[N];
Node t[N];
void print(long a) {
printf("node %ld: par... | #include <cstdio>
#include <iostream>
using namespace std;
const long N = 100001;
typedef struct {
long parent;
long left; // 1????????????
long
right_sib; //??????????????????(????????????????????¬?????????????????¨?????????)
} Node;
long n, d[N];
Node t[N];
void print(long a) {
printf("node %ld: par... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 123,043 | 123,044 | u231562319 | cpp |
p02279 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
struct tree {
vector<int> children;
int depth;
int parent;
string type; // root, leef, internal node
};
tree trees[100000];
int calc_depth(int n) {
for (vector<int>::iterator i = trees[n].children.begin();
i < trees[n].chil... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
struct tree {
vector<int> children;
int depth;
int parent;
string type; // root, leef, internal node
};
tree trees[100000];
int calc_depth(int n) {
for (vector<int>::iterator i = trees[n].children.begin();
i < trees[n].chil... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 123,045 | 123,046 | u783707634 | cpp |
p02279 | #include <algorithm>
#include <cstdio>
#include <iostream>
#define N 100001
#define NIL -1
using namespace std;
struct Node {
int parent, left, right;
};
Node **T;
int *depth;
Node *newNode(int parent, int left, int right) {
Node *p = new Node;
p->parent = parent;
p->left = left;
p->right = right;
return... | #include <algorithm>
#include <cstdio>
#include <iostream>
#define N 100001
#define NIL -1
using namespace std;
struct Node {
int parent, left, right;
};
Node **T;
int *depth;
Node *newNode(int parent, int left, int right) {
Node *p = new Node;
p->parent = parent;
p->left = left;
p->right = right;
return... | [
"variable_declaration.add",
"identifier.change",
"expression.operation.binary.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"assignment.value.change"
] | 123,050 | 123,051 | u826647986 | cpp |
p02279 | #include <algorithm>
#include <iostream>
#include <iterator> //back_inserter
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string> //ノードのタイプ(root、internal node、leafのいずれか)を記録
#include <vector> //子のセットを記録
#define N_MAX 100000
#define MAX_DEPTH
#define NIL -1 //親や子などが存在しない場合に用いる
using namespace std;
//... | #include <algorithm>
#include <iostream>
#include <iterator> //back_inserter
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string> //ノードのタイプ(root、internal node、leafのいずれか)を記録
#include <vector> //子のセットを記録
#define N_MAX 100000
#define MAX_DEPTH
#define NIL -1 //親や子などが存在しない場合に用いる
using namespace std;
//... | [
"control_flow.loop.condition.change",
"assignment.value.change",
"identifier.change",
"call.arguments.change"
] | 123,052 | 123,053 | u401858389 | cpp |
p02279 | #include <algorithm>
#include <iostream>
#include <iterator> //back_inserter
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string> //ノードのタイプ(root、internal node、leafのいずれか)を記録
#include <vector> //子のセットを記録
#define N_MAX 100000
#define MAX_DEPTH
#define NIL -1 //親や子などが存在しない場合に用いる
using namespace std;
//... | #include <algorithm>
#include <iostream>
#include <iterator> //back_inserter
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string> //ノードのタイプ(root、internal node、leafのいずれか)を記録
#include <vector> //子のセットを記録
#define N_MAX 100000
#define MAX_DEPTH
#define NIL -1 //親や子などが存在しない場合に用いる
using namespace std;
//... | [
"control_flow.loop.condition.change"
] | 123,054 | 123,053 | u401858389 | cpp |
p02279 | /*! if g++ -g alds_1_7_a.cpp -o alds_1_7_a.out; then ./alds_1_7_a.out <
* alds_1_7_a.test; fi
*/
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <nu... | /*! if g++ -g alds_1_7_a.cpp -o alds_1_7_a.out; then ./alds_1_7_a.out <
* alds_1_7_a.test; fi
*/
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <nu... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 123,055 | 123,056 | u213314770 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int s) {
int i, c;
cout << "node " << s << ": ";
cout << "parent = " << T[s].p << ",";
cout << "depth = " << D[s] << ", ";
if (T[s].p == NIL)
cout << "root,... | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int s) {
int i, c;
cout << "node " << s << ": ";
cout << "parent = " << T[s].p << ", ";
cout << "depth = " << D[s] << ", ";
if (T[s].p == NIL)
cout << "root... | [
"literal.string.change",
"io.output.change"
] | 123,060 | 123,058 | u870980810 | cpp |
p02279 | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int s) {
int i, c;
cout << "node " << s << ": ";
cout << "parent = " << T[s].p << ",";
cout << "depth = " << D[s] << ", ";
if (T[s].p == NIL)
cout << "root,... | #include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1
struct Node {
int p, l, r;
};
Node T[MAX];
int n, D[MAX];
void print(int s) {
int i, c;
cout << "node " << s << ": ";
cout << "parent = " << T[s].p << ", ";
cout << "depth = " << D[s] << ", ";
if (T[s].p == NIL)
cout << "root... | [
"literal.string.change",
"io.output.change"
] | 123,061 | 123,058 | u870980810 | cpp |
p02279 | #include <iostream>
using namespace std;
const int nil = -1;
struct Node {
int p, l, r;
};
Node T[100000];
int n, D[100000];
void print(int u) {
cout << "node" << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].p == nil)
cout << "root, ";
else if (T[u].... | #include <iostream>
using namespace std;
const int nil = -1;
struct Node {
int p, l, r;
};
Node T[100000];
int n, D[100000];
void print(int u) {
cout << "node " << u << ": ";
cout << "parent = " << T[u].p << ", ";
cout << "depth = " << D[u] << ", ";
if (T[u].p == nil)
cout << "root, ";
else if (T[u]... | [
"literal.string.change",
"io.output.change"
] | 123,064 | 123,065 | u633068244 | cpp |
p02279 | #define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int number; //
int parent_nu... | #define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int number; //
int parent_nu... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 123,070 | 123,071 | u639594975 | cpp |
p02279 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
struct Node {
struct Node *parent;
struct Node *left_child;
struct Node *right_sibling;
int key;
int depth;
Node(int key_ = -1)
: parent{nullptr}, left_child{nullptr},
right_sibling{nullptr}, key{key_}, depth{-1} {};
... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
struct Node {
struct Node *parent;
struct Node *left_child;
struct Node *right_sibling;
int key;
int depth;
Node(int key_ = -1)
: parent{nullptr}, left_child{nullptr},
right_sibling{nullptr}, key{key_}, depth{-1} {};
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"assignment.value.change"
] | 123,072 | 123,073 | u766807750 | cpp |
p02279 | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
struct node {
int parent, left, right;
};
node t[100000];
int n, NI... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
struct node {
int parent, left, right;
};
node t[100000];
int n, NI... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 123,074 | 123,075 | u177949486 | cpp |
p02279 | #include <iostream>
#include <vector>
using namespace std;
struct Tree {
int node;
int depth;
int parent;
vector<int> childs;
Tree(int id, int depth, int parent, vector<int> childs) {
this->node = id;
this->depth = depth;
this->parent = parent;
this->childs = childs;
}
void fix_tree(int d... | #include <iostream>
#include <vector>
using namespace std;
struct Tree {
int node;
int depth;
int parent;
vector<int> childs;
Tree(int id, int depth, int parent, vector<int> childs) {
this->node = id;
this->depth = depth;
this->parent = parent;
this->childs = childs;
}
void fix_tree(int d... | [
"literal.string.change",
"io.output.change"
] | 123,076 | 123,077 | u368876271 | cpp |
p02279 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a... | [
"assignment.variable.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change"
] | 123,078 | 123,079 | u346550152 | cpp |
p02279 | #include <iostream>
using namespace std;
const long MAX = 100001;
const long NIL = -1;
struct Node {
long parent, leftChild, rightSibling;
};
struct Node T[MAX];
long n, Depth[MAX];
void print(long id) {
cout << "node " << id << ": ";
cout << "parent = " << T[id].parent << ", ";
cout << "depth = " << Depth[... | #include <iostream>
using namespace std;
const long MAX = 100001;
const long NIL = -1;
struct Node {
long parent, leftChild, rightSibling;
};
struct Node T[MAX];
long n, Depth[MAX];
void print(long id) {
cout << "node " << id << ": ";
cout << "parent = " << T[id].parent << ", ";
cout << "depth = " << Depth[... | [
"literal.string.change",
"io.output.change"
] | 123,080 | 123,081 | u564420347 | cpp |
p02279 | //
// Created by ?????°?????? on 2016/04/05.
//
#include <iostream>
using namespace std;
const int MAX = 100000;
const int NIL = -1;
struct Node {
// ????????????????§????
int parent;
int left_child;
int right_sibling;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "Node " << u << ... | //
// Created by ?????°?????? on 2016/04/05.
//
#include <iostream>
using namespace std;
const int MAX = 100000;
const int NIL = -1;
struct Node {
// ????????????????§????
int parent;
int left_child;
int right_sibling;
};
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i, c;
cout << "node " << u << ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 123,082 | 123,083 | u210148484 | cpp |
p02279 | #include <iostream>
#include <string>
#define MAX 100005
#define NIL -1
using namespace std;
struct Node {
int parent, left, right;
};
Node Nodes[MAX];
int node_num;
int Depth[MAX];
void set_depth(int num, int depth) {
Depth[num] = depth;
if (Nodes[num].right != NIL) {
set_depth(Nodes[num].right, depth);... | #include <iostream>
#include <string>
#define MAX 100005
#define NIL -1
using namespace std;
struct Node {
int parent, left, right;
};
Node Nodes[MAX];
int node_num;
int Depth[MAX];
void set_depth(int num, int depth) {
Depth[num] = depth;
if (Nodes[num].right != NIL) {
set_depth(Nodes[num].right, depth);... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.string.change",
"io.output.change",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 123,090 | 123,091 | u864527629 | cpp |
p02279 | #include <iostream>
#include <string>
#define MAX 100005
#define NIL -1
using namespace std;
struct Node {
int parent, left, right;
};
Node Nodes[MAX];
int node_num;
int Depth[MAX];
void set_depth(int num, int depth) {
Depth[num] = depth;
if (Nodes[num].right != NIL) {
set_depth(Nodes[num].right, depth);... | #include <iostream>
#include <string>
#define MAX 100005
#define NIL -1
using namespace std;
struct Node {
int parent, left, right;
};
Node Nodes[MAX];
int node_num;
int Depth[MAX];
void set_depth(int num, int depth) {
Depth[num] = depth;
if (Nodes[num].right != NIL) {
set_depth(Nodes[num].right, depth);... | [
"literal.string.change",
"io.output.change"
] | 123,092 | 123,091 | u864527629 | cpp |
p02279 | #include <iostream>
#include <list>
#include <stdlib.h>
using namespace std;
bool linear_search(int *array, int size, int num);
void print_children(int *children, int size);
struct graph {
int parent_id;
int child_num;
int depth;
int *children;
};
int main() {
int n;
cin >> n;
graph *g = (graph *)calloc(... | #include <iostream>
#include <list>
#include <stdlib.h>
using namespace std;
bool linear_search(int *array, int size, int num);
void print_children(int *children, int size);
struct graph {
int parent_id;
int child_num;
int depth;
int *children;
};
int main() {
int n;
cin >> n;
graph *g = (graph *)calloc(... | [
"literal.string.change",
"io.output.change"
] | 123,093 | 123,094 | u641921093 | cpp |
p02279 | #include <iostream>
#include <memory>
#include <vector>
using namespace std;
struct Node {
int id;
int depth;
string state;
shared_ptr<Node> parent;
vector<shared_ptr<Node>> children;
Node() : id(-1), state("root") {}
Node(int id) : id(id), state("root"), depth(0) {
parent = shared_ptr<Node>(new... | #include <iostream>
#include <memory>
#include <vector>
using namespace std;
struct Node {
int id;
int depth;
string state;
shared_ptr<Node> parent;
vector<shared_ptr<Node>> children;
Node() : id(-1), state("root") {}
Node(int id) : id(id), state("root"), depth(0) {
parent = shared_ptr<Node>(new... | [
"literal.string.change",
"io.output.change"
] | 123,097 | 123,098 | u387690318 | cpp |
p02279 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Node {
public:
int id;
int parent;
int depth;
string type;
vector<int> child;
Node() : id(-1), parent(-1), depth(-1), type(""){};
};
vector<Node> root;
void dfs(int id, int d) {
if (root[id].depth < ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Node {
public:
int id;
int parent;
int depth;
string type;
vector<int> child;
Node() : id(-1), parent(-1), depth(-1), type(""){};
};
vector<Node> root;
void dfs(int id, int d) {
if (root[id].depth < ... | [
"literal.string.change",
"assignment.value.change"
] | 123,099 | 123,100 | u387690318 | cpp |
p02279 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Node {
public:
int id;
int parent;
int depth;
string type;
vector<int> child;
Node() : id(-1), parent(-1), depth(-1), type(""){};
};
vector<Node> root;
void dfs(int id, int d) {
if (root[id].depth < ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Node {
public:
int id;
int parent;
int depth;
string type;
vector<int> child;
Node() : id(-1), parent(-1), depth(-1), type(""){};
};
vector<Node> root;
void dfs(int id, int d) {
if (root[id].depth < ... | [
"literal.string.change",
"assignment.value.change"
] | 123,101 | 123,100 | u387690318 | cpp |
p02279 | #include <bits/stdc++.h>
using namespace std;
int par[100000];
struct node {
node *next;
int key;
};
node *head[100000];
void mk_node(int key, node *next, node *prev) {
node *n = (node *)malloc(sizeof(node));
n->key = key;
n->next = next;
prev->next = n;
}
void insert(int x, int i) { mk_node(x, head[i]->... | #include <bits/stdc++.h>
using namespace std;
int par[100000];
struct node {
node *next;
int key;
};
node *head[100000];
void mk_node(int key, node *next, node *prev) {
node *n = (node *)malloc(sizeof(node));
n->key = key;
n->next = next;
prev->next = n;
}
void insert(int x, int i) { mk_node(x, head[i]->... | [
"literal.string.change",
"io.output.change",
"call.arguments.change"
] | 123,104 | 123,105 | u952951927 | cpp |
p02279 | #include <bits/stdc++.h>
using namespace std;
int par[100000];
struct node {
node *next;
int key;
};
node *head[100000];
void mk_node(int key, node *next, node *prev) {
node *n = (node *)malloc(sizeof(node));
n->key = key;
n->next = next;
prev->next = n;
}
void insert(int x, int i) { mk_node(x, head[i]->... | #include <bits/stdc++.h>
using namespace std;
int par[100000];
struct node {
node *next;
int key;
};
node *head[100000];
void mk_node(int key, node *next, node *prev) {
node *n = (node *)malloc(sizeof(node));
n->key = key;
n->next = next;
prev->next = n;
}
void insert(int x, int i) { mk_node(x, head[i]->... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 123,106 | 123,105 | u952951927 | cpp |
p02279 | #include <bits/stdc++.h>
using namespace std;
int par[100000];
struct node {
node *next;
int key;
};
node *head[100000];
void mk_node(int key, node *next, node *prev) {
node *n = (node *)malloc(sizeof(node));
n->key = key;
n->next = next;
prev->next = n;
}
void insert(int x, int i) { mk_node(x, head[i]->... | #include <bits/stdc++.h>
using namespace std;
int par[100000];
struct node {
node *next;
int key;
};
node *head[100000];
void mk_node(int key, node *next, node *prev) {
node *n = (node *)malloc(sizeof(node));
n->key = key;
n->next = next;
prev->next = n;
}
void insert(int x, int i) { mk_node(x, head[i]->... | [
"literal.string.change",
"io.output.change"
] | 123,107 | 123,105 | u952951927 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.