# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
16207 | mindol | Cave (IOI13_cave) | C++98 | 1061 ms | 608 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cave.h"
#include<cstdio>
int temp[5001]; // 시도할 배열
bool check[5001]; // check[i] : i번째 스위치를 알아냈는지
int ans[5001]; // ans[i] : i번째 스위치의 답(i번째 스위치에 연결된 문을 열리게 하는 스위치의 답)
int connected[5001]; // connected[i] :i번째 스위치와 연결된 문
void exploreCave(int N) {
for(int i=0;i<N;i++) // i번째 문과 연결된 스위치를 찾을 것임.
{
for(int j=0;j<N;j++)
{
if(check[j]) temp[j]=ans[j];
else temp[j]=0;
} // 일단 스위치를 다 올려본다.
int res=tryCombination(temp);
if(res!=i)
{
for(int j=0;j<N;j++)
{
if(check[j]) temp[j]=ans[j];
else temp[j]=1;
} // 일단 스위치를 다 내려본다.
}
// 이제 i번째 문이 막혀있음
int s=0,e=N-1;
while(s<e)
{
# | 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... |