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_35238731_11639.cpp: In function 'double binaryKnapsack(int, int*, double*, int)':
0_0_35238731_11639.cpp:8:16: error: 'MaxC' was not declared in this scope
     double Val[MaxC];
                ^
0_0_35238731_11639.cpp:9:12: error: 'Val' was not declared in this scope
     memset(Val, 0, sizeof(Val));
            ^
0_0_35238731_11639.cpp: In function 'int main()':
0_0_35238731_11639.cpp:19:20: error: 'MaxN' was not declared in this scope
     int i, n, C, w[MaxN];
                    ^
0_0_35238731_11639.cpp:25:26: error: 'w' was not declared in this scope
             scanf("%d", &w[i]);
                          ^
0_0_35238731_11639.cpp:27:27: error: 'v' was not declared in this scope
             scanf("%lf", &v[i]);
                           ^
0_0_35238731_11639.cpp:28:33: error: 'w' was not declared in this scope
         ans = binaryKnapsack(n, w, v, C);
                                 ^
0_0_35238731_11639.cpp:28:36: error: 'v' was not declared in this scope
         ans = binaryKnapsack(n, w, v, C);
                                    ^


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-09-29 23:32:22, Gzip enabled