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 |
我的主程序段在此,可为什么会wa,想不通In Reply To:解题报告 Posted by:huicpc11 at 2005-09-09 02:21:45 for (i = 0; i < n; i ++) { f[i][0] = sum[i]; for (j = 1; j <= q; j ++) { if (j > i) break; f[i][j] = -1; for (k = j - 1; k < i; k ++) { max = f[k][j-1] > sum[i]-sum[k] ? f[k][j-1] : sum[i]-sum[k]; if ((max < f[i][j]) || (f[i][j] == -1)) { f[i][j] = max; p[i][j] = k + 1; } } } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator