이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |