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_19224606_28054.cpp: In function 'int main()':
0_0_19224606_28054.cpp:18:75: error: request for member 'h' in 'i', which is of non-class type 'int'
 int sum=0;                dp[i][j]=dp[i-1][j];                for(int h=i.h>
                                                                           ^
0_0_19224606_28054.cpp:19:1: error: expected primary-expression before '=' token
 =1;h--){                    cnt++;                    sum+=a[h];                    if(sum>j) break;                    dp[i][j]=max(dp[i][j],dp[h-1][j-sum]+cnt*cnt);                }            }        }        printf("%d\n",dp[n][m]);    }    return 0;}
 ^
0_0_19224606_28054.cpp:19:7: error: expected ';' before ')' token
 =1;h--){                    cnt++;                    sum+=a[h];                    if(sum>j) break;                    dp[i][j]=max(dp[i][j],dp[h-1][j-sum]+cnt*cnt);                }            }        }        printf("%d\n",dp[n][m]);    }    return 0;}
       ^


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-22 17:16:53, Gzip enabled