Submission #252384

#TimeUsernameProblemLanguageResultExecution timeMemory
252384yuma220284Cave (IOI13_cave)C++14
0 / 100
162 ms640 KiB
#include "cave.h" #include <iostream> using namespace std; void exploreCave(int N) { static int ANS1[5000] = {}, ANS2[5000] = {}; //ANS1:Switch ANS2:Door static 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++) { /*for (int j = 0; j < 14; j++) { for (int k = 0; k < N; k++) cout << Q[j][k] << ' '; cout << endl; } cout << endl;*/ 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][B] = 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...