제출 #1015983

#제출 시각아이디문제언어결과실행 시간메모리
1015983deera슈퍼트리 잇기 (IOI20_supertrees)C++14
11 / 100
110 ms24056 KiB
#include <bits/stdc++.h> #include "supertrees.h" using namespace std; int construct(vector<vector<int>> p) { int n = p.size(); vector<int> dist = {0, 0, 0, 0}; for(int i=0;i<n;i++) for(int j=0;j<n;j++) dist[p[i][j]]++; // subtask 1 if (dist[1] == n*n) { vector<vector<int>> r(n, vector<int>(n)); for(int i=0;i<n-1;i++) { r[i][(i+1)%n] = 1; r[(i+1)%n][i] = 1; } build(r); return 1; } return 0; }
#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...