제출 #399602

#제출 시각아이디문제언어결과실행 시간메모리
399602luisgalan슈퍼트리 잇기 (IOI20_supertrees)C++14
11 / 100
234 ms24000 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)); if (n == 1) { build(result); return 1; } 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...