Submission #314030

#TimeUsernameProblemLanguageResultExecution timeMemory
314030linear00000Connecting Supertrees (IOI20_supertrees)C++14
Compilation error
0 ms0 KiB
#include "supertrees.h" #include <bits/stdc++.h> int construct(vector<vector<int> > v) { int n = v.size(); int d[n][n]; for (int i=0; i<n; i++) { d[0][i] = 1, d[i][0] = 1; } return d; }

Compilation message (stderr)

supertrees.cpp:4:15: error: 'int construct' redeclared as different kind of entity
    4 | int construct(vector<vector<int> > v) {
      |               ^~~~~~
In file included from supertrees.cpp:1:
supertrees.h:3:5: note: previous declaration 'int construct(std::vector<std::vector<int> >)'
    3 | int construct(std::vector<std::vector<int>> p);
      |     ^~~~~~~~~
supertrees.cpp:4:15: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
    4 | int construct(vector<vector<int> > v) {
      |               ^~~~~~
      |               std::vector
In file included from /usr/include/c++/9/vector:67,
                 from supertrees.h:1,
                 from supertrees.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector' declared here
  386 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
supertrees.cpp:4:22: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
    4 | int construct(vector<vector<int> > v) {
      |                      ^~~~~~
      |                      std::vector
In file included from /usr/include/c++/9/vector:67,
                 from supertrees.h:1,
                 from supertrees.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: 'std::vector' declared here
  386 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
supertrees.cpp:4:29: error: expected primary-expression before 'int'
    4 | int construct(vector<vector<int> > v) {
      |                             ^~~