제출 #970603

#제출 시각아이디문제언어결과실행 시간메모리
970603Acanikolic동굴 (IOI13_cave)C++14
0 / 100
24 ms348 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 || tryCombination(S) == -1) { D[j] = index; break; } S[j] ^= 1; } } int SS[N]; for(int i = 0; i < N; i++) { SS[i] = 0; } for(int i = 0; i < N; i++) if(D[i] != -1) SS[i] = S[i]; 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 || tryCombination(SS) == -1) { 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...