제출 #985412

#제출 시각아이디문제언어결과실행 시간메모리
985412kkkkkkkk사이버랜드 (APIO23_cyberland)C++17
8 / 100
1746 ms2097152 KiB
#include <bits/stdc++.h> using namespace std; vector<pair<int,int> > G[100005]; double rez=0; 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, teme, 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<n;i++) G[i].clear(); 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...