| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1344800 | sdan | 동굴 (IOI13_cave) | C++20 | 31 ms | 500 KiB |
#include "cave.h"
#include<bits/stdc++.h>
using namespace std;
#define f first
#define s second
void exploreCave(int n) {
int s[n], d[n]; for(int i = 0; i < n; ++i) s[i] = 0, d[i] = -1;
int k = -1;
for(int i = 0; i < n; ++i) {
k = tryCombination(s);
if(k != i) for(int i = 0; i < n; ++i)
if(d[i] == -1) s[i] = s[i] ^ 1;
int l = 0, r = n;
while(l + 1 < r) {
int m = (l + r) / 2;
for(int i = l; i < m; ++i)
if(d[i] == -1) s[i] = s[i] ^ 1;
k = tryCombination(s);
if(k == i) l = m;
else {
for(int i = l; i < m; ++i)
if(d[i] == -1) s[i] = s[i] ^ 1;
r = m;
}
}
d[l] = i;
if(k == i) s[l] = s[l] ^ 1;
}
answer(s, d);
}| # | 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... | ||||
