#include "swap.h"
#include <bits/stdc++.h>
using namespace std;
vector<vector<pair<int,int>>> al;
int mx=0;
int n,m;
void init(int N, int M,
vector<int> U, vector<int> V, vector<int> W) {
al.assign(N+1,vector<pair<int,int>>());
for (int i=0; i<M; i++) {
al[U[i]].push_back({V[i],W[i]});
al[V[i]].push_back({U[i],W[i]});
mx=max(mx,W[i]);
}
n=N;
m=M;
}
int getMinimumFuelCapacity(int X, int Y) {
if (m==n-1) return -1;
return mx;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
356 KB |
Output is correct |
4 |
Correct |
1 ms |
344 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
31 ms |
8016 KB |
Output is correct |
10 |
Correct |
31 ms |
9808 KB |
Output is correct |
11 |
Correct |
33 ms |
9712 KB |
Output is correct |
12 |
Correct |
35 ms |
10332 KB |
Output is correct |
13 |
Correct |
32 ms |
10404 KB |
Output is correct |
14 |
Correct |
29 ms |
8532 KB |
Output is correct |
15 |
Correct |
80 ms |
14044 KB |
Output is correct |
16 |
Correct |
98 ms |
13816 KB |
Output is correct |
17 |
Correct |
73 ms |
14268 KB |
Output is correct |
18 |
Correct |
73 ms |
14264 KB |
Output is correct |
19 |
Correct |
39 ms |
7116 KB |
Output is correct |
20 |
Correct |
74 ms |
15040 KB |
Output is correct |
21 |
Correct |
79 ms |
15168 KB |
Output is correct |
22 |
Correct |
74 ms |
15668 KB |
Output is correct |
23 |
Correct |
75 ms |
15800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Incorrect |
68 ms |
13928 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
356 KB |
Output is correct |
4 |
Correct |
1 ms |
344 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
356 KB |
Output is correct |
4 |
Correct |
1 ms |
344 KB |
Output is correct |
5 |
Correct |
2 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
31 ms |
8016 KB |
Output is correct |
10 |
Correct |
31 ms |
9808 KB |
Output is correct |
11 |
Correct |
33 ms |
9712 KB |
Output is correct |
12 |
Correct |
35 ms |
10332 KB |
Output is correct |
13 |
Correct |
32 ms |
10404 KB |
Output is correct |
14 |
Correct |
29 ms |
8532 KB |
Output is correct |
15 |
Correct |
80 ms |
14044 KB |
Output is correct |
16 |
Correct |
98 ms |
13816 KB |
Output is correct |
17 |
Correct |
73 ms |
14268 KB |
Output is correct |
18 |
Correct |
73 ms |
14264 KB |
Output is correct |
19 |
Incorrect |
68 ms |
13928 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |