# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
319331 | marlicu | Putovanje (COCI20_putovanje) | C++14 | 160 ms | 26216 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |