| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1025551 | dozer | 동굴 (IOI13_cave) | C++14 | 473 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
#define sp " "
#define endl "\n"
#define pb push_back
#define pii pair<int,int>
#define st first
#define nd second
#define fileio() freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define fastio() cin.tie(0), ios_base::sync_with_stdio(0)
#define LL node * 2
#define RR node * 2 + 1
#define mid (l + r) / 2
#define ll long long
#define MAXN 200005
#define LOGN 12
void exploreCave(int N) {
int done[N], curr[N];
for (int i = 0; i < N; i++)
done[i] = -1, curr[i] = 0;
auto question = [&](int x, int val){
int tmpx = x;
int lst = -1;
for (int i = 0; i < N; i++){
if (x > 0 && done[i] == -1) curr[i] = val, x--, lst = i;
else if (done[i] == -1) curr[i] = 1 - val;
}
int res = tryCombination(curr);
return res;
};
for (int i = 0; i < N; i++){
int val = 0;
int gh = question(0, 1);
if (gh >= i + 1 || gh == -1){
val = 1;
}
int pos = 0;
for (int j = LOGN; j >= 0; j--){
int tmp = pos + (1<<j);
int t = question(tmp, val);
// cout<<i<<sp<<val<<sp<<tmp<<sp<<t<<endl;
if (t >= i + 1 || t == -1) pos = tmp;
}
pos++;
int lst = 0;
for (int i = 0; i < N; i++){
if (done[i] == -1 && pos > 0) lst = i, pos--;
}
done[lst] = i;
curr[lst] = 1 - val;
}
answer(curr, done);
}컴파일 시 표준 에러 (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... | ||||
