0_0_28807129_10393.cpp: In function 'int main()':
0_0_28807129_10393.cpp:43:31: error: 'ans' was not declared in this scope
if(a[j]<a[i]) ans=max(ans,dp[j]);
^
0_0_28807129_10393.cpp:44:24: error: 'ans' was not declared in this scope
dp[i]=a[i]+ans;
^
|