#include "migrations.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
vll d(10001, 0);
int send_message(int n, int i, int pi) {
d[i] = d[pi] + 1;
if (i != n-1) {
return 0;
} else {
ll nd = max_element(d.begin(), d.end()) - d.begin();
return nd;
}
}
std::pair<int, int> longest_path(std::vector<int> S) {
return {0, S[S.size() - 1]};
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |