Submission #1200049

#TimeUsernameProblemLanguageResultExecution timeMemory
1200049IBoryCrocodile'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 travel_plan(int N, int M, int* R[2], int* L, int K, int* P) { for (int i = 0; i < M; ++i) { ll a = R[i][0], b = R[i][1], c = L[i]; 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 = P[K]; 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); } return D[0]; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc3ZWKvb.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