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 |
|---|---|---|---|---|---|---|---|
p02101 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define fi first
#define se second
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
template <typename A, t... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define fi first
#define se second
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
template <typename A, t... | [
"identifier.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 93,416 | 93,417 | u318856271 | cpp |
p02103 | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int n, m, k;
int x[100001], y[100001];
map... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int n, m, k;
int x[100001], y[100001];
map... | [
"identifier.change",
"expression.operation.binary.change"
] | 93,432 | 93,433 | u117454239 | cpp |
p02103 | #include <bits/stdc++.h>
using namespace std;
struct UnionFind {
vector<int> data;
UnionFind(int sz) { data.assign(sz, -1); }
bool unite(int x, int y) {
x = find(x), y = find(y);
if (x == y)
return (false);
if (data[x] > data[y])
swap(x, y);
data[x] += data[y];
data[y] = x;
... | #include <bits/stdc++.h>
using namespace std;
struct UnionFind {
vector<int> data;
UnionFind(int sz) { data.assign(sz, -1); }
bool unite(int x, int y) {
x = find(x), y = find(y);
if (x == y)
return (false);
if (data[x] > data[y])
swap(x, y);
data[x] += data[y];
data[y] = x;
... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 93,435 | 93,436 | u095377734 | cpp |
p02106 | #include <bits/stdc++.h>
using namespace std;
/*
struct Monoid {
using T = _type_;
static T op(const T& a, const T& b) {return _a_op_b_;}
static constexpr T e() {return _identity_element_;};
};
*/
/*
struct M_act {
using OS = _operand_set_(i.e. Monoid)_;
using OM = _operator_monoid_(i.e. Monoid)_;
using ... | #include <bits/stdc++.h>
using namespace std;
/*
struct Monoid {
using T = _type_;
static T op(const T& a, const T& b) {return _a_op_b_;}
static constexpr T e() {return _identity_element_;};
};
*/
/*
struct M_act {
using OS = _operand_set_(i.e. Monoid)_;
using OM = _operator_monoid_(i.e. Monoid)_;
using ... | [] | 93,444 | 93,445 | u046809180 | cpp |
p02108 | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> PP;
int n, m;
int c[1... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> PP;
int n, m;
int c[1... | [] | 93,452 | 93,453 | u117454239 | cpp |
p02237 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void to_adjacent_matrix(vector<vector<int>> &adjacent_list,
vector<vector<int>> &adjacent_matrix);
int main() {
int n;
cin >> n;
vector<vector<int>> vertex(n, vector<int>(n, -1));
for (int i = 0; i < n; ++i)... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void to_adjacent_matrix(vector<vector<int>> &adjacent_list,
vector<vector<int>> &adjacent_matrix);
int main() {
int n;
cin >> n;
vector<vector<int>> vertex(n, vector<int>(n, -1));
for (int i = 0; i < n; ++i)... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 93,574 | 93,575 | u207749959 | cpp |
p02237 | #include <iostream>
using namespace std;
int main() {
int g[10010][10010] = {}; //要素を0で初期化
int n, a, b, c;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a >> b;
for (int i = 0; i < b; ++i) {
cin >> c;
g[a - 1][c - 1] = 1; /* code */
}
}
for (int i = 0; i < n; ++i) {
for (int j... | #include <iostream>
using namespace std;
int main() {
int g[1001][1001] = {{0}}; //要素を0で初期化
int n, a, b, c;
cin >> n;
// for (int i = 0; i < n; ++i)
// {
// for (int j = 0; j < n; ++j)
// {
// g[i][j]=0;
// }
// }
for (int i = 0; i < n; ++i) {
cin >> a >> b;
for (int i = 0; i <... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"identifier.change"
] | 93,589 | 93,590 | u864527629 | cpp |
p02237 | #include <iostream>
using namespace std;
int main() {
int g[10010][10010] = {}; //要素を0で初期化
int n, a, b, c;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a >> b;
for (int i = 0; i < b; ++i) {
cin >> c;
g[a - 1][c - 1] = 1; /* code */
}
}
for (int i = 0; i < n; ++i) {
for (int j... | #include <iostream>
using namespace std;
int main() {
int g[1001][1001] = {{0}}; //要素を0で初期化
int n, a, b, c;
cin >> n;
// for (int i = 0; i < n; ++i)
// {
// for (int j = 0; j < n; ++j)
// {
// g[i][j]=0;
// }
// }
for (int i = 0; i < n; ++i) {
cin >> a >> b;
for (int i = 0; i <... | [
"literal.number.change",
"variable_declaration.array_dimensions.change"
] | 93,591 | 93,590 | u864527629 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main(void) {
int M[N][N];
int n, m, l, k;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j];
}
}
for (int i = 0; i < n; i++) {
cin >> m >> l;
m--;
for (int j = 0; j < n; j++) {
... | #include <iostream>
using namespace std;
static const int N = 1000;
int main(void) {
int M[N][N];
int n, m, l, k;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j];
}
}
for (int i = 0; i < n; i++) {
cin >> m >> l;
m--;
for (int j = 0; j < l; j++) {
... | [
"literal.number.change",
"variable_declaration.value.change",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,603 | 93,604 | u870980810 | cpp |
p02237 | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> a(n, vector<int>(n, 0));
for (int i = 0; i < n; i++) {
int u, k, v;
cin >> u;
for (int j = 0; j < k; j++) {
cin >> v;
a[u - 1][v - 1] = 1;
}
}
for (int i = 0; i < n; i++... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> a(n, vector<int>(n, 0));
for (int i = 0; i < n; i++) {
int u, k, v;
cin >> u >> k;
for (int j = 0; j < k; j++) {
cin >> v;
a[u - 1][v - 1] = 1;
}
}
for (int i = 0; i < n... | [
"expression.operation.binary.add"
] | 93,606 | 93,607 | u528991554 | cpp |
p02237 | #include <iostream>
int main() {
int node_num, adj[100][100];
std::cin >> node_num;
for (int i = 0; i < node_num; i++)
for (int j = 0; j < node_num; j++)
adj[i][j] = 0;
for (int i = 0; i < node_num; i++) {
int node, num;
std::cin >> node >> num;
for (int j = 0; j < num; j++) {
in... | #include <iostream>
int main() {
int node_num, adj[100][100];
std::cin >> node_num;
for (int i = 0; i < node_num; i++)
for (int j = 0; j < node_num; j++)
adj[i][j] = 0;
for (int i = 0; i < node_num; i++) {
int node, num;
std::cin >> node >> num;
for (int j = 0; j < num; j++) {
in... | [
"assignment.change"
] | 93,608 | 93,609 | u783707634 | cpp |
p02237 | #include <iostream>
#include <vector>
using namespace std;
int N;
int main() {
cin >> N;
vector<vector<bool>> M(N, vector<bool>(N));
int u, k, v;
for (int i = 0; i < N; i++) {
cin >> u >> k;
for (int i = 0; i < k; i++) {
cin >> v;
M[u - 1][v - 1] = true;
}
}
for (int i = 0; ... | #include <iostream>
#include <vector>
using namespace std;
int N;
int main() {
cin >> N;
vector<vector<bool>> M(N, vector<bool>(N));
int u, k, v;
for (int i = 0; i < N; i++) {
cin >> u >> k;
for (int i = 0; i < k; i++) {
cin >> v;
M[u - 1][v - 1] = true;
}
}
for (int i = 0; ... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 93,610 | 93,611 | u823513038 | cpp |
p02237 | #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 ... | [] | 93,615 | 93,616 | u902731901 | cpp |
p02237 | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int judge(int i, int n, int variable, vector<vector<int>> &v) {
for (int j = 0; j < v[variable].size(); ++j) {
if (i == v[variable][j]) {
return 1;
break;
}
}
return 0;
}
int main() {
int n, u, k, vv;
cin >> n;
... | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int judge(int i, int n, int variable, vector<vector<int>> &v) {
for (int j = 0; j < v[variable].size(); ++j) {
if (i == v[variable][j]) {
return 1;
break;
}
}
return 0;
}
int main() {
int n, u, k, vv;
cin >> n;
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 93,624 | 93,625 | u910697883 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin ... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,627 | 93,628 | u292798607 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin ... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,627 | 93,629 | u292798607 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < n; j++) {
... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,642 | 93,643 | u967088297 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; i < n; i++) {
cin >>... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >>... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,644 | 93,645 | u567212938 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < k; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; i < n; i++) {
cin >>... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >>... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,646 | 93,645 | u567212938 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < k; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >>... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >>... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,647 | 93,645 | u567212938 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < k; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >>... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
M[i][j] = 0;
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >>... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,648 | 93,645 | u567212938 | cpp |
p02237 | #include <iostream>
using namespace std;
int main(void) {
int m[100][100];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
m[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >> v;
v... | #include <iostream>
using namespace std;
int main(void) {
int m[100][100];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
m[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >> v;
v... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 93,655 | 93,656 | u047260394 | cpp |
p02237 | //
// main.cpp
// graph
//
// Created by ???????????? on 2017/10/22.
// Copyright ?? 2017 ????????????. All rights reserved.
//
#include <iostream>
#include <stdio.h>
using namespace std;
int main(int argc, const char *argv[]) {
int n, i, j, id, num, node;
scanf("%d", &n);
int A[n][n];
// initialize wit... | //
// main.cpp
// graph
//
// Created by ???????????? on 2017/10/22.
// Copyright ?? 2017 ????????????. All rights reserved.
//
#include <iostream>
#include <stdio.h>
using namespace std;
int main(int argc, const char *argv[]) {
int n, i, j, id, num, node;
scanf("%d", &n);
int A[n][n];
// initialize wit... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 93,659 | 93,660 | u826441682 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
... | [
"expression.unary.arithmetic.add"
] | 93,669 | 93,670 | u936175119 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N]; // 0 オリジンの配列
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--; // 0 オリジンへ変換
for (int j = 0; j < ... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N]; // 0 オリジンの配列
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--; // 0 オリジンへ変換
for (int j = 0; j < ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"assignment.change"
] | 93,674 | 93,673 | u150984829 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N]; // 0 オリジンの配列
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--; // 0 オリジンへ変換
for (int j = 0; j < ... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N]; // 0 オリジンの配列
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--; // 0 オリジンへ変換
for (int j = 0; j < ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,675 | 93,673 | u150984829 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N]; // 0 オリジンの配列
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--; // 0 オリジンへ変換
for (int j = 0; j < ... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >> v;
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"assignment.change"
] | 93,674 | 93,676 | u150984829 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N]; // 0 オリジンの配列
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--; // 0 オリジンへ変換
for (int j = 0; j < ... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
M[i][j] = 0;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >> v;
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 93,675 | 93,676 | u150984829 | cpp |
p02237 | #include <stdio.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
int main(void) {
int n, i, j;
scanf("%d", &n);
char r[n][n];
rep(i, n) rep(j, n) r[i][j] = 0;
rep(i, n) {
int u, k;
scanf("%d%d", &u, &k);
u--;
rep(j, k) {
int v;
scanf("%d", &v);
v--;
r[v][u] = 1;
}
... | #include <stdio.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
int main(void) {
int n, i, j;
scanf("%d", &n);
char r[n][n];
rep(i, n) rep(j, n) r[i][j] = 0;
rep(i, n) {
int u, k;
scanf("%d%d", &u, &k);
u--;
rep(j, k) {
int v;
scanf("%d", &v);
v--;
r[u][v] = 1;
}
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 93,677 | 93,678 | u428870975 | cpp |
p02237 | #include <cstdio>
#include <iostream>
using namespace std;
static const int MAX = 100;
int main() {
int n, u, k, v;
cin >> n;
int M[MAX][MAX];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j =... | #include <cstdio>
#include <iostream>
using namespace std;
static const int MAX = 100;
int main() {
int n, u, k, v;
cin >> n;
int M[MAX][MAX];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j =... | [
"control_flow.branch.else.remove"
] | 93,679 | 93,680 | u796290719 | cpp |
p02237 | // 最長共通部分列 問題
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
#define MAX_N 100
// 無効な値の定義
const int INV = -1;
int main(void) {
int n, u, num, v_num;
int ary_graph[MAX_N + 1][MAX_N + 1];
f... | // 最長共通部分列 問題
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
#define MAX_N 100
// 無効な値の定義
const int INV = -1;
int main(void) {
int n, u, num, v_num;
int ary_graph[MAX_N + 1][MAX_N + 1];
f... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 93,687 | 93,688 | u444487239 | cpp |
p02237 | #include <iostream>
//给一个图的邻接表,输出其邻接矩阵
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i > n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j... | #include <iostream>
//给一个图的邻接表,输出其邻接矩阵
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"expression.unary.arithmetic.add"
] | 93,689 | 93,690 | u633823896 | cpp |
p02237 | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
int u, k, v;
for (int i = 0; i < n; i++) {
cin >> u >> k;
for (int j = 0; j < k; j++) {
... | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N];
int n;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
int u, k, v;
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--; // to 0 origin
for (int ... | [
"expression.unary.arithmetic.add"
] | 93,694 | 93,695 | u626935725 | cpp |
p02237 | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int u[n], k;
int a[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u[i];
cin >> k;
for (int j = 0; j < k; j++) {
int v;
ci... | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int u[n], k;
int a[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u[i];
cin >> k;
for (int j = 0; j < k; j++) {
int v;
ci... | [
"expression.operation.binary.add"
] | 93,701 | 93,702 | u347703990 | cpp |
p02237 | #include <iostream>
using namespace std;
int main() {
int n, k, v, u;
cin >> n;
double V[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
V[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u;
cin >> k;
for (int j = 0; j < k; j++) {
cin >> v;
V[... | #include <iostream>
using namespace std;
int main() {
int n, k, v, u;
cin >> n;
double V[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
V[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u;
cin >> k;
for (int j = 0; j < k; j++) {
cin >> v;
V[... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"io.output.change"
] | 93,703 | 93,704 | u526996304 | cpp |
p02237 | #include <iostream>
using namespace std;
int main() {
int n, k, v, u;
cin >> n;
double V[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
V[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u;
cin >> k;
for (int j = 0; j < k; j++) {
cin >> v;
V[... | #include <iostream>
using namespace std;
int main() {
int n, k, v, u;
cin >> n;
double V[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
V[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u;
cin >> k;
for (int j = 0; j < k; j++) {
cin >> v;
V[... | [
"io.output.change"
] | 93,705 | 93,704 | u526996304 | cpp |
p02235 | #include <iostream>
#include <string>
int main() {
int n;
int an[1000];
int l = 0;
std::cin >> n;
std::string x;
std::string y;
int ans[1001][1001];
int j, k;
for (int i = 0; i < n; i++) {
std::cin >> x;
std::cin >> y;
for (int j = 0; j <= 1000; j++) {
for (int k = 0; k <= 1000; k++)... | #include <iostream>
#include <string>
int main() {
int n;
int an[1000];
int l = 0;
std::cin >> n;
std::string x;
std::string y;
int ans[1001][1001];
int j, k;
for (int i = 0; i < n; i++) {
std::cin >> x;
std::cin >> y;
for (int j = 0; j <= 1000; j++) {
for (int k = 0; k <= 1000; k++)... | [
"expression.operation.binary.remove"
] | 94,219 | 94,220 | u142394607 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
string X, Y;
int v[1001][1001];
int dp(string X, string Y) {
int n = X.size();
int m = Y.size();
for (int i = 0; i < n; i++) {
v[i][0] = 0; ///0のテーブル
for (int j = 0; j < m; j++) {
v[0][j] = 0;
}
}
for (int i ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
string X, Y;
int v[1001][1001];
int dp(string X, string Y) {
int n = X.size();
int m = Y.size();
for (int i = 0; i <= n; i++) {
v[i][0] = 0; ///0のテーブル
for (int j = 0; j <= m; j++) {
v[0][j] = 0;
}
}
for (int ... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change",
"misc.off_by_one"
] | 94,223 | 94,224 | u810098703 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 1; i <= m; i++)
c[i][0] = 0;
for (int j = 1; j <= n; ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n; ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,227 | 94,228 | u357596970 | cpp |
p02235 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void input(string &x, string &y) { cin >> x >> y; }
int lcs(string x, string y) {
vector<vector<int>> tb(
vector<vector<int>>((int)x.size() + 1, vector<int>(y.size() + 1, 0)));
for (int i = 1; i < (int)x.size() + 1; i++) {
for (i... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void input(string &x, string &y) { cin >> x >> y; }
int lcs(string x, string y) {
vector<vector<int>> tb(
vector<vector<int>>((int)x.size() + 1, vector<int>(y.size() + 1, 0)));
for (int i = 1; i < (int)x.size() + 1; i++) {
for (i... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,232 | 94,233 | u843517396 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int Lcs(string X, string Y) {
int c[N + 1][N + 1], LMAX = 0;
;
int m = X.size(), n = Y.size();
X = ' ' + X;
Y = ' ' + Y;
for (int i = 1; i <= m; i++)
c[i][0] = 0;
for (int j = 1; j <= n; j++)... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int Lcs(string X, string Y) {
int c[N + 1][N + 1];
int LMAX = 0;
int m = X.size(), n = Y.size();
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n; j+... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,234 | 94,235 | u962332067 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1] = {};
int m = X.length();
int n = Y.length();
X = ' ' + X;
Y = ' ' + Y;
int maxl = 0;
for (int i = 1; i <= m; i++) {
for (int j = 1; j < n; j++) {
if (X[i] ... | #include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1] = {};
int m = X.length();
int n = Y.length();
X = ' ' + X;
Y = ' ' + Y;
int maxl = 0;
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
if (X[i]... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 94,236 | 94,237 | u325396151 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef pair<int, int> pii;
typedef... | #include <algorithm>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef pair<int, int> pii;
typedef... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,238 | 94,239 | u141334592 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
#if 0
所用時間:0.5h
感想:
#endif
int solve(string X, string Y) {
int rows = Y.size();
int cols = X.size();
int L[1001][1001] = {}; // L[y][x]の初期化
//テーブルLの更新
for (int r = 1; r <= rows; ++r) {
for (int c = 1; c <= cols; ++c) {
if (X[c] == Y[r])... | #include <iostream>
#include <string>
using namespace std;
#if 0
所用時間:0.5h
感想:
#endif
int solve(string X, string Y) {
int rows = Y.size();
int cols = X.size();
int L[1001][1001] = {}; // L[y][x]の初期化
//テーブルLの更新
for (int r = 1; r <= rows; ++r) {
for (int c = 1; c <= cols; ++c) {
if (X[c - 1] == Y... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,247 | 94,248 | u625347860 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
int A[1005][1005] = {};
int main() {
int i, j, k, q;
cin >> q;
string a, b;
for (i = 0; i < q; i++) {
cin >> a >> b;
int al = a.size();
int bl = b.size();
for (j = 1; j <= al; j++) {
for (k = 1; k <= bl; k++) {
if (a[j] ==... | #include <iostream>
#include <string>
using namespace std;
int A[1005][1005] = {};
int main() {
int i, j, k, q;
cin >> q;
string a, b;
for (i = 0; i < q; i++) {
cin >> a >> b;
int al = a.size();
int bl = b.size();
for (j = 1; j <= al; j++) {
for (k = 1; k <= bl; k++) {
if (a[j - 1... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,249 | 94,250 | u269127502 | cpp |
p02235 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int q;
cin >> q;
while (q--) {
string x, y;
cin >> x >> y;
int m = x.length();
int n = y.length();
vector<vector<int>> dp(m + 1, vector<int>(n + 1, 0));
for (int i = 1; i <= m; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int q;
cin >> q;
while (q--) {
string x, y;
cin >> x >> y;
int m = x.length();
int n = y.length();
vector<vector<int>> dp(m + 1, vector<int>(n + 1, 0));
for (int i = 1; i <= m; i++) {
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,251 | 94,252 | u531542222 | cpp |
p02235 | #include <bits/stdc++.h>
using namespace std;
int lcs(string X, string Y) {
// staticにしないと実行時にスタックオーバーフローになる
static int c[1001][1001];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 1; j <= n; j++)
c[0][j] = ... | #include <bits/stdc++.h>
using namespace std;
int lcs(string X, string Y) {
// staticにしないと実行時にスタックオーバーフローになる
static int c[1001][1001];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 1; j <= n; j++)
c[0][j] = ... | [
"io.output.newline.add"
] | 94,255 | 94,256 | u554503378 | cpp |
p02235 | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int lcs(string x, string y) {
int m = x.length();
int n = y.length();
int c[m + 1][n + 1];
for (int i = 1; i < m; i++) {
c[i][0] = 0;
}
for (int i = 1; i < n; i++) {
c[0][i] = 0;
}
for (int i = 1; i <= m; i++) {
... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int lcs(string x, string y) {
int m = x.length();
int n = y.length();
int c[m + 1][n + 1];
for (int i = 0; i <= m; i++) {
c[i][0] = 0;
}
for (int i = 1; i <= n; i++) {
c[0][i] = 0;
}
for (int i = 1; i <= m; i++) {
... | [
"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"
] | 94,257 | 94,258 | u678006013 | cpp |
p02235 | #include <iostream>
using namespace std;
const int MAX = 1001;
short max(short a, short b) {
if (a > b) {
return a;
} else {
return b;
}
}
short solve(string str1, string str2) {
int len1 = str1.length();
int len2 = str2.length();
str1 = " " + str1;
str2 = " " + str2;
short LCS[MAX][MAX];
fo... | #include <iostream>
using namespace std;
const int MAX = 1001;
short max(short a, short b) {
if (a > b) {
return a;
} else {
return b;
}
}
short solve(string str1, string str2) {
int len1 = str1.length();
int len2 = str2.length();
str1 = " " + str1;
str2 = " " + str2;
short LCS[MAX][MAX];
fo... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 94,259 | 94,260 | u920023587 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int lcs(const string &a, const string &b) {
vector<vector<int>> dp(a.size(), vector<int>(b.size()));
for (size_t i = 0; i < dp.size(); ++i) {
for (size_t j = 0; j < dp[0].size(); ++j) {
if (a.at(i) == b.at(j)) {
dp[... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int lcs(const string &a, const string &b) {
vector<vector<int>> dp(a.size(), vector<int>(b.size()));
for (size_t i = 0; i < dp.size(); ++i) {
for (size_t j = 0; j < dp[0].size(); ++j) {
if (a.at(i) == b.at(j)) {
dp[... | [
"io.output.newline.add"
] | 94,261 | 94,262 | u990888799 | cpp |
p02235 | #include <iostream>
using namespace std;
int ans(string a, string b) {
int n = a.size();
int m = b.size();
int memo[n + 1][m + 1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= m; j++) {
memo[i][j] = 0;
}
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
int re... | #include <iostream>
using namespace std;
int ans(string a, string b) {
int n = a.size();
int m = b.size();
int memo[n + 1][m + 1];
for (int i = 0; i <= n; i++) {
for (int j = 0; j <= m; j++) {
memo[i][j] = 0;
}
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
int re... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,265 | 94,266 | u813563655 | cpp |
p02235 | #include <iostream>
using namespace std;
int max_length(string x, string y) {
int n = x.size();
int m = y.size();
int dp[n + 1][m + 1];
for (int i = 0; i < m; ++i) {
dp[0][i] = 0;
}
for (int i = 1; i <= n; ++i) {
dp[i][0] = 0;
for (int j = 1; j <= m; ++j) {
if (x[i - 1] == y[j - 1]) {
... | #include <iostream>
using namespace std;
int max_length(string x, string y) {
int n = x.size();
int m = y.size();
int dp[n + 1][m + 1];
for (int i = 0; i <= m; ++i) {
dp[0][i] = 0;
}
for (int i = 1; i <= n; ++i) {
dp[i][0] = 0;
for (int j = 1; j <= m; ++j) {
if (x[i - 1] == y[j - 1]) {
... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 94,267 | 94,268 | u663419588 | cpp |
p02235 | #include <algorithm>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
int dp[1001][1001];
int main() {
int n;
cin >> n;
while (n--) {
string X, Y;
cin >> X >> Y;
memset(dp, 0, sizeof(dp));
for (int i = 1; i <= X.size(); ++i) {
for (int j = 1; j <= Y.size(); ++j)... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
int dp[1001][1001];
int main() {
int n;
cin >> n;
while (n--) {
string X, Y;
cin >> X >> Y;
memset(dp, 0, sizeof(dp));
for (int i = 1; i <= X.size(); ++i) {
for (int j = 1; j <= Y.size(); ++j)... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,271 | 94,272 | u167841698 | cpp |
p02235 | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#define MAX_LENGTH 1000
#define NIL -1
using namespace std;
// think easy make easy
int q; // num of datasets
string X;
string Y;
char map[MAX_LENGTH + 1][MAX_LENGTH + 1];
int findMaxLength(int x, int y) { // x:Xの終端.y:Yの終端(0オリジン)
int val;
... | #include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#define MAX_LENGTH 1000
#define NIL -1
using namespace std;
// think easy make easy
int q; // num of datasets
string X;
string Y;
int map[MAX_LENGTH + 1][MAX_LENGTH + 1];
int findMaxLength(int x, int y) { // x:Xの終端.y:Yの終端(0オリジン)
int val;
... | [
"variable_declaration.type.primitive.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 94,275 | 94,274 | u401858389 | cpp |
p02235 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, e) for ((i) = (s); (i) < (int)(e); (i)++)
#define REP(i, e) FOR(i, 0, e)
#define all(o) (o).begin(), (o).end()
#define psb(x) push_back(x)
#define mp(x, y) make_pair((x), (y))
typedef long long ll;
typedef pair<int, int> PII;
const double EPS = 1e-10;... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, e) for ((i) = (s); (i) < (int)(e); (i)++)
#define REP(i, e) FOR(i, 0, e)
#define all(o) (o).begin(), (o).end()
#define psb(x) push_back(x)
#define mp(x, y) make_pair((x), (y))
typedef long long ll;
typedef pair<int, int> PII;
const double EPS = 1e-10;... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,277 | 94,278 | u238053758 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
int solve(string s1, string s2) {
int L[s1.size() + 1][s2.size() + 1];
for (int i = 0; i <= s1.size(); i++) {
for (int j = 0; j <= s2.size(); j++) {
if (i == 0 || j == 0) {
L[i][j] = 0;
} else if (s1[i] == s2[j]) {
L[i][j] ... | #include <iostream>
#include <string>
using namespace std;
int solve(string s1, string s2) {
int L[s1.size() + 1][s2.size() + 1];
for (int i = 0; i <= s1.size(); i++) {
for (int j = 0; j <= s2.size(); j++) {
if (i <= 0 || j <= 0) {
L[i][j] = 0;
} else if (s1[i - 1] == s2[j - 1]) {
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,280 | 94,281 | u569803106 | cpp |
p02235 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int q;
cin >> q;
for (int m = 0; m < q; m++) {
string wordx, wordy;
cin >> wordx >> wordy;
int L[1000][1000] = {0};
for (int j = 0; j < wordy.size(); j++) {
for (int i = 0; i < wor... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int q;
cin >> q;
for (int m = 0; m < q; m++) {
string wordx, wordy;
cin >> wordx >> wordy;
int L[1010][1010] = {0};
for (int j = 0; j < wordy.size(); j++) {
for (int i = 0; i < wor... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"expression.operation.binary.remove"
] | 94,286 | 94,287 | u357901626 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
constexpr int MAX_XY = 1000;
int lx, ly, q, dp[MAX_XY][MAX_XY];
std::string sx, sy;
void fill_dp() {
for (int i = 1; i <= lx; ++i) {
for (int j = 1; j <= ly; ++j) {
if (sx[i] == sy[j])
dp[i][j] = dp[i - 1][j - 1] + 1;
else
d... | #include <algorithm>
#include <iostream>
#include <string>
constexpr int MAX_XY = 1010;
int lx, ly, q, dp[MAX_XY][MAX_XY];
std::string sx, sy;
void fill_dp() {
for (int i = 1; i <= lx; ++i) {
for (int j = 1; j <= ly; ++j) {
if (sx[i - 1] == sy[j - 1])
dp[i][j] = dp[i - 1][j - 1] + 1;
else
... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,292 | 94,293 | u764491155 | cpp |
p02235 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <map>
#include <math.h>
#define INFTY (1 << 30)
#define MAX 100000000
using namespa... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <map>
#include <math.h>
#define INFTY (1 << 30)
#define MAX 100000000
using namespa... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"assignment.change"
] | 94,296 | 94,297 | u177949486 | cpp |
p02235 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <map>
#include <math.h>
#define INFTY (1 << 30)
#define MAX 100000000
using namespa... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <map>
#include <math.h>
#define INFTY (1 << 30)
#define MAX 100000000
using namespa... | [
"assignment.change"
] | 94,298 | 94,297 | u177949486 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= n; i++)
c[i][0] = 0;
for (int j = 0; j <= m... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 94,307 | 94,308 | u341533698 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 94,310 | 94,308 | u341533698 | cpp |
p02235 | #include <iostream>
using namespace std;
#include <string>
string s, t;
int dp[1001][1001];
int main() {
int p;
cin >> p;
while (p > 0) {
p--;
cin >> s >> t;
int n = s.size();
int m = t.size();
for (int i = 1; i <= n; i++)
dp[i][0] = 0;
for (int i = 1; i <= m; i++)
dp[0][i] = ... | #include <iostream>
using namespace std;
#include <string>
string s, t;
int dp[1001][1001];
int main() {
int p;
cin >> p;
while (p > 0) {
p--;
cin >> s >> t;
int n = s.size();
int m = t.size();
for (int i = 1; i <= n; i++)
dp[i][0] = 0;
for (int i = 1; i <= m; i++)
dp[0][i] = ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"expression.operator.compare.change",
"control_flow.loop.condition.change",
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condit... | 94,313 | 94,314 | u829912068 | cpp |
p02235 | #include <iostream>
using namespace std;
#include <string>
string s, t;
int dp[1001][1001];
int main() {
int p;
cin >> p;
while (p > 0) {
p--;
cin >> s >> t;
int n = s.size();
int m = t.size();
for (int i = 1; i <= n; i++)
dp[i][0] = 0;
for (int i = 1; i <= m; i++)
dp[0][i] = ... | #include <iostream>
using namespace std;
#include <string>
string s, t;
int dp[1001][1001];
int main() {
int p;
cin >> p;
while (p > 0) {
p--;
cin >> s >> t;
int n = s.size();
int m = t.size();
for (int i = 1; i <= n; i++)
dp[i][0] = 0;
for (int i = 1; i <= m; i++)
dp[0][i] = ... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 94,315 | 94,314 | u829912068 | cpp |
p02235 | #include <iostream>
#include <string>
#include <vector>
int main(int argc, char const *argv[]) {
int q;
std::cin >> q;
for (size_t _ = 0; _ < q; _++) {
std::string x, y;
std::cin >> x;
std::cin >> y;
std::vector<std::vector<int>> dp(x.size() + 1,
std::vector<... | #include <iostream>
#include <string>
#include <vector>
int main(int argc, char const *argv[]) {
int q;
std::cin >> q;
for (size_t _ = 0; _ < q; _++) {
std::string x, y;
std::cin >> x;
std::cin >> y;
std::vector<std::vector<int>> dp(x.size() + 1,
std::vector<... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 94,320 | 94,321 | u342312206 | cpp |
p02235 | #include <bits/stdc++.h>
using namespace std;
int dp[2000][2000];
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
while (n--) {
string sa, sb;
cin >> sa >> sb;
memset(dp, 0, sizeof(dp));
for (int i = 1; i <= sa.size(); i++) {
for (int j = 1; j <= sb.size(); j... | #include <bits/stdc++.h>
using namespace std;
int dp[2000][2000];
int main(void) {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
while (n--) {
string sa, sb;
cin >> sa >> sb;
memset(dp, 0, sizeof(dp));
for (int i = 1; i <= sa.size(); i++) {
for (int j = 1; j <= sb.size(); j... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,326 | 94,327 | u219160431 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
string s, t;
int main() {
int n;
cin >> n;
while (n--) {
// dp[i][j] :=
// s???i??????????????§???t???j??????????????§?????£?????¨??????LCS
vector<vector<int>> dp(2000, vector<int>(2000));
cin >> s... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
string s, t;
int main() {
int n;
cin >> n;
while (n--) {
// dp[i][j] :=
// s???i??????????????§???t???j??????????????§?????£?????¨??????LCS
vector<vector<int>> dp(2000, vector<int>(2000));
cin >> s... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"assignment.change"
] | 94,328 | 94,329 | u816905840 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string.h>
#define MAX 10000
using namespace std;
int lcs(string s1, string s2) {
int C[MAX + 1][MAX + 1];
int m = s1.size();
int n = s2.size();
for (int i = 0; i <= m; ++i) {
C[i][0] = 0;
}
for (int j = 0; j <= n; ++j) {
C[0][j] = 0;
}
for (... | #include <algorithm>
#include <iostream>
#include <string.h>
#define MAX 1000
using namespace std;
int lcs(string s1, string s2) {
int C[MAX + 1][MAX + 1];
int m = s1.size();
int n = s2.size();
for (int i = 0; i <= m; ++i) {
C[i][0] = 0;
}
for (int j = 0; j <= n; ++j) {
C[0][j] = 0;
}
for (i... | [
"preprocessor.define.value.change",
"literal.integer.change"
] | 94,347 | 94,346 | u379744035 | cpp |
p02235 | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
int lcs(string X, string Y) {
int n, m;
int c[1001... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
int lcs(string X, string Y) {
int n, m;
int c[1001... | [
"assignment.variable.change",
"identifier.change",
"variable_declaration.name.change",
"control_flow.loop.for.initializer.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"variable_access.subscript.index.change"
] | 94,348 | 94,349 | u765145536 | cpp |
p02235 | #include <stdio.h>
int hantei(char x[], char y[]) {
int xn = 0, yn = 0, flag = 0, i, j, max = 0;
int c[101][101];
while (flag == 0) {
if (x[xn] == '\0') {
xn++;
} else {
flag = 1;
}
}
flag = 0;
while (flag == 0) {
if (y[yn] == '\0') {
yn++;
} else {
flag = 1;
... | #include <stdio.h>
int hantei(char x[], char y[]) {
int xn = 0, yn = 0, flag = 0, i, j, max = 0;
int c[1001][1001];
while (flag == 0) {
if (x[xn] != '\0') {
xn++;
} else {
flag = 1;
}
}
flag = 0;
while (flag == 0) {
if (y[yn] != '\0') {
yn++;
} else {
flag = 1... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 94,350 | 94,351 | u227825652 | cpp |
p02235 | #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... | [
"literal.number.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 94,361 | 94,362 | u682097651 | cpp |
p02235 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
vector<pii> P;
string s, t, rev;
const int MAX_N = 10001;
int dp[MAX_N][MAX_N];
void trace(int i, int j) {
if (dp[i][j] == dp[i - 1][j] && dp[i][j] == dp[i][j - 1]) {
trace(i - 1, j... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
vector<pii> P;
string s, t, rev;
const int MAX_N = 1001;
int dp[MAX_N][MAX_N];
void trace(int i, int j) {
if (dp[i][j] == dp[i - 1][j] && dp[i][j] == dp[i][j - 1]) {
trace(i - 1, j ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,363 | 94,364 | u131811591 | cpp |
p02235 | #include "bits/stdc++.h"
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = " " + X;
Y = " " + Y;
for (int i = 1; i <= m; ++i) {
c[i][0] = 0;
}
for (int j = 1; j <= n; ++j) {
c[0][j] = 0;
}... | #include "bits/stdc++.h"
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.length();
int n = Y.length();
int maxl = 0;
X = " " + X;
Y = " " + Y;
for (int i = 0; i <= m; ++i) {
c[i][0] = 0;
}
for (int j = 0; j <= n; ++j) {
c[0][j] = 0;... | [
"call.function.change",
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,365 | 94,366 | u944777079 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
static const int MAX = 1001;
void lcs(string X, string Y) {
int dp[MAX][MAX];
int i, j;
int xLength = X.size();
int yLength = Y.size();
// initialize dp[][]
for (i = 1; i <= xLength; i++)
dp[i][0] = 0;
for (i = 1; i <= yLength; i++)
dp[... | #include <iostream>
#include <string>
using namespace std;
static const int MAX = 1001;
void lcs(string X, string Y) {
int dp[MAX][MAX];
int i, j;
int xLength = X.size();
int yLength = Y.size();
// initialize dp[][]
for (i = 1; i <= xLength; i++)
dp[i][0] = 0;
for (i = 1; i <= yLength; i++)
dp[... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,367 | 94,368 | u743590150 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int Q = 0;
string X, Y;
cin >> Q;
for (int q = 0; q < Q; q++) {
cin >> X >> Y;
int len[1001][1001] = {};
for (int s = 1; s <= X.length(); s++) {
for (int t = 1; t <= Y.length(); t++) {
if (X... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
int Q = 0;
string X, Y;
cin >> Q;
for (int q = 0; q < Q; q++) {
cin >> X >> Y;
int len[1001][1001] = {};
for (int s = 1; s <= X.length(); s++) {
for (int t = 1; t <= Y.length(); t++) {
if (X... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,371 | 94,372 | u961922335 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
// ???????????§???????????§?????§??????
int DP[1024][1024] = {};
int main() {
int N;
cin >> N;
for (int c = 0; c < N; ++c) {
string X, Y;
cin >> X >> Y;
int xlen = (int)X.size();
int ylen = (int)Y.size();
for (int i = 0; i <= xlen; ... | #include <iostream>
#include <string>
using namespace std;
// ???????????§???????????§?????§??????
int DP[1024][1024] = {};
int main() {
int N;
cin >> N;
for (int c = 0; c < N; ++c) {
string X, Y;
cin >> X >> Y;
int xlen = (int)X.size();
int ylen = (int)Y.size();
for (int i = 0; i <= xlen; ... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,373 | 94,374 | u349218688 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
// L[i][j] X[0]..X[i]??¨X[0]..Y[j]???LCS
int L[1001][1001] = {};
int main() {
int testnum;
cin >> testnum;
for (int t = 0; t < testnum; ++t) {
string X, Y;
cin >> X >> Y;
for (int i = 1; i <= X.length(); ++i) {
for (int j = 1; j <= Y.... | #include <iostream>
#include <string>
using namespace std;
// L[i][j] X[0]..X[i]??¨X[0]..Y[j]???LCS
int L[1001][1001] = {};
int main() {
int testnum;
cin >> testnum;
for (int t = 0; t < testnum; ++t) {
string X, Y;
cin >> X >> Y;
for (int i = 1; i <= X.length(); ++i) {
for (int j = 1; j <= Y.... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,375 | 94,376 | u445955169 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int lcs(string a, string b) {
int longest_length = 0;
int m = a.size(), n = b.size();
int table[m + 1][n + 1];
for (int i = 0; i < m + 1; i++)
table[i][0] = 0;
for (int i = 0; i < n + 1; i++)
table[0][i... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int lcs(string a, string b) {
int longest_length = 0;
int m = a.size(), n = b.size();
int table[m + 1][n + 1];
for (int i = 0; i < m + 1; i++)
table[i][0] = 0;
for (int i = 0; i < n + 1; i++)
table[0][i... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,381 | 94,382 | u222957942 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = " " + X;
Y = " " + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n;... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = " " + X;
Y = " " + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n;... | [
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 94,383 | 94,384 | u722526744 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = " " + X;
Y = " " + Y;
for (int i = 1; i <= m; i++)
c[i][0] = 0;
for (int j = 1; j <= n;... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = " " + X;
Y = " " + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n;... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"expression.operation.compare.replace.add",
"assignment.replace.remove",
"misc.typo"
] | 94,385 | 94,384 | u722526744 | cpp |
p02235 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int q;
cin >> q;
for (int i = 0; i < q; i++) {
string x, y;
cin >> x >> y;
int nx, ny;
nx = x.size();
ny = y.size();
vector<vector<int>> lcs(nx + 1, vector<int>(ny + 1, 0));
for (int i = ... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int q;
cin >> q;
for (int i = 0; i < q; i++) {
string x, y;
cin >> x >> y;
int nx, ny;
nx = x.size();
ny = y.size();
vector<vector<int>> lcs(nx + 1, vector<int>(ny + 1, 0));
for (int i = ... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,386 | 94,387 | u672509549 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
#define MAX 1000
int dp[MAX + 1][MAX + 1];
int LCS(string STR1, string STR2) {
int length1 = STR1.size();
int length2 = STR2.size();
//???????????¨????????????????????????
STR1 = ' ' + STR1;
STR2 = ' ' + STR2;
for (int i = 0; i ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
#define MAX 1000
int dp[MAX + 1][MAX + 1];
int LCS(string STR1, string STR2) {
int length1 = STR1.size();
int length2 = STR2.size();
STR1 = ' ' + STR1;
STR2 = ' ' + STR2;
for (int i = 0; i <= length1; i++) {
for (int l = 0; l ... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"assignment.change"
] | 94,388 | 94,389 | u050281953 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
#define int long long
using namespace std;
signed main() {
int n;
cin >> n;
for (int c = 0; c < n; c++) {
string x, y;
cin >> x >> y;
int dp[x.size() + 1][y.size() + 1];
for (int i = 0; i < x.size() + 1; i++) {
dp[i][0] = 0;
}
... | #include <algorithm>
#include <iostream>
#include <string>
#define int long long
using namespace std;
signed main() {
int n;
cin >> n;
for (int c = 0; c < n; c++) {
string x, y;
cin >> x >> y;
int dp[x.size() + 1][y.size() + 1];
for (int i = 0; i < x.size() + 1; i++) {
dp[i][0] = 0;
}
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,390 | 94,391 | u214404619 | cpp |
p02235 | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// ---------------------
// repetition
#define FOR(i, a, b) for (... | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
// ---------------------
// repetition
#define FOR(i, a, b) for (... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"expression.operation.binary.remove"
] | 94,394 | 94,395 | u981265766 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 1; i <= m; i++)
c[i][0] = 0;
for (int j = 1; j <= n;... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 1; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= n;... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,408 | 94,409 | u714252022 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string x, string y) {
int c[N + 1][N + 1], maxl = 0, i, j;
int m = x.size();
int n = y.size();
x = ' ' + x;
y = ' ' + y;
for (i = 1; i <= m; i++)
c[i][0] = 0;
for (i = 1; i <= n; i++)
... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string x, string y) {
int c[N + 1][N + 1], maxl = 0, i, j;
int m = x.size();
int n = y.size();
x = ' ' + x;
y = ' ' + y;
for (i = 1; i <= m; i++)
c[i][0] = 0;
for (i = 0; i <= n; i++)
... | [
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,411 | 94,412 | u709938732 | cpp |
p02235 | #include <iostream>
#include <string>
using namespace std;
int lcs(string x, string y) {
int m = x.size();
int n = y.size();
int c[m + 1][n + 1];
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int i = 1; i <= n; i++)
c[0][i] = 0;
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
... | #include <iostream>
#include <string>
using namespace std;
int lcs(string x, string y) {
int m = x.size();
int n = y.size();
int c[m + 1][n + 1];
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int i = 1; i <= n; i++)
c[0][i] = 0;
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,418 | 94,419 | u014557234 | cpp |
p02235 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int get_LCS(string x, string y) {
int nx = x.size(), ny = y.size();
int dp[nx + 1][ny + 1];
for (int i =... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
int get_LCS(string x, string y) {
int nx = x.size(), ny = y.size();
int dp[nx + 1][ny + 1];
for (int i =... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,420 | 94,421 | u014557234 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int dp[1002][1002];
int main() {
int n;
cin >> n;
string x, y;
while (n--) {
fill((int *)dp, (int *)(dp + 1002), 0);
cin >> x >> y;
for (int i = 1; i <= x.size(); i++) {
for (int j = 1; j <= y.size(); j++) {
... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int dp[1002][1002];
int main() {
int n;
cin >> n;
string x, y;
while (n--) {
fill((int *)dp, (int *)(dp + 1002), 0);
cin >> x >> y;
for (int i = 1; i <= x.size(); i++) {
for (int j = 1; j <= y.size(); j++) {
... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,422 | 94,423 | u096656118 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int dp[1002][1002];
int main() {
int n;
cin >> n;
string x, y;
while (n--) {
cin >> x >> y;
for (int i = 1; i <= x.size(); i++) {
for (int j = 1; j <= y.size(); j++) {
if (x[i] == y[j])
dp[i][j] = dp... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int dp[1002][1002];
int main() {
int n;
cin >> n;
string x, y;
while (n--) {
cin >> x >> y;
for (int i = 1; i <= x.size(); i++) {
for (int j = 1; j <= y.size(); j++) {
if (x[i - 1] == y[j - 1])
dp[i]... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,425 | 94,426 | u096656118 | cpp |
p02235 | /* test */
#include <bits/stdc++.h>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 1; i <= m; i++)
c[i][0] = 0;
for (int k = 1; k <= n; k++)
c[0][k] = 0;... | /* test */
#include <bits/stdc++.h>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int k = 1; k <= n; k++)
c[0][k] = 0;... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,427 | 94,428 | u435226340 | cpp |
p02235 | #include <iostream>
#include <string>
#define MAX_N 1000
#define MAX_M 1000
int n, m;
std::string s, t;
int dp[MAX_N + 1][MAX_M + 1];
void solve() {
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
if (s[i + 1] == t[j + 1]) {
dp[i + 1][j + 1] = dp[i][j] + 1;
} else {
dp[... | #include <iostream>
#include <string>
#define MAX_N 1000
#define MAX_M 1000
int n, m;
std::string s, t;
int dp[MAX_N + 1][MAX_M + 1];
void solve() {
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
if (s[i] == t[j]) {
dp[i + 1][j + 1] = dp[i][j] + 1;
} else {
dp[i + 1][j... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 94,429 | 94,430 | u571345107 | cpp |
p02235 | #define PI 3.14159265359
#define INF 2000000000
#define MAX 500000
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
void LCS(string X, string Y) {
int c[1000][1... | #define PI 3.14159265359
#define INF 2000000000
#define MAX 500000
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
void LCS(string X, string Y) {
int c[1002][1... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 94,431 | 94,432 | u106214670 | cpp |
p02235 | #include <iostream>
using namespace std;
#include <algorithm>
#include <cstring>
#include <string>
int dp[1002][1002] = {0};
int main() {
int q;
cin >> q;
for (int i = 0; i < q; ++i) {
string x, y;
int cnt = 0;
cin >> x >> y;
memset(dp, 0, sizeof(dp));
for (int j = 1; j <= x.size(); ++j) {
... | #include <iostream>
using namespace std;
#include <algorithm>
#include <cstring>
#include <string>
int dp[1002][1002] = {0};
int main() {
int q;
cin >> q;
for (int i = 0; i < q; ++i) {
string x, y;
int cnt = 0;
cin >> x >> y;
memset(dp, 0, sizeof(dp));
for (int j = 1; j <= x.size(); ++j) {
... | [] | 94,439 | 94,440 | u490319842 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int p[1001][1001] = {0};
int main() {
int i, j, q, e, l, z, m, u, n;
char s[2001], c[2001];
cin >> q;
for (e = 0; e < q; e++) {
scanf("%s %s", s, c);
l = strlen(s);
z = strlen(c);
for (i = 0; i ... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int p[1001][1001] = {0};
int main() {
int i, j, q, e, l, z, m, u, n;
char s[2001], c[2001];
cin >> q;
for (e = 0; e < q; e++) {
scanf("%s %s", s, c);
l = strlen(s);
z = strlen(c);
for (i = 0; i ... | [
"expression.operation.binary.remove"
] | 94,441 | 94,442 | u315618053 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int p[1001][1001] = {0};
int main() {
int i, j, q, e, l, z, m, u, n;
char s[2001], c[2001];
cin >> q;
for (e = 0; e < q; e++) {
scanf("%s %s", s, c);
l = strlen(s);
z = strlen(c);
for (i = 0; i ... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int p[1001][1001] = {0};
int main() {
int i, j, q, e, l, z, m, u, n;
char s[2001], c[2001];
cin >> q;
for (e = 0; e < q; e++) {
scanf("%s %s", s, c);
l = strlen(s);
z = strlen(c);
for (i = 0; i ... | [
"assignment.change",
"expression.operation.binary.remove"
] | 94,443 | 94,442 | u315618053 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int p[1001][1001] = {0};
int main() {
int i, j, q, e, l, z, m, u, n;
char s[2001], c[2001];
cin >> q;
for (e = 0; e < q; e++) {
scanf("%s %s", s, c);
l = strlen(s);
z = strlen(c);
for (i = 0; i ... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int p[1001][1001] = {0};
int main() {
int i, j, q, e, l, z, m, u, n;
char s[2001], c[2001];
cin >> q;
for (e = 0; e < q; e++) {
scanf("%s %s", s, c);
l = strlen(s);
z = strlen(c);
for (i = 0; i ... | [
"assignment.change"
] | 94,444 | 94,442 | u315618053 | cpp |
p02235 | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int c[1010][1010];
void lcs(char X[], char Y[]) {
int m = strlen(X);
int n = strlen(Y);
int i, j;
for (i = 1; i <= m; i++)
c[i][0] = 0;
for (j = 1; j <= m; j++)
c[0][j] = 0;
for (i = 1; i <= m; i++) {
for (j = 1; j ... | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int c[1010][1010];
void lcs(char X[], char Y[]) {
int m = strlen(X);
int n = strlen(Y);
int i, j;
for (i = 1; i <= m; i++)
c[i][0] = 0;
for (j = 1; j <= n; j++)
c[0][j] = 0;
for (i = 1; i <= m; i++) {
for (j = 1; j ... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"control_flow.branch.if.condition.change",
"misc.off_by_one"
] | 94,450 | 94,451 | u877539319 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = ' ' + X;
Y = ' ' + Y;
for (int i = 1; i <= m; i++)
c[i][0] = 0;
for (int j = 1; j <= n;... |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
static const int N = 1000;
int lcs(string X, string Y) {
int c[N + 1][N + 1];
int m = X.size();
int n = Y.size();
int maxl = 0;
X = " " + X;
Y = " " + Y;
for (int i = 0; i <= m; i++)
c[i][0] = 0;
for (int j = 0; j <= ... | [
"literal.string.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 94,452 | 94,453 | u215304644 | cpp |
p02235 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int lcs(string x, string y) {
int m, n, c[1001][1001], i, j, maxl = 0;
m = x.size();
n = y.size();
x = ' ' + x;
y = ' ' + y;
for (i = 0; i <= m; i++) {
c[i][0] = 0;
}
for (j = 1; j <= n; j++) {
c[0][j] = 0;
}... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int lcs(string x, string y) {
int m, n, c[1001][1001], i, j, maxl = 0;
m = x.size();
n = y.size();
x = ' ' + x;
y = ' ' + y;
for (i = 0; i <= m; i++) {
c[i][0] = 0;
}
for (j = 1; j <= n; j++) {
c[0][j] = 0;
}... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 94,455 | 94,456 | u694499356 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.