# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
652615 | MilosMilutinovic | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 82 ms | 47944 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.
const int N=100;
int ff1[N][12],tsz1=0;
int encode(int n,int x,int y) {
for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) {
++tsz1;
for (int j=0;j<12;j++) if (i>>j&1) ff1[tsz1][j]=1;
}
for (int i=0;i<12;i++) if (ff1[x][i]&&!ff1[y][i]) return i+1;
return 11;
}
const int N=1000;
int ff2[N][12],tsz2;
int decode(int n,int q,int h) {
for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) {
++tsz2;
for (int j=0;j<12;j++) if (i>>j&1) ff2[tsz2][j]=1;
}
return ff2[q][h-1];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |