Submission #252374

#TimeUsernameProblemLanguageResultExecution timeMemory
252374yuma220284Cave (IOI13_cave)C++14
0 / 100
168 ms708 KiB
#include "cave.h" using namespace std; void exploreCave(int N) { int ANS1[5000] = {}, ANS2[5000] = {}; //ANS1:Switch ANS2:Door int Q[14][5000] = {}; for (int i = 0; i < N; i++) { for (int j = 0; j < 14; j++) { Q[j][i] = (i >> j) & 1; } } for (int i = 0; i < N; i++) { int X = tryCombination(Q[13]); int Y = 0; for (int j = 0; j < 13; j++) { if (tryCombination(Q[j]) > i) Y += 1 << j; } int A, B; if (X == i) A = 1, B = Y; else A = 0, B = 8191 - Y; ANS1[B] = A, ANS2[B] = i; for (int j = 0; j < 14; j++) { Q[j][i] = A; } } answer(ANS1, ANS2); }
#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...