제출 #231083

#제출 시각아이디문제언어결과실행 시간메모리
231083Tehillah동굴 (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...