#include <bits/stdc++.h>
#include "cmp.h"
using namespace std;
// void bit_set(int add)
// int bit_get(int add);
void remember(int a){
for(int i = 0; i < 6; i++){
bit_set(a % 4 + i * 4 + 1);
a /= 4;
}
}
int compare(int b){
int dig[6];
for(int i = 0; i < 6; i++){
dig[i] = b % 4;
b /= 4;
}
int i = 5;
for(; i >= 0; i--){
int x = bit_get(dig[i] + i * 4 + 1);
if(x == 0) break;
}
if(i == -1){
return 0;
}
else{
if(dig[i] == 3){
return 1;
}
if(dig[i] == 0){
return -1;
}
int b1 = bit_get(0 + i * 4 + 1);
if(b1){
return 1;
}
int b2 = bit_get(3 + i * 4 + 1);
if(b2){
return -1;
}
return dig[i] == 2 ? -1 : 1;
}
return 0;
}
// by me
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
639 ms |
107024 KB |
ZERO POINTS: For a=3069 and b=1532, correct answer is -1, got 1 |