# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167763 | afvrevebva | Commuter Pass (JOI18_commuter_pass) | C++20 | 2093 ms | 327680 KiB |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll C=1e9;
const ll M=2e5;
vector<vector<pair<int,ll>>> adj;
void f(vector<ll> &v,int x){
v[x]=0;
auto comp=[&v](int i,int j){return v[i]>v[j];};
priority_queue<int,vector<int>,decltype(comp)>pq{comp};
pq.push(x);
while(!pq.empty()){
int i=pq.top();
pq.pop();
for(pair<int,ll> p:adj[i]){
ll j,c;
tie(j,c)=p;
if(v[j]>v[i]+c){
v[j]=v[i]+c;
pq.push(j);
}
}
}
}
void f1(vector<ll> &v,int x){
v[x]=0;
# | 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... |