#include "swap.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define ep insert
#define pb push_back
using namespace std;
const int NN=1e5+5;
int n,m,mid,w[NN];
vector<pair<int,int>> adj[NN];
set<int> s;
void init(int N, int M,
vector<int> U, vector<int> V, vector<int> W) {
n=N,m=M;
for (int i=0;i<m;i++) w[V[i]]=W[i],s.ep(W[i]);
return;
}
int getMinimumFuelCapacity(int X, int Y) {
if (X && Y){
s.erase(s.find(w[X]));
s.erase(s.find(w[Y]));
int ans=max(*s.begin(),max(w[X],w[Y]));
s.ep(w[X]);
s.ep(w[Y]);
return ans;
}
return -1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2904 KB |
Output is correct |
2 |
Execution timed out |
2045 ms |
2652 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2904 KB |
Output is correct |
2 |
Execution timed out |
2045 ms |
2652 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2904 KB |
Output is correct |
2 |
Execution timed out |
2045 ms |
2652 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2904 KB |
Output is correct |
2 |
Execution timed out |
2045 ms |
2652 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2904 KB |
Output is correct |
2 |
Execution timed out |
2045 ms |
2652 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2904 KB |
Output is correct |
2 |
Execution timed out |
2045 ms |
2652 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |