Submission #938352

#TimeUsernameProblemLanguageResultExecution timeMemory
938352Sir_Ahmed_ImranCop and Robber (BOI14_coprobber)C++17
Compilation error
0 ms0 KiB
///~~~LOTA~~~/// #include "coprobber.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define append push_back #define add insert #define nl "\n" #define ff first #define ss second #define pii pair<int,int> #define all(x) (x).begin(),(x).end() #define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL) #define MAXN 501 int r; int dept[MAXN]; vector<int> a[MAXN]; void dfs(int v){ for(auto& i:a[v]){ if(dept[i]) r=max(r,dept[v]-dept[i]); else{ dept[i]=dept[v]+1; dfs(i); } } } int start(int n,bool g[MAXN][MAXN]){ for(int i=0;i<n;i++) for(int j=r=0;j<n;j++) if(g[i][j]) a[i].append(j); dept[0]=1; dfs(0); if(r>3) return -1; return 0; } int nextMove(int v){ return -1; }

Compilation message (stderr)

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