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

bubt大神的代码咋就过得了啊?我用vector建树的就tle无数次,即使扔G++也是。下面是我网上看的为什么超时

Posted by liuyu523115237 at 2011-08-03 14:05:26 on Problem 3159 and last updated at 2011-08-03 14:25:47
In Reply To:汗。。。真的用队列过不了。。。栈才能过。。而且还不是返回tle。。是wa。。。 Posted by:200731000904 at 2009-04-27 18:45:57
队列的初始容量为44那样,当大于这以后就扩大一倍(即使只大1)并把原来的数据全部复制过来。所以当数非常大的话就复制很多次就tle了。所以要在开始时就通过控制参数为他指定一个容量。
如果哪位大侠知道怎么弄就好了,以后 spfa + 各种优化都没用了

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