摘要:
经典的信封装信问题f[ n ] = ( n-1 ) * ( f[ n-1 ]+f[ n-2 ] ) 1 #include 2 #include 3 #include 4 typedef long long int64; 5 const int maxn = 22; 6 int64 a[ maxn ]; 7 8 void init(){ 9 a[ 0 ] = a[ 1 ] = 0;10 a[ 2 ] = 1;11 for( int i=3;i<=20;i++ ){12 a[ i ] = ( i-1 )*(a[ i-2 ] + a[ i-1 ]);13 ... 阅读全文