| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 150620 | お前はもう死んでいる (#200) | 로카히아 유적 (FXCUP4_lokahia) | C++17 | 9 ms | 848 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "lokahia.h"
#include <bits/stdc++.h>
using namespace std;
int FindBase(int N){
vector<vector<int> > s, t, de;
vector<int> la;
for(int i = 0; i < N; i++)
s.push_back({i});
while(s.size() > 1){
for(int i = 1; i < s.size(); i += 2){
if(CollectRelics(s[i - 1][0], s[i][0]) == -1){
de.push_back(s[i - 1]);
de.push_back(s[i]);
} else {
for(int& x : s[i - 1])
s[i].push_back(x);
t.push_back(s[i]);
}
}
if(s.size() & 1){
de.push_back(s.back());
la = s.back();
}
swap(s, t);
t.clear();
}
if(s.empty()) s.push_back(la);
if(s[0].empty()) return -1;
int res = 0;
int root = s[0][0];
int sz = 1;
for(int i = 0; i < N; i++){
if(root == i) continue;
int rrr = CollectRelics(root, i);
if(rrr != -1){
res = max(rrr, res);
sz++;
}
}
if(sz > N / 2) return res;
return -1;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
