| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 308140 | daniel920712 | 동굴 (IOI13_cave) | C++14 | 433 ms | 1016 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cave.h"
#include <set>
#include <vector>
#include <stdio.h>
using namespace std;
set < int > all;
vector < int > how;
int have[5005]={0};
int ans[5005];
void F(int l,int r,int here,int what)
{
int t,x,y,t2,i;
if(l==r)
{
have[how[l]]=0;
t=tryCombination(have);
if(t==here) have[how[l]]=1;
else have[how[l]]=0;
ans[how[l]]=here;
all.erase(how[l]);
return;
}
x=(l+r)/2;
for(i=l;i<=x;i++) have[how[i]]=1-have[how[i]];
t=tryCombination(have);
/*printf("aa %d\n",here);
for(i=l;i<=r;i++) printf("%d ",how[i]);
printf("\n");
printf("%d %d\n",what,t);*/
if((t==here)!=(what==here)) F(l,x,here,t);
else F(x+1,r,here,t);
}
void exploreCave(int N)
{
int i;
for(i=0;i<N;i++) all.insert(i);
for(i=0;i<N;i++)
{
how.clear();
for(auto j:all)
{
how.push_back(j);
have[j]=0;
}
F(0,N-i-1,i,tryCombination(have));
}
answer(have,ans);
}
컴파일 시 표준 에러 (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... | ||||
