Submission #746587

#TimeUsernameProblemLanguageResultExecution timeMemory
746587finn__Question (Grader is different from the original contest) (CEOI14_question_grader)C++17
0 / 100
2070 ms24288 KiB
struct precalc { int p[924]; constexpr precalc() : p{} { int l = 0; for (int i = 0; i < 1 << 12; ++i) if (__builtin_popcount(i) == 6) p[l++] = i; } }; constexpr precalc z; int encode(int n, int x, int y) { return __builtin_ctz(z.p[x] ^ (z.p[x] & z.p[y])) + 1; }
struct precalc { int p[924]; constexpr precalc() : p{} { int l = 0; for (int i = 0; i < 1 << 12; ++i) if (__builtin_popcount(i) == 6) p[l++] = i; } }; constexpr precalc z; int decode(int n, int q, int h) { return z.p[q] & (1 << (h - 1)); }
#Verdict Execution timeMemoryGrader output
Fetching results...