# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1216642 | nataliaa | Cave (IOI13_cave) | C++20 | 0 ms | 0 KiB |
#include "cave.h"
#include<bits/stdc++.h>
using namespace std;
void exploreCave(int N) {
int v[N];
int a[N] ={};
for(int i = 0; i < N; i++) v[i]= i;
for(int i = 0; i < N; i++) {
int k = tryCombination(int a[])
if(k>i) i = k-1;
else {
if(a[i]==0) a[i]=1;
else a[i]=0;
}
}
answer(int a[],int v[]);
}