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:lqp18_31 at 2009-08-17 14:19:59 > for( int i=1 ; i<=N ; i++){ > for( int j=0 ; j<(1<<N) ; j++){ > for( int k=0 ; k<(1<<N) ; k++) > if( (no[ j ]^1)==no[ k ] ) > f[ i ][ j ]+=f[ i-1 ][ k ]*p[ j ][ k ]; > f[ i ][ j ]*=f[ i-1 ][ j ]; > } > for( int j=0 ; j<(1<<N) ; j++) no[ j ]>>=1; // here > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator