Submission #309421

#TimeUsernameProblemLanguageResultExecution timeMemory
309421jam_xd_Connecting Supertrees (IOI20_supertrees)C++17
Compilation error
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; }

Compilation message (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> >