# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
661177 | kinope | Olympic Bus (JOI20_ho_t4) | C++14 | 655 ms | 14412 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 unsigned long long ll;
typedef pair<ll, int> pii;
struct st{int a, b; ll c, d;} kraw[50000];
vector<pii> g[201][2];
ll odl[4][201][201]; //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 dijkstra(int s, int y, int b, bool ODWR){
priority_queue<pii> pq;
pq.emplace(0, s);
odl[b][s][y] = 0;
while(!pq.empty()){
int x = pq.top().ss; ll dis = -pq.top().ff;
pq.pop();
for(pii u : g[x][ODWR]){
if(u.ss == y) continue;
if(odl[b][u.ss][y] > dis + u.ff){
odl[b][u.ss][y] = dis + u.ff;
pq.emplace(-odl[b][u.ss][y], u.ss);
}
}
}
}
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... |