# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174125 | StefanSebez | Dreaming (IOI13_dreaming) | C++20 | 232 ms | 25064 KiB |
#include "dreaming.h"
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define ll long long
#define ld long double
const int N=1e5+50;
int n,m,L;
vector<pair<int,int>>E[N];
map<pair<int,int>,int>edge;
int maksdepth,makscvor,par[N];
int komp[N],cnt;
void DFS(int u,int parent,int depth){
par[u]=parent;
if(maksdepth<=depth) makscvor=u;
maksdepth=max(maksdepth,depth);
komp[u]=cnt;
for(auto [i,x]:E[u]){
if(i==parent) continue;
DFS(i,u,depth+x);
}
}
int travelTime(int n1, int m1, int L1, int A[], int B[], int T[]) {
n=n1,m=m1,L=L1;
for(int i=0;i<m;i++){
E[A[i]].pb({B[i],T[i]});
E[B[i]].pb({A[i],T[i]});
edge[{A[i],B[i]}]=edge[{B[i],A[i]}]=T[i];
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |