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_17203025_12508.cpp:89:11: error: redefinition of 'const int N'
 const int N=2000+10;
           ^
0_0_17203025_12508.cpp:31:11: note: 'const int N' previously defined here
 const int N=2000+10;
           ^
0_0_17203025_12508.cpp:91:12: error: conflicting declaration 'int dp [2010][2]'
 int dp[N][2];
            ^
0_0_17203025_12508.cpp:33:5: note: previous declaration as 'int dp [2010][2010][2]'
 int dp[N][N][2];
     ^
0_0_17203025_12508.cpp:92:8: error: redefinition of 'int A [2010]'
 int A[N],B[N];
        ^
0_0_17203025_12508.cpp:34:5: note: 'int A [2010]' previously declared here
 int A[N],B[N];
     ^
0_0_17203025_12508.cpp:92:13: error: redefinition of 'int B [2010]'
 int A[N],B[N];
             ^
0_0_17203025_12508.cpp:34:10: note: 'int B [2010]' previously declared here
 int A[N],B[N];
          ^
0_0_17203025_12508.cpp:93:8: error: redefinition of 'int w [2010]'
 int w[N];
        ^
0_0_17203025_12508.cpp:35:5: note: 'int w [2010]' previously declared here
 int w[N];
     ^
0_0_17203025_12508.cpp: In function 'int main()':
0_0_17203025_12508.cpp:95:5: error: redefinition of 'int main()'
 int main()
     ^
0_0_17203025_12508.cpp:37:5: note: 'int main()' previously defined here
 int main()
     ^
0_0_17203025_12508.cpp:108:25: error: invalid array assignment
                 dp[j][0]=max(dp[j][0],dp[j][1]);
                         ^
0_0_17203025_12508.cpp:110:25: error: incompatible types in assignment of 'int* const' to 'int [2]'
                 dp[j][1]=max(dp[j-w[i]][0]+A[i]+B[i],dp[j-w[i]][1]+A[i]);
                         ^
0_0_17203025_12508.cpp:112:38: error: invalid conversion from 'const int*' to 'int' [-fpermissive]
         int ans=max(dp[M][0],dp[M][1]);
                                      ^


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-17 07:42:45, Gzip enabled