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 |
|---|---|---|---|---|---|---|---|
p03165 | #include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cerr << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cerr << #v << ":"; \
for (int i = 0; i < v.size(); i++) ... | #include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cerr << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cerr << #v << ":"; \
for (int i = 0; i < v.size(); i++) ... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 974,616 | 974,617 | u579152247 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
#define ll long long
#define mod 1000000007
#define ffor(i, a, b) for (int i = a; i < b; i++)
#define bfor(i, a, b) for (int i = a - 1; i >= b; i--)
#define mp make_pair
#define pb push_back
#define... | #include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
#define ll long long
#define mod 1000000007
#define ffor(i, a, b) for (int i = a; i < b; i++)
#define bfor(i, a, b) for (int i = a - 1; i >= b; i--)
#define mp make_pair
#define pb push_back
#define... | [
"identifier.change",
"call.arguments.change"
] | 974,655 | 974,656 | u476428694 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
list<int> *adjList;
int dfs(int v, vector<int> &dp) {
if (dp[v] != -1)
return dp[v];
int ans = 0;
for (auto i = adjList[v].begin(); i != adjList[v].end(); i++)
ans = max(ans, dfs(*i, dp) + 1);
return dp[v] = ans;
}
int main() {
int V, E;
cin >> V >> ... | #include <bits/stdc++.h>
using namespace std;
list<int> *adjList;
int dfs(int v, vector<int> &dp) {
if (dp[v] != -1)
return dp[v];
int ans = 0;
for (auto i = adjList[v].begin(); i != adjList[v].end(); i++)
ans = max(ans, dfs(*i, dp) + 1);
return dp[v] = ans;
}
int main() {
int V, E;
cin >> V >> ... | [
"identifier.change",
"io.output.change"
] | 974,657 | 974,658 | u273574716 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
vector<int> graph[100001];
int dp[100001];
int solve(int src) {
if (dp[src] != -1) {
return dp[src];
}
bool leaf = true;
int bestChild = 0;
for (int c : graph[src]) {
leaf = 0;
bestChild = max(bestChild, solve(c));
}
return dp[src] = leaf ? 0 : 1... | #include <bits/stdc++.h>
using namespace std;
vector<int> graph[100001];
int dp[100001];
int solve(int src) {
if (dp[src] != -1) {
return dp[src];
}
bool leaf = true;
int bestChild = 0;
for (int c : graph[src]) {
leaf = 0;
bestChild = max(bestChild, solve(c));
}
return dp[src] = leaf ? 0 : 1... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 974,659 | 974,660 | u510516229 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define iton for (int i = 0; i <= n; i++)
#define itok for (int i = 0; i < k; i++)
#define jton for (int j = 0; j <= n; j++)
void dfs(vector<ll> input[], int dp[], bool visited[], int val) {
visited[val] = true;
for (int i = 0; i < input[val].size()... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define iton for (int i = 0; i <= n; i++)
#define itok for (int i = 0; i < k; i++)
#define jton for (int j = 0; j <= n; j++)
void dfs(vector<ll> input[], int dp[], bool visited[], int val) {
visited[val] = true;
for (int i = 0; i < input[val].size()... | [] | 974,663 | 974,664 | u707091521 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
int cnt = 0;
int longPath(int *dp, int u, vector<vector<int>> &graph) {
// cout<<u<<" ";
cnt++;
if (dp[u] != -1) {
return dp[u];
}
if (graph[u].empty()) {
dp[u] = 0;
return dp[u];
}
int i;
for (i = 0; i < graph[u].size(); i++) {
dp[u] = max(d... | #include <bits/stdc++.h>
using namespace std;
int cnt = 0;
int longPath(int *dp, int u, vector<vector<int>> &graph) {
// cout<<u<<" ";
cnt++;
if (dp[u] != -1) {
return dp[u];
}
if (graph[u].empty()) {
dp[u] = 0;
return dp[u];
}
int i;
for (i = 0; i < graph[u].size(); i++) {
dp[u] = max(d... | [] | 974,667 | 974,668 | u610655627 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
void input() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
#define endl "\n"
#define ll long long int
#define vll vector<ll>
#define pb push_back
#define pll pair<ll, ll>
#define mp make_pair
#define ff first
#def... | #include <bits/stdc++.h>
using namespace std;
void input() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
#define endl "\n"
#define ll long long int
#define vll vector<ll>
#define pb push_back
#define pll pair<ll, ll>
#define mp make_pair
#define ff first
#def... | [
"call.remove"
] | 974,670 | 974,671 | u071936511 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, m, vis[N], ans[N];
vector<int> adj[N];
stack<int> s;
void dfs(int u) {
vis[u] = 1;
for (int v : adj[u]) {
if (vis[v] == 0)
dfs(v);
}
s.push(u);
}
int main(int argc, char const *argv[]) {
cin >> n >> m;
for (int i = 0; i < m... | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, m, vis[N], ans[N];
vector<int> adj[N];
stack<int> s;
void dfs(int u) {
vis[u] = 1;
for (int v : adj[u]) {
if (vis[v] == 0)
dfs(v);
}
s.push(u);
}
int main(int argc, char const *argv[]) {
cin >> n >> m;
for (int i = 0; i < m... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change"
] | 974,672 | 974,673 | u126063509 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define N 100001
int DP[N] = {0};
vector<int> adj[N];
bool vis[N] = {0};
void dfs(int x) {
// d++;
vis[x] = 1;
int k = INT_MIN;
for (auto i : adj[x]) {
if (!vis[i]) {
dfs(i);
}
DP[x] = max(DP[x], 1 + DP[i]);
}
}
signe... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define N 100001
int DP[N] = {0};
vector<int> adj[N];
bool vis[N] = {0};
void dfs(int x) {
// d++;
vis[x] = 1;
int k = INT_MIN;
for (auto i : adj[x]) {
if (!vis[i]) {
dfs(i);
}
DP[x] = max(DP[x], 1 + DP[i]);
}
}
signe... | [
"expression.operation.binary.add"
] | 974,682 | 974,683 | u795378930 | cpp |
p03166 | #include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
template <class T> inline bool chMax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
in... | #include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
template <class T> inline bool chMax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
in... | [
"call.function.change"
] | 974,684 | 974,685 | u379804877 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PII pair<ll, ll>
#define VI vector<ll>
#define VB vector<bool>
#define VVI vector<vector<ll>>
#define VS vector<string>
#define VP vector<PII>
#define lf(i, a, b) for (ll i = a; i <= b; i++)
#define lr(i, a, b) for (ll i = a; i >= b; i--)
#defin... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PII pair<ll, ll>
#define VI vector<ll>
#define VB vector<bool>
#define VVI vector<vector<ll>>
#define VS vector<string>
#define VP vector<PII>
#define lf(i, a, b) for (ll i = a; i <= b; i++)
#define lr(i, a, b) for (ll i = a; i >= b; i--)
#defin... | [
"variable_declaration.remove",
"identifier.change",
"call.arguments.change"
] | 974,692 | 974,693 | u752324944 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1000007;
vector<int> e[N];
int memo[N];
int solve(int u) {
int &st = memo[u];
if (st == -1) {
st = 1;
for (int v : e[u]) {
st = max(st, 1 + solve(v));
}
}
return st;
}
int main() {
memset(memo, -1, sizeof ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1000007;
vector<int> e[N];
int memo[N];
int solve(int u) {
int &st = memo[u];
if (st == -1) {
st = 0;
for (int v : e[u]) {
st = max(st, 1 + solve(v));
}
}
return st;
}
int main() {
memset(memo, -1, sizeof ... | [
"literal.number.change",
"assignment.value.change"
] | 974,701 | 974,702 | u502224091 | cpp |
p03166 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long int lint;
typedef long long int llint;
#define INF 1073741824
#define LINF 4611686018000000000
// Graph
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long int lint;
typedef long long int llint;
#define INF 1073741824
#define LINF 4611686018000000000
// Graph
... | [
"assignment.change"
] | 974,703 | 974,704 | u104889348 | cpp |
p03166 | #include <bits/stdc++.h>
#define ll long long
#define f(i, start, end, inc) for (int i = start; i < end; i += inc)
#define fl(i, start, end, inc) for (ll i = start; i < end; i += inc)
#define vi vector<int>
#define vl vector<ll>
#define vs vector<string>
#define umap unordered_map
#define uset unordered_set
#define vp... | #include <bits/stdc++.h>
#define ll long long
#define f(i, start, end, inc) for (int i = start; i < end; i += inc)
#define fl(i, start, end, inc) for (ll i = start; i < end; i += inc)
#define vi vector<int>
#define vl vector<ll>
#define vs vector<string>
#define umap unordered_map
#define uset unordered_set
#define vp... | [
"literal.number.change",
"call.arguments.change"
] | 974,705 | 974,706 | u928676630 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define M 1000000007
#define ll long long
#define pb push_back
#define fo(i, N) for (int i = 0; i < N; i++)
#define foo(i, x, N) for (int i = x; i < N; i++)
#define fill(a, val) memset(a, val, sizeof(a))
#define fastio() ... | #include <bits/stdc++.h>
using namespace std;
#define M 1000000007
#define ll long long
#define pb push_back
#define fo(i, N) for (int i = 0; i < N; i++)
#define foo(i, x, N) for (int i = x; i < N; i++)
#define fill(a, val) memset(a, val, sizeof(a))
#define fastio() ... | [
"assignment.variable.change",
"identifier.change",
"call.function.change",
"call.arguments.add",
"assignment.change"
] | 974,722 | 974,723 | u864055502 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
map<int, vector<int>> graph;
int dfs(int node, vector<int> dp) {
if (dp[node] != 0)
return dp[node] + 1;
for (auto i : graph[node]) {
dp[node] = max(dp[node], dfs(i, dp));
}
dp[node]++;
return dp[node];
}
int main() {
int n, ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
map<int, vector<int>> graph;
int dfs(int node, vector<int> &dp) {
if (dp[node] != 0)
return dp[node];
for (auto i : graph[node]) {
dp[node] = max(dp[node], dfs(i, dp));
}
dp[node]++;
return dp[node];
}
int main() {
int n, m;
... | [
"expression.operation.binary.remove",
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 974,730 | 974,731 | u432063054 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define pb push_back
#define MOD 1000000007
#define inf 3e18
#define vi vector<int>
#define vld vector<ld>
#define pii pair<int, int>
#define mii map<int, int>
#define fi first
#define se second
#define fastIO ... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define pb push_back
#define MOD 1000000007
#define inf 3e18
#define vi vector<int>
#define vld vector<ld>
#define pii pair<int, int>
#define mii map<int, int>
#define fi first
#define se second
#define fastIO ... | [
"variable_declaration.remove"
] | 974,736 | 974,737 | u294050910 | cpp |
p03166 | #include <bits/stdc++.h>
#define ll long long
const int mxn = 1e5 + 1;
using namespace std;
vector<int> adj[mxn + 1], visited(mxn + 1, 0), dist(mxn + 1, -1);
void dfs(int u) {
if (visited[u])
return;
visited[u] = 1;
for (int v : adj[u]) {
if (!visited[v])
dfs(v);
dist[u] = max(dist[u], dist[... | #include <bits/stdc++.h>
#define ll long long
const int mxn = 1e5 + 1;
using namespace std;
vector<int> adj[mxn + 1], visited(mxn + 1, 0), dist(mxn + 1, 0);
void dfs(int u) {
if (visited[u])
return;
visited[u] = 1;
for (int v : adj[u]) {
if (!visited[v])
dfs(v);
dist[u] = max(dist[u], dist[v... | [
"literal.number.change",
"call.arguments.change"
] | 974,742 | 974,743 | u124430580 | cpp |
p03166 | #include <iostream>
#include <vector>
using namespace std;
int N, M;
int dp[100010];
vector<int> G[100010];
int rec(int v) {
if (dp[v] != -1)
return dp[v];
int res = 0;
for (int u : G[v]) {
res = max(res, rec(u) + 1);
}
return dp[v] = res;
}
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++... | #include <iostream>
#include <vector>
using namespace std;
int N, M;
int dp[100010];
vector<int> G[100010];
int rec(int v) {
if (dp[v] != -1)
return dp[v];
int res = 0;
for (int u : G[v]) {
res = max(res, rec(u) + 1);
}
return dp[v] = res;
}
int main() {
cin >> N >> M;
for (int i = 0; i < M; i++... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 974,744 | 974,745 | u098923136 | cpp |
p03166 | /*
*
* I am o0o0oo00.
*
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define p7 1000000007
#define p9 998244353
#define pb push_back
#define ff first
#define ss second
#define vll ve... | /*
*
* I am o0o0oo00.
*
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define p7 1000000007
#define p9 998244353
#define pb push_back
#define ff first
#define ss second
#define vll ve... | [
"call.remove"
] | 974,754 | 974,755 | u109542682 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> l(100002);
int dp[100002];
int dpres(int i) {
if (dp[i] == -1) {
if (l[i].size() == 1) {
dp[i] = 0;
} else {
int ma = 0;
for (int j = 1; j < l[i].size(); j++) {
ma = max(dpres(l[i][j]), ma);
}
dp[i] = ma ... | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> l(100002);
int dp[100002];
int dpres(int i) {
if (dp[i] == -1) {
if (l[i].size() == 1) {
dp[i] = 0;
} else {
int ma = 0;
for (int j = 1; j < l[i].size(); j++) {
ma = max(dpres(l[i][j]), ma);
}
dp[i] = ma ... | [
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 974,756 | 974,757 | u891945807 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
int child[100001];
int marker[100001];
int maximumm = 0;
int dfs(int head, vector<int> v[]) {
child[head] = 1;
int maxi = 0;
for (int i = 0; i < v[head].size(); i++) {
maxi = 0;
if (marker[v[head][i]] == 0) {
marker[v[head][i]] = 1;
int x = dfs(v[h... | #include <bits/stdc++.h>
using namespace std;
int child[100001];
int marker[100001];
int maximumm = 0;
int dfs(int head, vector<int> v[]) {
child[head] = 1;
int maxi = 0;
for (int i = 0; i < v[head].size(); i++) {
// maxi=0;
if (marker[v[head][i]] == 0) {
marker[v[head][i]] = 1;
int x = dfs(v[... | [
"expression.operation.binary.add"
] | 974,760 | 974,761 | u464230785 | cpp |
p03166 | /*
created by Sanyam Singhal
/*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long int
#define mod 1000000007
#define w(t) \
int t; ... | /*
created by Sanyam Singhal
/*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long int
#define mod 1000000007
#define w(t) \
int t; ... | [
"call.remove"
] | 974,762 | 974,763 | u142133038 | cpp |
p03166 | #include <bits/stdc++.h>
#include <stdint.h>
using namespace std;
#define int long long
#define pb push_back
#define mod 1000000007
#define endl '\n'
#define w(x) \
int x; \
cin >... | #include <bits/stdc++.h>
#include <stdint.h>
using namespace std;
#define int long long
#define pb push_back
#define mod 1000000007
#define endl '\n'
#define w(x) \
int x; \
cin >... | [
"call.remove"
] | 974,766 | 974,767 | u464104383 | cpp |
p03166 | #include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
bitset<100001> d;
int kq[100001];
int ans = 0;
void dfs(int i, vector<int> a[]) {
for (int j = 0; j < a[i].size(); j++) {
cout << i;
if (d[a[i][j]] == 0) {
d[a[i][j]] = 1;
dfs(a[i][j], a);
}
kq[i] = max(k... | #include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
bitset<100001> d;
int kq[100001];
int ans = 0;
void dfs(int i, vector<int> a[]) {
for (int j = 0; j < a[i].size(); j++) {
if (d[a[i][j]] == 0) {
d[a[i][j]] = 1;
dfs(a[i][j], a);
}
kq[i] = max(kq[i], kq[a[i][... | [] | 974,775 | 974,776 | u940325994 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
vector<bool> vis;
vector<vector<int>> adj;
vector<int> dp;
inline void dfs(int k) {
vis[k] = 1;
for (int v : adj[k]) {
if (!vis[v]) {
dfs(v);
dp[k] = max(dp[k], 1 + dp[v]);
}
}
}
int main() {
int n, m;
int e[2];
cin >> n >> m;
vis.assig... | #include <bits/stdc++.h>
using namespace std;
vector<bool> vis;
vector<vector<int>> adj;
vector<int> dp;
void dfs(int k) {
vis[k] = 1;
for (int v : adj[k]) {
if (!vis[v])
dfs(v);
dp[k] = max(dp[k], 1 + dp[v]);
}
}
int main() {
int n, m;
int e[2];
cin >> n >> m;
vis.assign(n + 1, 0);
dp... | [
"literal.number.change",
"call.arguments.change"
] | 974,805 | 974,806 | u158312277 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
vector<bool> vis;
vector<vector<int>> adj;
vector<int> dp;
inline void dfs(int k) {
vis[k] = 1;
for (int v : adj[k]) {
if (!vis[v]) {
dfs(v);
dp[k] = max(dp[k], 1 + dp[v]);
}
}
}
int main() {
int n, m;
int e[2];
cin >> n >> m;
vis.assig... | #include <bits/stdc++.h>
using namespace std;
vector<bool> vis;
vector<vector<int>> adj;
vector<int> dp;
void dfs(int k) {
vis[k] = 1;
for (int v : adj[k]) {
if (!vis[v])
dfs(v);
dp[k] = max(dp[k], 1 + dp[v]);
}
}
int main() {
int n, m;
int e[2];
cin >> n >> m;
vis.assign(n + 1, 0);
dp... | [
"literal.number.change",
"call.arguments.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"
] | 974,807 | 974,806 | u158312277 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int maxv = 5 + 5;
vector<int> arr[maxv];
vector<int> indeg(maxv);
vector<int> vis(maxv);
vector<int> dis(maxv);
void dfs(int i) {
vis[i] = 1;
for (auto v : arr[i]) {
--indeg[v];
dis[v] = max(dis[v], 1 + dis[i]);
if (indeg[v... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int maxv = 1e5 + 5;
vector<int> arr[maxv];
vector<int> indeg(maxv);
vector<int> vis(maxv);
vector<int> dis(maxv);
void dfs(int i) {
vis[i] = 1;
for (auto v : arr[i]) {
--indeg[v];
dis[v] = max(dis[v], 1 + dis[i]);
if (indeg... | [
"literal.number.change",
"expression.operation.binary.change"
] | 974,824 | 974,825 | u566474691 | cpp |
p03166 | #include <bits/stdc++.h>
#include <queue>
using namespace std;
vector<queue<int>> gra;
vector<int> dp;
vector<int> si;
int path(int x) {
int &ret = dp[x];
if (ret != -1)
return ret;
ret = 1;
for (int i = 0; i < si[x]; i++) {
int y = gra[x].front();
gra[x].pop();
if (ret < path(y) + 1)
ret ... | #include <bits/stdc++.h>
#include <queue>
using namespace std;
vector<queue<int>> gra;
vector<int> dp;
vector<int> si;
int path(int x) {
int &ret = dp[x];
if (ret != -1)
return ret;
ret = 0;
for (int i = 0; i < si[x]; i++) {
int y = gra[x].front();
gra[x].pop();
if (ret < path(y) + 1)
ret ... | [
"literal.number.change",
"assignment.value.change"
] | 974,832 | 974,833 | u058186113 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("-O3")
const int maxn = 10e7;
vector<bool> visited(maxn, false);
vector<vector<int>> edges(maxn);
vector<long long int> dp(maxn);
void dfs(int u) {
visited[u] = 1;
for (int v : edges[u]) {
if (!visited[v])
dfs(v);
dp[u] = max(dp[u],... | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("-O3")
const int maxn = 1 + 10e5;
vector<bool> visited(maxn, false);
vector<vector<int>> edges(maxn);
vector<long long int> dp(maxn);
void dfs(int u) {
visited[u] = 1;
for (int v : edges[u]) {
if (!visited[v])
dfs(v);
dp[u] = max(dp... | [
"literal.number.change"
] | 974,836 | 974,837 | u898200089 | cpp |
p03166 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unordered_map>
#include <vector>
#define ll long long
#defi... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <unordered_map>
#include <vector>
#define ll long long
#defi... | [
"expression.operation.binary.remove",
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"assignment.change"
] | 974,844 | 974,845 | u376276683 | cpp |
p03166 | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define INT_MAX 2147483647
#define ll long long... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define INT_MAX 2147483647
#define ll long long... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 974,848 | 974,849 | u671252724 | cpp |
p03166 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less_equal<int>, rb_tree_tag, \
tree_order_statistic... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, null_type, less_equal<int>, rb_tree_tag, \
tree_order_statistic... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 974,857 | 974,858 | u713352016 | cpp |
p03166 | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
int n, m, i, ans[20005], an, x, y;
vector<int> adj[200005];
int dfs(int nod) {
int cur = 0;
for (auto x : adj[nod]) {
if (!ans[x])
dfs(x);
cur = max(cur, ans[x]);
}
return ans[nod] = cur++;
}
int main() {
... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
int n, m, i, ans[200005], an, x, y;
vector<int> adj[200005];
int dfs(int nod) {
int cur = 0;
for (auto x : adj[nod]) {
if (!ans[x])
dfs(x);
cur = max(cur, ans[x]);
}
return ans[nod] = cur + 1;
}
int main() {... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"assignment.value.change",
"function.return_value.change"
] | 974,861 | 974,860 | u111912627 | cpp |
p03166 | #include <bits/stdc++.h>
#define x first
#define y second
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
#define pb push_back
#define rep(i, a, b) for (int i = a; i < b; i++)
#define mem(i) memset((i), (-1), (sizeof(i)))
#define all(i) (i).begin(), (i).end()
using namespace std;
typedef pair<int, int> pii;
ty... | #include <bits/stdc++.h>
#define x first
#define y second
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
#define pb push_back
#define rep(i, a, b) for (int i = a; i < b; i++)
#define mem(i) memset((i), (-1), (sizeof(i)))
#define all(i) (i).begin(), (i).end()
using namespace std;
typedef pair<int, int> pii;
ty... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 974,874 | 974,875 | u938143205 | cpp |
p03166 | #include <bits/stdc++.h>
#define int long long int
#define nitro ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define pb push_back
#define PI 3.1415926535897932384626
#define MOD 1000000007
#define DEBUG false
#pragma GCC optimize "trapv"
using namespace std;
void dfs(vector<int> adj[], int node, ... | #include <bits/stdc++.h>
#define int long long int
#define nitro ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define pb push_back
#define PI 3.1415926535897932384626
#define MOD 1000000007
#define DEBUG false
#pragma GCC optimize "trapv"
using namespace std;
void dfs(vector<int> adj[], int node, ... | [
"assignment.change"
] | 974,876 | 974,877 | u531475417 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define fore(i, a, b) for (int i = a; i < b; i++)
#define maxe(a, b, c) max(a, max(b, c))
#define eb emplace_back
#define em emplace
#define print(x) cout << x << endl;
#define in(k) ... | #include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define fore(i, a, b) for (int i = a; i < b; i++)
#define maxe(a, b, c) max(a, max(b, c))
#define eb emplace_back
#define em emplace
#define print(x) cout << x << endl;
#define in(k) ... | [
"call.arguments.change"
] | 974,880 | 974,881 | u719855312 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define vi vector<ll>
#define vb vector<bool>
#define pii pair<ll, ll>
#define mod 1000000007
#define pll pair<ll, ll>
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define rep1(i, n) fo... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define vi vector<ll>
#define vb vector<bool>
#define pii pair<ll, ll>
#define mod 1000000007
#define pll pair<ll, ll>
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define rep1(i, n) fo... | [
"literal.number.change",
"variable_declaration.value.change"
] | 974,898 | 974,899 | u720542798 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int cache[N];
vector<int> adj[N];
int dfs(int n) {
int &ans = cache[n];
if (ans != -1)
/*if previously find longest path for the node n
than from here it's compute value return*/
return ans;
ans = 0;
for (auto it : adj[n])
ans... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int cache[N];
vector<int> adj[N];
int dfs(int n) {
int &ans = cache[n];
if (ans != -1)
/*if previously find longest path for the node n
than from here it's compute value return*/
return ans;
ans = 0;
for (auto it : adj[n])
ans... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 974,907 | 974,908 | u295361373 | cpp |
p03166 |
// naveen mall
#include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);... |
// naveen mall
#include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 974,914 | 974,916 | u949654626 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
int dfs(vector<vector<int>> &graph, int k, vector<int> &vis, int &res) {
if (!vis[k]) {
int x = 0;
for (int i = 0; i < graph[k].size(); ++i) {
x = max(x, dfs(graph, graph[k][i], vis, res));
}
vis[k] = x + 1;
res = max(res, vis[k]);
return vi... | #include <bits/stdc++.h>
using namespace std;
int dfs(vector<vector<int>> &graph, int k, vector<int> &vis, int &res) {
if (!vis[k]) {
int x = 0;
for (int i = 0; i < graph[k].size(); ++i) {
x = max(x, dfs(graph, graph[k][i], vis, res));
}
vis[k] = x + 1;
res = max(res, vis[k]);
return vi... | [
"expression.operation.binary.add"
] | 974,917 | 974,918 | u427759487 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
int dfs(vector<vector<int>> &graph, int k, vector<int> &vis, int &res) {
if (!vis[k]) {
int x = 0;
for (int i = 0; i < graph[k].size(); ++i) {
x = max(x, dfs(graph, graph[k][i], vis, res));
}
vis[k] = x + 1;
res = max(res, vis[k]);
return vi... | #include <bits/stdc++.h>
using namespace std;
int dfs(vector<vector<int>> &graph, int k, vector<int> &vis, int &res) {
if (!vis[k]) {
int x = 0;
for (int i = 0; i < graph[k].size(); ++i) {
x = max(x, dfs(graph, graph[k][i], vis, res));
}
vis[k] = x + 1;
res = max(res, vis[k]);
return vi... | [
"literal.number.change",
"variable_declaration.value.change"
] | 974,919 | 974,918 | u427759487 | cpp |
p03166 | /***
** AUTHOR::ASHUTOSH MOUDGIL
***/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define F f... | /***
** AUTHOR::ASHUTOSH MOUDGIL
***/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define F f... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 974,920 | 974,921 | u610676400 | cpp |
p03166 | #include <cstdio>
#include <queue>
#include <vector>
using namespace std;
int n, m;
int ins[100006], length[100006];
int best;
vector<int> nbrs[100005];
queue<int> q;
inline int maks(int a, int b) { return a > b ? a : b; }
int main() {
scanf("%d %d", &n, &m);
for (int i = 0; i < m; i++) {
int a, b;
scanf... | #include <cstdio>
#include <queue>
#include <vector>
using namespace std;
int n, m;
int ins[100006], length[100006];
int best;
vector<int> nbrs[100005];
queue<int> q;
inline int maks(int a, int b) { return a > b ? a : b; }
int main() {
scanf("%d %d", &n, &m);
for (int i = 0; i < m; i++) {
int a, b;
scanf... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 974,934 | 974,935 | u427697910 | cpp |
p03166 | // Created by conan1024hao in 2020.
// Copyright © 2020 conan1024hao. All rights reserved.
// 専用ライブラリです、自由にコピーして構いません。
// 感谢看我的代码!Wechat:conan1024hao Twitter/QQ:810396815
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#inclu... | // Created by conan1024hao in 2020.
// Copyright © 2020 conan1024hao. All rights reserved.
// 専用ライブラリです、自由にコピーして構いません。
// 感谢看我的代码!Wechat:conan1024hao Twitter/QQ:810396815
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#inclu... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 974,936 | 974,937 | u220212997 | cpp |
p03166 | // Created by conan1024hao in 2020.
// Copyright © 2020 conan1024hao. All rights reserved.
// 専用ライブラリです、自由にコピーして構いません。
// 感谢看我的代码!Wechat:conan1024hao Twitter/QQ:810396815
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#inclu... | // Created by conan1024hao in 2020.
// Copyright © 2020 conan1024hao. All rights reserved.
// 専用ライブラリです、自由にコピーして構いません。
// 感谢看我的代码!Wechat:conan1024hao Twitter/QQ:810396815
#pragma GCC optimize("O3")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#inclu... | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 974,938 | 974,937 | u220212997 | cpp |
p03166 | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#define rep(i, s, g) for (i = s; i <= g; i++)
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;
vector<vector<int>> G;
vector<int> dp(100010, -1);
int memorize(int n) {
if (dp[n] != -1) {
return dp[n];
} else {
... | #include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#define rep(i, s, g) for (i = s; i <= g; i++)
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;
vector<vector<int>> G;
vector<int> dp(100010, -1);
int memorize(int n) {
if (dp[n] != -1) {
return dp[n];
}
int res ... | [
"expression.operation.binary.add"
] | 974,987 | 974,988 | u880221923 | cpp |
p03166 | #pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
#define se second
#define fi first
#define ss size()
#define pb push_back
#define mp make_pair
#define ins insert
#... | #pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
#define se second
#define fi first
#define ss size()
#define pb push_back
#define mp make_pair
#define ins insert
#... | [
"expression.operation.unary.add",
"control_flow.branch.if.condition.change"
] | 974,993 | 974,994 | u242818056 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 2e5 + 100;
vector<int> adj[N];
int n, m, vis[N], dis[N];
stack<int> stk;
void dfs(int u) {
vis[u] = 1;
for (auto it : adj[u]) {
if (!vis[it]) {
dfs(it);
}
}
stk.push(u);
}
void solve() {
cin >> n >> m;
for (... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 2e5 + 100;
vector<int> adj[N];
int n, m, vis[N], dis[N];
stack<int> stk;
void dfs(int u) {
vis[u] = 1;
for (auto it : adj[u]) {
if (!vis[it]) {
dfs(it);
}
}
stk.push(u);
}
void solve() {
cin >> n >> m;
for (... | [] | 975,023 | 975,024 | u518166320 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
vector<int> g[1000005];
int dp[1000005];
int func(int u) {
if (dp[u] != -1) {
return dp[u];
} else {
int ans = 0;
for (auto i : g[u]) {
ans = max(ans, 1 + func(i));
}
dp[u] = ans;
return ans;
}
}
int main(void) {
int n, m;
cin >> ... | #include <bits/stdc++.h>
using namespace std;
vector<int> g[1000005];
int dp[1000005];
int func(int u) {
if (dp[u] != -1) {
return dp[u];
} else {
int ans = 0;
for (auto i : g[u]) {
ans = max(ans, 1 + func(i));
}
dp[u] = ans;
return ans;
}
}
int main(void) {
int n, m;
cin >> ... | [
"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"
] | 975,029 | 975,030 | u204368100 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"assignment.value.change",
"call.arguments.change"
] | 975,042 | 975,043 | u144432905 | cpp |
p03166 | #include "bits/stdc++.h"
using namespace std;
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \
c i) {
sim > ... | #include "bits/stdc++.h"
using namespace std;
#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x) \
sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \
c i) {
sim > ... | [
"identifier.change"
] | 975,050 | 975,051 | u994133665 | cpp |
p03166 | #include <bits/stdc++.h>
#define endl "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using ll = long lon... | #include <bits/stdc++.h>
#define endl "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using ll = long lon... | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 975,054 | 975,055 | u398135166 | cpp |
p03166 | #include <bits/stdc++.h>
#define endl "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using ll = long lon... | #include <bits/stdc++.h>
#define endl "\n"
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
using ll = long lon... | [
"control_flow.loop.condition.change",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 975,056 | 975,055 | u398135166 | cpp |
p03166 | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int n, m;
vector<int> visited, dp;
vector<vector<int>> edge2;
int bfs(int n) {
queue<int> que;
que.push(n);
int r... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int n, m;
vector<int> visited, dp;
vector<vector<int>> edge2;
int bfs(int nod) {
queue<int> que;
que.push(nod);
i... | [
"identifier.change",
"call.arguments.change"
] | 975,061 | 975,062 | u834415466 | cpp |
p03166 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define ii pair<int, int>
#define nl '\n'
#define fillar(x) ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define ii pair<int, int>
#define nl '\n'
#define fillar(x) ... | [
"literal.number.change",
"assignment.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",
"variable_declaration.value.change"
] | 975,063 | 975,064 | u058612320 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
bool vis[100002];
int dp[100003];
map<int, vector<int>> mapy;
void dfs(int i) {
vis[i] = true;
for (auto node : mapy[i]) {
if (!vis[node])
dfs(node);
dp[i] = max(dp[i], dp[node] + 1);
}
}
int main() {
for (int i = 0; i <= 100000; i++)
vis[i] = ... | #include <bits/stdc++.h>
using namespace std;
bool vis[100002];
int dp[100003];
map<int, vector<int>> mapy;
void dfs(int i) {
vis[i] = true;
for (auto node : mapy[i]) {
if (!vis[node])
dfs(node);
dp[i] = max(dp[i], dp[node] + 1);
}
}
int main() {
for (int i = 0; i <= 100000; i++)
vis[i] = ... | [
"expression.operation.binary.remove"
] | 975,077 | 975,078 | u079477806 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
bool vis[100002];
int dp[100003];
map<int, vector<int>> mapy;
void dfs(int i) {
vis[i] = true;
for (auto node : mapy[i]) {
if (!vis[i])
dfs(node);
dp[i] = max(dp[i], dp[node] + 1);
}
}
int main() {
for (int i = 0; i <= 100000; i++)
vis[i] = fal... | #include <bits/stdc++.h>
using namespace std;
bool vis[100002];
int dp[100003];
map<int, vector<int>> mapy;
void dfs(int i) {
vis[i] = true;
for (auto node : mapy[i]) {
if (!vis[node])
dfs(node);
dp[i] = max(dp[i], dp[node] + 1);
}
}
int main() {
for (int i = 0; i <= 100000; i++)
vis[i] = ... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 975,079 | 975,078 | u079477806 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> dp(N), n[N];
int lp(int i) {
if (!dp[i])
return dp[i];
for (auto p : n[i])
dp[i] = max(dp[i], lp(p) + 1);
return dp[i];
}
int main() {
int N, M, x, y;
cin >> N >> M;
for (int i = 0; i < M; i++)
cin >> x >> y, n[x].... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> dp(N), n[N];
int lp(int i) {
if (dp[i])
return dp[i];
for (auto p : n[i])
dp[i] = max(dp[i], lp(p) + 1);
return dp[i];
}
int main() {
int N, M, x, y;
cin >> N >> M;
for (int i = 0; i < M; i++)
cin >> x >> y, n[x].p... | [
"expression.operation.unary.logical.remove",
"control_flow.branch.if.condition.change"
] | 975,093 | 975,094 | u013064880 | cpp |
p03166 | // #pragma GCC optimize("03")
#include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
using namespace std;
int mx, n, m, x, y;
vector<int> v[100100];
int dp[100100];
int viz[100100];
void dfs(int x) {
viz[x] = 1;
int cur = -1;
for (auto y : v[x]) {
if (!viz[y])
dfs(y);
cu... | // #pragma GCC optimize("03")
#include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
using namespace std;
int mx, n, m, x, y;
vector<int> v[100100];
int dp[100100];
int viz[100100];
void dfs(int x) {
viz[x] = 1;
int cur = -1;
for (auto y : v[x]) {
if (!viz[y])
dfs(y);
cu... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 975,103 | 975,104 | u093252820 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
int n, m;
int dp[100010];
vector<int> adj[100010];
int rec(int x) {
if (dp[x] >= 0)
return dp[x];
if (adj[x].empty())
return dp[x] = 0;
dp[x] = dp[adj[x][0]] + 1;
for (int i = 0; i < adj[x].size(); i++) {
dp[x] = max(dp[adj[x][i]] + 1, dp[x]);
}
retu... | #include <bits/stdc++.h>
using namespace std;
int n, m;
int dp[100010];
vector<int> adj[100010];
int rec(int x) {
if (dp[x] >= 0)
return dp[x];
if (adj[x].empty())
return dp[x] = 0;
dp[x] = dp[adj[x][0]] + 1;
for (int i = 0; i < adj[x].size(); i++) {
dp[x] = max(rec(adj[x][i]) + 1, dp[x]);
}
ret... | [
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 975,107 | 975,108 | u313427116 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
int n, m;
int dp[100010];
vector<int> adj[100010];
int rec(int x) {
if (dp[x] >= 0)
return dp[x];
if (adj[x].empty())
return dp[x] = 0;
dp[x] = dp[adj[x][0]] + 1;
for (int i = 0; i < adj[x].size(); i++) {
dp[x] = max(adj[x][i] + 1, dp[x]);
}
return d... | #include <bits/stdc++.h>
using namespace std;
int n, m;
int dp[100010];
vector<int> adj[100010];
int rec(int x) {
if (dp[x] >= 0)
return dp[x];
if (adj[x].empty())
return dp[x] = 0;
dp[x] = dp[adj[x][0]] + 1;
for (int i = 0; i < adj[x].size(); i++) {
dp[x] = max(rec(adj[x][i]) + 1, dp[x]);
}
ret... | [
"call.arguments.add",
"call.arguments.change"
] | 975,109 | 975,108 | u313427116 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) // [a, b)
#define reprev(i, n) reprrev(i, 0, n)
typedef long long ll;
typedef unsigned long long ull;
template <class T>... | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprrev(i, a, b) for (int i = b - 1; i >= a; i--) // [a, b)
#define reprev(i, n) reprrev(i, 0, n)
typedef long long ll;
typedef unsigned long long ull;
template <class T>... | [
"literal.number.change",
"variable_declaration.value.change"
] | 975,119 | 975,120 | u052332717 | cpp |
p03166 | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define sre... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define sre... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"call.arguments.change"
] | 975,125 | 975,126 | u340293807 | cpp |
p03166 | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define sre... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define sre... | [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 975,127 | 975,126 | u340293807 | cpp |
p03166 | #include <bits/stdc++.h>
#include <unordered_map>
#include <vector>
using namespace std;
void dfs(int node, vector<int> &dp, vector<bool> &vis,
unordered_map<int, vector<int>> &m) {
vis[node] = true;
for (auto i : m[node]) {
if (!vis[i])
dfs(i, dp, vis, m);
dp[node] = max(dp[node], 1 + dp[i]... | #include <bits/stdc++.h>
#include <unordered_map>
#include <vector>
using namespace std;
void dfs(int node, vector<int> &dp, vector<bool> &vis,
unordered_map<int, vector<int>> &m) {
vis[node] = true;
for (auto i : m[node]) {
if (!vis[i])
dfs(i, dp, vis, m);
dp[node] = max(dp[node], 1 + dp[i]... | [
"literal.number.change",
"assignment.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"
] | 975,161 | 975,162 | u953182071 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vel;
typedef vector<int> vei;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> ve_vel;
typedef ve... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vel;
typedef vector<int> vei;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> ve_vel;
typedef ve... | [
"call.function.change"
] | 975,163 | 975,164 | u263715385 | cpp |
p03166 |
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse2")
/*
||||||||||||||||||||||||||||||||||||||||||||||||
| ||| | |||| |||| | |
| | | | | | | | | | |
| | | | | | | | | | |
... |
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse2")
/*
||||||||||||||||||||||||||||||||||||||||||||||||
| ||| | |||| |||| | |
| | | | | | | | | | |
| | | | | | | | | | |
... | [] | 975,165 | 975,166 | u980932400 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
void dfs(long long int x, vector<long long int> adj[], long long int dp[],
bool vis[]) {
vis[x] = true;
for (long long int i = 0; i < adj[x].size(); i++) {
if (!vis[adj[x][i]])
dfs(adj[x][i], adj, dp, vis);
dp[x] = max(dp[x], 1 + dp[adj[x][i]]... | #include <bits/stdc++.h>
using namespace std;
void dfs(long long int x, vector<long long int> adj[], long long int dp[],
bool vis[]) {
vis[x] = true;
for (long long int i = 0; i < adj[x].size(); i++) {
if (!vis[adj[x][i]])
dfs(adj[x][i], adj, dp, vis);
dp[x] = max(dp[x], 1 + dp[adj[x][i]]... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 975,167 | 975,168 | u016317669 | cpp |
p03166 | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define sz(x) (int)x.size()
#defi... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define mi map<int, int>
#define mii map<pii, int>
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define sz(x) (int)x.size()
#defi... | [
"identifier.change",
"call.arguments.change"
] | 975,171 | 975,172 | u026594048 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
// g++ -g -o yourexe yourfile.cpp
//./yourexe < yourinput.in > youroutput.out
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
using namespace std;
// g++ -g -o yourexe yourfile.cpp
//./yourexe < yourinput.in > youroutput.out
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | [
"io.output.change",
"call.arguments.change"
] | 975,180 | 975,181 | u760200622 | cpp |
p03166 | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
const int M = 1e9 + 7;
using namespace std;
int N = 1000000 + 1;
void dfs(vector<int> *g, int st, bool *visited, vector<int> *ts) {
visited[st] = true;
for (int i = 0; i < g[st].size(); i++) {
if (visited[g[st][i]] == false) {
dfs(g, g... | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
const int M = 1e9 + 7;
using namespace std;
int N = 1000000 + 1;
void dfs(vector<int> *g, int st, bool *visited, vector<int> *ts) {
visited[st] = true;
for (int i = 0; i < g[st].size(); i++) {
if (visited[g[st][i]] == false) {
dfs(g, g... | [
"call.remove",
"call.arguments.change"
] | 975,182 | 975,183 | u912430437 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = 0; i < n; i++)
#define forn1(i, n) for (int i = 1; i <= n; i++)
#define loop(i, sta, end, inc) for (int i = sta; i <= end; i += inc)
#define itr(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define in(a, b, c) assert(b <= a && a <= c... | #include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = 0; i < n; i++)
#define forn1(i, n) for (int i = 1; i <= n; i++)
#define loop(i, sta, end, inc) for (int i = sta; i <= end; i += inc)
#define itr(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define in(a, b, c) assert(b <= a && a <= c... | [
"assignment.change",
"expression.operation.binary.remove",
"identifier.change"
] | 975,186 | 975,187 | u858856811 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long> vll;
const int MAX_N = 100000;
vector<vi> pre(MAX_N + 1);
vi dist(MAX_N + 1);
vector<bool> visited(MAX_N + 1);
void dfs(int v) {
visited[v] = tr... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long> vll;
const int MAX_N = 100000;
vector<vi> pre(MAX_N + 1);
vi dist(MAX_N + 1);
vector<bool> visited(MAX_N + 1);
void dfs(int v) {
visited[v] = tr... | [
"identifier.change",
"call.arguments.change",
"assignment.value.change",
"variable_access.subscript.index.change"
] | 975,202 | 975,203 | u426076937 | cpp |
p03166 | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int... | [
"assignment.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 975,204 | 975,205 | u621104964 | cpp |
p03166 | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define INF (1 << 30)
#define INFL (1LL << 60)
#define MOD 1000000007LL
#define EPS ((ld)(1e-9))
#define sz(x) ((int)(x).size())
#define setz(x) memset(x, 0, sizeof(x))
#define all(x) (x).begin(... | #include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define INF (1 << 30)
#define INFL (1LL << 60)
#define MOD 1000000007LL
#define EPS ((ld)(1e-9))
#define sz(x) ((int)(x).size())
#define setz(x) memset(x, 0, sizeof(x))
#define all(x) (x).begin(... | [
"call.add",
"call.arguments.change"
] | 975,208 | 975,209 | u236019708 | cpp |
p03166 | #include <bits/stdc++.h>
#define hell 1000000007
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define pb pu... | #include <bits/stdc++.h>
#define hell 1000000007
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
#define pb pu... | [
"control_flow.return.add",
"function.return_value.change"
] | 975,213 | 975,214 | u864500649 | cpp |
p03166 | // _____ _______ _____ _____
// /\ \ /::\ \ /\ \ /\ \
// /::\ \ /::::\ \ /::\____\ /::\ \
// /::::\ \ /::::::\ \ /:::/ / /::::\ \
// /:... | // _____ _______ _____ _____
// /\ \ /::\ \ /\ \ /\ \
// /::\ \ /::::\ \ /::\____\ /::\ \
// /::::\ \ /::::::\ \ /:::/ / /::::\ \
// /:... | [
"literal.number.change",
"variable_declaration.value.change"
] | 975,228 | 975,229 | u132913960 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
queue<int> q;
vector<int> g[N];
int d[N], f[N];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1, x, y; i <= m; i++) {
scanf("%d%d", &x, &y);
g[y].push_back(x);
d[y]++;
}
for (int i = 1; i <= n; i++)
if (d[i] == 0... | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
queue<int> q;
vector<int> g[N];
int d[N], f[N];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1, x, y; i <= m; i++) {
scanf("%d%d", &x, &y);
g[x].push_back(y);
d[y]++;
}
for (int i = 1; i <= n; i++)
if (d[i] == 0... | [
"identifier.change",
"variable_access.subscript.index.change",
"call.arguments.change"
] | 975,241 | 975,242 | u608842354 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
queue<int> q;
vector<int> g[N];
int d[N], f[N];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1, x, y; i <= m; i++) {
scanf("%d%d", &x, &y);
g[y].push_back(x);
d[y]++;
}
for (int i = 1; i <= n; i++)
if (d[i] == 0... | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
queue<int> q;
vector<int> g[N];
int d[N], f[N];
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1, x, y; i <= m; i++) {
scanf("%d%d", &x, &y);
g[y].push_back(x);
d[x]++;
}
for (int i = 1; i <= n; i++)
if (d[i] == 0... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 975,241 | 975,243 | u608842354 | cpp |
p03166 | #include <cstdio>
#include <queue>
using namespace std;
int n, m, topo[100005], order[100005], in[100005], topo_cnt, dp[100005];
int head[100005], cnt, ans;
queue<int> q;
struct node {
int to;
int next;
} edge[100005];
void add(int x, int y) {
cnt++;
edge[cnt].to = y;
edge[cnt].next = head[x];
head[x] = cnt... | #include <cstdio>
#include <queue>
using namespace std;
int n, m, topo[100005], order[100005], in[100005], topo_cnt, dp[100005];
int head[100005], cnt, ans;
queue<int> q;
struct node {
int to;
int next;
} edge[100005];
void add(int x, int y) {
cnt++;
edge[cnt].to = y;
edge[cnt].next = head[x];
head[x] = cnt... | [
"variable_declaration.value.change",
"identifier.change",
"control_flow.loop.for.initializer.change"
] | 975,252 | 975,253 | u287687156 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
using vb = vector<bool>;
using vs = vector<string>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const ld eps = 1e-9;
#define sz(c) ll((c... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
using vb = vector<bool>;
using vs = vector<string>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const ld eps = 1e-9;
#define sz(c) ll((c... | [
"literal.number.change",
"call.arguments.change"
] | 975,254 | 975,255 | u978976567 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
// from https://misora192.hatenablog.com/entry/2019/01/09/074031
int n, m;
const int max_n = 1e5 + 10;
vector<int> g[max_n];
bool used[max_n];
vector<int> v;
void dfs(int u) {
if (used[u])
return;
used[u] = true;
for (int i : g[u])
dfs(i);
v.push_back(u);
... | #include <bits/stdc++.h>
using namespace std;
// from https://misora192.hatenablog.com/entry/2019/01/09/074031
int n, m;
const int max_n = 1e5 + 10;
vector<int> g[max_n];
bool used[max_n];
vector<int> v;
void dfs(int u) {
if (used[u])
return;
used[u] = true;
for (int i : g[u])
dfs(i);
v.push_back(u);
... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 975,258 | 975,259 | u123756661 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < (n); i++)
#define MOD 1000000007
vector<int> g[100010];
int memo[100010];
int dfs(int a) {
if (memo[a] != 0) {
return memo[a];
}
FOR(i, g[a].size()) {
if (memo[a] < dfs(g[a][i]) + 1) {
memo[a] = dfs(g[a][i]) + 1;
... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < (n); i++)
#define MOD 1000000007
vector<int> g[100010];
int memo[100010];
int dfs(int a) {
if (memo[a] != 0) {
return memo[a];
}
FOR(i, g[a].size()) {
if (memo[a] < dfs(g[a][i]) + 1) {
memo[a] = dfs(g[a][i]) + 1;
... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 975,311 | 975,312 | u962104148 | cpp |
p03166 | #include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
// vector<int> dp; // 頂点 i から始まるパスで最長のものの長さ
int dp[100001]; // メモ化再帰
multimap<int, int> mp; // 入力値(from, to)
// 一番遠い場所を探す
int... | #include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
// vector<int> dp; // 頂点 i から始まるパスで最長のものの長さ
int dp[100001]; // メモ化再帰
multimap<int, int> mp; // 入力値(from, to)
// 一番遠い場所を探す
int... | [
"call.add",
"call.arguments.change"
] | 975,327 | 975,328 | u858107870 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5;
int dp[MAX_N + 1];
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> adj_list(MAX_N + 1);
vector<int> degree(MAX_N + 1);
for (int i = 0; i < m; i++) {
int x, y;
cin >> x >> y;
adj_list[y].push_back(x);
degree[x]... | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5;
int dp[MAX_N + 1];
int main() {
int n, m;
cin >> n >> m;
vector<vector<int>> adj_list(MAX_N + 1);
vector<int> degree(MAX_N + 1);
for (int i = 0; i < m; i++) {
int x, y;
cin >> x >> y;
adj_list[y].push_back(x);
degree[x]... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 975,365 | 975,366 | u263542246 | cpp |
p03166 | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long
vector<ll> adj[100002];
bool visited[100002];
ll dp[100002];
void initialize() {
for (ll i = 0; i < 100002; ++i) {
visited[i] = false;
}
}
ll dfs(ll i) {
visited[i] = true;
if (adj[i].size() == 0)
return dp[i] = 0... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define ll long long
vector<ll> adj[100002];
bool visited[100002];
ll dp[100002];
void initialize() {
for (ll i = 0; i < 100002; ++i) {
visited[i] = false;
}
}
ll dfs(ll i) {
visited[i] = true;
if (adj[i].size() == 0)
return dp[i] = 0... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 975,371 | 975,372 | u771978844 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define pb push_back
typedef pair<int, int> ii;
typedef long long ll;
const int maxn = 1e5 + 5;
vector<int> adj[maxn];
int dp[maxn];
int n, m;
int solve(int u) {
if (dp[u] != -1)
return dp[u];
int best = 0;
for (int v : adj[u]... | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define pb push_back
typedef pair<int, int> ii;
typedef long long ll;
const int maxn = 1e5 + 5;
vector<int> adj[maxn];
int dp[maxn];
int n, m;
int solve(int u) {
if (dp[u] != -1)
return dp[u];
int best = 0;
for (int v : adj[u]... | [
"misc.opposites",
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 975,408 | 975,409 | u905710781 | cpp |
p03166 | #include <iostream>
#include <vector>
using namespace std;
int longest_path(int u, int DP[], vector<int> node[]) {
if (DP[u] > 0) {
return DP[u];
}
int ret = 0;
for (int i = 0; i < node[u].size(); i++) {
ret = max(ret, longest_path(node[u][i], DP, node) + 1);
}
return DP[u] = ret;
}
int main() {
... | #include <iostream>
#include <vector>
using namespace std;
int longest_path(int u, int DP[], vector<int> node[]) {
if (DP[u] > 0) {
return DP[u];
}
int ret = 0;
for (int i = 0; i < node[u].size(); i++) {
ret = max(ret, longest_path(node[u][i], DP, node) + 1);
}
return DP[u] = ret;
}
int main() {
... | [
"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"
] | 975,448 | 975,449 | u981186088 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
int n, m, a, b, dp[100010], to[100010];
vector<int> v[100010];
queue<int> q;
int main() {
cin >> n >> m;
for (int i = 1; i <= m; ++i) {
scanf("%d%d", &a, &b);
v[a].push_back(b);
to[b]++;
}
for (int i = 1; i <= n; ++i)
if (to[i] == 0)
q.push(i)... | #include <bits/stdc++.h>
using namespace std;
int n, m, a, b, dp[100010], to[100010];
vector<int> v[100010];
queue<int> q;
int main() {
cin >> n >> m;
for (int i = 1; i <= m; ++i) {
scanf("%d%d", &a, &b);
v[a].push_back(b);
to[b]++;
}
for (int i = 1; i <= n; ++i)
if (to[i] == 0)
q.push(i)... | [] | 975,464 | 975,465 | u989325410 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
#define debug(x) cerr << #x << " = " << (x) << endl;
template <typename T> ostream &operator<<(ostream &o, vector<T> &v) {
for (auto &x : v... | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
#define debug(x) cerr << #x << " = " << (x) << endl;
template <typename T> ostream &operator<<(ostream &o, vector<T> &v) {
for (auto &x : v... | [
"assignment.change"
] | 975,481 | 975,482 | u115464345 | cpp |
p03166 | #include <bits/stdc++.h>
#define ll long long
#define lsb(x) (x & -x)
using namespace std;
vector<int> sorted;
void dfs(int node, const vector<vector<int>> &g, vector<bool> &visited) {
visited[node] = 1;
for (auto it : g[node])
if (!visited[it])
dfs(it, g, visited);
sorted.push_back(node);
}
int ma... | #include <bits/stdc++.h>
#define ll long long
#define lsb(x) (x & -x)
using namespace std;
vector<int> sorted;
void dfs(int node, const vector<vector<int>> &g, vector<bool> &visited) {
visited[node] = 1;
for (auto it : g[node])
if (!visited[it])
dfs(it, g, visited);
sorted.push_back(node);
}
int ma... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change"
] | 975,483 | 975,484 | u088237968 | cpp |
p03167 | /* works correctly*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
char grid[10000][10000];
int r, c;
int dp[1000][1000];
// using memoization
int path(int x, int y) {
if (x >= r || y >= c)
return 0;
if (grid[x][y] == '#')
return 0;
if (x == r - 1 && y == ... | /* works correctly*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
char grid[10000][10000];
int r, c;
int dp[1000][1000];
// using memoization
int path(int x, int y) {
if (x >= r || y >= c)
return 0;
if (grid[x][y] == '#')
return 0;
if (x == r - 1 && y == ... | [
"identifier.change",
"call.function.change",
"io.output.change"
] | 975,495 | 975,496 | u639986648 | cpp |
p03167 | #include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define mod 1000000007
using namespace std;
char block[1001][1001];
ll dp[1001][1001];
ll row, col;
ll ans;
ll no_of_paths(ll r, ll c) {
dp[0][0] = 1;
for (int j = 1; j < c; j++) {
if (block[0][j] == '#') {
dp[0][j] = 0;
}... | #include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define mod 1000000007
using namespace std;
char block[1001][1001];
ll dp[1001][1001];
ll row, col;
ll ans;
ll no_of_paths(ll r, ll c) {
dp[0][0] = 1;
for (int j = 1; j < c; j++) {
if (block[0][j] == '#') {
dp[0][j] = 0;
}... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 975,516 | 975,517 | u438469926 | cpp |
p03167 | #include <iostream>
#include <vector>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
const long long INF = 1LL << 60... | #include <iostream>
#include <vector>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
const long long INF = 1LL << 60... | [
"call.arguments.change",
"call.arguments.add"
] | 975,602 | 975,603 | u539639881 | cpp |
p03167 | #include <bits/stdc++.h>
using namespace std;
long long n, m, dp[1005][1005];
char c;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
dp[0][1] = 1;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> c;
if (c == '.')
dp[i][j] = (dp[i - 1... | #include <bits/stdc++.h>
using namespace std;
long long n, m, dp[1005][1005];
char c;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> n >> m;
dp[0][1] = 1;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> c;
if (c == '.')
dp[i][j] = (dp[i - 1... | [
"literal.number.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 975,622 | 975,623 | u587171482 | cpp |
p03167 | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define f(a, b) for (ll i = a; i <= b; i++)
#define pb push_back
#define pf push_front
#define mp make_pair
using namespace std;
#define N 200005
const ll INF = 1000000001;
const ll MOD = 1000000007;
int dp[1001][1001];
int ways(int h, int w) {
// ... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define f(a, b) for (ll i = a; i <= b; i++)
#define pb push_back
#define pf push_front
#define mp make_pair
using namespace std;
#define N 200005
const ll INF = 1000000001;
const ll MOD = 1000000007;
int dp[1001][1001];
int ways(int h, int w) {
// ... | [] | 975,555 | 975,556 | u020281596 | cpp |
p03167 | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define vi vector<int>
#define vvi vector<vector<int>>
#define FASTIO \
ios_base::sync_with_stdio(NULL); \
cin.tie(NULL);
#define FOR(i, n) for ... | #include <bits/stdc++.h>
#define ll long long
#define endl "\n"
#define vi vector<int>
#define vvi vector<vector<int>>
#define FASTIO \
ios_base::sync_with_stdio(NULL); \
cin.tie(NULL);
#define FOR(i, n) for ... | [
"control_flow.loop.for.condition.change"
] | 975,671 | 975,672 | u372662491 | cpp |
p03166 | #include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m, it, cur, ans, kq;
int dd[N], x[N], f[N];
vector<int> ad[N];
void dfs(int u) {
dd[u] = 1;
for (auto v : ad[u])
if (!dd[v])
dfs(v);
x[u] = --it;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
// freopen... | #include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n, m, it, cur, ans, kq;
int dd[N], x[N], f[N];
vector<int> ad[N];
void dfs(int u) {
dd[u] = 1;
for (auto v : ad[u])
if (!dd[v])
dfs(v);
x[--it] = u;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
// freopen... | [
"assignment.change"
] | 975,681 | 975,682 | u815544868 | cpp |
p03167 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define infin ll(pow(10, 9) + 7);
int main() {
int h, w;
cin >> h >> w;
ll ways[h][w]; // ways[i][j]=no.of ways to reach (h-1,w-1) from i,j
char given[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> given[i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define infin ll(pow(10, 9) + 7);
int main() {
int h, w;
cin >> h >> w;
ll ways[h][w]; // ways[i][j]=no.of ways to reach (h-1,w-1) from i,j
char given[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> given[i... | [
"assignment.variable.change",
"variable_access.subscript.index.change"
] | 975,727 | 975,728 | u834471595 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.