#include "swap.h"
#include <bits/stdc++.h>
using namespace std;
#define all(a) begin(a),end(a)
const int mxN = (int)3e5+10;
bool line = false;
int deg[mxN], ans;
void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) {
fill(deg,deg+N,0);
for(int i = 0; i < M; i++)
deg[U[i]]++, deg[V[i]]++;
line = (*min_element(deg,deg+N)==1);
ans = *max_element(all(W));
}
int getMinimumFuelCapacity(int X, int Y) {
if(line) return -1;
return ans;
}
# |
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 |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 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 |
15 ms |
4048 KB |
Output is correct |
10 |
Correct |
21 ms |
4944 KB |
Output is correct |
11 |
Correct |
24 ms |
4956 KB |
Output is correct |
12 |
Correct |
20 ms |
5204 KB |
Output is correct |
13 |
Correct |
19 ms |
5060 KB |
Output is correct |
14 |
Correct |
19 ms |
4568 KB |
Output is correct |
15 |
Correct |
55 ms |
9152 KB |
Output is correct |
16 |
Correct |
51 ms |
9092 KB |
Output is correct |
17 |
Correct |
56 ms |
9304 KB |
Output is correct |
18 |
Correct |
53 ms |
9264 KB |
Output is correct |
19 |
Correct |
32 ms |
6164 KB |
Output is correct |
20 |
Correct |
51 ms |
10196 KB |
Output is correct |
21 |
Correct |
56 ms |
10456 KB |
Output is correct |
22 |
Correct |
52 ms |
10684 KB |
Output is correct |
23 |
Correct |
75 ms |
10568 KB |
Output is correct |
# |
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 |
56 ms |
8436 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 |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 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 |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 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 |
15 ms |
4048 KB |
Output is correct |
10 |
Correct |
21 ms |
4944 KB |
Output is correct |
11 |
Correct |
24 ms |
4956 KB |
Output is correct |
12 |
Correct |
20 ms |
5204 KB |
Output is correct |
13 |
Correct |
19 ms |
5060 KB |
Output is correct |
14 |
Correct |
19 ms |
4568 KB |
Output is correct |
15 |
Correct |
55 ms |
9152 KB |
Output is correct |
16 |
Correct |
51 ms |
9092 KB |
Output is correct |
17 |
Correct |
56 ms |
9304 KB |
Output is correct |
18 |
Correct |
53 ms |
9264 KB |
Output is correct |
19 |
Incorrect |
56 ms |
8436 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 |
- |