# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
44555 | wzy | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++11 | 0 ms | 0 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.
#include <vector>
int encode (int n, int x, int y) {
vector<int> masks;
for(int j = 0 ; j < (1<<12) ; j++){
int x = 0;
for(int w = 0 ; w < 12 ; w++){
if(1<<w & j) x++;
}
if(x == 6) masks.push_back(j);
}
for(int j = 0 ; j < 12 ; j++){
if((mask[x] & 1 <<j) && !(mask[y] & 1<<j)){
return (j + 1);
}
}
}
#include <vector>
int decode (int n, int q, int h) {
h--;
vector<int> masks;
for(int j = 0 ; j < (1<<12) ; j++){
int x = 0;
for(int w = 0 ; w < 12 ; w++){
if(1<<w & j) x++;
}
if(x == 6) masks.push_back(j);
}
if(mask[q] & 1<<h){
return 1;
}
else return 0;
}