Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

其实基本不需要用long long或_int64,包括扩展gcd计算都用int都OK,只有最后一步有个乘法可能会溢出,需要先转成long long,求余后即可转回int

Posted by yjh8047 at 2015-10-02 00:44:08 on Problem 1061 and last updated at 2015-10-02 00:45:09
像这样:
int t = ((int)(((long long)t0 * d0) % L) + L) % L;

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator