Submission #672739

#TimeUsernameProblemLanguageResultExecution timeMemory
672739Hacv16Cave (IOI13_cave)C++17
0 / 100
29 ms392 KiB
#include<bits/stdc++.h> #include "cave.h" using namespace std; typedef long long ll; const int MAX = 2e6 + 15; const int INF = 0x3f3f3f3f; //Subtask 3 : N <= 100 bool mark[MAX]; void exploreCave(int n){ int S[n] = {0}, D[n] = {0}; for(int door = 0; door < n; door++){ int aux = tryCombination(S); int color = (aux == door ? 1 : 0); for(int s = 0; s < n; s++){ if(mark[s]) continue; S[s] = !color; } int Switch = 0; for(int s = 0; s < n; s++){ if(mark[s]) continue; S[s] = color; int t = tryCombination(S); if(t != door){ Switch = s; break; } S[s] = !color; } mark[Switch] = true; S[Switch] = color; D[Switch] = door; } 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...