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

解此题应该注意的3个问题!

Posted by FriendshipPKU at 2009-04-06 12:37:33 on Problem 2249
1:不需要开数组,也不能开数组,因为当m或n的值为2^32时,数组的大小达不到2^31
2:采用一边乘一边除的策略,暂时除不尽的分母项累乘到一个临时变量,最后再去除去此临时变量(一定能除尽)就得到结果了!
3:为了防止溢出,结果都用64为整数保存

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