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:我的程序总是WA...能告诉我哪组数据错了么?

Posted by Ruser at 2005-07-13 21:52:22 on Problem 2479
In Reply To:我的程序总是WA...能告诉我哪组数据错了么? Posted by:Ruser at 2005-07-13 21:24:57
我说明一下我的算法好了...
以序列a的顺序为阶段。
累加序列a的值用sum保存。
if sum<0 then sum:=0;
同时记录当前有效区间中连续负数的值min;
每次向后移动一个数字,就和但前最优解比较一次。
当前解:=sum-min;

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