제출 #309421

#제출 시각아이디문제언어결과실행 시간메모리
309421jam_xd_슈퍼트리 잇기 (IOI20_supertrees)C++17
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h" #include "supertrees.h" using namespace std; int construct (int [][] p){ deque<vector<int> >resp; for(int i=0;i<p.size();i++){ deque<int>jaja; for(int j=0;j<p.size();j++){ if(i == 0 and j != 0) jaja.push_back(1); else if(i != 0 and j == 0) jaja.push_back(1); else if(i == 0 and j == 0)jaja.push_back(0); } resp.push_back(row); } build(resp); return 1; }

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

supertrees.cpp:5:23: error: multidimensional array must have bounds for all dimensions except the first
    5 | int construct (int [][] p){
      |                       ^
supertrees.cpp:5:25: error: expected ',' or '...' before 'p'
    5 | int construct (int [][] p){
      |                         ^
supertrees.cpp: In function 'int construct()':
supertrees.cpp:7:19: error: 'p' was not declared in this scope
    7 |     for(int i=0;i<p.size();i++){
      |                   ^
supertrees.cpp:14:24: error: 'row' was not declared in this scope; did you mean 'pow'?
   14 |         resp.push_back(row);
      |                        ^~~
      |                        pow
supertrees.cpp:17:11: error: could not convert 'resp' from 'std::deque<std::vector<int> >' to 'std::vector<std::vector<int> >'
   17 |     build(resp);
      |           ^~~~
      |           |
      |           std::deque<std::vector<int> >