제출 #785076

#제출 시각아이디문제언어결과실행 시간메모리
785076Alfraganus동굴 (IOI13_cave)C++14
0 / 100
87 ms364 KiB
#include "cave.h" // #include "grader.c" #include <vector> using namespace std; void exploreCave(int n) { // cout<<n<<endl; int a[n], d[n]; vector<int> used(n, -1); for (int i = 0; i < n; i++) { int l = 0, r = n - 1; while (l < r) { int m = (l + r) >> 1; for (int j = l; j < r; j++) { if (used[j] == -1) a[j] = 0; else a[j] = used[j]; } for (int j = 0; j < l; j++) a[j] = used[j]; for (int j = r; j < n; j++) a[j] = used[j]; int k = tryCombination(a); if (k == i) l = m + 1; else r = m; } d[i] = l; used[i] = a[i]; } answer(a, 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...