Submission #1117258

#TimeUsernameProblemLanguageResultExecution timeMemory
1117258I_FloPPed21Connecting Supertrees (IOI20_supertrees)C++14
Compilation error
0 ms0 KiB
#include "supertrees.h" #include <iostream> #include <vector> using namespace std; const int N=1001; int n,b[N][N],componente[N],cnt,root[N],modes[N][N]; bool viz[N]; void fa_dfs(int i) { viz[i]=true; componente[i]=cnt; for(int j=0; j<n; j++) { if(viz[j]==true) continue; if(modes[i][j]==1) { fa_dfs(j); } } } int construct(vector<vector<int>>p) { n=p.size(); for(int i=0; i<n; i++) for(int j=0; j<n; j++) modes[i][j]=p[i][j]; for(int i=0; i<n; i++) { if(viz[i]==false) { cnt++; viz[i]=true; componente[i]=cnt; fa_dfs(i); } } build(b); return 1; } int main() { cout << "Hello world!" << endl; return 0; }

Compilation message (stderr)

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:40:11: error: could not convert '(int (*)[1001])(& b)' from 'int (*)[1001]' to 'std::vector<std::vector<int> >'
   40 |     build(b);
      |           ^
      |           |
      |           int (*)[1001]