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_37662432_22685.cpp:2:15: error: expected ']' before ';' token
 #define N 1010;
               ^
0_0_37662432_22685.cpp:4:11: note: in expansion of macro 'N'
 int chess[N],dp[N];
           ^
0_0_37662432_22685.cpp:4:12: error: expected unqualified-id before ']' token
 int chess[N],dp[N];
            ^
0_0_37662432_22685.cpp:4:18: error: expected unqualified-id before ']' token
 int chess[N],dp[N];
                  ^
0_0_37662432_22685.cpp: In function 'int main()':
0_0_37662432_22685.cpp:17:9: error: 'chess' was not declared in this scope
    cin>>chess[i];
         ^
0_0_37662432_22685.cpp:18:4: error: 'dp' was not declared in this scope
    dp[i]=chess[i];
    ^
0_0_37662432_22685.cpp:24:8: error: 'chess' was not declared in this scope
     if(chess[i]>chess[j])
        ^
0_0_37662432_22685.cpp:26:6: error: 'dp' was not declared in this scope
      dp[i]=max(dp[i],dp[j]+chess[i]);
      ^
0_0_37662432_22685.cpp:29:18: error: 'dp' was not declared in this scope
    maxz=max(maxz,dp[i]);
                  ^


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-16 17:59:43, Gzip enabled