Submission #992895

#TimeUsernameProblemLanguageResultExecution timeMemory
992895mohammedMonemCave (IOI13_cave)C++14
0 / 100
22 ms348 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int N) { int comp[N], cmp[N] = {0}, v[N]; for (int i = 0; i < N; ++i) { memset(comp, 0, N); if (tryCombination(comp)) { memset(comp, 1, N); } int s = 0, e = N - 1; while (s <= e) { int md = (s + e) / 2; memset(comp + s, !comp[s], md); if (tryCombination(comp) == i) { v[i] = s, cmp[i] = comp[s]; e = md - 1; } else { s = md + 1; } memset(comp + s, !comp[s], md); } } answer(cmp, v); }
#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...