#include "islands.h"
#include <variant>
#include <vector>
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define all(x) x.begin(),x.end()
typedef long long ll;
#define pb push_back
#define INF 9999999999999999
vector<vector<pair<int,int>>>g;
vector<pair<int,int>> vis;
ll last=-1;
void dfs(int start)
{
for(auto x:g[start])
{
if(vis[x.F].F==-1)
{
vis[x.F]={start,x.S};
dfs(x.F);
continue;
}
if((x.F==vis[start].F && x.S!=vis[start].S) || x.F!=vis[start].F)
{
last=start;
break;
}
}
return ;
}
variant<bool, vector<int> > find_journey(int N, int M, vector<int> U, vector<int> V)
{
g.assign(N,vector<pair<int,int>>());
for(int i=0;i<M;i+=2)
{
g[U[i]].pb({V[i],i});
g[V[i]].pb({U[i],i});
}
vis.assign(N,{-1,-1});
vis[0]={0,-1};
dfs(0);
if(last==-1)
return false;
vector<int>v={0};
return v;
}
Compilation message
circuit.cpp:1:10: fatal error: islands.h: No such file or directory
1 | #include "islands.h"
| ^~~~~~~~~~~
compilation terminated.