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:lshguang89 at 2007-11-09 16:45:22 > n=2*m 时 结果为 (2^(n-1)-2)/3 +1 > n=2*m+1时 结果为 (2^(n-1)-1) /3 可以这样吗? 用f[n][0]表示n中00的对数,用f[n][1]表示n中1的个数 当n=0时,f[n][0] = 0, f[n][1] = 1; 当n=1时, f[n][0] = 0, f[n][1] = 1; 当n>=2时,f[n][0] = f[n-2][0]+f[n-2][1]; f[n][1] = 2 * f[n][1]; 则f[n][0]为所求解。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator