# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
748594 | piOOE | Two Transportations (JOI19_transportations) | C++17 | 3000 ms | 10144 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 "Azer.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
constexpr int maxN = 2000, maxQ = 58001;
constexpr int inf = 1e9 + 7;
int N, A, Q = 0, S = 0, Last = 0, usedCnt = 0;
vector<pair<int, int>> adj[maxN];
set<pair<int, int>> st;
int dist[maxN];
bool used[maxN], b[maxQ];
void upd(int v) {
for (auto [to, w]: adj[v]) {
if (!used[to] && dist[to] > dist[v] + w) {
st.erase({dist[to], to});
st.emplace(dist[to] = dist[v] + w, to);
}
}
}
void ckmin(int v, int d) {
if (dist[v] > d) {
st.erase({dist[v], v});
st.emplace(dist[v] = d, v);
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |