0_0_32468834_19720.cpp:4:1: error: expected unqualified-id before 'int'
int a[100005],dp[100005];
^
0_0_32468834_19720.cpp: In function 'int main()':
0_0_32468834_19720.cpp:11:43: error: 'a' was not declared in this scope
for(int i=0;i<n;++i) {scanf("%d",&a[i]);dp[i]=a[i];}
^
0_0_32468834_19720.cpp:11:49: error: 'dp' was not declared in this scope
for(int i=0;i<n;++i) {scanf("%d",&a[i]);dp[i]=a[i];}
^
0_0_32468834_19720.cpp:13:7: error: 'dp' was not declared in this scope
if(dp[i-1]>=0) dp[i]=a[i]+dp[i-1];
^
0_0_32468834_19720.cpp:13:25: error: 'a' was not declared in this scope
if(dp[i-1]>=0) dp[i]=a[i]+dp[i-1];
^
0_0_32468834_19720.cpp:16:7: error: 'dp' was not declared in this scope
if(dp[i]>max_n) {max_n=dp[i];k=i;}
^
0_0_32468834_19720.cpp:18:13: error: 'dp' was not declared in this scope
if(dp[i]<0) {tmp=i+1;break;}
^
|