Submission #314029

#TimeUsernameProblemLanguageResultExecution timeMemory
314029linear00000Connecting Supertrees (IOI20_supertrees)C++14
Compilation error
0 ms0 KiB
#include "supertrees.h" #include <bits/stdc++.h> using namespace std; int construct(vector<vector<int> > v) { int n = v.size(); int ans[n][n]; for (int i=0; i<n; i++) { d[0][i] = 1, d[i][0] = 1; } return ans; }

Compilation message (stderr)

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:10:3: error: 'd' was not declared in this scope
   10 |   d[0][i] = 1, d[i][0] = 1;
      |   ^
supertrees.cpp:12:9: error: invalid conversion from 'int (*)[n]' to 'int' [-fpermissive]
   12 |  return ans;
      |         ^~~
      |         |
      |         int (*)[n]