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 |
Re:悬赏Q币喽,谁帮我找出我代码错哪儿了,奖励Q币啦。。。或者给出一些让我错的数据In Reply To:悬赏Q币喽,谁帮我找出我代码错哪儿了,奖励Q币啦。。。或者给出一些让我错的数据 Posted by:123454321 at 2007-08-26 23:17:14 3?3?3 30444 应该是90 而你会得出95 错了,你应该在每次sum+之后比较一下剩下的最大值是否仍可能比给定数大!! 不然会现错误的。如例子3?3?3,30444第一个?之后本来没有解了,但是呢,你的程序会继续 sum+=(9-4)*(10,0)=5 所以变成了95而答案应该在90的时候截止!!!!!!!!!! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator