# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1207769 | tamzid | Connecting Supertrees (IOI20_supertrees) | C++20 | 0 ms | 0 KiB |
#include "supertrees.h"
#include <vector>
using namespace std;
int construct(std::vector<std::vector<int>> p) {
int n = p.size();
if(n == 1)
{
build({0});
return 1;
}
vector<vector<int>> a(n,vector<int>(n,0));
for(int i=0;i<n;++i)
{
a[i][0] = 1;
a[0][i] = 1;
}
build(a);
return 1;
}