Submission #774849

#TimeUsernameProblemLanguageResultExecution timeMemory
774849khshgCave (IOI13_cave)C++14
0 / 100
191 ms444 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std; void exploreCave(int N) { int cor[N]{}, DtoS[N]{}, StoD[N]{}; for(int i = 0; i < N; ++i) { bool f = (tryCombination(cor) == i); int tl = 0, tr = N - 1; while(tl < tr) { int tm = (tl + tr) / 2; int ask[N]{}; for(int j = 0; j <= tm; ++j) { ask[j] = 1; } for(int j = 0; j < i; ++j) ask[DtoS[j]] = cor[DtoS[j]]; bool F = (tryCombination(ask) == i); if(F == f) { tl = tm + 1; } else tr = tm; } DtoS[i] = tl; StoD[tl] = i; cor[tl] = !f; } answer(cor, StoD); }
#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...