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 hassenio at 2012-02-19 23:11:00 on Problem 1018
首先把宽带b从小到大排序(离散化),并记录每个b的值是来自第几个设备的
假设我们已经找到了b的值为i的最小p的和,那么当我们将b的值更新到i+1时,只有存在b的值为i或b的值为i+1的设备的最小p需要更新,所以就只更新这些p,所以对于每一个设备,最多更新m^2*2次,所以总复杂度是n*m^2

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