# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
16204 | mindol | Cave (IOI13_cave) | C++98 | 7 ms | 512 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cave.h"
int door[5001],a[5001];
bool ans[5001]; int where[5001];
void exploreCave(int N) {
for(int i=0;i<N;i++)
{
int s=0,e=N-1;
for(int j=0;j<N;j++)
if(ans[j]==0) a[j]=0;
int res=tryCombination(a);
if(res!=i)
{
for(int j=0;j<N;j++)
if(ans[j]==0) a[j]=1;
}
while(s<=e)
{
int mid=(s+e)/2;
for(int j=s;j<=mid;j++)
if(ans[j]==0) a[j]=!a[j];
int res=tryCombination(a);
if(res==i) // 뒷쪽에 있음
{
for(int j=s;j<=mid;j++)
if(ans[j]==0) a[j]=!a[j];
# | 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... |