# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1016403 | Aiperiii | Olympic Bus (JOI20_ho_t4) | C++14 | 500 ms | 5468 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 all(x) x.begin(),x.end()
#define ff first
#define ss second
#define pb push_back
using namespace std;
multiset < pair <int,int> > g[205];
int dis(int u,int u2,int n){
vector <int> d(n+1,1e10);
d[u]=0;
priority_queue <pair <int,int> > pq;
pq.push({0,u});
while(!pq.empty()){
int v=pq.top().ss;
pq.pop();
for(auto to : g[v]){
if(d[to.ff]>d[v]+to.ss){
d[to.ff]=d[v]+to.ss;
pq.push({d[to.ff],to.ff});
}
}
}
return d[u2];
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int n,m;
cin>>n>>m;
# | 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... |