Submission #918171

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

Compilation message (stderr)

/usr/bin/ld: /tmp/cc43CDBS.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/ccVpblbU.o:eastereggs.cpp:(.text+0x0): first defined here
/usr/bin/ld: /tmp/cc43CDBS.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccVpblbU.o:eastereggs.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status