제출 #988329

#제출 시각아이디문제언어결과실행 시간메모리
988329Muaath_5동굴 (IOI13_cave)C++17
0 / 100
33 ms348 KiB
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> using namespace std; const int N = 2e5+1; int n; #ifndef MUAATH_5 #include "cave.h" #endif int tryCombination(int c[]); void answer(int s[], int d[]); void exploreCave(int n_) { n = n_; int correct[n] = {}; int index[n] = {}; for (int i = 0; i < n; i++) { int zero = (tryCombination(correct) == 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]; if (!zero) for (int i = 0; i <= mid; i++) cpy[i] = 1; if (tryCombination(cpy) == i) l = mid+1; else r = mid; } index[i] = l; correct[i] = !zero; } answer(index, correct); }
#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...