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 LancerX at 2008-03-11 17:53:56 on Problem 2352
In Reply To:线段树的大小为多大? Posted by:thincal at 2007-09-14 12:34:56
> 谢迪的解题报告中用线段树的F数组,为什么定义为 3 倍的 X ?不是n个叶子节点的总结点数为2n么?
> const int MAXX = 32000;	//最大范围
> int f[(MAXX + 1) * 3]; //f值
我也很纳闷用2倍开数组一直RTE,不断改int f[MAX*2 + n]的那个n值,都不顶用,索性改*3,就过了...

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