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

提交了12次终于A了...经历TLE、RE、WA 后来看见有人提交了28次才A 终于舒坦了 经验见内

Posted by xuchang at 2010-11-04 21:55:08 on Problem 1717
1.直接用NP的背包算法肯定TLE 再怎么剪枝都A不了
2.负数和正数的空间一定不能有重叠 建议拿10000做分界线 小于一万的都是正数空间 10002就是-2 这个时候运算的逻辑要理清 是加还是减
3.设定标志位,不要重复渲染  dp[i]是在本轮中产生的,那么不能再由dp[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