제출 #314028

#제출 시각아이디문제언어결과실행 시간메모리
314028linear00000슈퍼트리 잇기 (IOI20_supertrees)C++14
컴파일 에러
0 ms0 KiB
#include "supertrees.h" #include <bits/stdc++.h> int construct(vector<vector<int> > v) { int n = v.size(); int ans[n][n]; for (int i=0; i<n; i++) { d[0][i] = 1, d[i][0] = 1; } return ans; }

컴파일 시 표준 에러 (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) {
      |                             ^~~