Submission #961627

#TimeUsernameProblemLanguageResultExecution timeMemory
961627Gr1senConnecting Supertrees (IOI20_supertrees)C++17
11 / 100
150 ms24144 KiB
#include"supertrees.h" #include<iostream> #include<vector> #include<algorithm> #include<iomanip> using namespace std; #define vi vector<int> #define vvi vector<vi> vi L; int construct(std::vector<std::vector<int>> p) { int n = p.size(); vvi Adj(n, vi(n, 0)); L.clear(); for (int i = 0; i < n; i++) { bool q = 0; for (auto j : L) { if (p[i][j]) {Adj[i][j] = 1; Adj[j][i] = 1; q = 1; break;} } if (!q) L.push_back(i); } build(Adj); return 1; }
#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...