| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 705998 | Nonoze | 동굴 (IOI13_cave) | C++14 | 627 ms | 408 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cave.h"
#include <bits/stdc++.h>
void exploreCave(int N) {
int S[N], D[N];
for (int i = 0; i < N; ++i)
{
S[i]=0, D[i]=0;
}
for (int i = 0; i < N; ++i)
{
int *s_new=S;
int remplacer=1;
if (tryCombination(S)>i)
{
for (int j = 0; j < N; ++j)
{
if (D[j]==-1)
{
s_new[i]=1;
}
}
remplacer=0;
}
int l=0, r=N;
while(l<r) {
int mid=(l+r)/2;
for (int j = 0; j < mid; ++j)
{
if (D[j]==-1)
{
s_new[i]=remplacer;
}
}
if (tryCombination(s_new)>i) {
r=mid+1;
}
else {
l=mid;
}
s_new=S;
}
S[l]=remplacer;
S[l]=i;
}
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... | ||||
