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

Re:请教高手,我的程序还要怎么改进才可以?为什么总是超过时间限制

Posted by chygr at 2007-09-27 22:35:02 on Problem 1002
In Reply To:Re:请教高手,我的程序还要怎么改进才可以?为什么总是超过时间限制 Posted by:ivan5610 at 2007-09-27 16:59:07
谢谢提醒
我现在改了试试

> 尽量不用vecotr,对此题可用一个100000大小的数组代替。vector的操作比较慢,易超时。另外,用字符数组来接受输入比string要高效,还有就是,用scanf,printf比cin,cout高效,而且printf可以轻松实现此题的输出要求,最后就是把你的deal函数内联进main函数内,可提高速度。 这样应该可以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