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 |
|---|---|---|---|---|---|---|---|
p02573 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <new>
#include <queue>
#include <random>
#include <se... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <new>
#include <queue>
#include <random>
#include <se... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 268,975 | 268,976 | u099918199 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> number(N, vector<int>(0));
vector<bool> seen(N, false);
vector<int> A(M);
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> A[i] >> B[i];
}
for (int i = 0; i < M; i++) {
number[A[i] ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<vector<int>> number(N, vector<int>(0));
vector<bool> seen(N, false);
vector<int> A(M);
vector<int> B(M);
for (int i = 0; i < M; i++) {
cin >> A[i] >> B[i];
}
for (int i = 0; i < M; i++) {
number[A[i] ... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 268,979 | 268,980 | u422692699 | cpp |
p02573 | #include <bits/stdc++.h> //---------------------------------------------------------------
#define ll long long
#define mod 1000000007
#define MAX 100005
#define PI 3.141592653589793238 // shortcut keys
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fr(i, a, b) for (int i = a; i <... | #include <bits/stdc++.h> //---------------------------------------------------------------
#define ll long long
#define mod 1000000007
#define MAX 100005
#define PI 3.141592653589793238 // shortcut keys
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fr(i, a, b) for (int i = a; i <... | [
"variable_declaration.value.change"
] | 268,984 | 268,985 | u349761723 | cpp |
p02573 | #include <bits/stdc++.h> //---------------------------------------------------------------
#define ll long long
#define mod 1000000007
#define MAX 100005
#define PI 3.141592653589793238 // shortcut keys
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fr(i, a, b) for (int i = a; i <... | #include <bits/stdc++.h> //---------------------------------------------------------------
#define ll long long
#define mod 1000000007
#define MAX 100005
#define PI 3.141592653589793238 // shortcut keys
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define fr(i, a, b) for (int i = a; i <... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"variable_declaration.value.change"
] | 268,986 | 268,985 | u349761723 | cpp |
p02573 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (ll i = a; i < ll(b); i++)
#define repr(i, a, b) for (ll i = a; i >= ll(b); i--)
#define endl "\n"
#define ALL(x) x.begin(), x.end()
#define AL... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (ll i = a; i < ll(b); i++)
#define repr(i, a, b) for (ll i = a; i >= ll(b); i--)
#define endl "\n"
#define ALL(x) x.begin(), x.end()
#define AL... | [
"literal.number.change",
"variable_declaration.value.change"
] | 268,993 | 268,994 | u946467231 | cpp |
p02573 | #if loc || local
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < ll(n); ++i)
#define repr(i, n) for (ll i = ll(n); i-- > 0;)
using ll = int_fast64_t;
using pll = pair<ll, ll>;
constexpr ll INF = 1LL << 60;
constexpr ll MOD = 1e9 + 7;
template <class T> ... | #if loc || local
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < ll(n); ++i)
#define repr(i, n) for (ll i = ll(n); i-- > 0;)
using ll = int_fast64_t;
using pll = pair<ll, ll>;
constexpr ll INF = 1LL << 60;
constexpr ll MOD = 1e9 + 7;
template <class T> ... | [
"assignment.change"
] | 268,995 | 268,996 | u423624748 | cpp |
p02573 | //インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <chrono> //実行時間計測
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostre... | //インクルード(アルファベット順)
#include <algorithm> //sort,二分探索,など
#include <bitset> //固定長bit集合
#include <chrono> //実行時間計測
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostre... | [
"assignment.change"
] | 269,003 | 269,004 | u345693891 | cpp |
p02573 | // Code for D - Friends
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define FOR(i, x, y) for (ll i = x; i < (ll)(y); i++)
#define MOD 1000000007
#define mod(x) ((x) % MOD + MOD) % MOD
#define debug(var) ... | // Code for D - Friends
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define FOR(i, x, y) for (ll i = x; i < (ll)(y); i++)
#define MOD 1000000007
#define mod(x) ((x) % MOD + MOD) % MOD
#define debug(var) ... | [
"assignment.change"
] | 269,011 | 269,012 | u638629468 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> G(3e5);
vector<bool> seen(3e5, false);
int cnt;
void dfs(int u) {
seen[u] = true;
cnt++;
for (auto next : G[u]) {
if (seen[next] != false)
continue;
dfs(next);
}
}
int main() {
int n, m, ans;
cin >> n >> m;
int a, b;
for ... | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> G(3e5);
vector<bool> seen(3e5, false);
int cnt;
void dfs(int u) {
seen[u] = true;
cnt++;
for (auto next : G[u]) {
if (seen[next] != false)
continue;
dfs(next);
}
}
int main() {
int n, m, ans = 0;
cin >> n >> m;
int a, b;
... | [
"variable_declaration.value.change"
] | 269,023 | 269,024 | u590995678 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 200005;
int a[maxn];
int find(int x) {
if (a[x] == x)
return x;
else
return a[x] = find(a[x]);
}
int main() {
int n, m, aa, bb;
cin >> n >> m;
for (int i = 1; i <= n; i++)
a[i] = i;
for (int i = 1; i <= m; i++) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 200005;
int a[maxn];
int find(int x) {
if (a[x] == x)
return x;
else
return a[x] = find(a[x]);
}
int main() {
int n, m, aa, bb;
cin >> n >> m;
for (int i = 1; i <= n; i++)
a[i] = i;
for (int i = 1; i <= m; i++) ... | [
"call.add",
"call.arguments.change"
] | 269,032 | 269,033 | u506946227 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int MaxN = 2e5;
const int MaxM = 2e5;
int cnt[MaxN + 1];
int who[MaxN + 1];
inline int FindRoot(int x) {
if (who[x] != x)
who[x] = FindRoot(who[x]);
return who[x];
}
int main() {
int N, M;
int A, B, who_A, who_B;
scanf("%d %d\n", &N, &M);
for (int ... | #include <bits/stdc++.h>
using namespace std;
const int MaxN = 2e5;
const int MaxM = 2e5;
int cnt[MaxN + 1];
int who[MaxN + 1];
inline int FindRoot(int x) {
if (who[x] != x)
who[x] = FindRoot(who[x]);
return who[x];
}
int main() {
int N, M;
int A, B, who_A, who_B;
scanf("%d %d\n", &N, &M);
for (int ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,038 | 269,039 | u570506120 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
#define sz(a) int((a).size())
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
#define sz(a) int((a).size())
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define all(... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,046 | 269,047 | u523451669 | cpp |
p02573 | #include <bits/stdc++.h>
// @author : sam000013
#define int long long
#define PI 3.14159265
#define pb(x) push_back(x)
#define PI 3.14159265
#define all(v) v.begin(), v.end()
#define endl cout << "\n"
#define dbg(x) \
cout << #x << " " << x; ... | #include <bits/stdc++.h>
// @author : sam000013
#define int long long
#define PI 3.14159265
#define pb(x) push_back(x)
#define PI 3.14159265
#define all(v) v.begin(), v.end()
#define endl cout << "\n"
#define dbg(x) \
cout << #x << " " << x; ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,052 | 269,053 | u079095930 | cpp |
p02573 | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <time.h>
#include <vector>
#define h 200010
#define lli long long int
#define pb push_back
#define pof pop_front
#define lb lower_bo... | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <time.h>
#include <vector>
#define h 200010
#define lli long long int
#define pb push_back
#define pof pop_front
#define lb lower_bo... | [
"control_flow.return.add"
] | 269,060 | 269,061 | u028438021 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
struct UnionFind {
vector<int> par, gsize;
int sz;
UnionFind(int N) : par(N), gsize(N), sz(N) {
for (int i = 0; i < N; i++) {
par[i] = i;
gsize[i] = 1;
}
}
// root:子xの根を返す
int root(int x) {
if (par[x] == x)
r... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
struct UnionFind {
vector<int> par, gsize;
int sz;
UnionFind(int N) : par(N), gsize(N), sz(N) {
for (int i = 0; i < N; i++) {
par[i] = i;
gsize[i] = 1;
}
}
// root:子xの根を返す
int root(int x) {
if (par[x] == x)
r... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,070 | 269,071 | u176979814 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef std::pair<int, int> pair2;
typedef std::pair<int, pair2> pair3;
const ll INF = 1LL << 60;
int main() {
ll N, M;
cin >> N >> M;
ll A[M], B[M];
vector<vector<ll>> fri(N + 1, vector<ll>(0, 0));
for (ll i = 0; i < M; i++) {
cin >> A... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef std::pair<int, int> pair2;
typedef std::pair<int, pair2> pair3;
const ll INF = 1LL << 60;
int main() {
ll N, M;
cin >> N >> M;
ll A[M], B[M];
vector<vector<ll>> fri(N + 1, vector<ll>(0, 0));
for (ll i = 0; i < M; i++) {
cin >> A... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,074 | 269,075 | u534542874 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
vector<int> djs(200001, -1);
int root(int a) { return djs[a] < 0 ? a : djs[a] = root(djs[a]); }
int unite(int a, int b) {
int root_a = root(a);
int root_b = root(b);
if (root_a == root_b)
return 0;
if (djs[root_a] > djs[root_b])
swap(root_a, root_b);
dj... | #include <bits/stdc++.h>
using namespace std;
vector<int> djs(200001, -1);
int root(int a) { return djs[a] < 0 ? a : djs[a] = root(djs[a]); }
int unite(int a, int b) {
int root_a = root(a);
int root_b = root(b);
if (root_a == root_b)
return 0;
if (djs[root_a] > djs[root_b])
swap(root_a, root_b);
dj... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,079 | 269,080 | u081445141 | cpp |
p02573 | /*
* @author: codancer
* @createTime: 2020-08-30, 22:48:51
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <rando... | /*
* @author: codancer
* @createTime: 2020-08-30, 22:48:51
*/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <rando... | [
"call.add",
"call.arguments.add"
] | 269,097 | 269,098 | u206489571 | cpp |
p02573 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
const double EPS = 1e-9;
const double PI = acos(-1);
const int knightDir[8... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
const double EPS = 1e-9;
const double PI = acos(-1);
const int knightDir[8... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 269,101 | 269,102 | u782976395 | cpp |
p02573 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
const double EPS = 1e-9;
const double PI = acos(-1);
const int knightDir[8... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(0);
const double EPS = 1e-9;
const double PI = acos(-1);
const int knightDir[8... | [
"preprocessor.define.value.change",
"literal.integer.change",
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 269,103 | 269,102 | u782976395 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define pi 2 * asin(1.0)
#define MAX 10000000
#define MOD 1000000007
// Answer
int main() {
long N, M, t;
typedef pair<long, long> P;
cin >> N >> M;
vector<P> ab(M);
vector<P> ba(M);
vector<long> X(N, 1);
for (long i = 0; i < M; i++) {
cin >> ab.at(i).f... | #include <bits/stdc++.h>
using namespace std;
#define pi 2 * asin(1.0)
#define MAX 10000000
#define MOD 1000000007
// Answer
int main() {
long N, M, t;
typedef pair<long, long> P;
cin >> N >> M;
vector<P> ab(M);
vector<P> ba(M);
vector<long> X(N, 1);
for (long i = 0; i < M; i++) {
cin >> ab.at(i).f... | [
"call.arguments.change"
] | 269,115 | 269,116 | u133719418 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define FastRead \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define endl "\n"
#define sq(x) ((x) * (x))
#define pi acos(-1.0)
#define NUM 200005
typedef ... | #include <bits/stdc++.h>
using namespace std;
#define FastRead \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define endl "\n"
#define sq(x) ((x) * (x))
#define pi acos(-1.0)
#define NUM 200005
typedef ... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"call.arguments.change",
"assignment.variable.change",
"assignment.value.change"
] | 269,119 | 269,120 | u456245233 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define pi pair<int, int>
#define ff first
#define ss second
#define int long long
#define boost \
ios::sync_with_stdio(false); \
cin.tie(nullptr)
#define en... | #include <bits/stdc++.h>
using namespace std;
#define pi pair<int, int>
#define ff first
#define ss second
#define int long long
#define boost \
ios::sync_with_stdio(false); \
cin.tie(nullptr)
#define en... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,129 | 269,130 | u371555975 | cpp |
p02573 | #include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
using namespace std;
// ============union_find_tree===============
ll MAX_N = 200010;
vector<ll> par(MAX_N); // MAX_N == num of node
vector<ll> tree_rank(MAX_N);
void init(ll n) {
for (ll i = 0; i < n; ++i) {
par.at(i) = i;
tree_r... | #include <bits/stdc++.h>
#define INF 2000000000000000000
#define ll long long
using namespace std;
// ============union_find_tree===============
ll MAX_N = 200010;
vector<ll> par(MAX_N); // MAX_N == num of node
vector<ll> tree_rank(MAX_N);
void init(ll n) {
for (ll i = 0; i < n; ++i) {
par.at(i) = i;
tree_r... | [
"assignment.variable.change",
"call.arguments.change"
] | 269,153 | 269,154 | u023958502 | cpp |
p02573 | /*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠺⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⠀⠈⢿⣦⣄⣈⣁⣀⣠⣴⣦⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣶⡄⠙⢿⣿⣿⣿⣿⣿⡿⠓⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠙⣿⣿⠿⠛⠛⠛⠛⣿⣿⡄⠀⠈⠉⠉⠉⣁⣀⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⣸⣿⡇⠀⠀⠀⣴⣿⣿⡿⠿⢷⣄⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠠⣤⣤⣴⣾⣿⡿⠁⠀⢀⣾⣿⣿⠏⠀⠀⠈⣿⣧⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣏⠀⠀⣠⣾⣿⣿⠏⠀⠀⠀⠀⢹⣿⡄⠀⠀
⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠻⣿⣿⡟⠻⠿⠛⠁⠀⠀⠀⠀⠀⣾⣿⡇⠀⠀
⠀⠀... | /*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠺⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⠀⠈⢿⣦⣄⣈⣁⣀⣠⣴⣦⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣶⡄⠙⢿⣿⣿⣿⣿⣿⡿⠓⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠙⣿⣿⠿⠛⠛⠛⠛⣿⣿⡄⠀⠈⠉⠉⠉⣁⣀⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⣸⣿⡇⠀⠀⠀⣴⣿⣿⡿⠿⢷⣄⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠠⣤⣤⣴⣾⣿⡿⠁⠀⢀⣾⣿⣿⠏⠀⠀⠈⣿⣧⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣏⠀⠀⣠⣾⣿⣿⠏⠀⠀⠀⠀⢹⣿⡄⠀⠀
⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠻⣿⣿⡟⠻⠿⠛⠁⠀⠀⠀⠀⠀⣾⣿⡇⠀⠀
⠀⠀... | [
"call.arguments.change",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 269,157 | 269,158 | u701311264 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
vector<ll> ad[200006];
vector<ll> vis(200006, 0);
ll ans = 0, n, m, k;
void add(ll x, ll y) {
ad[x].push_back(y);
ad[y].push_back(x);
}
ll dfs(ll node) {
vis[node] = 1;
++ans;
for (ll i : ad[node]) {
if (!vis[i])
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
vector<ll> ad[200006];
vector<ll> vis(200006, 0);
ll ans = 0, n, m, k;
void add(ll x, ll y) {
ad[x].push_back(y);
ad[y].push_back(x);
}
ll dfs(ll node) {
vis[node] = 1;
++ans;
for (ll i : ad[node]) {
if (!vis[i])
... | [
"assignment.value.change",
"call.arguments.change",
"call.arguments.add"
] | 269,169 | 269,170 | u679682246 | cpp |
p02573 | #include <cstdio>
#include <iostream>
using namespace std;
int n, m, f[300006], a, b, ans = 0, max1[300006], s;
int find(int x) { return x == f[x] ? x : (f[x] = find(f[x])); }
void merge(int i, int j) {
s = find(i);
f[find(i)] = find(j);
max1[f[j]] += max1[s];
if (ans < max1[f[j]])
ans = max1[f[j]];
}
int m... | #include <cstdio>
#include <iostream>
using namespace std;
int n, m, f[300006], a, b, ans = 1, max1[300006], s;
int find(int x) { return x == f[x] ? x : (f[x] = find(f[x])); }
void merge(int i, int j) {
s = find(i);
f[find(i)] = find(j);
max1[f[j]] += max1[s];
if (ans < max1[f[j]])
ans = max1[f[j]];
}
int m... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,179 | 269,180 | u574882775 | cpp |
p02573 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct UnionFind {
vector<int> r; // represents parent/size*(-1) at child/root
UnionFind(int n) { r = vector<int>(n, -1); }
int root(int n) {
if (r[n] <= 0)
return n;
else
return r[n] = root(r[n]);
}
void u... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
struct UnionFind {
vector<int> r; // represents parent/size*(-1) at child/root
UnionFind(int n) { r = vector<int>(n, -1); }
int root(int n) {
if (r[n] < 0)
return n;
else
return r[n] = root(r[n]);
}
void un... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 269,182 | 269,183 | u205299510 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int f[N + 10];
int sz[N + 10];
int find(int x) { return x == f[x] ? x : f[x] = find(f[x]); }
int merge(int u, int v) {
int uf = find(u);
int vf = find(v);
if (uf != vf) {
sz[uf] += sz[vf];
sz[vf] = 0;
f[vf] = uf;
}
return sz[uf];
}
i... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int f[N + 10];
int sz[N + 10];
int find(int x) { return x == f[x] ? x : f[x] = find(f[x]); }
int merge(int u, int v) {
int uf = find(u);
int vf = find(v);
if (uf != vf) {
sz[uf] += sz[vf];
sz[vf] = 0;
f[vf] = uf;
}
return sz[uf];
}
i... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,200 | 269,201 | u211694760 | cpp |
p02573 | #include <algorithm>
#include <bitset>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define pi 3.141592653
#define in freopen("entrada",... | #include <algorithm>
#include <bitset>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <string.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define pi 3.141592653
#define in freopen("entrada",... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,225 | 269,226 | u912007551 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int MAX(2e5 + 2);
#define debug2(x, y) cout << x << " " << y << "\n"
ll const mod = 1e9 + 7;
vector<int> visited(MAX, 0);
vector<vector<int>> adj(MAX);
int main() {
int n, m, x, y, ans = 0;
cin >> n >> m;
for (int i ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int MAX(2e5 + 2);
#define debug2(x, y) cout << x << " " << y << "\n"
ll const mod = 1e9 + 7;
vector<int> visited(MAX, 0);
vector<vector<int>> adj(MAX);
int main() {
int n, m, x, y, ans = 0;
cin >> n >> m;
for (int i ... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 269,234 | 269,235 | u832708957 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
int a[200005], b[200005], f[200005], t[200005];
int find_(int x) {
if (f[x] != x)
f[x] = find_(f[x]);
return f[x];
}
bool cmp(int x, int y) { return x > y; }
int main() {
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++)
f[i] = i;
for (int i = 1; i <... | #include <bits/stdc++.h>
using namespace std;
int a[200005], b[200005], f[200005], t[200005];
int find_(int x) {
if (f[x] != x)
f[x] = find_(f[x]);
return f[x];
}
bool cmp(int x, int y) { return x > y; }
int main() {
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++)
f[i] = i;
for (int i = 1; i <... | [
"variable_access.subscript.index.change"
] | 269,236 | 269,237 | u250660201 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int n, m;
int fa[N], sum[N];
int find(int x) {
if (fa[x] != x)
fa[x] = find(fa[x]);
return fa[x];
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
fa[i] = i;
for (int i = 1; i <= m; i++) {
int x, y;
cin >> x >> y;
... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int n, m;
int fa[N], sum[N];
int find(int x) {
if (fa[x] != x)
fa[x] = find(fa[x]);
return fa[x];
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
fa[i] = i;
for (int i = 1; i <= m; i++) {
int x, y;
cin >> x >> y;
... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 269,240 | 269,241 | u324826464 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, m;
int fa[N], sum[N];
int find(int x) {
if (fa[x] != x)
fa[x] = find(fa[x]);
return fa[x];
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
fa[i] = i;
for (int i = 1; i <= m; i++) {
int x, y;
cin >> x >> y;
... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
int n, m;
int fa[N], sum[N];
int find(int x) {
if (fa[x] != x)
fa[x] = find(fa[x]);
return fa[x];
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
fa[i] = i;
for (int i = 1; i <= m; i++) {
int x, y;
cin >> x >> y;
... | [
"literal.number.change",
"expression.operation.binary.change",
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 269,242 | 269,241 | u324826464 | cpp |
p02573 | #include <bits/stdc++.h>
#define rep(i, f, n) for (int i = (f); (i) < (n); i++)
#define repe(i, f, n) for (int i = (f); (i) <= (n); i++)
using namespace std;
using ll = long long;
#define MOD (ll)1000000007
#define PI 3.14159265359
#define debug(x) cout << #x << " :: " << x << "\n";
#define debug2(x, y) ... | #include <bits/stdc++.h>
#define rep(i, f, n) for (int i = (f); (i) < (n); i++)
#define repe(i, f, n) for (int i = (f); (i) <= (n); i++)
using namespace std;
using ll = long long;
#define MOD (ll)1000000007
#define PI 3.14159265359
#define debug(x) cout << #x << " :: " << x << "\n";
#define debug2(x, y) ... | [
"identifier.change",
"call.arguments.change"
] | 269,248 | 269,249 | u873269440 | cpp |
p02573 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
class union_find {
public:
union_find(int N) {
parent = new int[N];
rank = new int[N];
for (int i = 0; i < N; i++) {
parent[i] = i;
rank[i] = 0;
}
}
int root(in... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
class union_find {
public:
union_find(int N) {
parent = new int[N];
rank = new int[N];
for (int i = 0; i < N; i++) {
parent[i] = i;
rank[i] = 0;
}
}
int root(in... | [
"call.function.change",
"variable_access.subscript.index.change"
] | 269,252 | 269,253 | u828593789 | cpp |
p02573 | #include <bits/stdc++.h>
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0)
#define int int64_t
#define ii pair<int, int>
#define endl '\n'
#define vi vector<int>
#define vii vector<ii>
#define vv... | #include <bits/stdc++.h>
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0)
#define int int64_t
#define ii pair<int, int>
#define endl '\n'
#define vi vector<int>
#define vii vector<ii>
#define vv... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,266 | 269,267 | u211972814 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<ll> vecl;
typedef pair<ll, ll> pairl;
#define ALL(v) v.begin(), v.end()
#define REP(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
template <class T, class C> void chmax(T &a, C b) { a > b ?... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<ll> vecl;
typedef pair<ll, ll> pairl;
#define ALL(v) v.begin(), v.end()
#define REP(i, x, n) for (int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
template <class T, class C> void chmax(T &a, C b) { a > b ?... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,271 | 269,272 | u997648604 | cpp |
p02573 | #include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
#define forn(i, n) for (ll i = 0; i < ll(n); i++)
class DisjointSet {
public:
vector<ll> Parent, Rank, Size;
ll MaxSize = -1;
DisjointSet(ll n) {
forn(i, n + 1) Parent.push_back(i), Rank.push_back(0), Size.push_back(1);
}... | #include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
#define forn(i, n) for (ll i = 0; i < ll(n); i++)
class DisjointSet {
public:
vector<ll> Parent, Rank, Size;
ll MaxSize = 1;
DisjointSet(ll n) {
forn(i, n + 1) Parent.push_back(i), Rank.push_back(0), Size.push_back(1);
}
... | [
"expression.operation.unary.arithmetic.remove"
] | 269,277 | 269,278 | u723732030 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
int p[200010], cnt[200010];
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
int n, m;
int a... | #include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
int p[200010], cnt[200010];
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
int n, m;
int a... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,281 | 269,282 | u816299751 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
#define Fi first
#define Se second
#define _Out(a) cerr << #a << " = " << (a) << endl
const int INF = 0x3f3f3f3f, MAXN = 1e3 ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
#define Fi first
#define Se second
#define _Out(a) cerr << #a << " = " << (a) << endl
const int INF = 0x3f3f3f3f, MAXN = 3e5 ... | [
"literal.number.change",
"expression.operation.binary.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 269,286 | 269,284 | u796749787 | cpp |
p02573 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int INF = 2 * 1e05 + 1;
vector<vector<int>> g(INF);
vector<int> visited(INF);
int cnt;
void dfs(int now) {
visited[now] = 1;
for (int next : g[now]) {
if (visited[next])
continue;
cnt++;
dfs(next);
}
}
int main() {
in... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int INF = 2 * 1e05 + 1;
vector<vector<int>> g(INF);
vector<int> visited(INF);
int cnt;
void dfs(int now) {
visited[now] = 1;
for (int next : g[now]) {
if (visited[next])
continue;
cnt++;
dfs(next);
}
}
int main() {
in... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,289 | 269,290 | u365375535 | cpp |
p02573 | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define REP(a, b) for (int a = 0; a < (b); ++a)
#define REP1(i, n) for (int i = 1; i <= (n); ++i)
#define debug(x) cerr << #x << ": " << x << '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define YES() pri... | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define REP(a, b) for (int a = 0; a < (b); ++a)
#define REP1(i, n) for (int i = 1; i <= (n); ++i)
#define debug(x) cerr << #x << ": " << x << '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define YES() pri... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,300 | 269,301 | u311671153 | cpp |
p02573 | #include <bits/stdc++.h>
#define MX 200005
using namespace std;
vector<int> adj[MX];
int vis[MX];
int dfs(int u) {
int ret = 1;
vis[u] = 1;
for (int v : adj[u])
if (!vis[v])
ret += dfs(v);
return ret;
}
int main() {
int n, m;
cin >> n >> m;
for (int i = 0; i < m; i++) {
int u, v;
cin >> ... | #include <bits/stdc++.h>
#define MX 200005
using namespace std;
vector<int> adj[MX];
int vis[MX];
int dfs(int u) {
int ret = 1;
vis[u] = 1;
for (int v : adj[u])
if (!vis[v])
ret += dfs(v);
return ret;
}
int main() {
int n, m;
cin >> n >> m;
for (int i = 0; i < m; i++) {
int u, v;
cin >> ... | [
"expression.operation.unary.add",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 269,309 | 269,310 | u757129757 | cpp |
p02573 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
class UnionFind {
public:
UnionFind(int &n) { r = vector<int>(n + 1, -1); }
int findRoot(int x) {
if (r[x] < 0)
return x... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
class UnionFind {
public:
UnionFind(int &n) { r = vector<int>(n + 1, -1); }
int findRoot(int x) {
if (r[x] < 0)
return x... | [
"assignment.change"
] | 269,311 | 269,312 | u541567517 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
constexpr int N = 2e5 + 100;
int fa[N], son_num[N];
int Find(int x) {
if (fa[x] == x)
return fa[x];
else
return fa[x] = Find(fa[x]);
}
void Union(int x, int y) {
int fax = Find(x);
int fay = Find(y);
if (fax != fay) {
fa[y] = fax;
son_num[fax] +... | #include <bits/stdc++.h>
using namespace std;
constexpr int N = 2e5 + 100;
int fa[N], son_num[N];
int Find(int x) {
if (fa[x] == x)
return fa[x];
else
return fa[x] = Find(fa[x]);
}
void Union(int x, int y) {
int fax = Find(x);
int fay = Find(y);
if (fax != fay) {
fa[fay] = fax;
son_num[fax]... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 269,324 | 269,325 | u046595819 | cpp |
p02573 | #include <iostream>
#include <vector>
using namespace std;
int root(int x, vector<int> &par) {
return par.at(x) == x ? x : par.at(x) = root(par.at(x), par);
}
int unite(int x, int y, vector<int> &par, vector<int> &rank) {
x = root(x, par);
y = root(y, par);
if (x == y)
return -1;
if (rank.at(x) < rank.a... | #include <iostream>
#include <vector>
using namespace std;
int root(int x, vector<int> &par) {
return par.at(x) == x ? x : par.at(x) = root(par.at(x), par);
}
int unite(int x, int y, vector<int> &par, vector<int> &rank) {
x = root(x, par);
y = root(y, par);
if (x == y)
return -1;
if (rank.at(x) < rank.a... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,346 | 269,347 | u714732628 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M), B(M);
for (int i = 0; i < M; i++) {
cin >> A[i] >> B[i];
A[i]--;
B[i]--;
}
vector<vector<int>> G(N);
for (int i = 0; i < M; i++) {
G[A[i]].push_back(B[i]);
G[B[i]].push_back(A[i]);
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M), B(M);
for (int i = 0; i < M; i++) {
cin >> A[i] >> B[i];
A[i]--;
B[i]--;
}
vector<vector<int>> G(N);
for (int i = 0; i < M; i++) {
G[A[i]].push_back(B[i]);
G[B[i]].push_back(A[i]);
... | [
"identifier.replace.remove",
"literal.replace.add",
"io.output.change"
] | 269,351 | 269,352 | u728261986 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll l... | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define ll l... | [
"expression.operation.unary.arithmetic.remove"
] | 269,359 | 269,360 | u313727475 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
using namespace __detail;
typedef long long ll;
#define ar array
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define all(x) (x).begin(), (x).end()
#define en '\n'
#define FILL(x, v) memset(x, v, sizeof(x))
#define pb push_back
#defi... | #include <bits/stdc++.h>
using namespace std;
using namespace __detail;
typedef long long ll;
#define ar array
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define all(x) (x).begin(), (x).end()
#define en '\n'
#define FILL(x, v) memset(x, v, sizeof(x))
#define pb push_back
#defi... | [
"call.function.change",
"call.arguments.change"
] | 269,361 | 269,362 | u297802287 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define print(r) cout << r << endl
#define prints(r) cout << r << " "
#define printline cout << endl
vector<ll> desc(2e5, 1);
vector<vector<ll>> tree(2e5);
vector<ll> visited(2e5, 0);
ll dfs(ll n) {
if (visited[n])
return 0;
visited[n] = 1;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define print(r) cout << r << endl
#define prints(r) cout << r << " "
#define printline cout << endl
vector<ll> desc(2e5, 1);
vector<vector<ll>> tree(2e5);
vector<ll> visited(2e5, 0);
ll dfs(ll n) {
if (visited[n])
return 0;
visited[n] = 1;
... | [
"expression.operation.binary.add"
] | 269,375 | 269,376 | u537926697 | cpp |
p02573 | #include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0; i < (int)(n); i++)
#define sum(a) accumulate(a.begin(), a.end(), 0LL)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
ll n, m;
cin >> n >> m;
vector<ll> a(m), b(m);
rep(i, m) cin >> a[i] >> b[i];
... | #include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0; i < (int)(n); i++)
#define sum(a) accumulate(a.begin(), a.end(), 0LL)
#define put(i) cout << fixed << i << endl
using namespace std;
using ll = long long;
int main() {
ll n, m;
cin >> n >> m;
vector<ll> a(m), b(m);
rep(i, m) cin >> a[i] >> b[i];
... | [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change"
] | 269,377 | 269,378 | u185935459 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const long double PI = (acos(-1));
const long long MOD = 1000000007;
struct Edge {
long long to;
long long cost;
};
using Graph = vector<vector<Edge>>;
using P = pair<ll, ll>;
const long long INF = 1LL << 60;
#defin... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const long double PI = (acos(-1));
const long long MOD = 1000000007;
struct Edge {
long long to;
long long cost;
};
using Graph = vector<vector<Edge>>;
using P = pair<ll, ll>;
const long long INF = 1LL << 60;
#defin... | [
"assignment.change"
] | 269,381 | 269,382 | u303297838 | cpp |
p02573 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
struct UnionFind {
vector<int> par;
UnionFind(int N) { par ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
struct UnionFind {
vector<int> par;
UnionFind(int N) { par ... | [
"assignment.change"
] | 269,383 | 269,384 | u412408615 | cpp |
p02573 | #include <bits/stdc++.h>
#define pb push_back
#define f(i, a, b) for (int i = a; i < b; i++)
#define f1(i, a, b) for (int i = a; i <= b; i++)
#define int long long
using namespace std;
#define mod 1000000007
vector<int> adj[200001];
int visited[200001];
int dfs(int s) {
visited[s] = 1;
int count = 1;
for (int i ... | #include <bits/stdc++.h>
#define pb push_back
#define f(i, a, b) for (int i = a; i < b; i++)
#define f1(i, a, b) for (int i = a; i <= b; i++)
#define int long long
using namespace std;
#define mod 1000000007
vector<int> adj[200001];
int visited[200001];
int dfs(int s) {
visited[s] = 1;
int count = 1;
for (int i ... | [
"literal.number.change",
"io.output.change"
] | 269,387 | 269,388 | u327245973 | cpp |
p02573 | // abc177_d.cpp
// Sat Aug 29 20:53:41 2020
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define INTINF 2147483647
#define LLINF 9223372036854775807
#define MOD 1000000007
#define rep(i, n) for (in... | // abc177_d.cpp
// Sat Aug 29 20:53:41 2020
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define INTINF 2147483647
#define LLINF 9223372036854775807
#define MOD 1000000007
#define rep(i, n) for (in... | [
"variable_access.subscript.index.change"
] | 269,393 | 269,394 | u628871447 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define COUT(x) cout << (x) << "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(), (x).end()
#define COUT(x) cout << (x) << "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | [
"expression.operation.binary.remove"
] | 269,395 | 269,396 | u303884911 | cpp |
p02573 | #include <iostream>
#include <vector>
using namespace std;
using Graph = vector<vector<int>>;
int cnt = 1;
// 深さ優先探索
vector<bool> seen;
void dfs(const Graph &G, int v) {
seen[v] = true;
for (auto next_v : G[v]) {
if (seen[next_v])
continue;
dfs(G, next_v); // 再帰的に探索
cnt++;
}
}
int main() {
... | #include <iostream>
#include <vector>
using namespace std;
using Graph = vector<vector<int>>;
int cnt = 1;
// 深さ優先探索
vector<bool> seen;
void dfs(const Graph &G, int v) {
seen[v] = true;
for (auto next_v : G[v]) {
if (seen[next_v])
continue;
dfs(G, next_v); // 再帰的に探索
cnt++;
}
}
int main() {
... | [
"literal.number.change",
"assignment.value.change"
] | 269,405 | 269,406 | u428138851 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int INF = 1e9;
#define PB push_back
#define PF push_front
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vpi vector<pii>
#define vll vector<ll>
#defin... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int INF = 1e9;
#define PB push_back
#define PF push_front
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vpi vector<pii>
#define vll vector<ll>
#defin... | [
"call.function.change"
] | 269,409 | 269,410 | u110044127 | cpp |
p02573 | /*
ID: Loxilante
Time: 2020/08/29
Prog: D
Lang: cpp
*/
#ifdef ONLINE_JUDGE
#pragma GCC optimize("O3")
#endif
#include <bits/extc++.h>
#define rep(i, l, r) for (int i = l; i < r; i++)
#define hrp(i, l, r) for (int i = l; i <= r; i++)
#define rev(i, r, l) for (int i = r; i >= l; i--)
#defi... | /*
ID: Loxilante
Time: 2020/08/29
Prog: D
Lang: cpp
*/
#ifdef ONLINE_JUDGE
#pragma GCC optimize("O3")
#endif
#include <bits/extc++.h>
#define rep(i, l, r) for (int i = l; i < r; i++)
#define hrp(i, l, r) for (int i = l; i <= r; i++)
#define rev(i, r, l) for (int i = r; i >= l; i--)
#defi... | [
"variable_access.subscript.index.change"
] | 269,411 | 269,412 | u757598068 | cpp |
p02573 | #include <bits/stdc++.h> // header file includes every Standard library
using namespace std;
#define mod 1000000007
// finding root of an element.
int root(int Arr[], int i) {
while (Arr[i] != i) {
Arr[i] = Arr[Arr[i]];
i = Arr[i];
}
return i;
}
/*modified union function where we connect the elements by ... | #include <bits/stdc++.h> // header file includes every Standard library
using namespace std;
#define mod 1000000007
// finding root of an element.
int root(int Arr[], int i) {
while (Arr[i] != i) {
Arr[i] = Arr[Arr[i]];
i = Arr[i];
}
return i;
}
/*modified union function where we connect the elements by ... | [
"variable_declaration.type.primitive.change",
"call.add",
"variable_access.subscript.index.change"
] | 269,421 | 269,422 | u528925384 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define Pi 2 * acos(0.0)
#define LINF 1LL << 63
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define MAX 500006
#define MAX1 10000008
#define mem(a, v) memset(a, v, sizeof(a))
#define all(x) x.begin(), x.end()
#define lcm(a,... | #include <bits/stdc++.h>
using namespace std;
#define Pi 2 * acos(0.0)
#define LINF 1LL << 63
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define MAX 500006
#define MAX1 10000008
#define mem(a, v) memset(a, v, sizeof(a))
#define all(x) x.begin(), x.end()
#define lcm(a,... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,433 | 269,434 | u405638031 | cpp |
p02573 | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define IO ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
#define ll long long
#define IO ... | [
"variable_access.subscript.index.change"
] | 269,443 | 269,444 | u915401678 | cpp |
p02573 | /*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;*/
#include <algorithm>
#include <bits/stdc++.h>
#include <ctype.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define S second
#def... | /*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;*/
#include <algorithm>
#include <bits/stdc++.h>
#include <ctype.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define S second
#def... | [
"control_flow.branch.if.condition.change"
] | 269,445 | 269,446 | u832564194 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
int par[200001], ran[200001], box[200001];
int main(void) {
int n, m, x, y, i;
cin >> n >> m;
for (i = 1; i <= n; i++) {
par[i] = i;
ran[i] = 0;
box[i] = 0;
}
for (i = 0; i < m; i++) {
cin >> x >> y;
if (x < y)
swap(x, y);
while (x !=... | #include <bits/stdc++.h>
using namespace std;
int par[200001], ran[200001], box[200001];
int main(void) {
int n, m, x, y, i;
cin >> n >> m;
for (i = 1; i <= n; i++) {
par[i] = i;
ran[i] = 0;
box[i] = 0;
}
for (i = 0; i < m; i++) {
cin >> x >> y;
if (x < y)
swap(x, y);
while (x !=... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.loop.condition.change",
"assignment.value.change"
] | 269,457 | 269,458 | u787972656 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int ans = 1;
int par[200001] = {};
int r[200001] = {};
int si[200001] = {};
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par[x] = find(par[x]);
}
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int ans = 1;
int par[200001] = {};
int r[200001] = {};
int si[200001] = {};
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par[x] = find(par[x]);
}
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y)... | [
"assignment.value.change"
] | 269,474 | 269,475 | u460597319 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int ans = 0;
int par[200001] = {};
int r[200001] = {};
int si[200001] = {};
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par[x] = find(par[x]);
}
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int ans = 1;
int par[200001] = {};
int r[200001] = {};
int si[200001] = {};
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par[x] = find(par[x]);
}
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y)... | [
"literal.number.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 269,476 | 269,475 | u460597319 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int ans = 0;
int par[200001] = {};
int r[200001] = {};
int si[200001] = {};
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par[x] = find(par[x]);
}
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int ans = 1;
int par[200001] = {};
int r[200001] = {};
int si[200001] = {};
int find(int x) {
if (par[x] == x) {
return x;
} else {
return par[x] = find(par[x]);
}
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y)... | [
"literal.number.change",
"variable_declaration.value.change",
"assignment.value.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 269,477 | 269,475 | u460597319 | cpp |
p02573 | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 2e5 + 10;
int p[N], se[N], ans;
int n, m;
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
p[i] = i, se[i] = 1;
for (int i = 0;... | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 2e5 + 10;
int p[N], se[N], ans;
int n, m;
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++)
p[i] = i, se[i] = 1;
for (int i = 0;... | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"call.arguments.change"
] | 269,482 | 269,483 | u929453447 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
#define ll long long
#define ios std::ios::sync_with_stdio(false)
const ll INF(0x3f3f3f3f3f3f3f3fll);
const int inf(0x3f3f3f3f);
#define int long long
#define pb(a) push_back(a)
#define debug(a) cout << "a : " << a << '\n'
#define mp(a, b) make_pa... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
#define ll long long
#define ios std::ios::sync_with_stdio(false)
const ll INF(0x3f3f3f3f3f3f3f3fll);
const int inf(0x3f3f3f3f);
#define int long long
#define pb(a) push_back(a)
#define debug(a) cout << "a : " << a << '\n'
#define mp(a, b) make_pa... | [
"variable_access.subscript.index.change"
] | 269,484 | 269,485 | u395943957 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(vec) vec.begin(), vec.end()
#define END return 0
typedef int64_t ll;
const int mod7 = 1e9 + 7;
const int mod9 = 1e9 + 9;
const int inf = 1 << 30;
const ll INF = 1LL << 60;
template <typename T> T gcd(T a, T b)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(vec) vec.begin(), vec.end()
#define END return 0
typedef int64_t ll;
const int mod7 = 1e9 + 7;
const int mod9 = 1e9 + 9;
const int inf = 1 << 30;
const ll INF = 1LL << 60;
template <typename T> T gcd(T a, T b)... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,500 | 269,501 | u716314620 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
#define ordered_set \
tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, ... | #include <bits/stdc++.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
#define ordered_set \
tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,502 | 269,503 | u406881148 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mset(arr, val) memset(arr, val, sizeof(arr))
#define loop(i, a, b) for (ll i = a; i < b; ++i)
#define dloop(i, a, b) for (ll i = a; i >= b; --i)
#define all(a) a.begin(), a.end()
#define lar 1000000007
#define pq priority_queue
#define pll p... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mset(arr, val) memset(arr, val, sizeof(arr))
#define loop(i, a, b) for (ll i = a; i < b; ++i)
#define dloop(i, a, b) for (ll i = a; i >= b; --i)
#define all(a) a.begin(), a.end()
#define lar 1000000007
#define pq priority_queue
#define pll p... | [
"assignment.variable.change",
"identifier.change"
] | 269,511 | 269,512 | u897654947 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define inf 1001001001
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(v) v.begin(), v.end()
int dx[4] = {0, -1, 0, 1};
int dy[4] = {-1, 0, 1, 0};
ll gcd(ll a, ll b) {... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define inf 1001001001
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(v) v.begin(), v.end()
int dx[4] = {0, -1, 0, 1};
int dy[4] = {-1, 0, 1, 0};
ll gcd(ll a, ll b) {... | [
"assignment.change"
] | 269,517 | 269,518 | u001327021 | cpp |
p02573 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
typedef unsigned long long int ull;
typedef tree<int, null_type, less<int>, rb_tree_tag,
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
typedef unsigned long long int ull;
typedef tree<int, null_type, less<int>, rb_tree_tag,
... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,521 | 269,522 | u554897099 | cpp |
p02573 |
#include <bits/stdc++.h>
using namespace std;
double pi = 3.14159265358979323846264338;
int sum;
int arr[200001];
vector<int> arr2[200001];
map<pair<int, int>, bool> ma;
void dfs(int a) {
// cout<<a<<" "<<sum<<endl;
arr[a]++;
sum++;
for (int b : arr2[a]) {
if (arr[b])
continue;
dfs(b);
}
}
int... |
#include <bits/stdc++.h>
using namespace std;
double pi = 3.14159265358979323846264338;
int sum;
int arr[200001];
vector<int> arr2[200001];
map<pair<int, int>, bool> ma;
void dfs(int a) {
// cout<<a<<" "<<sum<<endl;
arr[a]++;
sum++;
// cout<<a<<" "<<arr2[a].size()<<endl;
for (int b : arr2[a]) {
// cout<... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 269,532 | 269,533 | u176843436 | cpp |
p02573 | #include <bits/stdc++.h>
#define boost \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
//#define int long long
#define M ... | #include <bits/stdc++.h>
#define boost \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
//#define int long long
#define M ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,536 | 269,537 | u015114004 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
#define ALLR(x) (x).rbegin(), (x).rend()
#define MP make_pair
template <typename A, typename B> string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_stri... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define PB push_back
#define ALL(x) (x).begin(), (x).end()
#define ALLR(x) (x).rbegin(), (x).rend()
#define MP make_pair
template <typename A, typename B> string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_stri... | [
"call.arguments.change"
] | 269,557 | 269,558 | u420803966 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int int64_t
#define fio \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int int64_t
#define fio \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); ... | [
"literal.number.change",
"assignment.value.change"
] | 269,570 | 269,571 | u167053449 | cpp |
p02573 | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,578 | 269,579 | u494070244 | cpp |
p02573 | /*
vrrtll==???>;::::~~~~~~......`.`````````````````````...-?777!_.._?7u,~~~::::;>>??=lllttrrzu
rtll==??>>;::::~~~~......`.``````````````````
..J77!`````````...`..._T,~~~~:::;;>??==lttrrv
tll=??>>;:::~~~~......``````````````````..J7^ ` `` ` ``
.,```````...._4,.~~~::;;>>?===lttr l=???>;;::~~~......`````HTSu,.`` `..J7! ... | /*
vrrtll==???>;::::~~~~~~......`.`````````````````````...-?777!_.._?7u,~~~::::;>>??=lllttrrzu
rtll==??>>;::::~~~~......`.``````````````````
..J77!`````````...`..._T,~~~~:::;;>??==lttrrv
tll=??>>;:::~~~~......``````````````````..J7^ ` `` ` ``
.,```````...._4,.~~~::;;>>?===lttr l=???>;;::~~~......`````HTSu,.`` `..J7! ... | [
"assignment.change"
] | 269,580 | 269,581 | u373958718 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastIO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fastIO \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,588 | 269,589 | u007291572 | cpp |
p02573 | #include <bits/stdc++.h>
#ifndef M_PI
#define M_PI 3.14159265358979
#endif
#define deg_to_rad(deg) (((deg) / 360) * 2 * M_PI)
#define rad_to_deg(rad) (((rad) / 2 / M_PI) * 360)
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef pair<ll, ll> pll;
typedef pair<int, int> ... | #include <bits/stdc++.h>
#ifndef M_PI
#define M_PI 3.14159265358979
#endif
#define deg_to_rad(deg) (((deg) / 360) * 2 * M_PI)
#define rad_to_deg(rad) (((rad) / 2 / M_PI) * 360)
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef pair<ll, ll> pll;
typedef pair<int, int> ... | [
"literal.number.change",
"variable_declaration.value.change",
"variable_access.subscript.index.change"
] | 269,596 | 269,595 | u173041855 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int SZ = 2 * 1e5 + 1;
vector<int> parent(SZ, -1);
int root(int x) { return parent[x] == -1 ? x : root(parent[x]); }
void merge(int a, int b) {
int x = root(a);
int y = root(b);
if (x == y)
return;
if (x < y) {
parent[y] = x;
} else {
parent[x... | #include <bits/stdc++.h>
using namespace std;
const int SZ = 2 * 1e5 + 1;
vector<int> parent(SZ, -1);
int root(int x) { return parent[x] == -1 ? x : root(parent[x]); }
void merge(int a, int b) {
int x = root(a);
int y = root(b);
if (x == y)
return;
if (x < y) {
parent[y] = x;
} else {
parent[x... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,597 | 269,598 | u858071779 | cpp |
p02573 | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, n) for... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, n) for... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,603 | 269,604 | u190761897 | cpp |
p02573 |
// Problem: D - Friends
// Contest: AtCoder - AtCoder Beginner Contest 177
// URL: https://atcoder.jp/contests/abc177/tasks/abc177_d
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#defin... |
// Problem: D - Friends
// Contest: AtCoder - AtCoder Beginner Contest 177
// URL: https://atcoder.jp/contests/abc177/tasks/abc177_d
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#defin... | [
"expression.operation.binary.add"
] | 269,605 | 269,606 | u365513379 | cpp |
p02573 | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, n) for (int i = 1; i <= n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#d... | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPP(i, n) for (int i = 1; i <= n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#d... | [] | 269,607 | 269,608 | u222293734 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
// Union-Find Disjoint Sets Library written in OOP manner, using both path
// compression and union by rank heuristics
class UnionFind { // OOP style
private:
vi p, rank, setSize; // remember: vi is vector<int>
int numSets;
public:
UnionFind... | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
// Union-Find Disjoint Sets Library written in OOP manner, using both path
// compression and union by rank heuristics
class UnionFind { // OOP style
private:
vi p, rank, setSize; // remember: vi is vector<int>
int numSets;
public:
UnionFind... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,611 | 269,612 | u586598623 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int p[N], d[N];
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
cin.tie(0);
ios::sync_with_stdio(0);
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
d[i] = 1;
p[i] = i;
}
i... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int p[N], d[N];
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
cin.tie(0);
ios::sync_with_stdio(0);
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
d[i] = 1;
p[i] = i;
}
i... | [
"literal.number.change",
"variable_declaration.value.change"
] | 269,626 | 269,627 | u555147026 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int p[N], d[N];
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
cin.tie(0);
ios::sync_with_stdio(0);
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
d[i] = 1;
p[i] = i;
}
i... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int p[N], d[N];
int find(int x) {
if (p[x] != x)
p[x] = find(p[x]);
return p[x];
}
int main() {
cin.tie(0);
ios::sync_with_stdio(0);
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++) {
d[i] = 1;
p[i] = i;
}
i... | [
"expression.operation.unary.arithmetic.remove"
] | 269,628 | 269,627 | u555147026 | cpp |
p02573 | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int find(vector<int> &fa, int x) {
return fa[x] == x ? x : fa[x] = find(fa, fa[x]);
}
void uni(vector<int> &fa, int x, int y) {
int px = find(fa, x);
int py = find(fa, y);
if (px == py)
return;
fa[x] = y;
}
int main() {... | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int find(vector<int> &fa, int x) {
return fa[x] == x ? x : fa[x] = find(fa, fa[x]);
}
void uni(vector<int> &fa, int x, int y) {
int px = find(fa, x);
int py = find(fa, y);
if (px == py)
return;
fa[px] = py;
}
int main()... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"assignment.value.change"
] | 269,631 | 269,632 | u338639949 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define inf 1e15
#define N 300005
string s;
ll n, m, x, y, d, k;
ll a[N];
ll parent[N];
ll siz[N];
int find(int g) {
if (parent[g] != g) {
parent[g] = find(parent[g]);
}
return g;
}
int main() {
ios_ba... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define inf 1e15
#define N 300005
string s;
ll n, m, x, y, d, k;
ll a[N];
ll parent[N];
ll siz[N];
int find(int g) {
if (parent[g] != g) {
parent[g] = find(parent[g]);
}
return parent[g];
}
int main() {
... | [
"function.return_value.change"
] | 269,633 | 269,634 | u418548056 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define overload4(_1, _2, _3, _4, name, ...) name
#define overload3(_1, _2, _3, name, ...) name
#define rep1(n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 0; i < n; ++i)
#define rep... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define overload4(_1, _2, _3, _4, name, ...) name
#define overload3(_1, _2, _3, name, ...) name
#define rep1(n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 0; i < n; ++i)
#define rep... | [
"assignment.variable.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change"
] | 269,639 | 269,640 | u157994024 | cpp |
p02573 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define ALL(vec) vec.begin(), vec.end()
#define rALL(vec) vec.rbegin(), vec.rend()
using namespace std;
using ll = long long;
// ------------------------------
int main() {
int N, M;
cin >> N >> ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define ALL(vec) vec.begin(), vec.end()
#define rALL(vec) vec.rbegin(), vec.rend()
using namespace std;
using ll = long long;
// ------------------------------
int main() {
int N, M;
cin >> N >> ... | [
"literal.number.change",
"variable_declaration.value.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 269,643 | 269,644 | u665598835 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i, n) \
; \
for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) ... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i, n) \
; \
for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) ... | [
"variable_access.subscript.index.change"
] | 269,645 | 269,646 | u170513117 | cpp |
p02573 | #include <bits/stdc++.h>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
using namespace std;
using ll = long long;
ll find(ll x, vector<ll> &par) {
if (par.at(x) == x) {
return x;
} else {
return par.at(x) = find(par.at(x), par);
}
}
int main() {
ll N, M;
cin >> N... | #include <bits/stdc++.h>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
using namespace std;
using ll = long long;
ll find(ll x, vector<ll> &par) {
if (par.at(x) == x) {
return x;
} else {
return par.at(x) = find(par.at(x), par);
}
}
int main() {
ll N, M;
cin >> N... | [
"assignment.change"
] | 269,647 | 269,648 | u618148222 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
typedef pair<int, int> pii;
const int mod = (int)1000000007;
const int inf = (int)2e18;
int par[200010], Rank[200010];
int find(int a) {
if (par[a] < 0)
return a;
int x = fi... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
typedef pair<int, int> pii;
const int mod = (int)1000000007;
const int inf = (int)2e18;
int par[200010], Rank[200010];
int find(int a) {
if (par[a] < 0)
return a;
int x = fi... | [
"literal.number.change",
"io.output.change"
] | 269,656 | 269,657 | u006292466 | cpp |
p02573 | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define l(i, a, b) for (auto i = a; i < b; i++)
#define lr(i, a, b) for (auto i = a; i >= b; i--)
#define ll long long
#define lli long long int
#define ld long double
#define vec vector<int>
#define mii map<ll, ll>
#define vl vector<long long>
#define se set<long ... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define l(i, a, b) for (auto i = a; i < b; i++)
#define lr(i, a, b) for (auto i = a; i >= b; i--)
#define ll long long
#define lli long long int
#define ld long double
#define vec vector<int>
#define mii map<ll, ll>
#define vl vector<long long>
#define se set<long ... | [
"expression.operation.binary.add"
] | 269,658 | 269,659 | u732171993 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5 + 10;
int par[maxn];
int rank1[maxn];
int siz[maxn];
void f(int n) //初始化
{
for (int i = 0; i < n; i++) {
par[i] = i;
rank1[i] = 0;
siz[i] = 1;
}
}
int find(int x) {
if (par[x] == x) {
return x;
} else {
r... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5 + 10;
int par[maxn];
int rank1[maxn];
int siz[maxn];
void f(int n) //初始化
{
for (int i = 1; i <= n; i++) {
par[i] = i;
rank1[i] = 0;
siz[i] = 1;
}
}
int find(int x) {
if (par[x] == x) {
return x;
} else {
... | [
"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"
] | 269,662 | 269,663 | u554906051 | cpp |
p02573 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5;
int par[maxn];
int rank1[maxn];
int siz[maxn];
void f(int n) //初始化
{
for (int i = 0; i < n; i++) {
par[i] = i;
rank1[i] = 0;
siz[i] = 1;
}
}
int find(int x) {
if (par[x] == x) {
return x;
} else {
return... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5 + 10;
int par[maxn];
int rank1[maxn];
int siz[maxn];
void f(int n) //初始化
{
for (int i = 1; i <= n; i++) {
par[i] = i;
rank1[i] = 0;
siz[i] = 1;
}
}
int find(int x) {
if (par[x] == x) {
return x;
} else {
... | [
"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"
] | 269,664 | 269,663 | u554906051 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.