# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
668515 | 2022-12-04T03:03:02 Z | RambaXGorilla | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 4149 ms | 24220 KB |
using namespace std; int conv[930] = {}; void fillConv(){ if(conv[1]) return; for(int i = 0, j = 0;i < 1 << 12;i++){ if(__builtin_popcount(i) == 6){ j++; conv[j] = i; } } } int encode(int N, int X, int Y){ fillConv(); return __builtin_ctz(conv[X] ^ (conv[X] & conv[Y])) + 1; } int decode(int N, int Q, int H){ fillConv(); return (bool) (conv[Q] & 1 << H - 1); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4061 ms | 24220 KB | Output is correct - maxh = 12 |
2 | Correct | 4149 ms | 24064 KB | Output is correct - maxh = 12 |