Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

右移的小技巧,我是菜……

Posted by lqp18_31 at 2009-08-17 14:19:59 on Problem 3071 and last updated at 2009-08-17 14:21:54
              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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator