Submission #762288

#TimeUsernameProblemLanguageResultExecution timeMemory
762288SanguineChameleonCave (IOI13_cave)C++17
100 / 100
639 ms472 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; const int maxN = 5e3 + 20; int S[maxN]; int D[maxN]; bool flag[maxN]; void exploreCave(int N) { for (int i = 0; i < N; i++) { D[i] = -1; } for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (!flag[j]) { S[j] = 0; } } int state = (tryCombination(S) == i); int id = 0; for (int k = 0; k < 13; k++) { for (int j = 0; j < N; j++) { if (!flag[j]) { S[j] = state ^ ((j >> k) & 1); } } id |= (tryCombination(S) == i) << k; } S[id] = state; D[id] = i; flag[id] = true; } 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...