Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

贴原来AC的代码也TLE了

Posted by wyq at 2008-04-04 20:48:11 on Problem 1002 and last updated at 2008-04-04 20:51:53
原来AC的代码也是挺慢的,1800+ms AC的,可是现在把去年AC的代码又提交了几次 都TLE了,难道是服务器速度比原来慢了?sigh...

我是把字符串转换成为int(没用sprintf,是自己写的转换),用STL中的sort排序,然后再计算次数的,计算次数的部分复杂度是O(n),加上排序的复杂度应该不会超过O(n^2)吧,还是超时了,这点想不明白了...

请教怎么做减少时间,看到好多都是几百ms AC的,想知道做法,请不吝赐教^^

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator