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 |
将N^4改进为N^3*logN算法.对每行的B值小到大排序, N^2 dp求出f[i][j], 表示i行j~num[i]的最大P值. N^2枚举B值 * N枚举每行 * logN二分查找大于等于当前B的位置,即f[i][x]. 嫌麻烦的话用lower_bound就OK了. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator