제출 #672748

#제출 시각아이디문제언어결과실행 시간메모리
672748Hacv16동굴 (IOI13_cave)C++17
33 / 100
67 ms392 KiB
#include<bits/stdc++.h> #include "cave.h" using namespace std; typedef long long ll; const int MAX = 2e6 + 15; const int INF = 0x3f3f3f3f; //Subtask 3 : N <= 100 bool mark[MAX]; void exploreCave(int n){ int S[n] = { 0 }, D[n] = { 0 }; for(int door = 0; door < n; door++){ for(int i = 0; i < n; i++) if(!mark[i]) S[i] = 0; int color = (tryCombination(S) == door), pos = -1; for(int i = 0; i < n; i++){ if(mark[i]) continue; S[i] = !color; } for(int i = 0; i < n && pos == -1; i++){ if(mark[i]) continue; S[i] = color; if(tryCombination(S) != door) pos = i; S[i] = !color; } assert(pos != -1); mark[pos] = true; D[pos] = door; S[pos] = color; } answer(S, 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...