# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
564859 | Uzouf | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 7095 ms | 2980 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) {
int grid[12][924];
int col=-1;
for (int msk=0;msk<(1<<12);msk++) {
if (__builtin_popcount(msk)!=6) continue;
col++;
for (int i=0;i<12;i++) {
if ((msk&(1<<i))==(1<<i)) grid[i][col]=1;
else grid[i][col]=0;
}
}
int h;
for (int j=0;j<12;j++) {
if (grid[j][x-1]==1 && grid[j][y-1]==0) {
h=j+1; break;
}
}
return h;
}
int decode(int n,int q,int h) {
h--; q--;
int grid[12][924];
int col=-1;
for (int msk=0;msk<(1<<12);msk++) {
if (__builtin_popcount(msk)!=6) continue;
col++;
for (int i=0;i<12;i++) {
if ((msk&(1<<i))==(1<<i)) grid[i][col]=1;
else grid[i][col]=0;
}
}
return grid[h][q];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |