# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
123624 | deinfreund | Crocodile's Underground City (IOI11_crocodile) | C++14 | 1053 ms | 71908 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 "crocodile.h"
#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> conns;
vector<vector<int>> costs;
int travel_plan(int N, int M, int R[][2], int L[], int K, int P[])
{
conns.resize(N);
costs.resize(N);
for (int i = 0; i < M; i++){
int a = R[i][0];
int b = R[i][1];
conns[a].push_back(b);
conns[b].push_back(a);
costs[a].push_back(L[i]);
costs[b].push_back(L[i]);
}
const long long big = 1000000000;//100000000000000000LL;
vector<long long> firstCost(N, big);
vector<long long> secondCost(N, big);
priority_queue<pair<long long, int>> pq;
for (int i = 0; i < K; i++){
pq.push({0, P[i]});
}
vector<bool> visited(N, 0);
while (!pq.empty()){
int pos;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |