Submission #399600

#TimeUsernameProblemLanguageResultExecution timeMemory
399600luisgalanConnecting Supertrees (IOI20_supertrees)C++14
0 / 100
1 ms332 KiB
#include "supertrees.h" #include <bits/stdc++.h> using namespace std; const int MAX_N = 1e3 + 3; int construct(std::vector<std::vector<int>> p) { int n = p.size(); vector<vector<int>> result(n); fill(result.begin(), result.end(), vector<int>(n)); result[0][1] = 1; result[n-1][n-2] = 1; for (int i = 1; i < n-1; i++) { result[i][i-1] = 1; result[i][i+1] = 1; } build(result); return 1; } // subtask 1 // answer is always a spanning tree // or just a path lol // just connect adjacent nodes
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...