#include "swap.h"
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for (int i = (a); i <= (b); i++)
#define repa(i,a,b) for (int i = (a); i >= (b); i--)
#define lli long long int
#define debug(a) cout << #a << " = " << a << endl
#define debugsl(a) cout << #a << " = " << a << ", "
#define MAX 100000
#define u second.first
#define v second.second
#define w first
lli peso[MAX+2],a,b,c,n,m,YA;
vector<pair<lli,lli> > orden;
void init(int N, int M,std::vector<int> U, std::vector<int> V, std::vector<int> W) {
n = N;
m = M;
rep(i,0,m-1) {
peso[V[i]+1] = W[i];
orden.push_back({W[i],V[i]+1});
}
sort(orden.begin(), orden.end());
YA = orden[m-1].first;
}
int getMinimumFuelCapacity(int X, int Y) {
X++;
Y++;
if (n == m) return YA;
else return -1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
53 ms |
5076 KB |
Output is correct |
10 |
Correct |
46 ms |
5540 KB |
Output is correct |
11 |
Correct |
36 ms |
5524 KB |
Output is correct |
12 |
Correct |
39 ms |
5716 KB |
Output is correct |
13 |
Correct |
40 ms |
5700 KB |
Output is correct |
14 |
Correct |
35 ms |
5228 KB |
Output is correct |
15 |
Correct |
85 ms |
11328 KB |
Output is correct |
16 |
Correct |
105 ms |
11260 KB |
Output is correct |
17 |
Correct |
89 ms |
11596 KB |
Output is correct |
18 |
Correct |
95 ms |
11600 KB |
Output is correct |
19 |
Correct |
47 ms |
6596 KB |
Output is correct |
20 |
Correct |
83 ms |
11928 KB |
Output is correct |
21 |
Correct |
87 ms |
12140 KB |
Output is correct |
22 |
Correct |
96 ms |
12588 KB |
Output is correct |
23 |
Correct |
86 ms |
12596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Incorrect |
86 ms |
6864 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Incorrect |
0 ms |
308 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
308 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
53 ms |
5076 KB |
Output is correct |
10 |
Correct |
46 ms |
5540 KB |
Output is correct |
11 |
Correct |
36 ms |
5524 KB |
Output is correct |
12 |
Correct |
39 ms |
5716 KB |
Output is correct |
13 |
Correct |
40 ms |
5700 KB |
Output is correct |
14 |
Correct |
35 ms |
5228 KB |
Output is correct |
15 |
Correct |
85 ms |
11328 KB |
Output is correct |
16 |
Correct |
105 ms |
11260 KB |
Output is correct |
17 |
Correct |
89 ms |
11596 KB |
Output is correct |
18 |
Correct |
95 ms |
11600 KB |
Output is correct |
19 |
Incorrect |
86 ms |
6864 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
308 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |