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

无语了,经过几次优化这题居然爬到了第一(暂时的)

Posted by renew at 2006-02-27 15:04:48 on Problem 2762
第一个程序有两个递归过程:Language:GCC,时间差不多是531MS
第二次把两个递归过程合并:Language:GCC,时间有减少了少许500MS
第三次把一个对n==1的情况的特殊处理去掉:Language:GCC,时间又减少了少许487MS
最后再把另一个考虑到的特殊情况处理去掉:因为看到第一版的大牛们都是用C++或PASCAL,所以这次Language:C++,但时间就变成171MS了。

寒。应该是语言的问题吧?
记得以前有程序提交时用C++反而更耗时的

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