摘要:#include #include using namespace std; int compare_ints( const void* a, const void* b ) { int* arg1 = (int*) a; int* arg2 = (int*) b; if( *arg1 < *arg2 ) return -1; else if( *ar...
阅读全文
摘要:#include #include using namespace std; const int MAX_SIZE = 100; int b[MAX_SIZE];// Type *b = new Type[right-left+1]; template void Merge(Type c[], Type d[], int left, int mid, int right) {//c[] l...
阅读全文
摘要:#include #include using namespace std; int N,M; //Pemute-------------------- void Perm( int x[], int n, int k ) { int i; if ( k == n-1 ) { for ( i=0; i=m; k-- ) { x[m] = k+1; if(m==0) ...
阅读全文