#include "swap.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
int n, m;
int ok = 1, mx = -1;
vector<vector<pair<int,int>>> adj;
void init(int N, int M, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
n = N, m = M;
adj.resize(n + 2);
for (int i = 0; i < m; i++) {
adj[U[i]].push_back(make_pair(V[i],W[i]));
adj[V[i]].push_back(make_pair(U[i], W[i]));
mx = max(mx, W[i]);
}
for (int i = 0; i < n; i++) {
if (adj[i].size() == 1) ok = 0;
}
}
int getMinimumFuelCapacity(int X, int Y) {
if (ok) return -1;
else return mx;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
224 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
224 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
224 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
224 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
224 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
224 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |