답안 #836431

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
836431 2023-08-24T11:10:17 Z Trumling 디지털 회로 (IOI22_circuit) C++17
컴파일 오류
0 ms 0 KB
#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.