isPositive
- return true
if x > 0
, otherwise false
Example: isPositive(-1)
Legal ops: !
~
&
^
|
+
<<
>>
Max ops: 8
Note: No conditional statements are allowed.
inline bool isPositive(int32_t x) {
return ???;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…