| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
。。。。。。。居然要自己写乘法。。。。。。Rt。。。郁闷。。。。。
inline unsigned long long mul(unsigned long long a,unsigned long long b,unsigned long long p)
{
unsigned long long ans=0;
for(register int i=0;i<64;i++)
{
if(b&1) ans+=a;
ans%=p;
b>>=1;
a<<=1;
a%=p;
}
return ans;
}
奇慢无比。。。。。
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator