# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
792304 | limabeans | Race (IOI11_race) | C++17 | 3061 ms | 12524 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <algorithm>
#include <iostream>
#include <vector>
#include <cassert>
using namespace std;
using ll = long long;
const int maxn=2e5+10;
vector<pair<ll,int>> g[maxn];
pair<ll,int> dfs(int at, int p, int dst) {
if (at==dst) {
return {0,0};
}
for (auto ed: g[at]) {
int to = ed.second;
if (to==p) continue;
auto cur = dfs(to, at, dst);
if (cur.second != -1) {
cur.first += ed.first;
cur.second++;
return cur;
}
}
return {0,-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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |