# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
962657 | simona1230 | Cave (IOI13_cave) | C++17 | 94 ms | 520 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 <bits/stdc++.h>
#include "cave.h"
using namespace std;
int n;
int c[5000],d[5000];
int p[5000],l[5000];
int used[5000];
void exploreCave(int N)
{
n=N;
int x=tryCombination(l);
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
p[j]=c[j];
int l=1,r=n-i;
while(l!=r)
{
int m=(l+r)/2;
int cnt=0;
for(int j=0;j<n;j++)
{
if(!used[j])
{
cnt++;
p[j]=1;
}
}
int y=tryCombination(p);
if(x==i&&x!=y||x>i&&x==y)
{
r=m;
}
else
{
l=m+1;
}
}
d[i]=l;
c[i]=p[i];
x=tryCombination(c);
}
for(int i=0;i<n;i++)
c[i]=1^c[i];
answer(c,d);
}
Compilation message (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... |