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 |
发现写错了= =。。。In Reply To:2维树状数组居然TLE了。。。求解啊。 Posted by:Mrw at 2010-09-25 16:02:24 inline int get_sum( int x, int y ) { int sum = 0; for( int i = x ; i != 0; i -= lowbit(i)) //这里原来写成了x for( int j = y ; j != 0; j -= lowbit(j)) //这里原来写成了y sum += tre[i][j]; return sum; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator