# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
338969 | nandonathaniel | cmp (balkan11_cmp) | C++14 | 1830 ms | 82668 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"
#include "bits/stdc++.h"
using namespace std;
void remember(int n) {
for(int i=5;i>=0;i--){
int x=n & (1<<(2*i+1));
int y=n & (1<<(2*i));
if(x==0){
if(y==0){
bit_set(i*4+1);
}
else{
bit_set(i*4+2);
}
}
else{
if(y==0){
bit_set(i*4+3);
}
else{
bit_set(i*4+4);
}
}
}
}
int compare(int a) {
for(int i=5;i>=0;i--){
int x=a & (1<<(2*i+1));
int y=a & (1<<(2*i));
if(x==0){
if(y==0){
if(!bit_get(i*4+1))return -1;
}
else{
if(!bit_get(i*4+2)){
if(bit_get(i*4+1))return 1;
else return -1;
}
}
}
else{
if(y==0){
if(!bit_get(i*4+3)){
if(bit_get(i*4+4))return -1;
else return 1;
}
}
else{
if(!bit_get(i*4+4))return 1;
}
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |