|
@ -159,8 +159,9 @@ int bitXor(int x, int y) { |
|
|
* Rating: 1 |
|
|
* Rating: 1 |
|
|
*/ |
|
|
*/ |
|
|
int tmin(void) { |
|
|
int tmin(void) { |
|
|
|
|
|
|
|
|
return 2; |
|
|
|
|
|
|
|
|
int one = 1; |
|
|
|
|
|
int res = one << 31; |
|
|
|
|
|
return res; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
//2 |
|
|
//2 |
|
@ -172,7 +173,10 @@ int tmin(void) { |
|
|
* Rating: 1 |
|
|
* Rating: 1 |
|
|
*/ |
|
|
*/ |
|
|
int isTmax(int x) { |
|
|
int isTmax(int x) { |
|
|
return 2; |
|
|
|
|
|
|
|
|
int xplusone = x + 1; |
|
|
|
|
|
int all1 = xplusone ^ x; |
|
|
|
|
|
int allzero = all1 + 1; |
|
|
|
|
|
return !allzero; |
|
|
} |
|
|
} |
|
|
/* |
|
|
/* |
|
|
* allOddBits - return 1 if all odd-numbered bits in word set to 1 |
|
|
* allOddBits - return 1 if all odd-numbered bits in word set to 1 |
|
|