제출 #423737

#제출 시각아이디문제언어결과실행 시간메모리
423737ioi동굴 (IOI13_cave)C++14
12 / 100
50 ms416 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std ; void exploreCave(int N) { int com[N] , ans[N]; memset(com , 0 , sizeof com); for(int i = 1 ; i < N ; i ++){ com[i - 1] = 0 ; com[i] = 0 ; int c = tryCombination(com); com[i] = 1 ; int c2 = tryCombination(com); if(c == c2) ans[i - 1] = c , com[i - 1] = 1 ; else { com[i - 1] = 1 ; ans[i - 1] = tryCombination(com); com[i - 1] = 0 ; } } com[N - 1] = 1 ; int c = tryCombination(com); if(c == -1){ com[N - 1] = 0 ; ans[N - 1] = tryCombination(com); com[N - 1] = 1 ; } else { ans[N - 1] = c ; com[N - 1] = 0 ; } answer(com , ans); }
#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...