F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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++)//?????????§³????
                                                                                                                 ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-30 03:31:33, Gzip enabled