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:悬赏Q币喽,谁帮我找出我代码错哪儿了,奖励Q币啦。。。或者给出一些让我错的数据

Posted by lx_c at 2007-09-25 15:31:59 on Problem 3340
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:
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