# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
661182 | kinope | Olympic Bus (JOI20_ho_t4) | C++14 | 1087 ms | 2948 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 ff first
#define ss second
using namespace std;
typedef long long ll;
typedef pair<ll, int> pii;
typedef pair<ll, pair<int, int>> pii2;
struct st{int a, b; ll c, d;} kraw[50005];
vector<pii2> g2[205];
ll odl2[2][205]; //0. to z 1 do innych, 1. to z n do innych, 2. to z innych do 1, 3. to z innych do n
void dijkstra2(int s, int b, int BL){
priority_queue<pii> pq;
pq.emplace(0, s);
odl2[b][s] = 0;
while(!pq.empty()){
int x = pq.top().ss; ll dis = -pq.top().ff;
pq.pop();
for(pii2 u : g2[x]){
if(u.ss.ss == BL) continue;
if(odl2[b][u.ss.ff] > dis + u.ff){
odl2[b][u.ss.ff] = dis + u.ff;
pq.emplace(-odl2[b][u.ss.ff], u.ss.ff);
}
}
}
}
int main(){
Compilation message (stderr)
# | 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... |