제출 #785073

#제출 시각아이디문제언어결과실행 시간메모리
785073Alfraganus동굴 (IOI13_cave)C++17
0 / 100
82 ms428 KiB
#include "cave.h" // #include "graderlib.c" #include <bits/stdc++.h> using namespace std; void exploreCave(int n) { 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...