Submission #1200044

#TimeUsernameProblemLanguageResultExecution timeMemory
1200044IBoryCrocodile's Underground City (IOI11_crocodile)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define pii pair<ll, ll> typedef long long ll; using namespace std; const int MAX = 100007; vector<pii> G[MAX]; ll D[MAX], V[MAX]; int main() { ios::sync_with_stdio(0); cin.tie(0); int N, M, K; cin >> N >> M >> K; for (int i = 1; i <= M; ++i) { ll a, b, c; cin >> a >> b >> c; G[a].emplace_back(b, c); G[b].emplace_back(a, c); } priority_queue<pii, vector<pii>, greater<pii>> PQ; memset(D, 0x3f, sizeof(D)); while (K--) { int n; cin >> n; V[n] = 1; PQ.emplace(0, n); } while (!PQ.empty()) { auto [cd, cur] = PQ.top(); PQ.pop(); if (++V[cur] != 2) continue; D[cur] = cd; for (auto [next, nd] : G[cur]) PQ.emplace(cd + nd, next); } cout << D[0]; return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc2mMk3e.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccG5sawx.o:crocodile.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc2mMk3e.o: in function `main':
grader.cpp:(.text.startup+0x36): undefined reference to `travel_plan(int, int, int (*) [2], int*, int, int*)'
collect2: error: ld returned 1 exit status