# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
995988 | 54skyxenon | Crocodile's Underground City (IOI11_crocodile) | C++17 | 1833 ms | 125976 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.
// https://oj.uz/problem/view/IOI11_crocodile
/** Needed for linking!!! */
#include "crocodile.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define INF (ll)1e18
int travel_plan(int N, int M, int R[][2], int L[], int K, int P[]) {
vector<map<int, int>> graph(N);
vector<bool> is_exit(N);
vector<set<int>> visited(N);
for (int i = 0; i < M; i++) {
graph[R[i][0]][R[i][1]] = graph[R[i][1]][R[i][0]] = L[i];
}
for (int i = 0; i < K; i++) {
is_exit[P[i]] = true;
}
// Run Dijkstra's
vector<vector<ll>> dist(graph.size(), {INF, INF});
priority_queue<pair<ll, ll>> pq;
for (ll i = 0; i < graph.size(); i++) {
if (is_exit[i]) {
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... |