#include "bits/stdc++.h"
using namespace std;
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define wr puts("----------------")
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
const int MOD = 1e9+7;
const int INF = 1e9;
const int N = 2e5+5;
vector<pii> adj[N];
int mn = INF, mx = 0;
int deg[N];
void init(int n, int m, vector<int> u, vector<int> v, vector<int> w){
for(int i = 0; i < m; ++i){
adj[u[i]].pb({v[i], w[i]});
adj[v[i]].pb({u[i], w[i]});
umax(mx, w[i]);
deg[u[i]]++, deg[v[i]]++;
}
for(int i = 0; i < n; ++i)
umin(mn, deg[i]);
}
getMinimumFuelCapacity(int x, int y){
if(mn == 1)
return -1;
else
return mx; // you need to traverse all edges on cycle
}
Compilation message
swap.cpp:30:1: error: ISO C++ forbids declaration of 'getMinimumFuelCapacity' with no type [-fpermissive]
30 | getMinimumFuelCapacity(int x, int y){
| ^~~~~~~~~~~~~~~~~~~~~~