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 |
用DP吧int i,j; p[0].a1 = 1; p[0].a0 = 0; p[0].a01 = 0; p[0].a10 = 0; p[0].a00 = 0; p[0].a11 = 0; for(i=1;i<1001;i++) { p[i].a1 = p[i-1].a0+p[i-1].a1; p[i].a0 = p[i-1].a0+p[i-1].a1; p[i].a10 = p[i-1].a0+p[i-1].a11; p[i].a01 = p[i-1].a1+p[i-1].a00; p[i].a00 = p[i-1].a01; p[i].a11 = p[i-1].a10; } 算什么都可以 ^_6 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator