# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
99293 | Mercenary | 동굴 (IOI13_cave) | C++14 | 564 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cave.h"
const int maxn = 5005;
int ans[maxn];
int pos[maxn];
bool vis[maxn];
void FILL_N(int l , int r , int val)
{
for(int i = l ; i <= r ; ++i){
if(vis[i])continue;
ans[i] = val;
}
}
void exploreCave(int n) {
for(int i = 0 ; i < n ; ++i)
{
FILL_N(0,n-1,0);
bool ansi = (tryCombination(ans) == i);
// tryCombination(ans) == i -> ith door is block -> ans for ith door is 1
//else ans for ith door is 0
//now we need to find which switch connects to ith door
int l = 0 , h = n - 1;
while(l < h)
{
// FILL_N(0,n-1,!ansi);
int mid = l + h >> 1;
FILL_N(l , mid , ansi);
컴파일 시 표준 에러 (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... |