이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cave.h"
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>
#define vll vector<pll>
#define vii vector<pii>
using namespace std;
void exploreCave(int n){
int arr[n], door[n];
memset(arr, 0, sizeof(arr));
memset(door,0,sizeof(door));
bool vis[n];
memset(vis,false,sizeof(vis));
while(true){
int pos = tryCombination(arr);
if(vis[pos])
answer(arr,door);
if(pos == -1){
break;
}
arr[pos] = 1 - arr[pos];
vis[pos] = true;
}
for(int i = 0; i < n; i++){
arr[i] = 1 - arr[i];
int pos = tryCombination(arr);
//for(int j = 0; j < n;j++)
// cout<<arr[j]<<" ";
//cout<<pos<<endl;
door[i] = pos;
arr[i] = 1 - arr[i];
}
answer(arr, door);
}
# | 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... |