# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
928738 | Juanchoki | 동굴 (IOI13_cave) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include"cave.h"
#include <bits/stdc++.h>
using namespace std;
/*
int S[1<<20], D[1<<20];
int N;
int tryCombination(int comb[])
{
for (int i = 0; i < N; i++)
if (S[i] != comb[i])
return i;
return -1;
}
*/
void exploreCave(int N)
{
int arr[N];
for (int i = 0; i < N; i++)
arr[i] = 0;
int last = 0;
while (last < N)
{
int temp = tryCombination(arr);
if (temp == -1)
{
answer(arr);
}
if (temp == last)
{
arr[last++] = 1;
continue;
}
last = temp;
}
}