# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1165517 | DanerZein | Valley (BOI19_valley) | C++20 | 334 ms | 40608 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<ii> vi;
const int MAX_N=1e5+10;
const ll MAX=1e15;
vector<vi> G;
int shop[MAX_N];
ll dis[MAX_N];
ll dp[MAX_N];
int pa[MAX_N][22];
ll jump[MAX_N][22];
int level[MAX_N];
void dfs(int u,int p){
if(shop[u]) dp[u]=0;
for(auto &v:G[u]){
if(v.first!=p){
dis[v.first]=dis[u]+v.second;
dfs(v.first,u);
dp[u]=min(dp[u], dp[v.first]+v.second);
}
}
# | 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... |