Submission #519245

#TimeUsernameProblemLanguageResultExecution timeMemory
519245JomnoiCave (IOI13_cave)C++17
33 / 100
104 ms460 KiB
#include <bits/stdc++.h> #include "cave.h" #define DEBUG 0 using namespace std; const int MX = 5e3 + 10; int S[MX], D[MX], res, res1; void exploreCave(int N) { for(int i = 0; i < N; i++) { D[i] = -1; } // Subtask 1 // for(int i = 0; i < N; i++) { // res = tryCombination(S); // if(res == i) { // S[i] = 1; // } // else { // S[i] = 0; // } // } // for(int i = 0; i < N; i++) { // D[i] = i; // } // answer(S, D); // Subtask 2 // for(int i = 0; i < N; i++) { // S[i] = 1; // res = tryCombination(S); // D[i] = res; // S[i] = 0; // } // answer(S, D); // Subtask 3 for(int i = 0; i < N; i++) { res1 = tryCombination(S); for(int j = 0; j < N; j++) { if(D[j] != -1) { continue; } S[j] = 1; res = tryCombination(S); if(res1 == i and res != i) { D[j] = i; break; } if(res1 != i and res == i) { S[j] = 0; D[j] = i; break; } S[j] = 0; } } 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...