제출 #103622

#제출 시각아이디문제언어결과실행 시간메모리
103622turbat동굴 (IOI13_cave)C++14
0 / 100
395 ms640 KiB
#include <bits/stdc++.h> #include "cave.h" void exploreCave(int N) { int a[N], s[N], d[N], found[N],l, r, t; memset(s, 0, sizeof s); memset(d, 0, sizeof d); for (int i = 0;i < N;i++){ for (int i = 0;i < N;i++) a[i] = s[i]; if (tryCombination(a) > i) t = 0; else t = 1; l = 0, r = N - 1; while (l != r){ for (int i = 0;i < N;i++) a[i] = s[i]; int mid = (l + r) / 2; for (int i = l;i <= mid;i++) if (!found[i]) a[i] = t; if (tryCombination(a) > i) r = mid; else l = mid + 1; } d[l] = i; found[l] = 1; s[l] = t; } 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...