#include<bits/stdc++.h>
#define taskname "A"
using namespace std;
void World_Final();
void Solve();
int main(){
ios_base::sync_with_stdio(false); cin.tie(nullptr);
/*if (fopen(taskname".in", "r")) {
freopen(taskname".in", "r", stdin);
freopen(taskname".out", "w", stdout);
}*/
World_Final();
}
void World_Final(){
int Tests = 1;
//cin >> Tests;
for (int i = 1; i <= Tests; i ++) {
//cout << i << "\n";
Solve();
}
}
const int MOD = 1e9 + 7;
const int MAXN = 2e5 + 10;
const int INF = 1e9;
int par[MAXN]; vector<pair<int, int64_t>> G[MAXN];
int64_t travel_plan(int N, int M, int R[][2], int L[], int K, int st[]){
cin >> N >> M >> K;
for (int i = 0; i < M; i ++) {
cin >> R[i][0] >> R[i][1];
}
for (int i = 0; i < M; i ++) {
G[R[i][0]].push_back(make_pair(R[i][1], L[i]));
G[R[i][1]].push_back(make_pair(R[i][0], L[i]));
}
priority_queue<pair<int64_t, int>> pq;
vector<int64_t> f(N + 5, 1e18);
for (int i = 0; i < K; i ++) {
cin >> st[i]; f[st[i]] = 0;
pq.push(make_pair(0, st[i]));
}
while (!pq.empty()) {
int64_t d; int u; tie(d, u) = pq.top(); pq.pop();
if (-d != f[u]) continue;
for (auto [v, w] : G[u]) {
if (f[v] > f[u] + w) {
f[v] = f[u] + w;
par[v] = u;
pq.push(make_pair(-f[v], v));
}
}
}
for (int i = 0; i < N; i ++) f[i] = 1e18;
f[0] = 0; pq.push(make_pair(f[0], 0));
while (!pq.empty()) {
int64_t d; int u; tie(d, u) = pq.top(); pq.pop();
if (-d != f[u]) continue;
for (auto [v, w] : G[u]) {
if (par[u] != v && f[v] > f[u] + w) {
f[v] = f[u] + w;
pq.push(make_pair(-f[v], v));
}
}
}
int64_t ans = 1e18;
for (int i = 0; i < K; i ++) {
ans = min(ans, f[st[i]]);
}
return ans;
}
void Solve(){
}
Compilation message
/usr/bin/ld: /tmp/ccq044kj.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccv6Nuih.o:crocodile.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status