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_15814478_17017.cpp: In function 'long long int dfs(int, int, int)':
0_0_15814478_17017.cpp:17:20: error: invalid types 'long long int[int]' for array subscript
     if(dp[n][len][k]!=-1) return dp[n][len][k];
                    ^
0_0_15814478_17017.cpp:17:46: error: invalid types 'long long int[int]' for array subscript
     if(dp[n][len][k]!=-1) return dp[n][len][k];
                                              ^
0_0_15814478_17017.cpp:18:24: error: invalid types 'long long int[int]' for array subscript
     return dp[n][len][k]=max(dfs(n-1,len,k),max(dfs(n-1,len-a[n],k)+w[n],dfs(n-1,len-(a[n]+1)/2,k-1)+w[n]));
                        ^
0_0_15814478_17017.cpp: In function 'int main()':
0_0_15814478_17017.cpp:43:35: error: invalid types 'long long int[int]' for array subscript
                         dp[i][j][k]=max(dp[j][k],dp[j-(a[i])/2][k-1]+w[i]);
                                   ^


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-12-04 11:11:44, Gzip enabled