Submission #145793

#TimeUsernameProblemLanguageResultExecution timeMemory
145793letrongdatCop and Robber (BOI14_coprobber)C++17
Compilation error
0 ms0 KiB
//#include "coprobber.h" #include <bits/stdc++.h> const int maxN = 510; using namespace std; #define forn(i, a, b) for(int i=a; i<=b; ++i) #define repn(i, a, b) for(int i=a; i <b; ++i) int cur; int mov[maxN][maxN], deg[maxN][maxN]; int W[maxN][maxN][2]; int start(int N, bool A[maxN][maxN]) { queue < tuple < int, int, int > > q; repn(i, 0, N) repn(j, 0, N) repn(k, 0, N) deg[i][j] += A[j][k]; repn(i, 0, N) forn(turn, 0, 1) { W[i][i][turn] = 1; q.push({i, i, turn}); } while (q.size()) { int c, r, t; tie(c, r, t) = q.front(); q.pop(); repn(i, 0, N) { if (t) { if ( (A[c][i] || i == c) && !W[i][r][0]) { mov[i][r] = c; W[i][r][0] = true; q.push({i, r, 0}); } continue; } if (A[r][i] && !W[c][i][1] && --deg[c][i] < 1) { W[c][i][1] = true; q.push({c, i, 1}); } } } repn(i, 0 ,N) { int ok = 1; repn(j, 0, N) ok &= W[i][j][0]; if (ok) return cur = i; } return -1; } int nextMove(int R) { return cur = mov[cur][R]; }

Compilation message (stderr)

/tmp/ccl9cshr.o: In function `main':
grader.cpp:(.text.startup+0x13c): undefined reference to `start(int, bool (*) [500])'
collect2: error: ld returned 1 exit status