| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1299914 | opeleklanos | Connecting Supertrees (IOI20_supertrees) | C++20 | 0 ms | 0 KiB |
#include <iostream>
#include <vector>
using namespace std;
int construct(vector<vector<int>> p){
vector<vector<int>> ans;
int n = p.size();
ans.assign(n, vector<int>(n, 0));
for(int i = 0; i<n; i++){
if(i<n-1) ans[i][i+1] = 1;
if(i>0) ans[i][i-1] = 1;
}
build(ans);
}
