제출 #813183

#제출 시각아이디문제언어결과실행 시간메모리
813183Kerim동굴 (IOI13_cave)C++17
13 / 100
477 ms392 KiB
#include "cave.h" void exploreCave(int n) { int a[n], b[n]; for (int i = 0; i < n; i++) b[i] = -1; for (int i = 0; i < n; i++){ int st = 0, en = n-1; while (st < en){ int mid = (st + en) >> 1; for (int j = 0; j < n; j++){ if (b[j] == -1) a[j] = (j <= mid); else a[j] = 0; } if (tryCombination(a) == i) en = mid; else st = mid + 1; } b[st] = i; } for (int i = 0; i < n; i++) a[i] = 0; answer(a, b); } // tryCombination
#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...