# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
189118 | TadijaSebez | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++11 | 1620 ms | 80304 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) {
for(int i=0;i<10;i++)
{
if((x>>i&1) && !(y>>i&1)) return i+1;
}
int sum1=0,sum2=0;
for(int i=0;i<10;i++) sum1+=x>>i&1,sum2+=y>>i&1;
sum1--;sum2--;
for(int i=0;i<4;i++)
{
if(!(sum1>>i&1) && (sum2>>i&1)) return 11+i;
}
}
int decode (int n, int q, int h) {
if(h<=10)
{
h--;
if(q>>h&1) return 1;
else return 0;
}
else
{
h-=11;
int sum=0;
for(int i=0;i<10;i++) sum+=q>>i&1;
sum--;
if(!(sum>>h&1)) return 1;
else return 0;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |