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

Re:把min 设成0x7FFFFFFF,WA,改为0x7FFFFF,AC 为甚么啊,

Posted by Ruby931031 at 2012-03-21 09:42:42 on Problem 3268
In Reply To:把min 设成0x7FFFFFFF,WA,改为0x7FFFFF,AC 为甚么啊, Posted by:ZJNU09220229 at 2010-10-30 17:09:34
注意这句:min+f[k][j]……
目测楼上把无穷设的太大了,导致加法溢出,这个和变成负数==!
要给这个if语句里加一个判断条件min!=INF(因为min=INF时和不可能比D[j]更小),
或者把INF定的小一点。

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