# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
411566 | ak2006 | Valley (BOI19_valley) | C++14 | 572 ms | 75372 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;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vi = vector<int>;
using vvi = vector<vi>;
using vb = vector<bool>;
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
const ll inf = 1e15;
void setIO()
{
fast;
}
int n = 1e5 + 5,s,q,root;
vi in(n),out(n),num(n);
vl magic(n,inf),dist(n);
vvl anc(n,vl(21)),dp(n,vl(21));
vvvl adj(n);
vb shop(n);
int t;
void dfs(int u,int p,ll wt)
{
if (p != -1)dist[u] = dist[p] + wt,num[u] = num[p] + 1;
in[u] = t++;
if (shop[u])magic[u] = dist[u];
for (auto x:adj[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... |