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 |
转化用两个数组ab[] 和 ba[] 记录从当前位置往后和往前分别有都少个相同数,就能把此题用rmq的思想作。复杂度是O(N + Q)logN 的,要跑一千多ms Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator