Submission #231083

#TimeUsernameProblemLanguageResultExecution timeMemory
231083TehillahCave (IOI13_cave)C++14
12 / 100
29 ms640 KiB
#include "cave.h" #include <vector> #include <set> using namespace std; void exploreCave(int N) { int S[N], D[N]; for(int i=0; i<N; ++i) S[i] = 1; int ret; while(1) { ret = tryCombination(S); if(ret == -1) break; else S[ret] = !S[ret]; } set<int> st; for(int i=0; i<N; ++i) { //closing 'i'th door S[i] = !S[i]; ret = tryCombination(S); // assert(ret != -1); D[i] = ret; st.insert(ret); //open 'i'th door S[i] = !S[i]; } //assert((int)st.size() == N); answer(S, D); return; }
#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...