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

数据很水,O(N^3)的dp可过

Posted by sequix at 2016-10-01 13:43:00 on Problem 3782
读数据到 A[]
设 f[i] 为 以 A[i] 为最后一个元素的最小sum值,则有:

f[i] = f[j] (j < i,且f[j]为从0到i-1首个可行的sum值)
f[i] = f[i-1] + A[i] (从0到i-1没有可行的sum值,即不是上面的情况)

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