| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1363252 | ahmetlbktd4 | 사이버랜드 (APIO23_cyberland) | C++20 | 12 ms | 5680 KiB |
#include "cyberland.h"
#include "bits/stdc++.h"
using namespace std;
const double inf = 1e9;
double solve(int n,int m,int k,int h,vector<int> x,vector<int> y,vector<int> c,vector<int> arr){
vector <pair<int,int>> g[n+1];
for (int i = 0;i < m;i++){
g[x[i]].push_back({y[i],c[i]});
g[y[i]].push_back({x[i],c[i]});
}
vector <double> d(n,inf);
priority_queue <pair<double,int>> q;
q.push({-0.0,0});
d[0] = 0;
while (!q.empty()){
auto [w,nd] = q.top();
q.pop();
if (d[nd] < -w)
continue;
if (nd == h)
continue;
for (auto [to,w1] : g[nd]){
// cout << to << " " << w1 << "\n";
if (d[nd] + (double)w1 < d[to]){
d[to] = d[nd] + (double)w1;
q.push({-d[to],to});
}
}
}
return d[h];
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
