Submission #1084699

#TimeUsernameProblemLanguageResultExecution timeMemory
1084699detaomegaCave (IOI13_cave)C++14
33 / 100
38 ms584 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void exploreCave(int N) { /* ... */ int Key[N]; bool isSuccess[N]; for (int i = 0; i < N; i++) { Key[i] = 0; isSuccess[i] = 0; } int ansS[N], ansD[N]; for (int i = 0; i < N; i++) { int value = tryCombination(Key); if (value > i || value == -1) { for (int j = 0; j < N; j++) { if (!isSuccess[j]) { Key[j] = Key[j] ^ 1; } } } for (int j = 0; j < N; j++) { if (isSuccess[j]) { continue; } Key[j] = Key[j] ^ 1; value = tryCombination(Key); if (value > i || value == -1) { ansD[j] = i; ansS[j] = Key[j]; isSuccess[j] = 1; break; } Key[j] = Key[j] ^ 1; } } answer(ansS, ansD); }
#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...