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

我的主程序段在此,可为什么会wa,想不通

Posted by K208 at 2005-10-06 16:23:46 on Problem 1505
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:
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