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 |
注意了!!必须用__int64,用long int WA;而且要注意ax+by=c中a、c的正负;以及结果应属于(1,L/gcd(a,L))RT a是两蛙速度差,b是数轴长,求x x=用辗转相除扩展算出ax+by=gcd(a,b)的解再乘以c/gcd(a,b)的值 以这题的数据来看 直接让a=n-m;c=x-y;就可以过了 让a=m-n;c=y-x;而之后不作处理就WA 假如得到结果是x 应该输出(x%t+t)%t --(t=L/gcd(a,L)) 即是使x>1且小于L/gcd(a,L) Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator