/* A1 is the last row computed from first half of the table, A2 is the last row computed from second half of the table * maxValue is the max profit possible at cStar */ // place this in main function printf("The number of objects is %d, and the capacity is %d.\n", N, C); if(verbose == 0) printf("Time taken : %lf.\n",time); // place the following in solve_kp function before making recursive calls if(verbose == 1) { printf("The last row of the solution is: \n"); for(i=0;i<=C;i++){ printf(" %5d , %5d",A1[i],A2[i]); if((i%10)==9) printf("\n"); } printf("\n"); for(i=0;i<=C;i++){ printf(" %5d + %5d",A1[i],A2[C-i]); if((i%10)==9) printf("\n"); } printf("\n"); } if(verbose == 2) printf("cstar = %10d, maxValue = %10d\n",cStar,maxValue);