답안 #961355

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
961355 2024-04-11T22:19:53 Z Mohamed_Kachef06 자매 도시 (APIO20_swap) C++17
컴파일 오류
0 ms 0 KB
#include "swap.h"

#ifndef ONLINE_JUDGE
#include "grader.cpp"
#endif
#include <bits/stdc++.h>
using namespace std;

map<pair<int , int> , int> mp;
multiset<int> ms;

int n , m;
vector<int> u , v , w; 

void init(int N, int M,
          std::vector<int> U, std::vector<int> V, std::vector<int> W) {
      for (int i = 0 ; i < M ; i++){
        mp[{U[i] , V[i]}] = W[i]; ms.insert(W[i]);
      }     
      n = N;  m = M; 
      u = U; v = V; w = W;
}

int getMinimumFuelCapacity(int X, int Y) {
  if (X == 0 || n < 4) return -1;
  int a = mp[{0 , Y}] , b = mp[{0 , X}];
  ms.erase(ms.find(a)); ms.erase(ms.find(b)) ;
  int ans = max({*ms.begin() , a , b});
  ms.insert(a); ms.insert(b);
  return ans; 
}

Compilation message

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