# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
259171 | imeimi2000 | 한자 끝말잇기 (JOI14_kanji) | C++17 | 216 ms | 27360 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 "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long llong;
typedef pair<llong, llong> pll;
static void dijkstra(vector<pll> edge[], llong dist[], int prev[], int s) {
priority_queue<pll> pq;
pq.emplace(dist[s] = 0, s);
while (!pq.empty()) {
auto [d, x] = pq.top(); pq.pop();
d = -d;
if (dist[x] != d) continue;
for (auto [i, c] : edge[x]) {
if (d + c < dist[i]) pq.emplace(-(dist[i] = d + c), i), prev[i] = x;
}
}
}
const static llong inf = 4e18;
static vector<pll> edge[300];
static llong distK[6][300], distQ[60][300];
static int par[300], a;
static llong get_dist(int i, int x, int k) {
if (k) return distQ[i][a] + distK[k][x];
return distQ[i][x];
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |