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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define F first
#define S second
#define enter cout<<'\n';
#define INF 99999999999999999
#define MOD 1000000007
#define all(x) x.begin(),x.end()
//tryCombination
void exploreCave(int N)
{
int s[N]={ },d[N];
ll i=tryCombination(s);
bool no[N]={ };
while(i!=-1)
{
for(int j=0;j<N;j++)
{
if(no[j])
continue;
s[j]=s[j]^1;
int pos=tryCombination(s);
if(pos>i)
{
i=pos;
no[j]=1;
break;
}
s[j]=s[j]^1;
if(pos<i)
no[j]=1;
}
}
for(int j=0;j<N;j++)
{
s[j]=s[j]^1;
int pos=tryCombination(s);
s[j]=s[j]^1;
d[j]=pos;
}
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... |