Submission #147824

#TimeUsernameProblemLanguageResultExecution timeMemory
147824imsifileBulb Game (FXCUP4_bulb)C++17
Compilation error
0 ms0 KiB
#include "bulb.h" using namespace std; int N, rule[303030]; vector<int> L, R; int dfs(int ix){ if(ix<0) return ix; if(rule[ix]==0) return dfs(L[ix]); return dfs(R[ix]); } int FindWinner(int N_, int T, std::vector<int> L_, std::vector<int> R_){ N=N_, L=L_, R=R_; for(int i=0; i<N; i++){ rule[i]^=1; int fl=1; for(int j=0; j<N; j++){ rule[j]^=1; int x=dfs(0); rule[j]^=1; if(x==-2){ fl=0; break; } } rule[i]^=1; if(fl) return 1; } return 0; }

Compilation message (stderr)

/tmp/ccy8Q5hz.o: In function `main':
grader.cpp:(.text.startup+0x159): undefined reference to `FindWinner(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status