# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
789531 | someone | Two Transportations (JOI19_transportations) | C++14 | 0 ms | 0 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;
struct Arc {
int nex, pds;
};
const int N = 2e3 + 42, INF = 1e6 + 42;
int n, knows[N];
vector<bool> msg;
vector<int> dist;
vector<Arc> arc[N];
priority_queue<pair<int, int>> pq;
void Init(int X, int a, vector<int> U, vector<int> V, vector<int> C) {
//cout << '\n' << '\n';
n = X;
dist.resize(n);
for(int i = 0; i < a; i++) {
arc[U[i]].push_back({V[i], C[i]});
arc[V[i]].push_back({U[i], C[i]});
}
for(int i = 1; i < n; i++)
knows[i] = dist[i] = INF;
for(int i = 0; i < n; i++)
pq.push({-dist[i], i});
for(int j = 0; j < 11; j++)