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_28581587_6285.cpp:1:1: error: expected unqualified-id before numeric constant
 5
 ^
0_0_28581587_6285.cpp:3:10: error: 'n' was not declared in this scope
 double v[n];
          ^
0_0_28581587_6285.cpp:4:10: error: 'n' was not declared in this scope
 double m[n][n];
          ^
0_0_28581587_6285.cpp:4:13: error: 'n' was not declared in this scope
 double m[n][n];
             ^
0_0_28581587_6285.cpp:5:7: error: 'n' was not declared in this scope
 int x[n];
       ^
0_0_28581587_6285.cpp: In function 'int main()':
0_0_28581587_6285.cpp:11:8: error: 'cin' was not declared in this scope
  while(cin>>money>>row&&(money||row)){
        ^
0_0_28581587_6285.cpp:13:12: error: 'w' was not declared in this scope
       cin>>w[i]>>v[i];
            ^
0_0_28581587_6285.cpp:13:18: error: 'v' was not declared in this scope
       cin>>w[i]>>v[i];
                  ^
0_0_28581587_6285.cpp:15:8: error: 'm' was not declared in this scope
   fill(m[0],m[0]+n*n,0);
        ^
0_0_28581587_6285.cpp:15:18: error: 'n' was not declared in this scope
   fill(m[0],m[0]+n*n,0);
                  ^
0_0_28581587_6285.cpp:15:23: error: 'fill' was not declared in this scope
   fill(m[0],m[0]+n*n,0);
                       ^
0_0_28581587_6285.cpp:16:8: error: 'x' was not declared in this scope
   fill(x,x+n,1);
        ^
0_0_28581587_6285.cpp:21:10: error: 'w' was not declared in this scope
    if(j>=w[i]){
          ^
0_0_28581587_6285.cpp:22:42: error: 'v' was not declared in this scope
     m[i][j]=max(m[i-1][j],m[i-1][j-w[i]]+v[i]);
                                          ^
0_0_28581587_6285.cpp:22:46: error: 'max' was not declared in this scope
     m[i][j]=max(m[i-1][j],m[i-1][j-w[i]]+v[i]);
                                              ^
0_0_28581587_6285.cpp:32:15: error: 'w' was not declared in this scope
        money-=w[i];//³ö´íµã£¬×¢Òâ 
               ^
0_0_28581587_6285.cpp:37:16: error: 'v' was not declared in this scope
        ans*=(1-v[i]);
                ^
0_0_28581587_6285.cpp:41:25: error: 'printf' was not declared in this scope
   printf("%.1lf\%\n",ans);
                         ^


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-23 01:30:06, Gzip enabled