# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
902877 | ByeWorld | 슈퍼트리 잇기 (IOI20_supertrees) | C++14 | 163 ms | 24164 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "supertrees.h"
#include <bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define pb push_back
#define lb lower_bound
using namespace std;
const int MAXN = 1e3+10;
const double SMALL = 1e-6;
typedef pair<int,int> pii;
typedef pair<pii,int> ipii;
int n;
bool tag[MAXN], done[MAXN];
vector <vector<int>> adj;
void bd(int x, int y){
adj[x][y] = 1; adj[y][x] = 1;
}
int construct(vector<vector<int>> p) {
n = p.size();
vector <int> te(n);
for(int i=0; i<n; i++) adj.pb(te);
for(int i = 0; i < n; i++) {
if(done[i]) continue;
for(int x=0; x<n; x++) tag[x] = 0;
vector <int> vec; vec.pb(i); tag[i] = 1;
for(int j=i+1; j < n; j++){
if(p[i][j] == 1){
vec.pb(j); tag[j] = 1;
}
}
//for(auto in : vec) cout << in << "pp\n";
for(auto in : vec){
//cout << in << " in\n";
done[in] = 1;
for(int x=0; x<n; x++){
if(tag[x] && p[in][x] != 1) return 0; //harusnya 1
if(!tag[x] && p[in][x] == 1) return 0;
}
}
for(int i=0; i+1<vec.size(); i++){ // build
bd(vec[i], vec[i+1]);
}
}
for(int i=0; i<n; i++) adj[i][i] = 0;
build(adj);
return 1;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |