제출 #1327034

#제출 시각아이디문제언어결과실행 시간메모리
1327034riafhasan2010악어의 지하 도시 (IOI11_crocodile)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

const ll inf = 1e17;

ll travel_plan(int n, int m, int R[][2], int L[], int k, int p[]) {
  vector<vector<pair<int, int>>> g(n);
  for (int i = 0; i < m; i++) {
    g[R[i][0]].push_back({R[i][1], L[i]});
    g[R[i][1]].push_back({R[i][0], L[i]});
  }
  vector<ll> best(n, inf), second_best(n, inf);
  priority_queue<pair<ll, int>, vector<pair<ll, int>>, greater<pair<ll, int>>> pq;
  for (int i = 0; i < k; i++) {
    best[p[i]] = 0;
    pq.push({0, p[i]});
  }
  while (!pq.empty()) {
    auto [c, u] = pq.top(); pq.pop();
    if (c > second_best[u]) continue;
    for (auto [v, w] : g[u]) {
      if (c + w < best[v]) {
        second_best[v] = best[v];
        best[v] = c + w;
        pq.push({best[v], v});
      }
      else if (c + w < second_best[v]) {
        second_best[v] = c + w;
        pq.push({c + w, v});
      }
    }
  }
  return second_best[0];
}

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/cc4gJWeF.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccE2CJzm.o:crocodile.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status