제출 #1299914

#제출 시각아이디문제언어결과실행 시간메모리
1299914opeleklanosConnecting Supertrees (IOI20_supertrees)C++20
컴파일 에러
0 ms0 KiB
#include <iostream> #include <vector> using namespace std; int construct(vector<vector<int>> p){ vector<vector<int>> ans; int n = p.size(); ans.assign(n, vector<int>(n, 0)); for(int i = 0; i<n; i++){ if(i<n-1) ans[i][i+1] = 1; if(i>0) ans[i][i-1] = 1; } build(ans); }

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

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:13:5: error: 'build' was not declared in this scope
   13 |     build(ans);
      |     ^~~~~
supertrees.cpp:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^