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 frost at 2009-08-17 16:41:21 on Problem 3368
用两个数组ab[] 和 ba[] 记录从当前位置往后和往前分别有都少个相同数,就能把此题用rmq的思想作。复杂度是O(N + Q)logN 的,要跑一千多ms

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