| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2324 人关注过本帖
标题:关于第十八期比赛
只看楼主 加入收藏
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
快速回复:关于第十八期比赛
数据加载中...
 
   



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

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