#include<bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
using namespace std;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int>vi;
typedef vector<vector<int>>vvi;
typedef vector<ll>vl;
typedef vector<vl> vvl;
typedef pair<int,int>pi;
typedef pair<ll,ll> pl;
typedef vector<pl> vpl;
typedef vector<ld> vld;
typedef pair<ld,ld> pld;
//typedef tree<ll, null_type, less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
template<typename T> ostream& operator<<(ostream& os, vector<T>& a){os<<"[";for(int i=0; i<ll(a.size()); i++){os << a[i] << ((i!=ll(a.size()-1)?" ":""));}os << "]\n"; return os;}
#define all(x) x.begin(),x.end()
#define YES out("YES")
#define NO out("NO")
#define out(x){cout << x << "\n"; return;}
#define GLHF ios_base::sync_with_stdio(false); cin.tie(NULL)
#define print(x){for(auto ait:x) cout << ait << " "; cout << "\n";}
#define pb push_back
#define umap unordered_map
vvi dp,g;
umap<int,umap<int,int>>c;
int go(int i,int j){
if(dp[i][j]!=1e9)return dp[i][j];
if(g[i].size()==1 && g[j].size()==1 && g[i][0]==j)
return 1e9;
}
void init(int N, int M,vi U, vi V, vi W) {
return;
g.resize(N);
for(int i=0; i<M;i++){
g[U[i]].pb(V[i]);
g[V[i]].pb(U[i]);
c[U[i]][V[i]]=c[V[i]][U[i]]=W[i];
}
dp.resize(N,vi(N,1e9));
}
int getMinimumFuelCapacity(int x, int y) {
return -1;
}
Compilation message
swap.cpp: In function 'int go(int, int)':
swap.cpp:40:1: warning: control reaches end of non-void function [-Wreturn-type]
40 | }
| ^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
2 ms |
332 KB |
Output is correct |
6 |
Correct |
2 ms |
204 KB |
Output is correct |
7 |
Correct |
2 ms |
384 KB |
Output is correct |
8 |
Correct |
2 ms |
332 KB |
Output is correct |
9 |
Correct |
34 ms |
3764 KB |
Output is correct |
10 |
Correct |
47 ms |
4476 KB |
Output is correct |
11 |
Correct |
51 ms |
4452 KB |
Output is correct |
12 |
Correct |
52 ms |
4652 KB |
Output is correct |
13 |
Correct |
53 ms |
4648 KB |
Output is correct |
14 |
Correct |
55 ms |
4144 KB |
Output is correct |
15 |
Correct |
117 ms |
8588 KB |
Output is correct |
16 |
Correct |
134 ms |
8492 KB |
Output is correct |
17 |
Correct |
115 ms |
8780 KB |
Output is correct |
18 |
Correct |
103 ms |
8792 KB |
Output is correct |
19 |
Incorrect |
60 ms |
4876 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
101 ms |
7900 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
2 ms |
332 KB |
Output is correct |
6 |
Correct |
2 ms |
204 KB |
Output is correct |
7 |
Correct |
2 ms |
384 KB |
Output is correct |
8 |
Correct |
2 ms |
332 KB |
Output is correct |
9 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
2 ms |
332 KB |
Output is correct |
6 |
Correct |
2 ms |
204 KB |
Output is correct |
7 |
Correct |
2 ms |
384 KB |
Output is correct |
8 |
Correct |
2 ms |
332 KB |
Output is correct |
9 |
Correct |
34 ms |
3764 KB |
Output is correct |
10 |
Correct |
47 ms |
4476 KB |
Output is correct |
11 |
Correct |
51 ms |
4452 KB |
Output is correct |
12 |
Correct |
52 ms |
4652 KB |
Output is correct |
13 |
Correct |
53 ms |
4648 KB |
Output is correct |
14 |
Correct |
55 ms |
4144 KB |
Output is correct |
15 |
Correct |
117 ms |
8588 KB |
Output is correct |
16 |
Correct |
134 ms |
8492 KB |
Output is correct |
17 |
Correct |
115 ms |
8780 KB |
Output is correct |
18 |
Correct |
103 ms |
8792 KB |
Output is correct |
19 |
Incorrect |
101 ms |
7900 KB |
Output isn't correct |
20 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |