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_39507817_11622.cpp: In function 'int solve(int, int)':
0_0_39507817_11622.cpp:11:17: error: invalid types 'int[int]' for array subscript
   11 |             if(c[i]>j)  dp[i][j]=dp[i-1][j];
      |                 ^
0_0_39507817_11622.cpp:12:65: error: invalid types 'int[int]' for array subscript
   12 |                         else dp[i][j]=max(dp[i-1][j],dp[i-1][j-c[i]]+w[i])
      |                                                                 ^
0_0_39507817_11622.cpp:16:18: error: 'C' was not declared in this scope
   16 |     return dp[n][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-11-29 18:55:15, Gzip enabled