# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
866450 | salmon | Olympic Bus (JOI20_ho_t4) | C++14 | 0 ms | 0 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.
if(ton[t]){
for(int i = 1; i <= N; i++) tempd[i] = inf;
tempd[1] = 0;
for(int j : adjlst[i]){
pq.push(make_pair(edge[j][2], j));
}
while(!pq.empty()){
pair<int,int> ii = pq.top();
pq.pop();
int i = edge[ii.second][1];
if(tempd[i] != inf) continue;
tempd[i] = ii.first;
for(int j : adjlst[i]){
pq.push(make_pair(tempd[i] + edge[j][2],j));
}
}
temp = tempd[N];
}
else temp = min((long long int)f1d[N], f1d[edge[i][1]] + (long long int)bnd[edge[i][0]] + edge[i][2]);