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

一个动态规划……

Posted by wywcgs at 2008-03-22 21:32:07 on Problem 3443
In Reply To:请教不用暴搜的方法。。 Posted by:richardxx at 2008-03-22 20:52:48
2^13保存木棍的使用情况,然后设当前最短的那根木棍长度是x, 另两根是x+a和x+b
每次拓展必然要先拓展最短的那根木棍,这样可知a和b的范围不会超过最长那根木棍的长度
所状态最多只有2^13 * 26 * 26个……如果限定a <= b那么状态数还能除2
每次选择一个木棍拓展,所以复杂度就是2^13 * 26 * 26 / 2 * 13 = 360W左右

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