# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
447178 | zaneyu | cmp (balkan11_cmp) | C++14 | 2347 ms | 102172 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.
#include "cmp.h"
void remember(int n) {
n+=4096;
while(n>1) bit_set(n),n/=4;
}
int compare(int b) {
b+=4096;
int l=0,r=6;
bool hv=0;
int d;
while(l<=r){
int mid=(l+r)/2;
if(!bit_get(b>>(mid*2)) and mid!=6){
l=mid+1;
d=(b>>(mid*2));
hv=1;
}
else r=mid-1;
}
if(!hv) return 0;
if((d%4)>1){
if(bit_get(d/4*4+3)) return -1;
return 1;
}
else{
if(bit_get(d/4*4)) return 1;
return -1;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |