Submission #411484

#TimeUsernameProblemLanguageResultExecution timeMemory
411484MlxaCave (IOI13_cave)C++14
34 / 100
46 ms424 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define mp make_pair #define mt make_tuple #define x first #define y second const int N = 5050; int s[N]; int d[N]; int query() { return tryCombination(s); } void exploreCave(int n) { int cur = query(); while (cur != -1) { for (int i = 0; i < n; ++i) { s[i] ^= 1; int now = query(); if (cur < now || now == -1) { // d[i] = cur; cur = now; break; } else { s[i] ^= 1; } } } for (int i = 0; i < n; ++i) { s[i] ^= 1; int tmp = query(); s[i] ^= 1; assert(tmp != -1); d[i] = tmp; } answer(s, d); } #ifdef LC #include "graderlib.c" int main() { N = init(); exploreCave(N); printf("INCORRECT\nYour solution did not call answer().\n"); return 0; } #endif
#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...