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

DP-二分中的小优化

Posted by wt1019011 at 2016-03-20 11:19:47 on Problem 1054
dp好像挺慢的…3344ms
在二分上加了一个小优化才没有TLE:
l[i]存储 行1..i的点数;
若待查询编号为(x,y)
则二分初始范围为(l[x-1]+1,l[x])//即直接从列中二分。

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