#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