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 woqlin at 2009-10-14 21:46:14 on Problem 1694
In Reply To:解题思路 Posted by:19871026 at 2009-07-22 14:47:11
在同一层上,优先完成枝大的,即ai大的
且如果严格降序的话有ai+i>=a(i+1)+i+1;(i= 0,1,2)这种情况下可以先完成ai节点,再完成其他节点;
如果不是严格降序的话会出现ai+i<a(i+1)+i+1的情况,即先完成ai再做a(i+1)的话如果不新增石头是不可能的。有一个相同的枝就应新增一个,还有以一种情况也会新增石头,就是本层上的分支大于任何一个小的分支,这种情况下应该和k+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