제출 #447427

#제출 시각아이디문제언어결과실행 시간메모리
447427Nodir_Bobiev슈퍼트리 잇기 (IOI20_supertrees)C++17
0 / 100
1 ms204 KiB
#include "supertrees.h" #include <bits/stdc++.h> using namespace std ; int construct(std::vector<std::vector<int>> p) { int n = p.size(); vector <vector <int>> ans; for(int i = 0; i < n; i ++){ vector <int> row; row.resize(n); ans.push_back(row); } map <int, bool> us; for(int i = 0; i < n; i ++){ if( us[i] ) continue; for(int j = 0; j < n; j ++){ if( p[i][j] ){ if( us[j] ) return 0; us[j] = 1; ans[i][j] = ans[j][i] = 1; } } } build(ans); 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...