제출 #1126224

#제출 시각아이디문제언어결과실행 시간메모리
1126224psm9352사이버랜드 (APIO23_cyberland)C++20
0 / 100
18 ms2300 KiB
#include <vector> #include <algorithm> using namespace std; double solve(int N, int M, int K, int H, vector<int> x, vector<int>y, vector<int> c, vector<int> arr){ vector<double> ans(3,1e18);ans[0]=0; for (int t = 0;t<4;t++){ for (int i = 0;i<M;i++){ if (ans[x[i]]!=1e18) ans[y[i]]=min(ans[y[i]],ans[x[i]]+c[i]); if (ans[y[i]]!=1e18) ans[x[i]]=min(ans[x[i]],ans[y[i]]+c[i]); } } if (ans[H]>=1e18){return -1;} return ans[H]; }
#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...