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 <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... |