Submission #385048

#TimeUsernameProblemLanguageResultExecution timeMemory
385048AzimjonCave (IOI13_cave)C++17
0 / 100
3 ms492 KiB
#include "cave.h" #include <bits/stdc++.h> void exploreCave(int N) { int s[N], d[N]; memset(s, 0, sizeof(s)); for (int i = 0; i < N; i++) { int x = tryCombination(s); int l, r; l = 0, r = N - 1; while (l < r) { int m = (l + r) / 2; s[m] = 1 - s[m]; int y = tryCombination(s); if (y == x) { l = m; } else { r = m; } s[m] = 1 - s[m]; } d[l] = x; s[l] = 1 - s[l]; } answer(s, d); }
#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...