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_24174189_15592.cpp:8:8: error: 'N' was not declared in this scope
 int dp[N][N]; /// dp[i][j] 表示高度为i到高度为i的纸牌叠加到一起,所需要的最少距离和
        ^
0_0_24174189_15592.cpp:8:11: error: 'N' was not declared in this scope
 int dp[N][N]; /// dp[i][j] 表示高度为i到高度为i的纸牌叠加到一起,所需要的最少距离和
           ^
0_0_24174189_15592.cpp:9:9: error: 'N' was not declared in this scope
 int pos[N];
         ^
0_0_24174189_15592.cpp: In function 'int main()':
0_0_24174189_15592.cpp:17:13: error: 'pos' was not declared in this scope
             pos[x] = i; ///预处理出每个数的位置
             ^
0_0_24174189_15592.cpp:19:32: error: 'dp' was not declared in this scope
         for(int i=1;i<=10;i++) dp[i][i] = 0;
                                ^
0_0_24174189_15592.cpp:23:17: error: 'dp' was not declared in this scope
                 dp[i][j] = INF;
                 ^
0_0_24174189_15592.cpp:23:28: error: 'INF' was not declared in this scope
                 dp[i][j] = INF;
                            ^
0_0_24174189_15592.cpp:25:69: error: 'pos' was not declared in this scope
                     dp[i][j] = min(dp[i][j],dp[i][k]+dp[k+1][j]+abs(pos[j]-pos[k]));
                                                                     ^
0_0_24174189_15592.cpp:29:23: error: 'dp' was not declared in this scope
         printf("%d\n",dp[1][10]);
                       ^


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-07-07 06:18:29, Gzip enabled