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

Re:那个大牛解释一下这种解法的原理?

Posted by moshucong at 2009-04-08 17:46:00 on Problem 2313
In Reply To:算法提示!给未AC的人!(已AC!) Posted by:yanghuan at 2007-09-28 21:00:08
> 开始时取b[i] = a[i](1 <= i <= n)
> 若存在i使 b[i] <> Mid(b[i - 1], a[i], b[i + 1]) (2 <= i <= n - 1)
> {Mid(x, y, z)表示x, y, z中数值居中间的数}
> 则b[i]=Mid(b[i - 1], a[i], b[i + 1])
> 直到没有以上所说的i
> 所得的b数列即为所求
> 按公式求V
> 输出

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