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_24675957_17240.cpp: In function 'int main()':
0_0_24675957_17240.cpp:36:24: error: size of array 'dp' has non-integral type 'int*'
         int dp[n+1][w+1];
                        ^
0_0_24675957_17240.cpp:38:31: error: invalid conversion from 'int*' to 'int' [-fpermissive]
         int min_j=f_min(w,w[n]);
                               ^
0_0_24675957_17240.cpp:13:5: note: initializing argument 1 of 'int f_min(int, int)'
 int f_min(int a,int b)
     ^
0_0_24675957_17240.cpp:43:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
         for(int j=min_j;j<=w;j++)
                            ^
0_0_24675957_17240.cpp:49:35: error: invalid conversion from 'int*' to 'int' [-fpermissive]
             int min_j=f_min(w,w[i]);
                                   ^
0_0_24675957_17240.cpp:13:5: note: initializing argument 1 of 'int f_min(int, int)'
 int f_min(int a,int b)
     ^
0_0_24675957_17240.cpp:54:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
             for(int j=min_j;j<=w;j++)
                                ^
0_0_24675957_17240.cpp:65:30: error: invalid types 'int [1][int [(n + 1)]]' for array subscript
         printf("%d\n",dp[1][w]);
                              ^


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 14:34:51, Gzip enabled