#include "swap.h"
#include <bits/stdc++.h>
using namespace std;
int maxx=0;
int n,m,x,y;
vector<int> v[100001],w[100001],num[100001];
struct edge
{
int x,d;
edge(){}
edge(int _x,int _d)
{
x=_x;
d=_d;
}
bool operator<(const edge&e)const
{
return e.d<d;
}
};
bool sec=1;
void init(int N, int M,std::vector<int> U, std::vector<int> V, std::vector<int> W)
{
n=N;
m=M;
for(int i=0;i<m;i++)
{
if(U[i]!=0)sec=0;
v[U[i]].push_back(V[i]);
v[V[i]].push_back(U[i]);
w[U[i]].push_back(W[i]);
w[V[i]].push_back(W[i]);
num[U[i]].push_back(i);
num[V[i]].push_back(i);
maxx=max(maxx,(int)v[U[i]].size());
maxx=max(maxx,(int)v[V[i]].size());
}
}
int getMinimumFuelCapacity(int X, int Y)
{
x=X;
y=Y;
if(maxx<=2)
return -1;
}
Compilation message
swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:50:1: warning: control reaches end of non-void function [-Wreturn-type]
50 | }
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
7256 KB |
Output is correct |
2 |
Correct |
3 ms |
7268 KB |
Output is correct |
3 |
Correct |
2 ms |
7332 KB |
Output is correct |
4 |
Correct |
2 ms |
7516 KB |
Output is correct |
5 |
Correct |
2 ms |
7516 KB |
Output is correct |
6 |
Correct |
3 ms |
7516 KB |
Output is correct |
7 |
Correct |
2 ms |
7492 KB |
Output is correct |
8 |
Correct |
3 ms |
7516 KB |
Output is correct |
9 |
Correct |
54 ms |
18256 KB |
Output is correct |
10 |
Correct |
57 ms |
20692 KB |
Output is correct |
11 |
Correct |
59 ms |
20564 KB |
Output is correct |
12 |
Correct |
64 ms |
21244 KB |
Output is correct |
13 |
Correct |
65 ms |
21328 KB |
Output is correct |
14 |
Correct |
51 ms |
18516 KB |
Output is correct |
15 |
Correct |
113 ms |
24804 KB |
Output is correct |
16 |
Correct |
104 ms |
24580 KB |
Output is correct |
17 |
Correct |
103 ms |
25292 KB |
Output is correct |
18 |
Correct |
131 ms |
25388 KB |
Output is correct |
19 |
Incorrect |
51 ms |
13652 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
7256 KB |
Output is correct |
2 |
Correct |
3 ms |
7268 KB |
Output is correct |
3 |
Incorrect |
84 ms |
25100 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
7256 KB |
Output is correct |
2 |
Correct |
3 ms |
7268 KB |
Output is correct |
3 |
Correct |
2 ms |
7332 KB |
Output is correct |
4 |
Correct |
2 ms |
7516 KB |
Output is correct |
5 |
Correct |
2 ms |
7516 KB |
Output is correct |
6 |
Correct |
3 ms |
7516 KB |
Output is correct |
7 |
Correct |
2 ms |
7492 KB |
Output is correct |
8 |
Correct |
3 ms |
7516 KB |
Output is correct |
9 |
Incorrect |
2 ms |
7260 KB |
Output isn't correct |
10 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
7260 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
7256 KB |
Output is correct |
2 |
Correct |
3 ms |
7268 KB |
Output is correct |
3 |
Correct |
2 ms |
7332 KB |
Output is correct |
4 |
Correct |
2 ms |
7516 KB |
Output is correct |
5 |
Correct |
2 ms |
7516 KB |
Output is correct |
6 |
Correct |
3 ms |
7516 KB |
Output is correct |
7 |
Correct |
2 ms |
7492 KB |
Output is correct |
8 |
Correct |
3 ms |
7516 KB |
Output is correct |
9 |
Correct |
54 ms |
18256 KB |
Output is correct |
10 |
Correct |
57 ms |
20692 KB |
Output is correct |
11 |
Correct |
59 ms |
20564 KB |
Output is correct |
12 |
Correct |
64 ms |
21244 KB |
Output is correct |
13 |
Correct |
65 ms |
21328 KB |
Output is correct |
14 |
Correct |
51 ms |
18516 KB |
Output is correct |
15 |
Correct |
113 ms |
24804 KB |
Output is correct |
16 |
Correct |
104 ms |
24580 KB |
Output is correct |
17 |
Correct |
103 ms |
25292 KB |
Output is correct |
18 |
Correct |
131 ms |
25388 KB |
Output is correct |
19 |
Incorrect |
84 ms |
25100 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
7260 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |