# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
877001 | AlphaMale06 | 동굴 (IOI13_cave) | C++14 | 158 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "cave.h"
using namespace std;
void exploreCave(int n){
bool know[n];
int p[n], ans[n], comb[n];
for(int i=0; i< n; i++){
know[i]=ans[i]=0;
}
for(int i=0; i< n; i++){
for(int j=0; j< n; j++)comb[j]=ans[j];
int l=0; int r=n-1;
int prev=tryCombination(comb);
while(l<r){
int s=(l+r)/2;
for(int j=l; j<=s; j++){
if(!know[j])comb[j]=1-comb[j];
}
int ans1=tryCombination(comb);
if((ans1==i && prev==i) || (ans1!=i && prev!=i))l=s+1;
else r=s;
prev=ans1;
}
know[l]=1;
p[l]=i;
if(prev==i)ans[l]=1-comb[l];
else ans[l]=comb[l];
}
answer(ans, p);
}
컴파일 시 표준 에러 (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... |