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 Kuroro at 2012-12-04 21:50:00 on Problem 3211
这道题目的常规思路是对于每种颜色计算sum/2的背包,然后用sum-f[sum/2]。
我开始的思路是对sum做背包,然后找最接近sum/2(sum/2+1奇数的情况)。自己的想法是在时间复杂度上更高,但是感觉结果应该是一样的啊。。。。。。
但是自己的思路WA,改成常规思路后AC,谁能帮忙分析下,谢谢了。
如果能给出例子,万分感谢.

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