#include #define N 100 #define T 200 #define big 10000 int max(int a,int b) { if (a>b) return a; else return b; } main() { int n, p[N],w[N], d[N]; int j,t; int f[N][T]; int x1,x2,x3; int realmaxwt; printf("Enter n, the number of jobs\n"); scanf("%d",&n); printf("\nEnter w,p, d triples (in EDD order)\n"); for (j=1;j<=n;j++) scanf("%d %d %d",&w[j],&p[j],&d[j]); for(t=0;t= 0) x2 = f[j-1][t-p[j]] + w[j]; else x2 = 0; x2 = max(x2, f[j][t-1]); f[j][t] = max(x1,x2); } realmaxwt = 0; for (t=0;t