Submission #413783

#TimeUsernameProblemLanguageResultExecution timeMemory
413783LouayFarahCave (IOI13_cave)C++14
25 / 100
19 ms420 KiB
#include "bits/stdc++.h" #include "cave.h" using namespace std; int tryCombination(int S[]); void answer(int S[], int D[]); void exploreCave(int N) { int S[N]; int D[N]; for(int i = 0; i<N; i++) { S[i] = 0; D[i] = i; } int temp = tryCombination(S); if(temp==-1) { for(int i = 0; i<N; i++) { S[i] = 1; int door = tryCombination(S); S[i] = 0; D[i] = door; } answer(S, D); } else { int curr = temp; while(curr!=-1) { S[curr] = 1; curr = tryCombination(S); } 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...