Submission #285902

#TimeUsernameProblemLanguageResultExecution timeMemory
285902amallaCave (IOI13_cave)C++17
0 / 100
320 ms512 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std; int S[10000], D[10000], n, first; void solve(int curr) { for (int i = 0; i<n; ++i) { // intenta la puerta S[i] if (D[i]!=-1) continue; for (int j = 0; j<2; ++j) { // intenta S[i] = j; int ans = tryCombination(S); if (ans!=first) { D[ans] = i; S[i] = j^1; } if (ans == curr) { S[i] = j^1; D[curr] = i; return; } } } } void exploreCave(int N) { n = N; for (int i = 0; i<10000; ++i) { S[i] = 0; D[i] = -1; } first = tryCombination(S); for (int i = 0; i<N; ++i) { // para la puerta D[i] solve(i); } 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...