이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
void exploreCave(int n) {
int s[n];
int strash[n];
int d[n];
for (int i = 0; i < n; i++)
{
s[i] = -1;
d[i] = 0;
strash[i] = 0;
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (s[j] == -1)
{
strash[j] = 0;
int ans0 = tryCombination(strash);
strash[j] = 1;
int ans1 = tryCombination(strash);
if (ans0 == i and ans1 != i)
{
s[j] = 1;
strash[j] = 1;
d[j] = i;
}
else if (ans1 == i and ans0 != i)
{
s[j] = 0;
strash[j] = 0;
d[j] = i;
}
else
{
s[j] = -1;
}
}
}
}
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... |