# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1022226 | codefox | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 7040 ms | 344 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 a, int b)
{
int ca = __builtin_popcount(a);
int cb = __builtin_popcount(b);
ca--;
cb--;
for (int j = 0; j < 3; j++)
{
if ((cb&(1<<j)) && ((a==b)||((ca&(1<<j))==0)))
{
return j+1;
}
}
for (int j = 0; j < 10; j++)
{
if (((b&(1<<j))==0) && ((a==b)||((a&(1<<j)))))
{
return j+4;
}
}
}
int decode(int n, int q, int h)
{
int cq = __builtin_popcount(q);
cq--;
h--;
if (h < 3)
{
if (cq&(1<<h)) return false;
else return true;
}
else if (q &(1<<(h-3))) return true;
else return false;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |