Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
一点思路首先把宽带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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator