# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1164615 | crispxx | Cave (IOI13_cave) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define eb emplace_back
#define pb push_back
#define ar array
#define nl '\n'
#include "cave.h"
#include "grader.c"
void exploreCave(int n) {
int S[n]{}, D[n];
for(int i = 0; i < n; i++) {
int cur = tryCombination(S), flag = 0;
if(cur == -1) break;
for(int j = 0; j < n; j++) {
S[j] = !S[j];
int f = tryCombination(S);
if(f == -1) {
flag = 1;
break;
}
if(f > cur) {
break;
}
S[j] = !S[j];