运行 ID: 31091

Main.cc: In function ‘int cal(int, int)’:
Main.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
Main.cc: In function ‘int main()’:
Main.cc:18:14: error: expected unqualified-id before ‘=’ token
     for (int = 1; i <= m; ++ i) for (int j = 1; j <= m; ++ j) dis [i][j] = cal(i, j);
              ^
Main.cc:18:14: error: expected ‘;’ before ‘=’ token
Main.cc:18:14: error: expected primary-expression before ‘=’ token
Main.cc:18:19: error: ‘i’ was not declared in this scope
     for (int = 1; i <= m; ++ i) for (int j = 1; j <= m; ++ j) dis [i][j] = cal(i, j);
                   ^
Main.cc:18:25: error: expected ‘)’ before ‘;’ token
     for (int = 1; i <= m; ++ i) for (int j = 1; j <= m; ++ j) dis [i][j] = cal(i, j);
                         ^
Main.cc:18:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
     for (int = 1; i <= m; ++ i) for (int j = 1; j <= m; ++ j) dis [i][j] = cal(i, j);
     ^~~
Main.cc:18:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
     for (int = 1; i <= m; ++ i) for (int j = 1; j <= m; ++ j) dis [i][j] = cal(i, j);
                           ^~
Main.cc:18:30: error: ‘i’ was not declared in this scope
     for (int = 1; i <= m; ++ i) for (int j = 1; j <= m; ++ j) dis [i][j] = cal(i, j);
                              ^
Main.cc:18:49: error: ‘j’ was not declared in this scope
     for (int = 1; i <= m; ++ i) for (int j = 1; j <= m; ++ j) dis [i][j] = cal(i, j);
                                                 ^
Main.cc:24:64: error: expected ‘)’ before ‘{’ token
                     dp[i][j] = min(dp[i][j], dp[k][j - 1] + dis{k + 1][i]);
                                                                ^
Main.cc:15:15: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf ("%d", &d[i]);
         ~~~~~~^~~~~~~~~~~~~