# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
319331 | marlicu | Putovanje (COCI20_putovanje) | C++14 | 160 ms | 26216 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 X first
#define Y second
typedef pair <int, int> pii;
const int MAXN = 2e5 + 5;
const int LOG = 20;
int n, a, b, c1, c2;
vector <pii> veze[MAXN];
vector <pii> cijene;
int lca[LOG][MAXN];
int dubine[MAXN];
int koliko1[MAXN];
int koliko2[MAXN];
int zbroj[MAXN];
void dfs(int cvor, int roditelj, int dubina) {
dubine[cvor] = dubina;
for (auto ncvor : veze[cvor]) {
if (ncvor.X == roditelj) continue;
dfs(ncvor.X, cvor, dubina + 1);
lca[0][ncvor.X] = cvor;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |