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 |
因为x的坐标有可能为0,如果x=0的时候你要将这个点加入的话你会发现出现了死循环In Reply To:Re:用树状数组为什么也超时? Posted by:richardxx at 2007-01-01 14:26:54 > 好神奇哦,为什么全部x+1就不超时呢?? > 请Sempr解释一下好么? while (idx<MAXN){ arr[idx]+=diff; idx += lowBit(idx); // 如果idx=0,那么这个地方idx将永远是0 } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator