제출 #992817

#제출 시각아이디문제언어결과실행 시간메모리
992817Muaath_5동굴 (IOI13_cave)C++17
13 / 100
249 ms540 KiB
#include "cave.h" #include <bits/stdc++.h> void exploreCave(int n) { int sure[n] = {}, correct[n] = {}, index[n] = {}; for (int i = 0; i < n; i++) { int l = 0, r = n-1; while (l < r) { const int mid = (l+r)/2; int cpy[n]; for (int i = 0; i < n; i++) cpy[i] = correct[i]; for (int i = mid+1; i < n; i++) if (!sure[i]) cpy[i] = 1; if (tryCombination(cpy) == i) l = mid+1; else r = mid; } index[l] = i; sure[l] = 1; } answer(correct, index); }
#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...