?? uselessfile.cpp
字號:
#define BitsOf(type) (8*sizeof(type))
typedef unsigned Int; // define your type of UNSIGNED integer.
inline int FastEstimateLeading0s(Int a)
{
if (a) {
int i = 0;
for(int j = BitsOf(Int) / 2; !(a >> j); j>>=1)
i += j;
return i;
}
return BitsOf(Int);
}
inline int EvenRound(int i)
{
return (i | 1) - 1;
}
Int isqrt(Int a)
{
int i = FastEstimateLeading0s(a);
a <<= i = EvenRound(i);
Int rem = 0, root = 0;
for(int k = (BitsOf(Int) - i) >> 1; k; --k)
{
root <<= 1;
rem = (rem << 2) + ( a >> (BitsOf(Int) - 2));
a <<= 2;
if (root < rem)
rem -= (++ root) ++;
}
return root >> 1;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -