# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
851161 | pakapu | Cheap flights (LMIO18_pigus_skrydziai) | C++17 | 3046 ms | 25496 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 <bits/stdc++.h>
using namespace std;
#define int long long
int ans = 0;
vector<int> cost;
set<int> calculated;
vector<vector<pair<int, int>>> g;
int dfs(int u, int depth) {
if(depth >= 2) {
return 0;
}
if(depth == 1) {
for(auto v : g[u]) {
if(calculated.count(v.first)) {
//cout << v.first << ' ' << u << '\n';
//cout << cost[v.first] << ' ' << cost[u] << ' ' << v.second << '\n';
ans = max(ans, cost[v.first] + cost[u] + v.second);
}
}
return 0;
}
int curr = 0;
for(auto v : g[u]) {
# | 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... |