标题:关于第十八期比赛
只看楼主
HJin
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:401
专家分:0
注 册:2007-6-9
得分:0 
The above algorithm should be one of the best:

O(n) time + O(1) space.


I am working on a system which has no Chinese input. Please don\'t blame me for typing English.
2007-09-16 20:47
缘吇弹
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:地球
等 级:版主
威 望:43
帖 子:3038
专家分:27
注 册:2007-7-2
得分:0 
以下是引用HJin在2007-9-16 13:03:19的发言:
I think the algorithm for solving the invesion prolbem is O(n^2) --- you have two for loops and I would think in the worst case scenario, you will have O(n^2).

I submitted a O(n lgn) algorithm at yzfy.org, which uses a STL set (the set brings me TLE always).

Where are you come from?


Repeat  Life=Study;Until (death);
2007-09-16 23:37
crackerwang
Rank: 3Rank: 3
等 级:新手上路
威 望:8
帖 子:833
专家分:0
注 册:2007-2-14
得分:0 
china ! i think

2007-09-17 08:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-170250-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.170971 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved