제출 #774117

#제출 시각아이디문제언어결과실행 시간메모리
774117TrumlingCave (IOI13_cave)C++14
13 / 100
2057 ms396 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...