# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
486336 | Jarif_Rahman | Olympic Bus (JOI20_ho_t4) | C++17 | 730 ms | 6520 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
const ll inf = 1e17;
vector<ll> dijkstra(vector<vector<array<int, 3>>> v, int source){
int n = v.size();
vector<ll> dis(n, inf);
vector<bool> bl(n, 0);
priority_queue<pair<ll, int>> pq;
dis[source] = 0;
pq.push({0, source});
while(!pq.empty()){
int nd = pq.top().sc; pq.pop();
if(bl[nd]) continue;
bl[nd] = 1;
for(auto [w, c, x]: v[nd]) if(dis[nd]+w < dis[x]){
dis[x] = dis[nd]+w;
pq.push({-dis[x], x});
}
}
return dis;
# | 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... |