0_0_23208495_2424.cpp:5:203: error: stray '#' in program
if(s[i].sw<=W&&K>0) { su=s[i].sa; DFS(i,s[i].sa,s[i].sw,1); if(su>sum) sum=su; } printf("%d\n",sum); } } #include<stdio.h>
^
0_0_23208495_2424.cpp:2:12: error: 'su' does not name a type
su=suma; if(k==K)//??????????????K??
^
0_0_23208495_2424.cpp:2:26: error: expected unqualified-id before 'if'
su=suma; if(k==K)//??????????????K??
^
0_0_23208495_2424.cpp:3:22: error: expected unqualified-id before 'for'
return ; for(j=i+1;j<=N;j++) if(s[j].sw+w<=W&&k+1<=K) DFS(j,s[j].sa+suma,s[j].sw+w,k+1); } int main() { int t,i,j,e,sum; scanf("%d",&t); while(t--) { scanf("%d%d",&N,&K); for(i=1;i<=N;i++) scanf("%d%d",&s[i].sa,&s[i].sw); scanf("%d",&W); for(i=1;i<=N;i++)//?????????§³????
^
0_0_23208495_2424.cpp:3:32: error: 'j' does not name a type
return ; for(j=i+1;j<=N;j++) if(s[j].sw+w<=W&&k+1<=K) DFS(j,s[j].sa+suma,s[j].sw+w,k+1); } int main() { int t,i,j,e,sum; scanf("%d",&t); while(t--) { scanf("%d%d",&N,&K); for(i=1;i<=N;i++) scanf("%d%d",&s[i].sa,&s[i].sw); scanf("%d",&W); for(i=1;i<=N;i++)//?????????§³????
^
0_0_23208495_2424.cpp:3:37: error: 'j' does not name a type
return ; for(j=i+1;j<=N;j++) if(s[j].sw+w<=W&&k+1<=K) DFS(j,s[j].sa+suma,s[j].sw+w,k+1); } int main() { int t,i,j,e,sum; scanf("%d",&t); while(t--) { scanf("%d%d",&N,&K); for(i=1;i<=N;i++) scanf("%d%d",&s[i].sa,&s[i].sw); scanf("%d",&W); for(i=1;i<=N;i++)//?????????§³????
^
0_0_23208495_2424.cpp:3:113: error: expected declaration before '}' token
return ; for(j=i+1;j<=N;j++) if(s[j].sw+w<=W&&k+1<=K) DFS(j,s[j].sa+suma,s[j].sw+w,k+1); } int main() { int t,i,j,e,sum; scanf("%d",&t); while(t--) { scanf("%d%d",&N,&K); for(i=1;i<=N;i++) scanf("%d%d",&s[i].sa,&s[i].sw); scanf("%d",&W); for(i=1;i<=N;i++)//?????????§³????
^
|