摘要:
f(i,j) = max{f(i-1,j-Wi)+Vi, f(i-1,j)} (j>=Wi) 阅读全文
摘要:
int[] arr = data[];int[] fInc = new int[n];fInc[0] = 1;for(int i = 1; i < n; i++){ fInc[i] = 1; for(int j = 0; j < i; j++){ if(arr[i] > arr[j] && fInc 阅读全文