| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1340681 | nickolasarapidis | Cave (IOI13_cave) | C++20 | 95 ms | 500 KiB |
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5000;
void exploreCave(int N){
int S[N], D[N];
memset(S, 0, sizeof(S));
memset(D, -1, sizeof(D));
for(int i = 0; i < N; i++){
int l = 0, r = N - 1;
int B = tryCombination(S);
while(l < r){
int m = (l + r)/2; int L = l;
for(int j = l; j <= m; j++){
if(D[i] == -1) S[i] = 1;
}
int A = tryCombination(S);
if(A > i or A == -1){
if(B == i) r = m;
else l = m + 1;
}
else{
if(B == i) l = m + 1;
else r = m;
}
for(int j = L; j <= m; j++){
if(D[i] == -1) S[i] = 0;
}
}
D[l] = i;
if(B == i) S[l] = 1;
else S[l] = 0;
}
answer(S, D);
}
| # | 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... | ||||
