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 yygy at 2012-10-22 09:20:11 on Problem 1844
当前和为sum的时候sum-2*t=n
枚举一个i把所有小于等于i的所有组合用背包列举出来。
然后看看dp[t]是不是可以组成。
我的容量开到了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