# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70808 | 3zp | Commuter Pass (JOI18_commuter_pass) | C++14 | 891 ms | 20760 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 mn 100009
#define pb push_back
using namespace std;
long long n, m, S, T, U, V;
long long f[mn];
vector<int> v[mn], l[mn];
void Dij(long long k, long long *D){
priority_queue<pair<int,int> > q;
q.push({0,k});
for(long long i = 1; i <= n; i++)
D[i] = 1e18, f[i] = 0;
D[k] = 0;
while(q.size()){
long long x = q.top().second;
q.pop();
if(f[x]) continue;
f[x] = 1;
for(long long i = 0; i < v[x].size(); i++){
if(f[v[x][i]] == 0 &&
D[v[x][i]] > D[x] + l[x][i]){
D[v[x][i]] = D[x] + l[x][i];
q.push({-D[v[x][i]], v[x][i]});
}
}
}
}
long long du[mn], dv[mn], ds[mn], dt[mn], mindu[mn], mindv[mn];
void specDIJ(){
priority_queue<pair<int,int> > q;
Compilation message (stderr)
# | 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... |