# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
464746 | AdamGS | 동굴 (IOI13_cave) | C++14 | 261 ms | 456 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cave.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
void exploreCave(int N) {
int S[N], D[N];
rep(i, N) {
S[i]=0;
D[i]=-1;
}
int lst=tryCombination(S);
rep(i, N) {
int p=0, k=N-1;
while(p<k) {
int sr=(p+k)/2;
for(int j=p; j<=sr; ++j) if(D[j]==-1) S[j]^=1;
int nowe=tryCombination(S);
if(nowe!=i && lst!=i || nowe==i && lst==i) p=sr+1; else k=sr;
lst=nowe;
}
D[p]=i;
if(lst==i) S[p]^=1;
lst=tryCombination(S);
}
answer(S, D);
}
컴파일 시 표준 에러 (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... |