# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1173723 | mareksb | Commuter Pass (JOI18_commuter_pass) | C++20 | 204 ms | 21080 KiB |
#include <bits/stdc++.h>
#pragma GCC optimize ("O3,unroll-loops")
#pragma GCC target ("avx2,bmi,bmi2,popcnt,lzcnt")
using namespace std;
const int64_t N=100005;
vector<pair<int64_t,int64_t>> mas[N];
int64_t dS[N];
int64_t dT[N];
int64_t dV[N];
int64_t dU[N];
int64_t n,m;
int64_t s,t;//commuter pass
int64_t u,v;
void dijkstra(int64_t start, int64_t* dist){
priority_queue<pair<int64_t,int64_t>,vector<pair<int64_t,int64_t>>,greater<pair<int64_t,int64_t>>> pq;
dist[start]=0;
pq.push({0,start});
while(!pq.empty()){
int64_t x=pq.top().second;
pq.pop();
for(auto p:mas[x]){
if(dist[x]+p.second<dist[p.first]){
dist[p.first]=dist[x]+p.second;
pq.push({dist[p.first],p.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... |