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;}
^
|