# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
928738 | 2024-02-17T03:23:26 Z | Juanchoki | Cave (IOI13_cave) | C++14 | 0 ms | 0 KB |
#include"cave.h" #include <bits/stdc++.h> using namespace std; /* int S[1<<20], D[1<<20]; int N; int tryCombination(int comb[]) { for (int i = 0; i < N; i++) if (S[i] != comb[i]) return i; return -1; } */ void exploreCave(int N) { int arr[N]; for (int i = 0; i < N; i++) arr[i] = 0; int last = 0; while (last < N) { int temp = tryCombination(arr); if (temp == -1) { answer(arr); } if (temp == last) { arr[last++] = 1; continue; } last = temp; } }