#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.