제출 #970581

#제출 시각아이디문제언어결과실행 시간메모리
970581Acanikolic동굴 (IOI13_cave)C++14
0 / 100
20 ms500 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; void exploreCave(int N) { int S[N],D[N]; for(int i = 0; i < N; i++) { S[i] = 0; D[i] = -1; } for(int k = 0; k < N; k++) { int index = tryCombination(S); if(index == -1) break; for(int j = 0; j < N; j++) { if(D[j] != -1) continue; S[j] ^= 1; if(tryCombination(S) != index) { D[j] = index; break; } S[j] ^= 1; } } int SS[N]; for(int i = 0; i < N; i++) { SS[i] = 1; } for(int k = 0; k < N; k++) { int index = tryCombination(SS); if(index == -1) break; for(int j = 0; j < N; j++) { if(D[j] != -1) continue; SS[j] ^= 1; if(tryCombination(SS) != index) { D[j] = index; break; } SS[j] ^= 1; } } 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...