# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
600476 | stevancv | Evacuation plan (IZhO18_plan) | C++14 | 567 ms | 47108 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 <bits/stdc++.h>
#define ll long long
#define ld long double
#define sp ' '
#define en '\n'
#define smin(a, b) a = min(a, b)
#define smax(a, b) a = max(a, b)
using namespace std;
const int N = 3e3 + 2;
const int mod = 1e9 + 7;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(m), b(m), c(m);
vector<vector<array<int, 2>>> g(n);
for (int i = 0; i < m; i++) {
cin >> a[i] >> b[i] >> c[i];
a[i] -= 1; b[i] -= 1;
g[a[i]].push_back({b[i], c[i]});
g[b[i]].push_back({a[i], c[i]});
}
int k; cin >> k;
priority_queue<array<int, 2>> pq;
vector<int> dist(n, 1e9);
for (int i = 0; i < k; i++) {
int x; cin >> x; x -= 1;
pq.push({0, x});
# | 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... |