Submission #985398

#TimeUsernameProblemLanguageResultExecution timeMemory
985398kkkkkkkkCyberland (APIO23_cyberland)C++17
0 / 100
1563 ms2097152 KiB
#include <bits/stdc++.h> using namespace std; vector<pair<int,int> > G[100005]; double rez; void dfs(int teme, int kraj, int p, double vreme) { if (teme==kraj) { rez=vreme; return; } for (auto x:G[teme]) { int next=x.first; if (p!=next) dfs(next, kraj, p, vreme+x.second); } } double solve(int n, int m, int k, int h, vector<int> a, vector<int> b, vector<int> c, vector<int> arr) { for (int i=0;i<m;i++) { G[a[i]].push_back({b[i],c[i]}); G[b[i]].push_back({a[i],c[i]}); } dfs(0,h,-1,0); return rez; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...