Submission #1064483

#TimeUsernameProblemLanguageResultExecution timeMemory
1064483goduadzesabaEaster Eggs (info1cup17_eastereggs)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "grader.h" #include "grader.cpp" using namespace std; int n,l,r,md; vector <int> g[1000],a,b; void dfs (int i,int p){ a.push_back(i); for (int j:g[i]){ if (j==p) continue; dfs(j,i); } } int findEgg (int N, vector < pair < int, int > > bridges){ n=N; for (auto i:bridges){ g[i.first].push_back(i.second); g[i.second].push_back(i.first); } dfs(1,0); l=0; r=n-1; while (l<r){ md=(l+r)/2; b.clear(); for (int i=0; i<=md; i++) b.push_back(a[i]); if (query(b)) r=md; else l=md+1; } return a[l]; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccVB1xHz.o: in function `query(std::vector<int, std::allocator<int> >)':
grader.cpp:(.text+0x0): multiple definition of `query(std::vector<int, std::allocator<int> >)'; /tmp/ccVwrQEz.o:eastereggs.cpp:(.text+0x50): first defined here
/usr/bin/ld: /tmp/ccVB1xHz.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccVwrQEz.o:eastereggs.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status