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]);
^
|