Submission #309422

#TimeUsernameProblemLanguageResultExecution timeMemory
309422jam_xd_Connecting Supertrees (IOI20_supertrees)C++17
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" #include "supertrees.h" using namespace std; int construct (vector<vector<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: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:7:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |     for(int i=0;i<p.size();i++){
      |                 ~^~~~~~~~~
supertrees.cpp:9:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |         for(int j=0;j<p.size();j++){
      |                     ~^~~~~~~~~
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> >