#include "swap.h"
#include <vector>
int ans;
void init(int n, int m, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
std::vector<std::vector<std::pair<int, int>>> e(n);
if (m == n - 1) {
ans = -1;
} else {
for (int i = 0; i < m; i++) {
e[U[i]].emplace_back(V[i], W[i]);
e[V[i]].emplace_back(U[i], W[i]);
ans = std::max(ans, W[i]);
}
}
}
int getMinimumFuelCapacity(int X, int Y) {
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
30 ms |
3900 KB |
Output is correct |
10 |
Correct |
36 ms |
4740 KB |
Output is correct |
11 |
Correct |
36 ms |
4724 KB |
Output is correct |
12 |
Correct |
47 ms |
4920 KB |
Output is correct |
13 |
Correct |
37 ms |
4908 KB |
Output is correct |
14 |
Correct |
37 ms |
4024 KB |
Output is correct |
15 |
Correct |
100 ms |
6344 KB |
Output is correct |
16 |
Correct |
99 ms |
6248 KB |
Output is correct |
17 |
Correct |
103 ms |
6472 KB |
Output is correct |
18 |
Correct |
101 ms |
6432 KB |
Output is correct |
19 |
Correct |
68 ms |
4600 KB |
Output is correct |
20 |
Correct |
120 ms |
13484 KB |
Output is correct |
21 |
Correct |
130 ms |
13384 KB |
Output is correct |
22 |
Correct |
170 ms |
14092 KB |
Output is correct |
23 |
Correct |
133 ms |
14020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
204 KB |
Output is correct |
3 |
Incorrect |
93 ms |
6120 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
30 ms |
3900 KB |
Output is correct |
10 |
Correct |
36 ms |
4740 KB |
Output is correct |
11 |
Correct |
36 ms |
4724 KB |
Output is correct |
12 |
Correct |
47 ms |
4920 KB |
Output is correct |
13 |
Correct |
37 ms |
4908 KB |
Output is correct |
14 |
Correct |
37 ms |
4024 KB |
Output is correct |
15 |
Correct |
100 ms |
6344 KB |
Output is correct |
16 |
Correct |
99 ms |
6248 KB |
Output is correct |
17 |
Correct |
103 ms |
6472 KB |
Output is correct |
18 |
Correct |
101 ms |
6432 KB |
Output is correct |
19 |
Incorrect |
93 ms |
6120 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |