Submission #786946

#TimeUsernameProblemLanguageResultExecution timeMemory
786946drdilyorCave (IOI13_cave)C++17
13 / 100
445 ms416 KiB
#include<bits/stdc++.h> #include "cave.h" using namespace std; void exploreCave(int n) { vector<int> door_of(n, -1); for (int i = 0; i < n; i++) { int l = -1, r = n-1; while (l < r-1) { int mid = (l + r) / 2; vector<int> comb(n); for (int i = 0; i < n;i++) { comb[i] = door_of[i] == -1 && i <= mid; } if (tryCombination(comb.data()) == i) { r = mid; } else l = mid; } door_of[r] = i; } vector<int> zeros(n); answer(zeros.data(),door_of.data()); }
#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...