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,说成几何的形式就弄了我半天。。晕死,计算几何果然不行。留个DP式吧

Posted by shinekai at 2011-05-06 21:16:46 on Problem 1923
哎,这么久从没留过什么东西,留个DP式吧。
d[n][m]表示n个线m个crossings最多能分成多少个pieces。
那么d[n][m]=max(opt[n-x][m-(n-x)*x] + (n-x+1)*x).....其中1<=x<=n;
然后注意下无解的情况。可以-1初始化状态,-2是无解状态。

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