|
|
@ -188,7 +188,15 @@ int isTmax(int x) { |
|
|
|
* Rating: 2 |
|
|
|
*/ |
|
|
|
int allOddBits(int x) { |
|
|
|
return 2; |
|
|
|
int base = 42; |
|
|
|
int neg = 1 << 7; |
|
|
|
int unit8 = base + neg; |
|
|
|
int unit16 = (unit8 << 8) + unit8; |
|
|
|
int unit32 = (unit16 << 16) + unit16; |
|
|
|
int shouldunit32 = x & unit32; |
|
|
|
int allzero = shouldunit32^unit32; |
|
|
|
int res = !allzero; |
|
|
|
return res; |
|
|
|
} |
|
|
|
/* |
|
|
|
* negate - return -x |
|
|
|