Submission #985357

#TimeUsernameProblemLanguageResultExecution timeMemory
985357SzymonKrzywdaCave (IOI13_cave)C++17
13 / 100
33 ms564 KiB
#include"cave.h" #include <bits/stdc++.h> using namespace std; int tryCombination(int S[]); void answer(int S[],int D[]); void exploreCave(int N){ int D[N],S[N],w=0; //int S_2[N]; // 0 0 0 0 0 // 1 1 1 1 1 // 1 1 1 1 0 //1110 //3102 for (int i=0; i<N; i++){ if(w==-1) break; if (w > i) continue; for (int j=0; j<N; j++){ S[j] = (S[j]+1)%2; w = tryCombination(S); if(w==-1) break; if (w>i) break; S[j] = (S[j]+1)%2; } } for (int i=0; i<N; i++){ S[i] = (S[i]+1)%2; D[i] = tryCombination(S); S[i] = (S[i]+1)%2; } 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...