#include <bits/stdc++.h>
#include "grader.h"
#define For(i,a,b) for (int i = a; i <= (b); i++)
#define For2(i,a,b) for (int i = a; i >= (b); i--)
#define pii pair<int, int>
#define pb push_back
#define PI 3.1415926535897932384626433832795
#define MOD 1000000007
#define INF 2147483647
#define EPS 1e-9
#define fi first
#define se second
//f#define FILEOPEN
using namespace std;
vector<int> path[515];
vector<int> passed;
void dfs(int u, int prev) {
passed.pb(u);
for (int v: path[u]) {
if (v == prev) continue;
dfs(v, u);
}
}
int findEgg(int n, vector<pii> bridges) {
For(i,1,n) path[i].clear();
for (pii a: bridges) {
path[a.fi].pb(a.se);
path[a.se].pb(a.fi);
}
passed.clear(); passed.pb(0);
dfs(1, 1);
int l = 1, r = n;
while (l < r) {
int mid = (l + r) / 2;
vector<int> a;
For(i,1,mid) a.pb(passed[i]);
if (query(a)) r = mid;
else l = mid + 1;
}
return passed[l];
}
signed main() {
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#ifdef FILEOPEN
freopen("input.in", "r", stdin);
freopen("output.out", "w", stdout);
#endif
}
Compilation message
/tmp/ccbT5VaM.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc5EeqK8.o:eastereggs.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status