更新时间:2018-11-22 15:55作者:李天扬老师
{
return false;
}
str = buf + str;
}
return true;
}
static void Print(int128 & data, bool bEndl = true)
{
string str;
if( data.ToDecimalStr(str) )
{
printf("%s%s", str.c_str(), (bEndl?"\n":""));
}
}
};
static int128 const one = int128(0,0,0,1);
template
void add_one(bitset& b)
{
int i = 0;
while(i < N && b[i] == 1)
{
b[i] = 0;
++i;
}
if(i == N)
return;
b[i] = 1;
}
void add_one(int128& k)
{
int i = 0;
while(i < 128 && k[i] == 1)
{
k[i] = 0;
++i;
}
if(i == 128)
return;
k[i] = 1;
}
void shift(int128 & in,deque & de)
{
if(de.front()==1)