답안 #676693

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
676693 2022-12-31T17:53:36 Z LucaLucaM Easter Eggs (info1cup17_eastereggs) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "header.h"

using namespace std;
vector<int>v[513];
vector<int>order;
void dfs (int x, int par)
{
    order.push_back(x);
    for (int i : v[x])
    {
        if (i == par)
            continue;
        dfs(i, x);
    }
}

int findEgg(int N, vector < pair < int, int > > bridges)
{
    for (pair<int, int>p : bridges)
    {
        v[p.first].push_back(p.second);
        v[p.second].push_back(p.first);
    }

    dfs(1, -1);

    int l=1, r=N;
    while (l < r)
    {
        int mid = (l + r) / 2;

        vector<int>curr;
        for (int i=0; i<mid; i++)
            curr.push_back(order[i]);

        if (query(curr))
            r = mid;
        else
            l = mid + 1;
    }

    return order[r-1];
}

Compilation message

eastereggs.cpp:2:10: fatal error: header.h: No such file or directory
    2 | #include "header.h"
      |          ^~~~~~~~~~
compilation terminated.