# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
754750 | bensonlzl | Commuter Pass (JOI18_commuter_pass) | C++14 | 382 ms | 27068 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>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pl;
ll N, M, X, Y, S, T, U, V, C, mini = 1e18;
ll distS[100005], distT[100005], distU[100005], distV[100005], dp[100005];
int visit[100005];
vector<pl> AdjList[100005];
vector<int> dpList[100005];
void dijkstra(int x, ll d[]){
priority_queue<pl,vector<pl>,greater<pl> > pq;
for (int i = 1; i <= N; ++i) d[i] = 1e16;
d[x] = 0;
pq.push(pl(0,x));
while (!pq.empty()){
pl t = pq.top();
pq.pop();
ll dt = t.first, v = t.second;
if (d[v] != dt) continue;
for (auto it : AdjList[v]){
if (d[it.first] > d[v] + it.second){
d[it.first] = d[v] + it.second;
pq.push(pl(d[it.first],it.first));
# | 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... |