Submission #423737

#TimeUsernameProblemLanguageResultExecution timeMemory
423737ioiCave (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...