Submission #857515

#TimeUsernameProblemLanguageResultExecution timeMemory
857515chilinhxyzabcCave (IOI13_cave)C++17
13 / 100
17 ms600 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; void exploreCave(int n) { int s[n], d[n]; for(int i = 0; i < n; i++) { s[i] = 0; d[i] = -1; } while(true) { int curDoor = tryCombination(s); if(curDoor == -1) break; for(int j = n - 1; j >= 0; j--) { s[j] = 1 - s[j]; int door = tryCombination(s); s[j] = 1 - s[j]; if(door == curDoor) continue; else { s[j] = 1 - s[j]; break; } } } for(int i = 0; i < n; i++) { if(d[i] != -1) continue; s[i] = 1 - s[i]; int door = tryCombination(s); d[i] = door; s[i] = 1 - s[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...