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

算法提示!给未AC的人!(已AC!)

Posted by yanghuan at 2007-09-28 21:00:08 on Problem 2313
开始时取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