제출 #302881

#제출 시각아이디문제언어결과실행 시간메모리
302881ivan24슈퍼트리 잇기 (IOI20_supertrees)C++14
컴파일 에러
0 ms0 KiB
#include "supertrees.h" #include <vector> using ll = int; typedef vector<ll> vi; typedef vector<vi> vvi; typedef pair<ll,ll> ii; typedef vector<ii> vii; typedef vector<vii> vvii; #define F first #define S second int construct(vvi p) { int n = p.size(); vvi ans(n,vi(n,0)); for (ll i = 0; n > i; i++){ ans[i][0] = ans[0][i] = 1; } build(ans); return 1; }

컴파일 시 표준 에러 (stderr) 메시지

supertrees.cpp:5:9: error: 'vector' does not name a type
    5 | typedef vector<ll> vi;
      |         ^~~~~~
supertrees.cpp:6:9: error: 'vector' does not name a type
    6 | typedef vector<vi> vvi;
      |         ^~~~~~
supertrees.cpp:7:9: error: 'pair' does not name a type
    7 | typedef pair<ll,ll> ii;
      |         ^~~~
supertrees.cpp:8:9: error: 'vector' does not name a type
    8 | typedef vector<ii> vii;
      |         ^~~~~~
supertrees.cpp:9:9: error: 'vector' does not name a type
    9 | typedef vector<vii> vvii;
      |         ^~~~~~
supertrees.cpp:13:15: error: 'int construct' redeclared as different kind of entity
   13 | int construct(vvi p) {
      |               ^~~
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:13:15: error: 'vvi' was not declared in this scope
   13 | int construct(vvi p) {
      |               ^~~