Submission #766345

#TimeUsernameProblemLanguageResultExecution timeMemory
766345zsomborCave (IOI13_cave)C++17
100 / 100
667 ms468 KiB
#include <iostream> #include <vector> #include "cave.h" using namespace std; void exploreCave(int N) { int S[N]; int D[N]; vector <bool> done(N, false); for (int d = 0; d < N; d++) { for (int i = 0; i < N; i++) if (!done[i]) S[i] = 0; int o = (tryCombination(S) != d ? 0 : 1), s = 0; for (int j = 0; j < 13; j++) { for (int i = 0; i < N; i++) if (!done[i]) S[i] = (i & (1 << j) ? o : 1 - o); if (tryCombination(S) != d) s += (1 << j); } S[s] = o; D[s] = d; done[s] = true; } 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...