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 |
|---|---|---|---|---|---|---|---|
p02238 | #include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
typedef long long signed int ll;
constexpr ll NIL = -20000000000;
int g[101][101], n, d[101], f[101];
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
int u, k, v;
cin >> u... | #include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
using namespace std;
typedef long long signed int ll;
constexpr ll NIL = -20000000000;
int g[101][101], n, d[101], f[101];
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
int u, k, v;
cin >> u... | [
"control_flow.break.add"
] | 94,464 | 94,465 | u834733570 | cpp |
p02238 | #include <iostream>
using namespace std;
#define N 100
#define WHITE 0
#define GRAY 1
#define BLACK 1
int n, M[N][N];
int color[N], s[N], f[N], ts;
void dfs_visit(int u) {
int v;
color[u] = GRAY;
s[u] = ++ts;
for (v = 0; v < n; v++) {
if (M[u][v] == 0) {
continue;
}
if (color[v] == WHITE) {
... | #include <iostream>
using namespace std;
#define N 100
#define WHITE 0
#define GRAY 1
#define BLACK 1
int n, M[N][N];
int color[N], s[N], f[N], ts;
void dfs_visit(int u) {
int v;
color[u] = GRAY;
s[u] = ++ts;
for (v = 0; v < n; v++) {
if (M[u][v] == 0) {
continue;
}
if (color[v] == WHITE) {
... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 94,468 | 94,469 | u492887225 | cpp |
p02238 | #include <iostream>
using namespace std;
int adja[101][101];
int d[101], f[101], cnt;
void dfs(int u) {
d[u] = ++cnt;
for (int i = 0, v; (v = adja[u][i]) > 0; ++i) {
if (v > 0)
continue;
dfs(v);
}
f[u] = ++cnt;
}
int main() {
int n, k, u;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >... | #include <iostream>
using namespace std;
int adja[101][101];
int d[101], f[101], cnt;
void dfs(int u) {
d[u] = ++cnt;
for (int i = 0, v; (v = adja[u][i]) > 0; ++i) {
if (d[v] > 0)
continue;
dfs(v);
}
f[u] = ++cnt;
}
int main() {
int n, k, u;
cin >> n;
for (int i = 0; i < n; ++i) {
ci... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 94,470 | 94,471 | u327778409 | cpp |
p02238 | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> u >> k... | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,472 | 94,473 | u503318273 | cpp |
p02238 | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> u >> k... | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,476 | 94,473 | u503318273 | cpp |
p02238 | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> u >> k... | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> u >> k... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,472 | 94,477 | u503318273 | cpp |
p02238 | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> u >> k... | #include <iostream>
#include <queue>
using namespace std;
int a[101][101];
int n = 0;
int found[101];
int ended[101];
int aaa(int i, int time);
int main() {
for (int i = 0; i < 101; i++)
for (int j = 0; j < 101; j++)
a[i][j] = 0;
int u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> u >> k... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,476 | 94,477 | u503318273 | cpp |
p02238 | #include <algorithm>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
struct node {
int num;
std::vector<int> child;
};
int recurcive(node nodes[], int d[100], int f[100], int n, int count) {
d[n] = count++;
for (size_t i = 0; i < nodes[n].child.size(); i++) {
if (d[nodes[n].child[... | #include <algorithm>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
struct node {
int num;
std::vector<int> child;
};
int recurcive(node nodes[], int d[100], int f[100], int n, int count) {
d[n] = count++;
for (size_t i = 0; i < nodes[n].child.size(); i++) {
if (d[nodes[n].child[... | [
"expression.unary.arithmetic.add"
] | 94,482 | 94,483 | u783707634 | cpp |
p02238 | #include <cstdio>
#include <iostream>
#include <stack>
using namespace std;
static const int MAX_NUM = 101;
static const int NO_VISIT = 0;
static const int NOW_VISIT = 1;
static const int END_VISIT = 2;
void DSF(int *matrix, int num) {
int i, j;
int ttime = 0;
int stime[MAX_NUM + 1] = {0};
int etime[MAX_NUM ... | #include <cstdio>
#include <iostream>
#include <stack>
using namespace std;
static const int MAX_NUM = 101;
static const int NO_VISIT = 0;
static const int NOW_VISIT = 1;
static const int END_VISIT = 2;
void DSF(int *matrix, int num) {
int i, j;
int ttime = 0;
int stime[MAX_NUM + 1] = {0};
int etime[MAX_NUM ... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"assignment.variable.change",
"variable_access.subscript.index.change"
] | 94,497 | 94,498 | u861447106 | cpp |
p02238 | #include <cstdio>
#include <iostream>
#include <stack>
using namespace std;
static const int MAX_NUM = 101;
static const int NO_VISIT = 0;
static const int NOW_VISIT = 1;
static const int END_VISIT = 2;
void DSF(int *matrix, int num) {
int i, j;
int ttime = 0;
int stime[MAX_NUM + 1] = {0};
int etime[MAX_NUM ... | #include <cstdio>
#include <iostream>
#include <stack>
using namespace std;
static const int MAX_NUM = 101;
static const int NO_VISIT = 0;
static const int NOW_VISIT = 1;
static const int END_VISIT = 2;
void DSF(int *matrix, int num) {
int i, j;
int ttime = 0;
int stime[MAX_NUM + 1] = {0};
int etime[MAX_NUM +... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"assignment.variable.change",
"variable_access.subscript.index.change"
] | 94,497 | 94,499 | u861447106 | cpp |
p02238 | #include <stack>
#include <stdio.h>
#define MAX 100
enum SATE { NOT_VISIT, DISCOVER, FOUND };
int G[MAX + 1][MAX + 1], d[MAX + 1], f[MAX + 1], STATE[MAX + 1];
int n, tt;
std::stack<int> S;
void dfs(int i) {
S.push(i);
STATE[i] = DISCOVER;
d[i] = ++tt;
for (int j = 1; j <= n; ++j) {
if (G[i][j] != -1 &&... |
#include <stack>
#include <stdio.h>
#define MAX 100
enum SATE { NOT_VISIT, DISCOVER, FOUND };
int G[MAX + 1][MAX + 1], d[MAX + 1], f[MAX + 1], STATE[MAX + 1];
int n, tt;
std::stack<int> S;
void dfs(int i) {
S.push(i);
STATE[i] = DISCOVER;
d[i] = ++tt;
for (int j = 1; j <= n; ++j) {
if (G[i][j] != 1 ||... | [
"expression.operation.unary.arithmetic.remove",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 94,506 | 94,507 | u379744035 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GREY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GREY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
... | [
"identifier.change",
"expression.operation.binary.change"
] | 94,508 | 94,509 | u883286734 | cpp |
p02238 | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | [
"identifier.change",
"call.arguments.change"
] | 94,513 | 94,514 | u682097651 | cpp |
p02238 | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define rep(i, n) FOR(i, 0, n)
#define DEBUG(x) cout << #x << ": " << x << endl
#define vint vector<int>
#define vdouble ve... | [] | 94,515 | 94,514 | u682097651 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
//??¶????????°
int n;
//?????\??????
int M[N][N];
//??°?????¶???????¢????
int color[N];
//??\??¶????????°??¶???
int d[N];
//??\??¶???????????¶???
int f[... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
//??¶????????°
int n;
//?????\??????
int M[N][N];
//??°?????¶???????¢????
int color[N];
//??\??¶????????°??¶???
int d[N];
//??\??¶???????????¶???
int f[... | [
"control_flow.branch.if.condition.change",
"control_flow.branch.if.add"
] | 94,525 | 94,526 | u167064764 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int color[N], nt[N], M[N][N], d[N], f[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int color[N], nt[N], M[N][N], d[N], f[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.compare.replace.remove",
"assignment.replace.add"
] | 94,528 | 94,529 | u722526744 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int color[N], nt[N], M[N][N], d[N], f[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int color[N], nt[N], M[N][N], d[N], f[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo",
"expression.operation.compare.replace.remove",
"assignment.replace.add"
] | 94,530 | 94,529 | u722526744 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int color[N], nt[N], M[N][N], d[N], f[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int color[N], nt[N], M[N][N], d[N], f[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | [] | 94,531 | 94,529 | u722526744 | cpp |
p02238 | #include <stdio.h>
#define N 100
#define WHITE 0
#define GRAY 1
#define BLACK 2
int n, M[N][N];
int color[N], d[N], f[N], tt;
void dfs_visit(int u) {
int v;
color[u] = GRAY;
d[u] = ++tt;
for (v = 0; v < n; v++) {
if (M[u][v] == 0)
continue;
if (color[v] == WHITE) {
dfs_visit(v);
}
}
... | #include <stdio.h>
#define N 100
#define WHITE 0
#define GRAY 1
#define BLACK 2
int n, M[N][N];
int color[N], d[N], f[N], tt;
void dfs_visit(int u) {
int v;
color[u] = GRAY;
d[u] = ++tt;
for (v = 0; v < n; v++) {
if (M[u][v] == 0)
continue;
if (color[v] == WHITE) {
dfs_visit(v);
}
}
... | [
"expression.operation.unary.reference.add"
] | 94,532 | 94,533 | u722526744 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int M[N][N], color[N], d[N], f[N], nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v] == 1)
... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int M[N][N], color[N], d[N], f[N], nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove",
"variable_declaration.remove"
] | 94,534 | 94,536 | u722526744 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int M[N][N], color[N], d[N], f[N], nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int M[N][N], color[N], d[N], f[N], nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 94,537 | 94,536 | u722526744 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int M[N][N], color[N], d[N], f[N], nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, tt;
int M[N][N], color[N], d[N], f[N], nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
re... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 94,538 | 94,536 | u722526744 | cpp |
p02238 |
#include <iostream>
using namespace std;
const int MAX = 100;
void search(bool graph[MAX][MAX], int find[], int done[], int n, int u,
int &count) {
count++;
find[u] = count;
for (int i = 0; i < n; i++) {
if (graph[u][i] && find[i] == 0) {
search(graph, find, done, n, i, count);
}
}... |
#include <iostream>
using namespace std;
const int MAX = 100;
void search(bool graph[MAX][MAX], int find[], int done[], int n, int u,
int &count) {
count++;
find[u] = count;
for (int i = 0; i < n; i++) {
if (graph[u][i] && find[i] == 0) {
search(graph, find, done, n, i, count);
}
}... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 94,541 | 94,542 | u448745430 | cpp |
p02238 | #include <iostream>
using namespace std;
const int MAX = 100;
void search(bool graph[MAX][MAX], int find[], int done[], int n, int u,
int &count) {
count++;
find[u] = count;
for (int i = 0; i < n; i++) {
if (graph[u][i] && find[i] == 0) {
search(graph, find, done, n, i, count);
}
}
... |
#include <iostream>
using namespace std;
const int MAX = 100;
void search(bool graph[MAX][MAX], int find[], int done[], int n, int u,
int &count) {
count++;
find[u] = count;
for (int i = 0; i < n; i++) {
if (graph[u][i] && find[i] == 0) {
search(graph, find, done, n, i, count);
}
}... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 94,543 | 94,542 | u448745430 | cpp |
p02238 | #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
bool table[102][102] = {};
int color[102] = {}; // 0:?????¢?´¢???1:?¨??????????, 2:??¢?´¢??????
int n, counter = 0;
int t_visit[102] = {};
int t_finish[102] = {};
void DFS(int y) {
for (int j = 0; j <= n - 1; j++) {
//?¨????or??¢?´¢???????????£???????????????
... | #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
bool table[102][102] = {};
int color[102] = {}; // 0:?????¢?´¢???1:?¨??????????, 2:??¢?´¢??????
int n, counter = 0;
int t_visit[102] = {};
int t_finish[102] = {};
void DFS(int y) {
for (int j = 0; j <= n - 1; j++) {
//?¨????or??¢?´¢???????????£???????????????
... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 94,544 | 94,545 | u777913227 | cpp |
p02238 | #include <stdio.h>
int d[100], f[100], n, g[100][100], time = 1;
int func(int n) {
d[n] = time++;
int i, j;
for (i = 0; i < n; i++) {
if (g[n][i] == 1 && d[i] == 0) {
func(i);
}
}
f[n] = time++;
}
int main(void) {
int i, j, u, k, v;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("... | #include <stdio.h>
int d[100], f[100], n, g[100][100], time = 1;
int func(int m) {
d[m] = time++;
int i, j;
for (i = 0; i < n; i++) {
if (g[m][i] == 1 && d[i] == 0) {
func(i);
}
}
f[m] = time++;
}
int main(void) {
int i, j, u, k, v;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("... | [
"identifier.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 94,546 | 94,547 | u589573895 | cpp |
p02238 | #include <iostream>
using namespace std;
int G[105][105] = {};
int d[105] = {}, f[105] = {};
int N, T = 0;
void Gprint(int n) {
cout << "\\|";
for (int i = 0; i < n; i++)
cout << i + 1;
cout << endl;
for (int i = 0; i < n + 2; i++)
cout << "-";
cout << endl;
for (int i = 0; i < n; i++) {
cout ... | #include <iostream>
using namespace std;
int G[105][105] = {};
int d[105] = {}, f[105] = {};
int N, T = 0;
void Gprint(int n) {
cout << "\\|";
for (int i = 0; i < n; i++)
cout << i + 1;
cout << endl;
for (int i = 0; i < n + 2; i++)
cout << "-";
cout << endl;
for (int i = 0; i < n; i++) {
cout ... | [
"call.remove"
] | 94,548 | 94,549 | u252263785 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, Adj[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (Adj[u][v])... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, Adj[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (Adj[u][v])... | [
"literal.string.change",
"io.output.change"
] | 94,563 | 94,562 | u215304644 | cpp |
p02238 | #include <iostream>
using namespace std;
int time1 = 0;
int a[110][110] = {};
int d[110] = {};
int f[110] = {};
int n;
int p;
void dfs(int cur) {
if (d[cur] == 0) {
d[cur] = time1;
}
time1 += 1;
f[cur] = time1;
for (int dst = 1; dst <= n; dst++) {
if (a[cur][dst] == 1 && d[dst] == 0) {
a[cur]... | #include <iostream>
using namespace std;
int time1 = 0;
int a[110][110] = {};
int d[110] = {};
int f[110] = {};
int n;
int p;
void dfs(int cur) {
if (d[cur] == 0) {
d[cur] = time1;
}
time1 += 1;
f[cur] = time1;
for (int dst = 1; dst <= n; dst++) {
if (a[cur][dst] == 1 && d[dst] == 0) {
a[cur]... | [
"assignment.add"
] | 94,566 | 94,567 | u279401250 | cpp |
p02238 | #include <iostream>
using namespace std;
int n, t = 0;
int v[100][100];
int d[100], f[100], r[101];
void st(int id) {
if (!r[id]) {
r[id]++;
d[id - 1] = ++t;
for (int i = 0; i < n; i++)
if (v[id - 1][i])
st(i + 1);
f[id - 1] = ++t;
}
}
int main() {
cin >> n;
for (int i = 0; i <... | #include <iostream>
using namespace std;
int n, t = 0;
int v[100][100];
int d[100], f[100], r[101];
void st(int id) {
if (!r[id]) {
r[id]++;
d[id - 1] = ++t;
for (int i = 0; i < n; i++)
if (v[id - 1][i])
st(i + 1);
f[id - 1] = ++t;
}
}
int main() {
cin >> n;
for (int i = 0; i <... | [
"expression.operation.binary.add"
] | 94,573 | 94,574 | u604920879 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
// u に隣接する v を番号順に取得
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
// u に隣接する v を番号順に取得
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 94,577 | 94,578 | u150984829 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
// u に隣接する v を番号順に取得
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 94,577 | 94,579 | u150984829 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v]) {
... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v]) {
... | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 94,590 | 94,591 | u626935725 | cpp |
p02238 | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v]) {
... | #include <iostream>
#include <stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v]) {
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 94,592 | 94,591 | u626935725 | cpp |
p02239 | #include <bits/stdc++.h>
using namespace std;
int main(void) {
//??£??\??????????????£??\???????????????
int n, k;
cin >> n;
vector<vector<bool>> A(n, vector<bool>(n, false));
for (int i = 0; i < n; i++) {
cin >> k >> k;
for (int j = 0; j < k; j++) {
int input;
cin >> input;
A[i][i... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
//??£??\??????????????£??\???????????????
int n, k;
cin >> n;
vector<vector<bool>> A(n, vector<bool>(n, false));
for (int i = 0; i < n; i++) {
cin >> k >> k;
for (int j = 0; j < k; j++) {
int input;
cin >> input;
A[i][i... | [
"expression.operation.binary.add"
] | 94,777 | 94,778 | u727105197 | cpp |
p02239 | #include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
using namespace std;
const int maxx = 110;
int n, m[maxx][maxx];
int u, num, v;
int flag[maxx];
int d[maxx];
void bfs() {
queue<int> q;
q.push(1);
d[1] = 0;
while (!q.empty()) {
int u = q.front();
q.pop();
for (int i = 1; i ... | #include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
using namespace std;
const int maxx = 110;
int n, m[maxx][maxx];
int u, num, v;
int flag[maxx];
int d[maxx];
void bfs() {
queue<int> q;
q.push(1);
d[1] = 0;
while (!q.empty()) {
int u = q.front();
q.pop();
for (int i = 2; i ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,784 | 94,785 | u700153825 | cpp |
p02239 | #include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
const int Max = 100;
const int white = 0;
const int black = 1;
int M[Max][Max];
int d[Max], nt[Max], color[Max];
int n;
queue<int> Q;
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
return v;
... | #include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
const int Max = 100;
const int white = 0;
const int black = 1;
int M[Max][Max];
int d[Max], nt[Max], color[Max];
int n;
queue<int> Q;
int next(int u) {
for (int v = nt[u]; v < n; v++) {
nt[u] = v + 1;
if (M[u][v])
return v;
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 94,829 | 94,830 | u055968501 | cpp |
p02239 | #include <iostream>
#include <queue>
#include <vector>
struct node {
std::vector<int> child;
int distance;
};
int main() {
int node_num;
std::cin >> node_num;
std::vector<node> n(node_num);
for (int i = 0; i < node_num; i++) {
int num, to, node_val;
std::cin >> node_val >> num;
for (int j =... | #include <iostream>
#include <queue>
#include <vector>
struct node {
std::vector<int> child;
int distance;
};
int main() {
int node_num;
std::cin >> node_num;
std::vector<node> n(node_num);
for (int i = 0; i < node_num; i++) {
int num, to, node_val;
std::cin >> node_val >> num;
for (int j =... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"assignment.change"
] | 94,847 | 94,848 | u783707634 | cpp |
p02239 | #include <iostream>
#include <queue>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
int u, i, id, k, j;
cin >> u;
unordered_map<int, vector<int>> mymap;
queue<vector<int>> myqueue;
for (i = 0; i < u; ++i) {
cin >> id >> k;
vector<int> points;
for (j = 0; j < k; ++j) ... | #include <iostream>
#include <queue>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
int u, i, id, k, j;
cin >> u;
unordered_map<int, vector<int>> mymap;
queue<vector<int>> myqueue;
for (i = 0; i < u; ++i) {
cin >> id >> k;
vector<int> points;
for (j = 0; j < k; ++j) ... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 94,856 | 94,857 | u041039719 | cpp |
p02239 | #include <cstring>
#include <iostream>
#include <queue>
using namespace std;
int k[1000][1000], n, a, b, c, t, x[1000];
queue<int> Q;
queue<int> R;
int main() {
memset(x, -1, sizeof(x));
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a >> b;
for (int j = 0; j < b; j++) {
cin >> c;
k[i][c] =... | #include <cstring>
#include <iostream>
#include <queue>
using namespace std;
int k[1000][1000], n, a, b, c, t, x[1000];
queue<int> Q;
queue<int> R;
int main() {
memset(x, -1, sizeof(x));
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a >> b;
for (int j = 0; j < b; j++) {
cin >> c;
k[i][c] =... | [
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"call.add",
"identifier.change"
] | 94,858 | 94,859 | u852311840 | cpp |
p02239 | #include <iostream>
#include <queue>
using namespace std;
const long N = 100;
const long INFTY = (1 << 21);
long n, M[N + 1][N + 1];
long d[N + 1];
void bfs(long s) {
queue<long> q;
q.push(s);
for (long i = 1; i <= n; i++)
d[i] = INFTY;
d[s] = 0;
long u;
while (!q.empty()) {
u = q.front();
q.... | #include <iostream>
#include <queue>
using namespace std;
const long N = 100;
const long INFTY = (1 << 21);
long n, M[N + 1][N + 1];
long d[N + 1];
void bfs(long s) {
queue<long> q;
q.push(s);
for (long i = 1; i <= n; i++)
d[i] = INFTY;
d[s] = 0;
long u;
while (!q.empty()) {
u = q.front();
q.... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"literal.number.change",
"call.arguments.change"
] | 94,864 | 94,865 | u564420347 | cpp |
p02239 | #include <iostream>
#include <queue>
using namespace std;
const long N = 100;
const long INFTY = (1 << 21);
long n, M[N + 1][N + 1];
long d[N + 1];
void bfs(long s) {
queue<long> q;
q.push(s);
for (long i = 1; i <= n; i++)
d[i] = INFTY;
d[s] = 0;
long u;
while (!q.empty()) {
u = q.front();
q.... | #include <iostream>
#include <queue>
using namespace std;
const long N = 100;
const long INFTY = (1 << 21);
long n, M[N + 1][N + 1];
long d[N + 1];
void bfs(long s) {
queue<long> q;
q.push(s);
for (long i = 1; i <= n; i++)
d[i] = INFTY;
d[s] = 0;
long u;
while (!q.empty()) {
u = q.front();
q.... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 94,866 | 94,865 | u564420347 | cpp |
p02239 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
const ... | [
"identifier.replace.remove",
"literal.replace.add",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"literal.number.change",
"call.arguments.change"
] | 94,868 | 94,869 | u902731901 | cpp |
p02239 | #include <iostream>
#include <string>
#include <vector>
#define ALREADY 1
#define YET 0
int *passed;
int *distance_ps;
using namespace std;
void bfs(vector<vector<int>> a, int i, int dis) {
// i?????????vector<int>??????????????¢?????????
dis++;
vector<int> ai = a[i];
int n = ai.size();
// cout << "i: " <... | #include <iostream>
#include <string>
#include <vector>
#define ALREADY 1
#define YET 0
int *passed;
int *distance_ps;
using namespace std;
void bfs(vector<vector<int>> a, int i, int dis) {
// i?????????vector<int>??????????????¢?????????
dis++;
vector<int> ai = a[i];
int n = ai.size();
// cout << "i: " <... | [
"expression.operation.binary.add"
] | 94,873 | 94,874 | u876508046 | cpp |
p02239 | #include <iostream>
#include <queue>
using namespace std;
int main() {
int n, m, l, i, j, p;
int f[1000][1000];
int D[1000] = {};
cin >> n;
for (i = 0; i < n; i++) {
cin >> m;
cin >> p;
for (j = 0; j < p; j++) {
cin >> l;
f[m][l] = 1;
}
}
queue<int> Q;
Q.push(1);
while (!Q... | #include <iostream>
#include <queue>
using namespace std;
int main() {
int n, m, l, i, j, p;
int f[1000][1000];
int D[1000] = {};
cin >> n;
for (i = 0; i < n; i++) {
cin >> m;
cin >> p;
for (j = 0; j < p; j++) {
cin >> l;
f[m][l] = 1;
}
}
queue<int> Q;
Q.push(1);
while (!Q... | [
"variable_declaration.name.change",
"identifier.change",
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.change"
... | 94,877 | 94,878 | u633469237 | cpp |
p02239 | #include <iostream>
#include <queue>
using namespace std;
void debug1();
int n, gragh[110][110] = {}, d[110] = {};
queue<int> q;
int main() {
cin >> n;
// input
for (int i = 0; i < n; i++) {
int u, k;
cin >> u >> k;
for (int j = 0; j < k; j++) {
int t;
cin >> t;
gragh[u][t] = 1;
... | #include <iostream>
#include <queue>
using namespace std;
void debug1();
int n, gragh[110][110] = {}, d[110] = {};
queue<int> q;
int main() {
cin >> n;
// input
for (int i = 0; i < n; i++) {
int u, k;
cin >> u >> k;
for (int j = 0; j < k; j++) {
int t;
cin >> t;
gragh[u][t] = 1;
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 94,879 | 94,880 | u896418467 | cpp |
p02239 | #include <iostream>
#include <queue>
using namespace std;
static const int N = 100;
static const int no = -2;
int graph[N][N] = {{}};
int d[N] = {};
int n;
void bfs(int v) {
queue<int> Q;
Q.push(v);
int u;
for (int i = 1; i <= n; i++) {
d[i] = no;
}
d[v] = 0;
while (!Q.empty()) {
u = Q.front... | #include <iostream>
#include <queue>
using namespace std;
static const int N = 100;
static const int no = -1;
int graph[N][N] = {{}};
int d[N] = {};
int n;
void bfs(int v) {
queue<int> Q;
Q.push(v);
int u;
for (int i = 1; i <= n; i++) {
d[i] = no;
}
d[v] = 0;
while (!Q.empty()) {
u = Q.front... | [
"literal.number.change",
"variable_declaration.value.change"
] | 94,881 | 94,882 | u135421061 | cpp |
p02239 | #include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX_NUM = 101;
void BFS(int matrix[][MAX_NUM], int num, int target, int result[]) {
queue<int> Q;
int distance = 0;
char state[MAX_NUM] = {0};
Q.push(target);
result[target] = distance;
state[target] = 1;
whil... | #include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX_NUM = 101;
void BFS(int matrix[][MAX_NUM], int num, int target, int result[]) {
queue<int> Q;
int distance = 0;
char state[MAX_NUM] = {0};
Q.push(target);
result[target] = distance;
state[target] = 1;
whil... | [
"control_flow.loop.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,888 | 94,889 | u861447106 | cpp |
p02239 | #include <iostream>
#include <queue>
using namespace std;
int G[100][100];
int d[100];
int color[100];
int n;
queue<int> qu;
void bfs() {
color[0] = 1;
d[0] = 0;
qu.push(0);
while (!qu.empty()) {
int u = qu.front();
qu.pop();
for (int i = 0; i < n; i++) {
if (G[u][i] == 1 && color[i] == 0) {
... | #include <iostream>
#include <queue>
using namespace std;
int G[100][100];
int d[100];
int color[100];
int n;
queue<int> qu;
void bfs() {
color[0] = 1;
d[0] = 0;
qu.push(0);
while (!qu.empty()) {
int u = qu.front();
qu.pop();
for (int i = 0; i < n; i++) {
if (G[u][i] == 1 && color[i] == 0) {
... | [
"io.output.change"
] | 94,890 | 94,891 | u443587731 | cpp |
p02239 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long lli;
typedef vector<lli> vll;
typedef vector<bool> vbl;
typedef vector<vector<lli>> mat;... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long lli;
typedef vector<lli> vll;
typedef vector<bool> vbl;
typedef vector<vector<lli>> mat;... | [
"call.arguments.add"
] | 94,897 | 94,898 | u506061045 | cpp |
p02239 | #include <iostream>
using namespace std;
#define N_MAX 100
int Adj[N_MAX][N_MAX] = {};
int Min_d[N_MAX];
void bfs(int v, int d, int num_node);
int main() {
int n, i, u, k, v, j;
cin >> n;
for (i = 0; i < n; i++)
Min_d[i] = -1;
//??£??\???????????????
for (i = 0; i < n; i++) {
cin >> u >> k;
... | #include <iostream>
using namespace std;
#define N_MAX 100
int Adj[N_MAX][N_MAX] = {};
int Min_d[N_MAX];
void bfs(int v, int d, int num_node);
int main() {
int n, i, u, k, v, j;
cin >> n;
for (i = 0; i < n; i++)
Min_d[i] = -1;
//??£??\???????????????
for (i = 0; i < n; i++) {
cin >> u >> k;
... | [] | 94,899 | 94,900 | u071308538 | cpp |
p02241 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
struct Node {
int color, dist, parent;
};
int n, M[MAX][MAX];
Node node[MAX];
void Printnodes() {
string col[3] = {"WHITE", "... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
struct Node {
int color, dist, parent;
};
int n, M[MAX][MAX];
Node node[MAX];
void Printnodes() {
string col[3] = {"WHITE", "... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 95,173 | 95,174 | u114204200 | cpp |
p02241 | #include <iostream>
using namespace std;
int n;
int a[101][101];
int flg[101];
int t[101];
int sum = 0;
void visit() {
int ima = 0;
int mine = 100000000;
for (int k = 0; k < n; k++) {
for (int i = 0; i < n; i++) {
if (flg[i] == 0 && mine > t[i]) {
mine = t[i];
ima = i;
}
}
... | #include <iostream>
using namespace std;
int n;
int a[101][101];
int flg[101];
int t[101];
int sum = 0;
void visit() {
int ima = 0;
int mine = 100000000;
for (int k = 0; k < n - 1; k++) {
mine = 10000000;
for (int i = 0; i < n; i++) {
if (flg[i] == 0 && mine > t[i]) {
mine = t[i];
... | [
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"assignment.add"
] | 95,175 | 95,176 | u952951927 | cpp |
p02241 | #include <bits/stdc++.h>
#define rep(i, a) for (i = 0; i < a; i++)
using namespace std;
static const int W = 0;
static const int G = 1;
static const int B = 2;
void prim(int n, int &total, vector<vector<int>> &M) {
int i, u, min;
vector<int> d(n);
vector<int> p(n);
vector<int> color(n);
rep(i, n) {
d[i]... | #include <bits/stdc++.h>
#define rep(i, a) for (i = 0; i < a; i++)
using namespace std;
static const int W = 0;
static const int G = 1;
static const int B = 2;
void prim(int n, int &total, vector<vector<int>> &M) {
int i, u, min;
vector<int> d(n);
vector<int> p(n);
vector<int> color(n);
rep(i, n) {
d[i]... | [
"control_flow.branch.if.condition.change"
] | 95,177 | 95,178 | u458804662 | cpp |
p02241 | #include <algorithm>
#include <iostream>
#include <vector>
int color(std::vector<std::vector<int>> v) {
std::vector<int> color(v.size(), 0);
int count = 0, color_count = 1;
for (int i = 1; i <= 2000; i++) {
for (size_t j = 0; j < v.size(); j++) {
for (size_t k = j + 1; k < v.size(); k++) {
if (... | #include <algorithm>
#include <iostream>
#include <vector>
int color(std::vector<std::vector<int>> v) {
std::vector<int> color(v.size(), 0);
int count = 0, color_count = 1;
for (int i = 0; i <= 2000; i++) {
for (size_t j = 0; j < v.size(); j++) {
for (size_t k = j + 1; k < v.size(); k++) {
if (... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 95,179 | 95,180 | u783707634 | cpp |
p02241 | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INF = (1 << 21);
static const int BLACK = 2;
static const int WHITE = 0;
static const int GLAY = 1;
int n, M[MAX][MAX];
int prim() {
int d[MAX], p[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INF;
p[i] = -1;
... | #include <iostream>
using namespace std;
static const int MAX = 100;
static const int INF = (1 << 21);
static const int BLACK = 2;
static const int WHITE = 0;
static const int GLAY = 1;
int n, M[MAX][MAX];
int prim() {
int d[MAX], p[MAX], color[MAX];
for (int i = 0; i < n; i++) {
d[i] = INF;
p[i] = -1;
... | [
"control_flow.branch.if.condition.change"
] | 95,181 | 95,182 | u551438531 | cpp |
p02241 | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int p[100001], s[100001], t[10001], cost[10001];
int root(int a) {
if (p[a] == a)
return a;
return (p[a] = ro... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int p[100001], s[100001], t[100001], cost[100001];
int root(int a) {
if (p[a] == a)
return a;
return (p[a] = ... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 95,183 | 95,184 | u814518554 | cpp |
p02241 | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int p[10001], s[10001], t[10001], cost[10001];
int root(int a) {
if (p[a] == a)
return a;
return (p[a] = root... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int p[100001], s[100001], t[100001], cost[100001];
int root(int a) {
if (p[a] == a)
return a;
return (p[a] = ... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 95,185 | 95,184 | u814518554 | cpp |
p02241 | #define _CRT_SECURE_NO_WARNINGS
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <string>
using namespace std;
static const int INFTY = 2001;
int H;
int A[101];
int NodeNum[101];
int IndexInA[100];
int parent(int i) { return i / 2; }
int left(int... | #define _CRT_SECURE_NO_WARNINGS
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <string>
using namespace std;
static const int INFTY = 2001;
int H;
int A[101];
int NodeNum[101];
int IndexInA[100];
int parent(int i) { return i / 2; }
int left(int... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 95,194 | 95,195 | u554150588 | cpp |
p02241 | #include <algorithm>
#include <iostream>
#include <utility>
using namespace std;
int p[100];
pair<int, int> a[10000];
int root(int m) {
if (p[m] != m)
p[m] = root(p[m]);
return p[m];
}
void unit(int x, int y) { p[root(y)] = root(x); }
bool same(int x, int y) { return root(x) == root(y); }
int main() {
in... | #include <algorithm>
#include <iostream>
#include <utility>
using namespace std;
int p[100];
pair<int, int> a[10000];
int root(int m) {
if (p[m] != m)
p[m] = root(p[m]);
return p[m];
}
void unit(int x, int y) { p[root(y)] = root(x); }
bool same(int x, int y) { return root(x) == root(y); }
int main() {
in... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 95,200 | 95,201 | u840245750 | cpp |
p02241 | #include <bits/stdc++.h>
using namespace std;
#define MAX 100
#define INF 1 << 25
int n, cost[MAX][MAX];
int mincost[MAX];
bool used[MAX];
int prim() {
for (int i = 0; i < n; i++)
mincost[i] = INF, used[i] = false;
mincost[0] = 0;
int res = 0;
while (1) {
int v = -1;
for (int u = 0; u < n; u++)
... | #include <bits/stdc++.h>
using namespace std;
#define MAX 100
#define INF 1 << 25
int n, cost[MAX][MAX];
int mincost[MAX];
bool used[MAX];
int prim() {
for (int i = 0; i < n; i++)
mincost[i] = INF, used[i] = false;
mincost[0] = 0;
int res = 0;
while (1) {
int v = -1;
for (int u = 0; u < n; u++)
... | [
"control_flow.return.add"
] | 95,213 | 95,214 | u962041986 | cpp |
p02241 | #include <iostream>
using namespace std;
#define INF 1000000
int main() {
int n;
int G[100][100], d[100];
int minc, mi, i;
bool flg[i];
int sum = 0;
cin >> n;
for (i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> G[i][j];
if (G[i][j] == -1)
G[i][j] = INF;
}
d[i] ... | #include <iostream>
using namespace std;
#define INF 10000000
int main() {
long n;
long G[100][100], d[100];
long minc, mi, i;
bool flg[100];
long sum = 0;
cin >> n;
for (i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> G[i][j];
if (G[i][j] == -1)
G[i][j] = INF;
}
... | [
"preprocessor.define.value.change",
"literal.integer.change",
"variable_declaration.type.primitive.change",
"identifier.replace.remove",
"literal.replace.add",
"variable_declaration.array_dimensions.change"
] | 95,215 | 95,216 | u358566817 | cpp |
p02241 | #include <iostream>
using namespace std;
#define INF 1000000
int main() {
long n;
long G[100][100], d[100];
long minc, mi, i;
bool flg[i];
long sum = 0;
cin >> n;
for (i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> G[i][j];
if (G[i][j] == -1)
G[i][j] = INF;
}
d... | #include <iostream>
using namespace std;
#define INF 10000000
int main() {
long n;
long G[100][100], d[100];
long minc, mi, i;
bool flg[100];
long sum = 0;
cin >> n;
for (i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> G[i][j];
if (G[i][j] == -1)
G[i][j] = INF;
}
... | [
"preprocessor.define.value.change",
"literal.integer.change",
"identifier.replace.remove",
"literal.replace.add",
"variable_declaration.array_dimensions.change"
] | 95,218 | 95,216 | u358566817 | cpp |
p02241 | #include <iostream>
using namespace std;
#define INF 100000000
int main() {
long n;
long G[100][100], d[100];
long minc, mi, i;
bool flg[i];
long sum = 0;
cin >> n;
for (i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> G[i][j];
if (G[i][j] == -1)
G[i][j] = INF;
}
... | #include <iostream>
using namespace std;
#define INF 10000000
int main() {
long n;
long G[100][100], d[100];
long minc, mi, i;
bool flg[100];
long sum = 0;
cin >> n;
for (i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> G[i][j];
if (G[i][j] == -1)
G[i][j] = INF;
}
... | [
"preprocessor.define.value.change",
"literal.integer.change",
"identifier.replace.remove",
"literal.replace.add",
"variable_declaration.array_dimensions.change"
] | 95,219 | 95,216 | u358566817 | cpp |
p02241 | #include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
#define MAX_V 100
#define INF int(1e9)
// g : ??°??????, V : g???????????°, s : ????????????????????????
int Prim(int g[MAX_V + 1][MAX_V + 1], int V, int s) {
ll ret = 0, min_, nx... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
#define MAX_V 100
#define INF int(1e9)
// g : ??°??????, V : g???????????°, s : ????????????????????????
int Prim(int g[MAX_V + 1][MAX_V + 1], int V, int s) {
ll ret = 0, min_, nx... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 95,222 | 95,223 | u090396561 | cpp |
p02241 | #include <cstdio>
#include <vector>
int main(void) {
int n, min_edge, next_node, count, sum;
scanf("%d", &n);
std::vector<std::vector<int>> edges;
std::vector<int> isUsed;
edges.resize(n);
isUsed.resize(n);
for (int i = 0; i < n; i++) {
isUsed[i] = -1;
edges[i].resize(n);
for (int j = 0; j < ... | #include <cstdio>
#include <vector>
int main(void) {
int n, min_edge, next_node, count, sum;
scanf("%d", &n);
std::vector<std::vector<int>> edges;
std::vector<int> isUsed;
edges.resize(n);
isUsed.resize(n);
for (int i = 0; i < n; i++) {
isUsed[i] = -1;
edges[i].resize(n);
for (int j = 0; j < ... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.condition.change"
] | 95,226 | 95,227 | u616085665 | cpp |
p02241 | #include <climits>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 100;
static const int WHITE = 1;
static const int GRAY = 2;
static const int BLACK = 3;
int n, M[MAX + 10][MAX + 10];
int prim() {
int u, minv;
int d[MAX], p[MAX], color[MAX];
for (int i = 0; i < n; i++) {
... | #include <climits>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 100;
static const int WHITE = 1;
static const int GRAY = 2;
static const int BLACK = 3;
int n, M[MAX + 10][MAX + 10];
int prim() {
int u, minv;
int d[MAX], p[MAX], color[MAX];
for (int i = 0; i < n; i++) {
... | [
"assignment.value.change",
"identifier.change"
] | 95,238 | 95,239 | u022192887 | cpp |
p02241 | #include <stdio.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
int main(void) {
int n, i, j, ans = 0;
scanf("%d", &n);
int a[n][n];
char f[n];
rep(i, n) rep(j, n) scanf("%d", &a[i][j]);
rep(i, n) f[i] = 0;
f[0] = 1;
rep(i, n - 1) {
int min = 10000, minx, miny;
rep(j, n) {
rep(k, n) {
... | #include <stdio.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
int main(void) {
int n, i, j, ans = 0;
scanf("%d", &n);
int a[n][n];
char f[n];
rep(i, n) rep(j, n) scanf("%d", &a[i][j]);
rep(i, n) f[i] = 0;
f[0] = 1;
rep(i, n - 1) {
int min = 10000, minx, miny;
rep(j, n) {
rep(k, n) {
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 95,240 | 95,241 | u428870975 | cpp |
p02241 | /*
* @Author: Samson
* @Date: 2018-06-12 18:24:44
* @Last Modified by: Samson
* @Last Modified time: 2018-06-13 11:56:23
*/
// @URL : http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_12_A
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#define white 0
#define gray 1
#define bla... | /*
* @Author: Samson
* @Date: 2018-06-12 18:24:44
* @Last Modified by: Samson
* @Last Modified time: 2018-06-13 12:00:47
*/
// @URL : http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_12_A
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#define white 0
#define gray 1
#define bla... | [
"literal.number.change",
"assignment.variable.change",
"variable_access.subscript.index.change"
] | 95,242 | 95,243 | u925619490 | cpp |
p02241 | /*
* @Author: Samson
* @Date: 2018-06-12 18:24:44
* @Last Modified by: Samson
* @Last Modified time: 2018-06-13 12:00:22
*/
// @URL : http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_12_A
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#define white 0
#define gray 1
#define bla... | /*
* @Author: Samson
* @Date: 2018-06-12 18:24:44
* @Last Modified by: Samson
* @Last Modified time: 2018-06-13 12:00:47
*/
// @URL : http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_12_A
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#define white 0
#define gray 1
#define bla... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,244 | 95,243 | u925619490 | cpp |
p02241 | #include <climits>
#include <iostream>
using namespace std;
int n;
int g[101][101];
int d[101];
char c[101];
int p[101];
void prim() {
for (int i = 0; i < n; ++i) {
d[i] = INT_MAX;
c[i] = 'w';
}
c[0] = 'b';
d[0] = 0;
while (true) {
int u, v;
int mine = INT_MAX;
for (int j = 0; j < n; ++... | #include <climits>
#include <iostream>
using namespace std;
int n;
int g[101][101];
int d[101];
char c[101];
int p[101];
void prim() {
for (int i = 0; i < n; ++i) {
d[i] = INT_MAX;
c[i] = 'w';
}
c[0] = 'b';
d[0] = 0;
while (true) {
int u, v;
int mine = INT_MAX;
for (int j = 0; j < n; ++... | [
"variable_declaration.value.change"
] | 95,247 | 95,248 | u011563519 | cpp |
p02241 | #include <climits>
#include <iostream>
using namespace std;
int n;
int g[101][101];
int d[101];
char c[101];
int p[101];
void prim() {
for (int i = 0; i < n; ++i) {
d[i] = INT_MAX;
c[i] = 'w';
}
c[0] = 'b';
d[0] = 0;
while (true) {
int u, v;
int mine = INT_MAX;
for (int j = 0; j < n; ++... | #include <climits>
#include <iostream>
using namespace std;
int n;
int g[101][101];
int d[101];
char c[101];
int p[101];
void prim() {
for (int i = 0; i < n; ++i) {
d[i] = INT_MAX;
c[i] = 'w';
}
c[0] = 'b';
d[0] = 0;
while (true) {
int u, v;
int mine = INT_MAX;
for (int j = 0; j < n; ++... | [
"variable_declaration.value.change",
"io.output.newline.add"
] | 95,249 | 95,248 | u011563519 | cpp |
p02241 | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
template <typename FirstType, typename SecondType> struct PairComparator {
bool operator()(const pair<FirstType, SecondType> &p1,
const pair<FirstType, SecondType> &p2) const {
return p1.first > p2.first;
}
};
bool inM... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
template <typename FirstType, typename SecondType> struct PairComparator {
bool operator()(const pair<FirstType, SecondType> &p1,
const pair<FirstType, SecondType> &p2) const {
return p1.first > p2.first;
}
};
bool inM... | [
"control_flow.branch.if.condition.change",
"expression.operator.compare.change"
] | 95,256 | 95,257 | u084809388 | cpp |
p02241 | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
template <typename FirstType, typename SecondType> struct PairComparator {
bool operator()(const pair<FirstType, SecondType> &p1,
const pair<FirstType, SecondType> &p2) const {
return p1.first > p2.first;
}
};
bool inM... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
template <typename FirstType, typename SecondType> struct PairComparator {
bool operator()(const pair<FirstType, SecondType> &p1,
const pair<FirstType, SecondType> &p2) const {
return p1.first > p2.first;
}
};
bool inM... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 95,258 | 95,257 | u084809388 | cpp |
p02240 | #include <iostream>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define MAX_N 100000
#define MAX_M 100000
#define WHITE 1
#define GREY 2
#define BLACK 3
vector<int> G[MAX_N];
int V[MAX_N];
int V_num[MAX_N];
void init(void) {
for (int i = 0; i < MAX_N; i++) {
V[i] = WHITE;
V_n... | #include <iostream>
#include <queue>
#include <stdio.h>
#include <vector>
using namespace std;
#define MAX_N 100000
#define MAX_M 100000
#define WHITE 1
#define GREY 2
#define BLACK 3
vector<int> G[MAX_N];
int V[MAX_N];
int V_num[MAX_N];
void init(void) {
for (int i = 0; i < MAX_N; i++) {
V[i] = WHITE;
V_n... | [
"call.add",
"literal.string.change",
"call.arguments.change"
] | 95,525 | 95,526 | u173597612 | cpp |
p02240 | #include <bits/stdc++.h>
using namespace std;
vector<int> g[100000];
int c[100000], n;
void dfs(int r, int a) {
stack<int> s;
s.push(r);
c[r] = a;
while (!s.empty()) {
int u = s.top();
s.pop();
for (int i = 0; i < g[u].size(); i++) {
int v = g[u][i];
if (c[v] == -1) {
c[v] = a;... | #include <bits/stdc++.h>
using namespace std;
vector<int> g[100000];
int c[100000], n;
void dfs(int r, int a) {
stack<int> s;
s.push(r);
c[r] = a;
while (!s.empty()) {
int u = s.top();
s.pop();
for (int i = 0; i < g[u].size(); i++) {
int v = g[u][i];
if (c[v] == -1) {
c[v] = a;... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 95,531 | 95,532 | u661973509 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i =... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 95,533 | 95,534 | u011621222 | cpp |
p02240 | #include <bits/stdc++.h>
#include <stdint.h>
typedef uint32_t u32;
template <u32 N_> class UnionFindTree {
private:
u32 par[N_];
u32 rank[N_];
public:
UnionFindTree(u32 n) {
assert(n < N_);
for (u32 i = 0; i < n; ++i) {
par[i] = i;
rank[i] = 0;
}
return;
}
int find(u32 x) {
... | #include <bits/stdc++.h>
#include <stdint.h>
typedef uint32_t u32;
template <u32 N_> class UnionFindTree {
private:
u32 par[N_];
u32 rank[N_];
public:
UnionFindTree(u32 n) {
assert(n < N_);
for (u32 i = 0; i < n; ++i) {
par[i] = i;
rank[i] = 0;
}
return;
}
int find(u32 x) {
... | [] | 95,539 | 95,540 | u355552770 | cpp |
p02240 | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define MAX_N 500000
vector<int> X[MAX_N];
queue<int> Q;
int COLOR[MAX_N], N, M, Q1, A, B;
int main() {
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> A >> B;
X[A].push_back(B);
X[B].push_back(A);
}
int cnt = 0;
for (... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define MAX_N 500000
vector<int> X[MAX_N];
queue<int> Q;
int COLOR[MAX_N], N, M, Q1, A, B;
int main() {
cin >> N >> M;
for (int i = 0; i < M; i++) {
cin >> A >> B;
X[A].push_back(B);
X[B].push_back(A);
}
int cnt = 0;
for (... | [
"literal.string.change",
"io.output.change"
] | 95,541 | 95,542 | u852311840 | cpp |
p02240 | #include <iostream>
#include <queue>
#include <set>
using namespace std;
const int MAX_N = 100000;
int G[MAX_N];
set<int> A[MAX_N];
void assign_gid(int user_num) {
int gid;
queue<int> Q;
Q.push(0);
G[0] = gid = 0;
while (!Q.empty()) {
int c = Q.front();
Q.pop();
if (G[c] == -1)
G[c] = ... | #include <iostream>
#include <queue>
#include <set>
using namespace std;
const int MAX_N = 100000;
int G[MAX_N];
set<int> A[MAX_N];
void assign_gid(int user_num) {
int gid;
queue<int> Q;
Q.push(0);
G[0] = gid = 0;
while (!Q.empty()) {
int c = Q.front();
Q.pop();
if (G[c] == -1)
G[c] = ... | [
"control_flow.break.add"
] | 95,543 | 95,544 | u537319043 | cpp |
p02240 | #include <iostream>
using namespace std;
#include <stdio.h>
int *P;
int root(int a) {
if (P[a] == a)
return a;
P[a] = root(P[a]);
return P[a];
}
void join(int a, int b) {
int x = root(a), y = root(b);
x = P[y];
}
bool same(int a, int b) { return (root(a) == root(b) ? true : false); }
int main() {
i... | #include <iostream>
using namespace std;
#include <stdio.h>
int *P;
int root(int a) {
if (P[a] == a)
return a;
P[a] = root(P[a]);
return P[a];
}
void join(int a, int b) {
int x = root(a), y = root(b);
P[x] = y;
}
bool same(int a, int b) { return (root(a) == root(b) ? true : false); }
int main() {
i... | [
"assignment.change",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 95,547 | 95,548 | u986478725 | cpp |
p02240 | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 95,549 | 95,550 | u927516039 | cpp |
p02240 | #include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
vector<vector<int>> g;
int n, m, q, s, t;
vector<bool> visited;
vector<int> color;
void dfs(int s) {
for (int i = 0; i < g[s].size(); i++) {
if (color[g[s][i]] == -1) {
color[g[s][i]] = color[s];
dfs(g[s]... | #include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
vector<vector<int>> g;
int n, m, q, s, t;
vector<bool> visited;
vector<int> color;
void dfs(int s) {
for (int i = 0; i < g[s].size(); i++) {
if (color[g[s][i]] == -1) {
color[g[s][i]] = color[s];
dfs(g[s]... | [
"identifier.change",
"io.output.change"
] | 95,551 | 95,552 | u296395710 | cpp |
p02240 | #include <cstdio>
#include <iostream>
#include <vector>
#define MAX 100000
#define WHITE 0
#define GRAY 1
#define BLACK 2
using namespace std;
vector<int> G[MAX];
int graphc[MAX];
int color[MAX];
int colorCount;
void def(int o) {
int v;
for (int i = 0; i < G[o].size(); i++) {
v = G[o][i];
if (color[v... | #include <cstdio>
#include <iostream>
#include <vector>
#define MAX 100000
#define WHITE 0
#define GRAY 1
#define BLACK 2
using namespace std;
vector<int> G[MAX];
int graphc[MAX];
int color[MAX];
int colorCount;
void def(int o) {
int v;
for (int i = 0; i < G[o].size(); i++) {
v = G[o][i];
if (color[v... | [
"identifier.change",
"call.arguments.change"
] | 95,554 | 95,555 | u699373030 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
int i, u, v;
while (!S.empty()) {
u = S.top();
S.pop();
... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
int i, u, v;
while (!S.empty()) {
u = S.top();
S.pop();
... | [
"literal.number.change",
"variable_declaration.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 95,556 | 95,557 | u883286734 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
const int MAX = 100000;
const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i = 0; i < G[u]... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
const int MAX = 100000;
const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i = 0; i < G[u]... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 95,564 | 95,565 | u167064764 | cpp |
p02240 | #include <iostream>
#include <vector>
using namespace std;
void set_color(const vector<vector<int>> &u, int p, vector<int> color, int c) {
if (color[p] != -1)
return;
color[p] = c;
for (int i = 0; i < u[p].size(); i++) {
set_color(u, u[p][i], color, c);
}
}
bool is_friend(const vector<vector<int>> &u,... | #include <iostream>
#include <vector>
using namespace std;
void set_color(const vector<vector<int>> &u, int p, vector<int> &color, int c) {
if (color[p] != -1)
return;
color[p] = c;
for (int i = 0; i < u[p].size(); i++) {
set_color(u, u[p][i], color, c);
}
}
bool is_friend(const vector<vector<int>> &u... | [
"variable_declaration.specifier.add"
] | 95,566 | 95,567 | u510526182 | cpp |
p02240 | #include <queue>
#include <stdio.h>
using namespace std;
const int MAX = 100000;
int parent(int table[], int child) {
queue<int> q;
while (table[child] != -1) {
q.push(child);
child = table[child];
}
while (!q.empty()) {
table[q.front()] = child;
q.pop();
}
return child;
}
int main() {
... | #include <queue>
#include <stdio.h>
using namespace std;
const int MAX = 100000;
int parent(int table[], int child) {
queue<int> q;
while (table[child] != -1) {
q.push(child);
child = table[child];
}
while (!q.empty()) {
table[q.front()] = child;
q.pop();
}
return child;
}
int main() {
... | [
"identifier.change",
"call.arguments.change"
] | 95,571 | 95,572 | u448745430 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 10000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i ... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i... | [
"literal.number.change",
"variable_declaration.value.change",
"call.add"
] | 95,575 | 95,576 | u612835288 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i... | [
"identifier.change",
"call.arguments.change"
] | 95,583 | 95,584 | u228579910 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,591 | 95,592 | u215304644 | cpp |
p02240 | #include <cstdio>
#include <cstring>
#include <stack>
#include <vector>
using namespace std;
#define MAXN 100000
#define NIL -1
int n;
vector<int> G[MAXN];
int color[MAXN];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i = 0... | #include <cstdio>
#include <cstring>
#include <stack>
#include <vector>
using namespace std;
#define MAXN 100000
#define NIL -1
int n;
vector<int> G[MAXN];
int color[MAXN];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i = 0... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 95,593 | 95,594 | u918703259 | cpp |
p02240 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
const int MAX = 1e5 + 9;
int idx[MAX] = {0};
void init() {
int i;
for (i = 0; i < MAX; i++)
idx[i] = i;
}
int findroot(int i) {
while (i != idx[i])
i = idx[i];
return i;
}
void munion(int u, int v) {
u = findroot(u);
v = findroot(v);
... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
const int MAX = 1e5 + 9;
int idx[MAX] = {0};
void init() {
int i;
for (i = 0; i < MAX; i++)
idx[i] = i;
}
int findroot(int i) {
while (i != idx[i])
i = idx[i];
return i;
}
void munion(int u, int v) {
u = findroot(u);
v = findroot(v);
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 95,598 | 95,599 | u438764132 | cpp |
p02240 | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
void numbering(int id, int *g, int num, std::vector<int> *a) {
int tmp;
for (int i = 0; i < a[id].size(); i++) {
tmp = a[id][i];
if (g[tmp])
continue;
g[tmp] = num;
numbering(tmp, g, num, a);
}
}
void grouping(std::v... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
void numbering(int id, int *g, int num, std::vector<int> *a) {
int tmp;
for (int i = 0; i < a[id].size(); i++) {
tmp = a[id][i];
if (g[tmp])
continue;
g[tmp] = num;
numbering(tmp, g, num, a);
}
}
void grouping(std::v... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 95,600 | 95,601 | u832302504 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
//求解图的联通分量
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop()... | #include <iostream>
#include <stack>
#include <vector>
//求解图的联通分量
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop()... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 95,602 | 95,603 | u633823896 | cpp |
p02240 | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(c);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i... | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top();
S.pop();
for (int i... | [
"identifier.change",
"call.arguments.change"
] | 95,605 | 95,606 | u815527706 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX]; // 重み付き有向グラフの隣接リスト表現
void dijkstra() {
priority_... | #include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
static const int MAX = 10000;
static const int INFTY = (1 << 21);
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int n;
vector<pair<int, int>> adj[MAX]; // 重み付き有向グラフの隣接リスト表現
void dijkstra() {
priority_... | [] | 95,675 | 95,676 | u071753419 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int Max = 10000;
const int Infty = (1 << 21);
const int white = 0, gray = 1, black = 2;
int d[Max], color[Max];
int n;
vector<pair<int, int>> adj[Max];
void dijkstra(int s) {
priority_queue<pair<int, int>> PQ;
... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int Max = 10000;
const int Infty = (1 << 21);
const int white = 0, gray = 1, black = 2;
int d[Max], color[Max];
int n;
vector<pair<int, int>> adj[Max];
void dijkstra(int s) {
priority_queue<pair<int, int>> PQ;
... | [
"io.output.change",
"identifier.change",
"expression.operation.binary.change"
] | 95,679 | 95,680 | u055968501 | cpp |
p02243 | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int Max = 10000;
const int Infty = (1 << 21);
const int white = 0, gray = 1, black = 2;
int d[Max], color[Max];
int n;
vector<pair<int, int>> adj[Max];
void dijkstra(int s) {
priority_queue<pair<int, int>> PQ;
... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int Max = 10000;
const int Infty = (1 << 21);
const int white = 0, gray = 1, black = 2;
int d[Max], color[Max];
int n;
vector<pair<int, int>> adj[Max];
void dijkstra(int s) {
priority_queue<pair<int, int>> PQ;
... | [
"identifier.change",
"expression.operation.binary.change"
] | 95,681 | 95,680 | u055968501 | cpp |
p02243 | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define int(x) \
int x; \
scan... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define int(x) \
int x; \
scan... | [
"call.arguments.change"
] | 95,695 | 95,696 | u126072490 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.