| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 985380 | user736482 | Cave (IOI13_cave) | C++17 | 149 ms | 796 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "cave.h"
using namespace std;
bool fixed_[5000];
int match[5000],result[5000],openstate,ak;
void change(int a, int b, bool c){
for(int i=a;i<=b;i++){
if(!fixed_[i])
result[i]= c;
}
}
void exploreCave(int n){
for(int i=0;i<n;i++){
int pocz=0;
int kon=n-1;
change(pocz,kon,1);
ak=tryCombination(result);
if(ak==i)
openstate=0;
else
openstate=1;
while(pocz<kon){
int sr=(pocz+kon)/2;
change(pocz,sr,openstate);
change(sr+1,kon,!openstate);
ak=tryCombination(result);
if(ak==i)
pocz=sr+1;
else
kon=sr;
}
result[pocz]=openstate;
match[i]=pocz;
fixed_[pocz]=1;
}
answer(result,match);
}| # | 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... | ||||
