# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1171040 | kla | Commuter Pass (JOI18_commuter_pass) | C++20 | 202 ms | 15840 KiB |
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>>M[100001];
bool biju [100001]={};
long long U[100001]={};
long long V[100001]={};
long long bals[100001]={};
long long kopy[100001]={};
pair<long long, long long> pr[100001]={};
priority_queue<pair<long long, int>, vector<pair<long long, int>>, greater<pair<long long, int>>>pq={};
long long nxt(){
long long n;
cin>>n;
return n;
}
void DjikstrasimU(int sak){
U[sak]=0, pq.push(make_pair(0, sak));
while(pq.size()!=0){
int v=pq.top().second;
long long att=pq.top().first;
pq.pop();
if(biju[v]==0){
biju[v]=1;
for(auto c: M[v]){
if(att+c.second<U[c.first]){
U[c.first]=att+c.second, pq.push(make_pair(U[c.first], c.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... |