# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
131107 | mlyean00 | Cave (IOI13_cave) | C++14 | 416 ms | 640 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
const int MAX = 5000;
int n;
bool sure[MAX];
// Correct position of switch (such that the door is open)
int pos[MAX];
// Door the switch is connected to
int door[MAX];
// Find the switch to door d
void find_switch(int d, bool b) {
int lo = 0;
int hi = n;
while (lo < hi) {
int t[n];
copy(pos, pos + n, t);
int mid = (lo + hi) / 2;
for (int i = lo; i <= mid; ++i) {
if (!sure[i]) t[i] = 1;
}
int res = tryCombination(t);
if (b ^ (res == -1 || res > 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... |