Submission #23973

#TimeUsernameProblemLanguageResultExecution timeMemory
23973HiasatCave (IOI13_cave)C++14
46 / 100
51 ms640 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; int S[5001], D[5001]; bool used[5001]; void exploreCave(int N) { int me = tryCombination(S); if (me == -1) { for (int i = 0; i < N; ++i){ S[i] = 1; int dd = tryCombination(S); D[i] = dd; S[i] = 0; } } else { for (int i = 0; i < N; ++i) { int prevState = tryCombination(S); for (int j = 0 ; j < N ; j++) { if (used[j]) continue; S[j] = 1; int atm = tryCombination(S); if (prevState == i && atm != i) { used[j] = 1; S[j] = 1; D[j] = i; break; } if (prevState != i && atm == i) { used[j] = 1; S[j] = 0; D[j] = i; break; } S[j] = 0; } } } 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...