# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
287334 | reymontada61 | Olympic Bus (JOI20_ho_t4) | C++14 | 466 ms | 4216 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
int n, m;
const int MXN = 205, MXM = 50005;
int apsp[MXN][MXN];
int eds[MXM][4];
vector<int> adj[MXN];
int mxh = INT_MAX * 1000ll;
int dist(int src, int dest, int skip) {
int dists[MXN];
for (int i=0; i<MXN; i++) dists[i] = mxh;
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> proc;
proc.push({0, src});
while (!proc.empty()) {
auto x = proc.top(); proc.pop();
int di = x.first, no = x.second;
if (dists[no] < di) continue;
dists[no] = di;
for (auto ed: adj[no]) {
if (ed != skip) {
int ot = eds[ed][0] + eds[ed][1] - no;
int we = eds[ed][2];
if (dists[ot] > dists[no] + we) {
dists[ot] = dists[no] + we;
proc.push({dists[ot], ot});
# | 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... |