Submission #962832

#TimeUsernameProblemLanguageResultExecution timeMemory
962832stev2005Cave (IOI13_cave)C++17
12 / 100
8 ms564 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std; int n; inline void subtask1(){ ///every ith door -- ith switch int comb[n]; int switchd[n]; memset(comb, 0, sizeof(comb)); for (int i = 0; i < n; ++i) switchd[i] = i; int door = tryCombination(comb); while (door != -1){ comb[door] = 1; door = tryCombination(comb); } answer(comb, switchd); } inline void subtask2(){ /// correct combination is 0, 0 ... 0, 0 int comb[n]; int Ans[n]; memset(comb, 0, sizeof(comb)); for (int i = 0; i < n; ++i){ comb[i] = 1; Ans[i] = tryCombination(comb); comb[i] = 0; } answer(comb, Ans); } void exploreCave(int N) { n = N; subtask1(); }
#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...