Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:线段树的大小为多大?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator