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:哪位帮忙看一下,在我机器上好着,也做到了全是负数的情况,但是就是WA,不知为什么?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator