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 warmtrue at 2009-05-05 16:08:48 on Problem 1011
n次tle后总算AC了,舒服呀。
1。降序排列,从最长的开始一个个找。如果找的是第一根杆而且最长的没有选到则终止。(前几次tle就是这里写错了)
2。已经找到的不再搜索,两个相同值,前一个搜索失败后后一个也不用找了。
3.搜索时的剩余长度要大于等于当前木棒,小于等于剩余可用木棒长度和
4.用memset清零 qsort排序。
希望能对大家有帮助:)

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