Submission #720109

#TimeUsernameProblemLanguageResultExecution timeMemory
720109mseebacherConnecting Supertrees (IOI20_supertrees)C++17
Compilation error
0 ms0 KiB
#include "supertrees.h" #include <bits/stdc++.h> using namespace std; int construct(std::vector<std::vector<int>> p) { int n = p.size(); vector<vector<int> ans(n,vector<int>(n,0)); for(int i = 0;i<n-1;i++){ ans[i][i+1] = 1; ans[i+1][i] = 1; } build(ans); return 1; }

Compilation message (stderr)

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:8:43: error: template argument 1 is invalid
    8 |  vector<vector<int> ans(n,vector<int>(n,0));
      |                                           ^
supertrees.cpp:8:43: error: template argument 2 is invalid
supertrees.cpp:10:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   ans[i][i+1] = 1;
      |   ^~~
      |   abs
supertrees.cpp:13:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |  build(ans);
      |        ^~~
      |        abs