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:就是: Posted by:rruucc at 2003-08-14 20:05:14 > c[i]=a[i-2^k+1]+……+a[i](k为i在二进制形式下末尾0的个数)。 > c[1]=a[1] > c[2]=a[1]+a[2]=c[1]+a[2] > c[3]=a[3] > c[4]=a[1]+a[2]+a[3]+a[4]=c[2]+c[3]+a[4] > c[5]=a[5] > c[6]=a[5]+a[6]=c[5]+a[6] > 若a[k]所牵动的序列为C[p1],C[p2]……C[pm]。 > 则p1=k,而p(i+1)=pi+2li(li为pi在二进制中末尾0的个数)。 > a[1]……a[k]的和S。 > S=c[k1]+c[k2]+c[k3] + … + c[km] > k(i+1)=ki-2^lki(lki为ki在二进制数中末尾0的个数) > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator