# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
343611 | Kerim | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 7061 ms | 2384 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 arr[924],pos;//C(12,6)
int encode (int n, int x, int y) {pos=0;
for(int i=0,x,y;i<4096;i++){x=i;y=0;
while(x>=1)
y+=(x%2),x/=2;
if(y==6)arr[pos++]=i;
}
for(int i=0;i<12;i++)
if((arr[x-1]>>i&1) and !(arr[y-1]>>i&1))
return i+1;
}
int arr[924],pos;
int decode (int n, int q, int h){pos=0;
for(int i=0,x,y;i<4096;i++){x=i;y=0;
while(x>=1)
y+=(x%2),x/=2;
if(y==6)arr[pos++]=i;
}
return (arr[q-1]>>(h-1)&1);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |