# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
460427 | ak2006 | Putovanje (COCI20_putovanje) | C++14 | 299 ms | 59800 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vb = vector<bool>;
using vvb = vector<vb>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
const ll mod = 1e9 + 7,inf = 1e18;
#define pb push_back
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
void setIO()
{
fast;
}
ll n = 2e5 + 5,TIMER;
vvvl adj(n);
vvi anc(n,vi(21));
vl pref(n);
vl in(n),out(n),weight1ToParent(n),weight2ToParent(n);
void dfs(int u,int p)
{
in[u] = ++TIMER;
anc[u][0] = p;
for (int i = 1;i<=20;i++)anc[u][i] = anc[anc[u][i - 1]][i - 1];
for (auto val:adj[u]){
int v = val[0];
if (v != p){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |