# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
564840 | 2022-05-19T19:00:55 Z | Uzouf | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 1769 ms | 24012 KB |
int encode(int n,int x,int y) { int a=x,b=y; for (int p=10;p>=0;p--) { int i=0,j=0; if ((1<<p)<=a) { a-=(1<<p); i=1; } if ((1<<p)<=b) { b-=(1<<p); j=1; } if (i>j) return p+1; } a=__builtin_popcount(x); b=__builtin_popcount(y); for (int p=5;p>=0;p--) { int i=0,j=0; if ((1<<p)<=a) { a-=(1<<p); i=1; } if ((1<<p)<=b) { b-=(1<<p); j=1; } if (i<j) return p+11; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1702 ms | 23984 KB | wrong answer |
2 | Incorrect | 1769 ms | 24012 KB | wrong answer |