#include "swap.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
#define L(i, j, k) for (int i = (j); i <= k; i++)
#define R(i, j, k) for (int i = (j); i >= k; i--)
int N, M;
int ok = true;
int 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);
for (int i = 0; i < M; i++)
mx = max(mx, _W[i]);
for (int i = 0; i < N; i++)
if (adj[i].size() <= 1)
ok = false;
}
int getMinimumFuelCapacity(int X, int Y) {
if (!ok) return -1;
return mx;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 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 |
21 ms |
3928 KB |
Output is correct |
10 |
Correct |
23 ms |
4956 KB |
Output is correct |
11 |
Correct |
23 ms |
4700 KB |
Output is correct |
12 |
Correct |
25 ms |
4948 KB |
Output is correct |
13 |
Correct |
28 ms |
4948 KB |
Output is correct |
14 |
Correct |
23 ms |
4188 KB |
Output is correct |
15 |
Correct |
65 ms |
6624 KB |
Output is correct |
16 |
Correct |
71 ms |
6656 KB |
Output is correct |
17 |
Correct |
67 ms |
6852 KB |
Output is correct |
18 |
Correct |
84 ms |
6856 KB |
Output is correct |
19 |
Incorrect |
50 ms |
3364 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Incorrect |
62 ms |
6524 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 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 |
0 ms |
348 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 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 |
21 ms |
3928 KB |
Output is correct |
10 |
Correct |
23 ms |
4956 KB |
Output is correct |
11 |
Correct |
23 ms |
4700 KB |
Output is correct |
12 |
Correct |
25 ms |
4948 KB |
Output is correct |
13 |
Correct |
28 ms |
4948 KB |
Output is correct |
14 |
Correct |
23 ms |
4188 KB |
Output is correct |
15 |
Correct |
65 ms |
6624 KB |
Output is correct |
16 |
Correct |
71 ms |
6656 KB |
Output is correct |
17 |
Correct |
67 ms |
6852 KB |
Output is correct |
18 |
Correct |
84 ms |
6856 KB |
Output is correct |
19 |
Incorrect |
62 ms |
6524 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |