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_20652148_11478.cpp:9:8: error: 'MAX' was not declared in this scope
 int dp[MAX],sum[MAX],q[MAX];  
        ^
0_0_20652148_11478.cpp:9:17: error: 'MAX' was not declared in this scope
 int dp[MAX],sum[MAX],q[MAX];  
                 ^
0_0_20652148_11478.cpp:9:24: error: 'MAX' was not declared in this scope
 int dp[MAX],sum[MAX],q[MAX];  
                        ^
0_0_20652148_11478.cpp: In function 'int GetY(int, int)':
0_0_20652148_11478.cpp:13:12: error: 'sum' was not declared in this scope
     return sum[i]*sum[i]+dp[i]-(sum[j]*sum[j]+dp[j]);  
            ^
0_0_20652148_11478.cpp:13:26: error: 'dp' was not declared in this scope
     return sum[i]*sum[i]+dp[i]-(sum[j]*sum[j]+dp[j]);  
                          ^
0_0_20652148_11478.cpp: In function 'int GetX(int, int)':
0_0_20652148_11478.cpp:17:15: error: 'sum' was not declared in this scope
     return 2*(sum[i]-sum[j]);  
               ^
0_0_20652148_11478.cpp: In function 'int main()':
0_0_20652148_11478.cpp:25:9: error: 'q' was not declared in this scope
         q[tail++]=0;//这一步必须,因为可能前i个数全部作为一段才是最小值   
         ^
0_0_20652148_11478.cpp:29:13: error: 'sum' was not declared in this scope
             sum[i]=sum[i-1]+x;  
             ^
0_0_20652148_11478.cpp:32:13: error: 'dp' was not declared in this scope
             dp[i]=(sum[i]-sum[q[head]])*(sum[i]-sum[q[head]])+m+dp[q[head]];//计算dp[i]的最小值  
             ^
0_0_20652148_11478.cpp:37:23: error: 'dp' was not declared in this scope
         printf("%d\n",dp[n]);  
                       ^


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-29 12:32:34, Gzip enabled