#include "swap.h"
//#include "grader.cpp"
#include<bits/stdc++.h>
using namespace std;
const int mx=2e5+10;
typedef long long ll;
int inf=1e9+10;
const int mod=1e9+7;
vector<int>adj[mx];
int ans=-1;
void init(int n, int M,std::vector<int> U, std::vector<int> V, std::vector<int> W) {
for(int i=0;i<M;i++){
adj[U[i]].push_back(V[i]);
adj[V[i]].push_back(U[i]);
}
for(auto it:W){
ans=max(ans,it);
}
for(int i=0;i<n;i++){
if(adj[i].size()!=2){
ans=-1;
}
}
}
int getMinimumFuelCapacity(int X, int Y) {
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
4940 KB |
Output is correct |
3 |
Correct |
3 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
5 ms |
5000 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
5 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
57 ms |
9312 KB |
Output is correct |
10 |
Correct |
53 ms |
10332 KB |
Output is correct |
11 |
Correct |
70 ms |
10208 KB |
Output is correct |
12 |
Correct |
56 ms |
10560 KB |
Output is correct |
13 |
Correct |
84 ms |
10524 KB |
Output is correct |
14 |
Correct |
63 ms |
9516 KB |
Output is correct |
15 |
Correct |
119 ms |
12200 KB |
Output is correct |
16 |
Correct |
112 ms |
12040 KB |
Output is correct |
17 |
Correct |
148 ms |
12432 KB |
Output is correct |
18 |
Correct |
122 ms |
12448 KB |
Output is correct |
19 |
Correct |
66 ms |
9420 KB |
Output is correct |
20 |
Correct |
115 ms |
14376 KB |
Output is correct |
21 |
Correct |
120 ms |
14556 KB |
Output is correct |
22 |
Correct |
122 ms |
15028 KB |
Output is correct |
23 |
Correct |
161 ms |
15020 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
4940 KB |
Output is correct |
3 |
Incorrect |
105 ms |
12380 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
4940 KB |
Output is correct |
3 |
Correct |
3 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
5 ms |
5000 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
5 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Incorrect |
3 ms |
4940 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4940 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
4940 KB |
Output is correct |
2 |
Correct |
4 ms |
4940 KB |
Output is correct |
3 |
Correct |
3 ms |
4940 KB |
Output is correct |
4 |
Correct |
3 ms |
4940 KB |
Output is correct |
5 |
Correct |
5 ms |
5000 KB |
Output is correct |
6 |
Correct |
4 ms |
4940 KB |
Output is correct |
7 |
Correct |
5 ms |
4940 KB |
Output is correct |
8 |
Correct |
4 ms |
4940 KB |
Output is correct |
9 |
Correct |
57 ms |
9312 KB |
Output is correct |
10 |
Correct |
53 ms |
10332 KB |
Output is correct |
11 |
Correct |
70 ms |
10208 KB |
Output is correct |
12 |
Correct |
56 ms |
10560 KB |
Output is correct |
13 |
Correct |
84 ms |
10524 KB |
Output is correct |
14 |
Correct |
63 ms |
9516 KB |
Output is correct |
15 |
Correct |
119 ms |
12200 KB |
Output is correct |
16 |
Correct |
112 ms |
12040 KB |
Output is correct |
17 |
Correct |
148 ms |
12432 KB |
Output is correct |
18 |
Correct |
122 ms |
12448 KB |
Output is correct |
19 |
Incorrect |
105 ms |
12380 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4940 KB |
Output isn't correct |