제출 #1221084

#제출 시각아이디문제언어결과실행 시간메모리
1221084hmms127슈퍼트리 잇기 (IOI20_supertrees)C++20
컴파일 에러
0 ms0 KiB
#include "supertrees.h" #include <vector> using namespace std; int construct(std::vector<std::vector<int>> p) { vector<vector<int>>v(n+1,vector<int>(n+1,0)); for(int i=1;i<n;i++){ v[i][i+1]=1; } build(v); return 1; }

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

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:7:26: error: 'n' was not declared in this scope
    7 |     vector<vector<int>>v(n+1,vector<int>(n+1,0));
      |                          ^