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

dp+树状数组过了 800+ 我的思路

Posted by slp at 2010-10-20 14:44:27 on Problem 2796
dp求一w[i]为起点的能到达的最左边和最右边不小于w[i]的下标l[i] r[i]
用树状求w数组区间的和

那么最终中结果为 sum=Max(getsum(r[i])-getsum(l[i]-1))*(w[i])

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