# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
652613 | MilosMilutinovic | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 7091 ms | 2268 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
int encode(int n,int x,int y) {
const int N=925;
int ff[N][12];
int tsz=0;
for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) {
++tsz;
for (int j=0;j<12;j++) if (i>>j&1) ff[tsz][j]=1;
}
for (int i=0;i<12;i++) if (ff[x][i]&&!ff[y][i]) return i+1;
}
const int N=925;
int ff[N][12],tsz;
int decode(int n,int q,int h) {
for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) {
++tsz;
for (int j=0;j<12;j++) if (i>>j&1) ff[tsz][j]=1;
}
return ff[q][h-1];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |