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 zhongwen2006 at 2007-04-21 10:04:40 on Problem 1050
In Reply To:哪位帮忙看一下,在我机器上好着,也做到了全是负数的情况,但是就是WA,不知为什么? Posted by:cfdream at 2007-04-18 00:32:23
代码没这么复杂吧...
用DP做最大矩阵和啊...
max:=0;
for i:=1 to n do 
 begin
 for j:=1 to n do b[j]:=0;
 for j:=i to n do 
   begin
   for k:=1 to n do inc(b[j],a[j,k]);
   c:=0;
   for k:=1 to n do 
   begin
   if c>0 then c:=c+b[k] else c:=b[k];
   if c>max then max:=c;
   end;
   end;
 end;

   
   

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