Submission #677290

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6772902023-01-02 17:56:54TruitadepatatesCop and Robber (BOI14_coprobber)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
//subtask 1
vector<vector<int>> adj(501, vector<int>(501));
vector<int> p(501);
int cop = 0;
void dfs(int actual, int anterior){
p[actual] = anterior;
for (auto it: adj[actual]){
if (it != anterior){
dfs(it, actual);
}
}
}
int start(int n, bool a[501][501]){
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++){
if (a[i][j] == 1){
adj[i].push_back(j);
adj[j].push_back(i);
}
}
}
dfs(0, -1);
return 0;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

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