# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
564844 | Uzouf | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 2926 ms | 24228 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 h=-1;
for (int p=0;p<=9;p++) {
int a=((1<<p)&x),b=((1<<p)&y);
if (a==(1<<p) && b!=(1<<p)) {
h=p+1; break;
}
}
if (h==-1) {
int pa=__builtin_popcount(x),pb=__builtin_popcount(y);
for (int p=0;p<=4;p++) {
int a=((1<<p)&pa),b=((1<<p)&pb);
if (a!=(1<<p) && b==(1<<p)) {
h=11+p; break;
}
}
}
return h;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |