Submission #1117259

#TimeUsernameProblemLanguageResultExecution timeMemory
1117259I_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; vector<vector<int>>b; int 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) { b[i][j]=1; b[j][i]=1; fa_dfs(j); } } } int construct(vector<vector<int>>p) { n=p.size(); b.resize(n); for(int i=0;i<n;i++) b[i].resize(n); 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)

/usr/bin/ld: /tmp/ccdXhUSX.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccw2VwDZ.o:supertrees.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status