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 |
Re:怎么用栈?In Reply To:怎么用栈? Posted by:044100324 at 2007-10-23 17:37:18 aaaaaaaaaaaaaaaaaa#aaaaaaaaaaaaaaaaaa 后缀数组肯定是 #aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 然后栈里面的情况肯定是 1 2 3 4 5... 统计的时候每次只需要加上栈顶元素相关的数量,于是O(n)... > 如果输入是 > 1 > aaaaaaaaaaaaaaaaaa > aaaaaaaaaaaaaaaaaa > 这种感觉就是要O(n*n)! > > 请教一下AC的方法! Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator