Submission #482615

#TimeUsernameProblemLanguageResultExecution timeMemory
482615thiago_bastosCave (IOI13_cave)C++17
0 / 100
8 ms372 KiB
#include "cave.h" const int MAXN = 5000; int S[MAXN], B[MAXN], D[MAXN]; void exploreCave(int N) { for(int i = 0; i < N; ++i) S[i] = 0; int door = tryCombination(S); while(door >= 0) { for(int j = 0; j < N; ++j) { S[j] ^= 1; int ans = tryCombination(S); if(ans > door || ans < 0) { S[j] ^= 1; door = ans; break; } S[j] ^= 1; } } for(int i = 0; i < N; ++i) B[i] = S[i] ^ 1; for(int i = 0; i < N; ++i) { S[i] ^= 1; D[i] = tryCombination(S); S[i] ^= 1; } answer(B, 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...