#include "cmp.h"
#include <bits/stdc++.h>
using namespace std;
void remember(int n)
{
int poc[6]={1,4500,6000,6500,7000,7500},c[6],p[7];
p[6]=0;
for(int i=0;i<6;i++) c[i]=2*(((1<<(2*i+1)) & n)>>(2*i+1)) + (((1<<(2*i)) & n)>>(2*i));
for(int i=5;i>=0;i--) p[i]=4*p[i+1]+c[i];
for(int i=0;i<6;i++) bit_set(poc[i]+p[i]);
}
int compare(int b)
{
int poc[6]={1,4500,6000,6500,7000,7500},c[6],p[7];
p[6]=0;
for(int i=0;i<6;i++) c[i]=2*(((1<<(2*i+1)) & b)>>(2*i+1)) + (((1<<(2*i)) & b)>>(2*i));
for(int i=5;i>=0;i--) p[i]=4*p[i+1]+c[i];
int x=5;
while(bit_get(poc[x]+p[x]) && x>=0) x--;
if(x==-1) return 0;
if(c[x]==0) return -1;
if(c[x]==3) return 1;
if(c[x]==1)
{
if(bit_get(poc[x]+p[x]-1)) return 1;
else return -1;
}
if(bit_get(poc[x]+p[x]+1)) return -1;
else return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1045 ms |
103160 KB |
ZERO POINTS: For a=142 and b=142, correct answer is 0, got 1 |