#include "swap.h"
#include<bits/stdc++.h>
#include <vector>
#define pb push_back
using namespace std;
const int N = 1e6 + 5;
vector<pair<int, int> > g[N];
int mx, n, m;
void init(int N, int M,
std::vector<int> U, std::vector<int> V, std::vector<int> W) {
n = N;
m = M;
for(int i = 0; i < M; ++i){
int u = U[i], v = V[i], w = W[i];
g[u].pb({v, w});
g[v].pb({u, w});
mx = max(mx, w);
}
}
int getMinimumFuelCapacity(int X, int Y) {
if(m == n - 1)
return -1;
else
return mx;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
23764 KB |
Output is correct |
2 |
Correct |
13 ms |
23668 KB |
Output is correct |
3 |
Correct |
14 ms |
23764 KB |
Output is correct |
4 |
Correct |
13 ms |
23764 KB |
Output is correct |
5 |
Correct |
13 ms |
23832 KB |
Output is correct |
6 |
Correct |
12 ms |
23788 KB |
Output is correct |
7 |
Correct |
13 ms |
23764 KB |
Output is correct |
8 |
Correct |
12 ms |
23748 KB |
Output is correct |
9 |
Correct |
48 ms |
28048 KB |
Output is correct |
10 |
Correct |
66 ms |
28968 KB |
Output is correct |
11 |
Correct |
82 ms |
28872 KB |
Output is correct |
12 |
Correct |
64 ms |
29184 KB |
Output is correct |
13 |
Correct |
58 ms |
29132 KB |
Output is correct |
14 |
Correct |
67 ms |
28136 KB |
Output is correct |
15 |
Correct |
104 ms |
30832 KB |
Output is correct |
16 |
Correct |
152 ms |
30688 KB |
Output is correct |
17 |
Correct |
120 ms |
30956 KB |
Output is correct |
18 |
Correct |
112 ms |
31032 KB |
Output is correct |
19 |
Correct |
58 ms |
28080 KB |
Output is correct |
20 |
Correct |
155 ms |
31976 KB |
Output is correct |
21 |
Correct |
104 ms |
32136 KB |
Output is correct |
22 |
Correct |
115 ms |
32440 KB |
Output is correct |
23 |
Correct |
131 ms |
32368 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
23764 KB |
Output is correct |
2 |
Correct |
13 ms |
23668 KB |
Output is correct |
3 |
Incorrect |
94 ms |
31400 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
23764 KB |
Output is correct |
2 |
Correct |
13 ms |
23668 KB |
Output is correct |
3 |
Correct |
14 ms |
23764 KB |
Output is correct |
4 |
Correct |
13 ms |
23764 KB |
Output is correct |
5 |
Correct |
13 ms |
23832 KB |
Output is correct |
6 |
Correct |
12 ms |
23788 KB |
Output is correct |
7 |
Correct |
13 ms |
23764 KB |
Output is correct |
8 |
Correct |
12 ms |
23748 KB |
Output is correct |
9 |
Incorrect |
14 ms |
23764 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
23764 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
23764 KB |
Output is correct |
2 |
Correct |
13 ms |
23668 KB |
Output is correct |
3 |
Correct |
14 ms |
23764 KB |
Output is correct |
4 |
Correct |
13 ms |
23764 KB |
Output is correct |
5 |
Correct |
13 ms |
23832 KB |
Output is correct |
6 |
Correct |
12 ms |
23788 KB |
Output is correct |
7 |
Correct |
13 ms |
23764 KB |
Output is correct |
8 |
Correct |
12 ms |
23748 KB |
Output is correct |
9 |
Correct |
48 ms |
28048 KB |
Output is correct |
10 |
Correct |
66 ms |
28968 KB |
Output is correct |
11 |
Correct |
82 ms |
28872 KB |
Output is correct |
12 |
Correct |
64 ms |
29184 KB |
Output is correct |
13 |
Correct |
58 ms |
29132 KB |
Output is correct |
14 |
Correct |
67 ms |
28136 KB |
Output is correct |
15 |
Correct |
104 ms |
30832 KB |
Output is correct |
16 |
Correct |
152 ms |
30688 KB |
Output is correct |
17 |
Correct |
120 ms |
30956 KB |
Output is correct |
18 |
Correct |
112 ms |
31032 KB |
Output is correct |
19 |
Incorrect |
94 ms |
31400 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
14 ms |
23764 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |