# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1035016 | _Nhm207_ | Commuter Pass (JOI18_commuter_pass) | C++14 | 278 ms | 27940 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 int long long
#define Task "bus"
using namespace std;
const int N = 1e5 + 5;
vector<int> ds , dt , du , dv;
int n , m , u , v , s , t , ok[N];
int res;
vector<pair<int , int>> g[N];
void dijkstra(int u , vector<int> &d){
d . resize(n + 1);
for(int i = 1 ; i <= n ; i++) d[i] = 1e18;
d[u] = 0;
priority_queue<pair<int , int> , vector<pair<int , int>> , greater<pair<int , int>>> pq;
pq . push({d[u] , u});
while(pq . size()){
int u = pq . top() . second;
int du = pq . top() . first;
pq . pop();
if(d[u] != du) continue;
for(pair<int , int> nex : g[u]){
if(d[nex . first] > d[u] + nex . second){
d[nex . first] = d[u] + nex . second;
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... |