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


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-11-17 03:51:03, Gzip enabled