# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1164139 | Darren0724 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 462 ms | 39716 KiB |
int encode (int n, int x, int y) {
for(int i=0;i<10;i++){
int a=x&(1<<i);
int b=y&(1<<i);
if(a!=b){
if(x>0){
return i*2+1;
}
else{
return i*2+2;
}
}
}
}
int decode (int n, int q, int h) {
if(h%2==1){
int p=h/2;
if(q&(1<<p)){
return 1;
}
else{
return 0;
}
}
else{
int p=h/2-1;
if(q&(1<<p)){
return 0;
}
else{
return 1;
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |