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_20652505_20142.cpp: In function 'int GetY(int, int)':
0_0_20652505_20142.cpp:2:12: error: 'sum' was not declared in this scope
     return sum[i]*sum[i]+dp[i]-(sum[j]*sum[j]+dp[j]);  
            ^
0_0_20652505_20142.cpp:2:26: error: 'dp' was not declared in this scope
     return sum[i]*sum[i]+dp[i]-(sum[j]*sum[j]+dp[j]);  
                          ^
0_0_20652505_20142.cpp: In function 'int GetX(int, int)':
0_0_20652505_20142.cpp:6:15: error: 'sum' was not declared in this scope
     return 2*(sum[i]-sum[j]);  
               ^
0_0_20652505_20142.cpp: In function 'int main()':
0_0_20652505_20142.cpp:11:26: error: 'n' was not declared in this scope
     while(~scanf("%d%d",&n,&m)){  
                          ^
0_0_20652505_20142.cpp:11:29: error: 'm' was not declared in this scope
     while(~scanf("%d%d",&n,&m)){  
                             ^
0_0_20652505_20142.cpp:11:30: error: 'scanf' was not declared in this scope
     while(~scanf("%d%d",&n,&m)){  
                              ^
0_0_20652505_20142.cpp:13:9: error: 'q' was not declared in this scope
         q[tail++]=0;//这一步必须,因为可能前i个数全部作为一段才是最小值   
         ^
0_0_20652505_20142.cpp:16:13: error: 'sum' was not declared in this scope
             sum[i]=sum[i-1]+x;  
             ^
0_0_20652505_20142.cpp:18: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_20652505_20142.cpp:22:23: error: 'dp' was not declared in this scope
         printf("%d\n",dp[n]);  
                       ^
0_0_20652505_20142.cpp:22:28: error: 'printf' 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-21 01:32:06, Gzip enabled