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 |
贴原来AC的代码也TLE了原来AC的代码也是挺慢的,1800+ms AC的,可是现在把去年AC的代码又提交了几次 都TLE了,难道是服务器速度比原来慢了?sigh... 我是把字符串转换成为int(没用sprintf,是自己写的转换),用STL中的sort排序,然后再计算次数的,计算次数的部分复杂度是O(n),加上排序的复杂度应该不会超过O(n^2)吧,还是超时了,这点想不明白了... 请教怎么做减少时间,看到好多都是几百ms AC的,想知道做法,请不吝赐教^^ Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator