0_0_38538964_27679.c:8:1: error: unknown type name 'node'
node s[5100];
^
0_0_38538964_27679.c: In function 'main':
0_0_38538964_27679.c:19:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i = 0;i<n;i++)
^
0_0_38538964_27679.c:19:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_38538964_27679.c:20:24: error: request for member 'p' in something not a structure or union
scanf("%d%d%d",&s[i].p,&s[i].q,&s[i].v);
^
0_0_38538964_27679.c:20:32: error: request for member 'q' in something not a structure or union
scanf("%d%d%d",&s[i].p,&s[i].q,&s[i].v);
^
0_0_38538964_27679.c:20:40: error: request for member 'v' in something not a structure or union
scanf("%d%d%d",&s[i].p,&s[i].q,&s[i].v);
^
0_0_38538964_27679.c:21:20: error: 'node' undeclared (first use in this function)
qsort(s,n,sizeof(node),cmp);
^
0_0_38538964_27679.c:21:20: note: each undeclared identifier is reported only once for each function it appears in
0_0_38538964_27679.c:22:11: error: redefinition of 'i'
for(int i = 0;i<n;i++){
^
0_0_38538964_27679.c:19:11: note: previous definition of 'i' was here
for(int i = 0;i<n;i++)
^
0_0_38538964_27679.c:22:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i = 0;i<n;i++){
^
0_0_38538964_27679.c:23:4: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int j = m;j>=s[i].q;j--)
^
0_0_38538964_27679.c:23:25: error: request for member 'q' in something not a structure or union
for(int j = m;j>=s[i].q;j--)
^
0_0_38538964_27679.c:24:30: error: request for member 'p' in something not a structure or union
dp[j] = dp[j]>dp[j - s[i].p]+s[i].v? dp[j]:dp[j-s[i].p]+s[i].v;
^
0_0_38538964_27679.c:24:38: error: request for member 'v' in something not a structure or union
dp[j] = dp[j]>dp[j - s[i].p]+s[i].v? dp[j]:dp[j-s[i].p]+s[i].v;
^
0_0_38538964_27679.c:24:57: error: request for member 'p' in something not a structure or union
dp[j] = dp[j]>dp[j - s[i].p]+s[i].v? dp[j]:dp[j-s[i].p]+s[i].v;
^
0_0_38538964_27679.c:24:65: error: request for member 'v' in something not a structure or union
dp[j] = dp[j]>dp[j - s[i].p]+s[i].v? dp[j]:dp[j-s[i].p]+s[i].v;
^
|