제출 #852533

#제출 시각아이디문제언어결과실행 시간메모리
852533muratcepeda동굴 (IOI13_cave)C++17
0 / 100
2045 ms348 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int N) { int arr[N], bien[N], puerta[N], pos[N]; int ini = 0; int fin = N; int mitad = 0; for(int i = 0; i < N; ++i) arr[i] = bien[i] = puerta[i] = pos[i] = 0; for(int i = 0; i < N; ++i){ for(int borra = 0; borra < N; ++i){ if(bien[i] == 0) arr[i] = 0; } while(ini <= fin){ mitad = (ini + fin) / 2; for(int j = 0; j < N; ++j) arr[i] = 1; if(tryCombination(arr) == i) fin = mitad - 1; else ini = mitad + 1; } puerta[i] = arr[mitad]; pos[i] = mitad; bien[mitad] = 1; } answer(puerta, pos); }
#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...